diff --git a/02-spatial-data.md b/02-spatial-data.md index 2084bd4..eeea030 100644 --- a/02-spatial-data.md +++ b/02-spatial-data.md @@ -174,7 +174,7 @@ cat(crs(nlcd)) # CRS #> LENGTHUNIT["metre",1]], #> USAGE[ #> SCOPE["Engineering survey, topographic mapping."], -#> AREA["North America - between 114°W and 108°W - onshore and offshore. Canada - Alberta; Northwest Territories; Nunavut; Saskatchewan. United States (USA) - Arizona; Colorado; Idaho; Montana; New Mexico; Utah; Wyoming."], +#> AREA["North America - between 114W and 108W - onshore and offshore. Canada - Alberta; Northwest Territories; Nunavut; Saskatchewan. United States (USA) - Arizona; Colorado; Idaho; Montana; New Mexico; Utah; Wyoming."], #> BBOX[31.33,-114,84,-108]], #> ID["EPSG",26912]] ``` @@ -219,7 +219,7 @@ cat(crs(nlcd)) #> LENGTHUNIT["metre",1]], #> USAGE[ #> SCOPE["Engineering survey, topographic mapping."], -#> AREA["North America - between 114°W and 108°W - onshore and offshore. Canada - Alberta; Northwest Territories; Nunavut; Saskatchewan. United States (USA) - Arizona; Colorado; Idaho; Montana; New Mexico; Utah; Wyoming."], +#> AREA["North America - between 114W and 108W - onshore and offshore. Canada - Alberta; Northwest Territories; Nunavut; Saskatchewan. United States (USA) - Arizona; Colorado; Idaho; Montana; New Mexico; Utah; Wyoming."], #> BBOX[31.33,-114,84,-108]], #> ID["EPSG",26912]] ``` diff --git a/03-attribute-operations.md b/03-attribute-operations.md index 0e1d8ba..980964c 100644 --- a/03-attribute-operations.md +++ b/03-attribute-operations.md @@ -282,13 +282,13 @@ us_states |> #> Dimension: XY #> Bounding box: xmin: -125 ymin: 24.6 xmax: -67 ymax: 49.4 #> Geodetic CRS: NAD83 -#> # A tibble: 4 × 3 +#> # A tibble: 4 x 3 #> REGION nr_of_states geometry -#> -#> 1 Norteast 9 (((-70.8 42.9, -70.7 43.1, -70.6 43.1, -70.5 43.3, -70.… -#> 2 Midwest 12 (((-85.5 45.6, -85.5 45.8, -85.6 45.8, -85.6 45.6, -85.… -#> 3 South 17 (((-81.4 30.7, -81.4 30.8, -81.4 30.9, -81.4 31, -81.3 … -#> 4 West 11 (((-118 33.4, -118 33.3, -118 33.3, -118 33.4, -119 33.… +#> +#> 1 Norteast 9 (((-70.8 42.9, -70.7 43.1, -70.6 43.1, -70.5 43.3, -70.~ +#> 2 Midwest 12 (((-85.5 45.6, -85.5 45.8, -85.6 45.8, -85.6 45.6, -85.~ +#> 3 South 17 (((-81.4 30.7, -81.4 30.8, -81.4 30.9, -81.4 31, -81.3 ~ +#> 4 West 11 (((-118 33.4, -118 33.3, -118 33.3, -118 33.4, -119 33.~ ``` E6. What was the minimum and maximum total population in 2015 in each region? @@ -305,13 +305,13 @@ us_states |> #> Dimension: XY #> Bounding box: xmin: -125 ymin: 24.6 xmax: -67 ymax: 49.4 #> Geodetic CRS: NAD83 -#> # A tibble: 4 × 5 +#> # A tibble: 4 x 5 #> REGION min_pop max_pop tot_pop geometry -#> -#> 1 Norteast 626604 19673174 55989520 (((-70.8 42.9, -70.7 43.1, -70.6 43.1, -7… -#> 2 Midwest 721640 12873761 67546398 (((-85.5 45.6, -85.5 45.8, -85.6 45.8, -8… -#> 3 South 647484 26538614 118575377 (((-81.4 30.7, -81.4 30.8, -81.4 30.9, -8… -#> 4 West 579679 38421464 72264052 (((-118 33.4, -118 33.3, -118 33.3, -118 … +#> +#> 1 Norteast 626604 19673174 55989520 (((-70.8 42.9, -70.7 43.1, -70.6 43.1, -7~ +#> 2 Midwest 721640 12873761 67546398 (((-85.5 45.6, -85.5 45.8, -85.6 45.8, -8~ +#> 3 South 647484 26538614 118575377 (((-81.4 30.7, -81.4 30.8, -81.4 30.9, -8~ +#> 4 West 579679 38421464 72264052 (((-118 33.4, -118 33.3, -118 33.3, -118 ~ ``` E7. Add variables from `us_states_df` to `us_states`, and create a new object called `us_states_stats`. @@ -332,7 +332,7 @@ How can you find them? (hint: try to use the `dplyr::anti_join()` function) ```r us_states_df |> anti_join(st_drop_geometry(us_states), by = c("state" = "NAME")) -#> # A tibble: 2 × 5 +#> # A tibble: 2 x 5 #> state median_income_10 median_income_15 poverty_level_10 poverty_level_15 #> #> 1 Alaska 29509 31455 64245 72957 diff --git a/08-read-write-plot.md b/08-read-write-plot.md index 5e9c008..8db9da0 100644 --- a/08-read-write-plot.md +++ b/08-read-write-plot.md @@ -33,7 +33,7 @@ read_sf #> st_read(..., quiet = quiet, stringsAsFactors = stringsAsFactors, #> as_tibble = as_tibble) #> } -#> +#> #> nc = st_read(system.file("shape/nc.shp", package="sf")) #> Reading layer `nc' from data source diff --git a/09-mapping.md b/09-mapping.md index edfe053..b5b7c52 100644 --- a/09-mapping.md +++ b/09-mapping.md @@ -45,7 +45,7 @@ plot(africa["HDI"]) # tmap remotes::install_github("r-tmap/tmap") #> Using github PAT from envvar GITHUB_PAT. Use `gitcreds::gitcreds_set()` and unset GITHUB_PAT in .Renviron (or elsewhere) if you want to use the more secure git credential store instead. -#> Skipping install of 'tmap' from a github remote, the SHA1 (6162aa32) has not changed since last install. +#> Skipping install of 'tmap' from a github remote, the SHA1 (4f7d5ae3) has not changed since last install. #> Use `force = TRUE` to force installation library(tmap) #> @@ -79,7 +79,7 @@ ggplotly(g) ```{=html}
- + # mapsf library(mapsf) mf_map(x = africa, var = "HDI", type = "choro") diff --git a/09-mapping_files/figure-html/unnamed-chunk-9-1.png b/09-mapping_files/figure-html/unnamed-chunk-9-1.png index e279b37..de74bec 100644 Binary files a/09-mapping_files/figure-html/unnamed-chunk-9-1.png and b/09-mapping_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/09-mapping_files/figure-html/unnamed-chunk-9-2.png b/09-mapping_files/figure-html/unnamed-chunk-9-2.png index a040a99..4f5f9cb 100644 Binary files a/09-mapping_files/figure-html/unnamed-chunk-9-2.png and b/09-mapping_files/figure-html/unnamed-chunk-9-2.png differ diff --git a/10-gis.md b/10-gis.md index 7481f61..5e73c64 100644 --- a/10-gis.md +++ b/10-gis.md @@ -181,7 +181,7 @@ plot(st_geometry(ca_highways)) ``` -E8. The `ndvi.tif` raster (`system.file("raster/ndvi.tif", package = "spDataLarge")`) contains NDVI calculated for the Mongón study area based on Landsat data from September 22nd, 2000. +E8. The `ndvi.tif` raster (`system.file("raster/ndvi.tif", package = "spDataLarge")`) contains NDVI calculated for the Mongn study area based on Landsat data from September 22nd, 2000. Use **rstac**, **gdalcubes**, and **terra** to download Sentinel-2 images for the same area from 2020-08-01 to 2020-10-31, calculate its NDVI, and then compare it with the results from `ndvi.tif`. diff --git a/14-location.md b/14-location.md index c519973..afd5e47 100644 --- a/14-location.md +++ b/14-location.md @@ -121,8 +121,8 @@ names(reclass) = names(input_ras) #************************************ metro_names = dplyr::pull(metro_names, city) |> as.character() |> - {\(x) ifelse(x == "Velbert", "Düsseldorf", x)}() |> - {\(x) gsub("ü", "ue", x)}() + {\(x) ifelse(x == "Velbert", "Dsseldorf", x)}() |> + {\(x) gsub("", "ue", x)}() pop_agg = terra::aggregate(reclass$pop, fact = 20, fun = sum, na.rm = TRUE) pop_agg = pop_agg[pop_agg > 500000, drop = FALSE] diff --git a/404.html b/404.html index b8ae695..c6a19a0 100644 --- a/404.html +++ b/404.html @@ -77,7 +77,7 @@

## Warning: The 'main.title' argument of 'tm_layout()' is deprecated as of tmap
 ## 4.0. Please use 'tm_title()' instead.
-
+
@@ -99,7 +99,7 @@

Note: Second Edition is under construction 🏗