-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to download single country data if spatialtype is specified #75
Comments
Hi, Yes, thta's expected since the Long explanationThere is a variable in that dataset named library(giscoR)
library(sf)
#> Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1; sf_use_s2() is TRUE
library(tidyverse)
khm01 <- gisco_get_countries(resolution = "01", country = "KHM", spatialtype = "INLAND", cache_dir = "downloads/gisco")
plot(st_geometry(khm01)) This is where you are at this moment. See the variables of the dataset. glimpse(khm01)
#> Rows: 540
#> Columns: 11
#> $ EU_FLAG <chr> "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F…
#> $ OTHR_FLAG <chr> "T", "T", "T", "T", "T", "T", "T", "T", "T", "T", "T", "T…
#> $ COAS_FLAG <chr> "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F…
#> $ FID <dbl> 2279, 6149, 6175, 6902, 6435, 6911, 6914, 6307, 6555, 505…
#> $ EFTA_FLAG <chr> "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F…
#> $ CC_FLAG <chr> "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F", "F…
#> $ CNTR_BN_ID <dbl> 2279, 6149, 6175, 6902, 6435, 6911, 6914, 6307, 6555, 505…
#> $ POL_STAT <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, …
#> $ CNTR_BN_CODE <dbl> 2279, 6149, 6175, 6902, 6435, 6911, 6914, 6307, 6555, 505…
#> $ CNTR_CODE <chr> "CL", "SZ", "BO", "ZA", "PY", "NA", "PY", "ZA", "ZA", "BR…
#> $ geometry <LINESTRING [°]> LINESTRING (-68.60748 -54.8..., LINESTRING (32…
One may think that filtering by
Note that the borders seems to be right, however # Final inland of Cambodia
inland_KHM <- inlands %>%
filter(CNTR_BN_ID != 21207)
ggplot(inland_KHM) +
geom_sf(aes(color = as_factor(CNTR_BN_ID))) Created on 2024-01-04 with reprex v2.0.2 |
See also #50 , very similar issue with another dataset |
Entire dataset downloads if any spatialtype is specified.
E.g.,
R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 LTS
giscoR_0.4.0
The text was updated successfully, but these errors were encountered: