Closed swimmer008 closed 2 months ago
I don't see a problem, can you please try again? Maybe it was a temporary issue on the server side (we saw many of this in the past, see https://github.com/rOpenGov/giscoR/issues?q=label%3Anot-downloading):
library(giscoR)
nuts0.sf_2010 <- gisco_get_nuts(
year = 2010,
epsg = "4326",
cache = TRUE,
update_cache = TRUE,
cache_dir = tempdir(), # For the reprex to avoid caching
verbose = TRUE,
resolution = "01",
spatialtype = "RG",
country = NULL,
nuts_id = NULL,
nuts_level = "0"
)
#>
#> Cache dir is C:\Users\xxxxxx\AppData\Local\Temp\RtmpoXmnZj
#> Downloading from https://gisco-services.ec.europa.eu/distribution/v2/nuts/geojson/NUTS_RG_01M_2010_4326_LEVL_0.geojson
#> Retry query
#> Download succesful on
#>
#> C:\Users\xxxxxx\AppData\Local\Temp\RtmpoXmnZj/NUTS_RG_01M_2010_4326_LEVL_0.geojson
#> Reading from local file C:\Users\xxxxxx\AppData\Local\Temp\RtmpoXmnZj/NUTS_RG_01M_2010_4326_LEVL_0.geojson
#> 9.8 Mb
#> File loaded
#> Encoding characters
head(nuts0.sf_2010)
#> Simple feature collection with 6 features and 7 fields
#> Geometry type: MULTIPOLYGON
#> Dimension: XY
#> Bounding box: xmin: 2.546011 ymin: 34.56271 xmax: 34.58717 ymax: 51.50516
#> Geodetic CRS: WGS 84
#> FID NAME_LATN CNTR_CODE
#> 1 AT Österreich AT
#> 2 BE Belgique-België BE
#> 3 BG Balgarija BG
#> 4 CH Schweiz/Suisse/Svizzera CH
#> 5 CY Kýpros CY
#> 6 CZ Ceská republika CZ
#> NUTS_NAME LEVL_CODE
#> 1 Österreich 0
#> 2 Belgique-België 0
#> 3 <U+0411><U+044A><U+043B><U+0433><U+0430><U+0440><U+0438><U+044F> 0
#> 4 Schweiz/Suisse/Svizzera 0
#> 5 <U+039A><U+03CD>p<U+03C1><U+03BF><U+03C2> 0
#> 6 Ceská republika 0
#> NUTS_ID geo geometry
#> 1 AT AT MULTIPOLYGON (((10.45723 47...
#> 2 BE BE MULTIPOLYGON (((5.104323 51...
#> 3 BG BG MULTIPOLYGON (((22.67516 44...
#> 4 CH CH MULTIPOLYGON (((8.601358 47...
#> 5 CY CY MULTIPOLYGON (((34.57313 35...
#> 6 CZ CZ MULTIPOLYGON (((14.49423 51...
nuts0.sf_2013 <- gisco_get_nuts(
year = 2013,
epsg = "4326",
cache = TRUE,
update_cache = TRUE,
cache_dir = tempdir(), # For the reprex to avoid caching
verbose = TRUE,
resolution = "01",
spatialtype = "RG",
country = NULL,
nuts_id = NULL,
nuts_level = "0"
)
#>
#> Cache dir is C:\Users\xxxxxx\AppData\Local\Temp\RtmpoXmnZj
#> Downloading from https://gisco-services.ec.europa.eu/distribution/v2/nuts/geojson/NUTS_RG_01M_2013_4326_LEVL_0.geojson
#> Download succesful on
#>
#> C:\Users\xxxxxx\AppData\Local\Temp\RtmpoXmnZj/NUTS_RG_01M_2013_4326_LEVL_0.geojson
#> Reading from local file C:\Users\xxxxxx\AppData\Local\Temp\RtmpoXmnZj/NUTS_RG_01M_2013_4326_LEVL_0.geojson
#> 3.9 Mb
#> File loaded
#> Encoding characters
head(nuts0.sf_2013)
#> Simple feature collection with 6 features and 7 fields
#> Geometry type: MULTIPOLYGON
#> Dimension: XY
#> Bounding box: xmin: 2.546011 ymin: 34.5634 xmax: 34.58835 ymax: 51.50405
#> Geodetic CRS: WGS 84
#> FID NAME_LATN CNTR_CODE
#> 1 AT ÖSTERREICH AT
#> 2 BE BELGIQUE-BELGIË BE
#> 3 BG BULGARIA BG
#> 4 CY KÝPROS CY
#> 5 CZ CESKÁ REPUBLIKA CZ
#> 6 CH SCHWEIZ/SUISSE/SVIZZERA CH
#> NUTS_NAME NUTS_ID
#> 1 ÖSTERREICH AT
#> 2 BELGIQUE-BELGIË BE
#> 3 <U+0411><U+042A><U+041B><U+0413><U+0410><U+0420><U+0418><U+042F> BG
#> 4 <U+039A><U+03A5><U+03A0><U+03A1><U+039F>S CY
#> 5 CESKÁ REPUBLIKA CZ
#> 6 SCHWEIZ/SUISSE/SVIZZERA CH
#> LEVL_CODE geo geometry
#> 1 0 AT MULTIPOLYGON (((15.51186 48...
#> 2 0 BE MULTIPOLYGON (((5.104323 51...
#> 3 0 BG MULTIPOLYGON (((22.92548 44...
#> 4 0 CY MULTIPOLYGON (((34.58835 35...
#> 5 0 CZ MULTIPOLYGON (((14.49423 51...
#> 6 0 CH MULTIPOLYGON (((8.601358 47...
nuts0.sf_2016 <- gisco_get_nuts(
year = 2016,
epsg = "4326",
cache = TRUE,
update_cache = TRUE,
cache_dir = tempdir(), # For the reprex to avoid caching
verbose = TRUE,
resolution = "01",
spatialtype = "RG",
country = NULL,
nuts_id = NULL,
nuts_level = "0"
)
#>
#> Cache dir is C:\Users\xxxxxx\AppData\Local\Temp\RtmpoXmnZj
#> Downloading from https://gisco-services.ec.europa.eu/distribution/v2/nuts/geojson/NUTS_RG_01M_2016_4326_LEVL_0.geojson
#> Download succesful on
#>
#> C:\Users\xxxxxx\AppData\Local\Temp\RtmpoXmnZj/NUTS_RG_01M_2016_4326_LEVL_0.geojson
#> Reading from local file C:\Users\xxxxxx\AppData\Local\Temp\RtmpoXmnZj/NUTS_RG_01M_2016_4326_LEVL_0.geojson
#> 6.3 Mb
#> File loaded
#> Encoding characters
head(nuts0.sf_2016)
#> Simple feature collection with 6 features and 10 fields
#> Geometry type: MULTIPOLYGON
#> Dimension: XY
#> Bounding box: xmin: 5.867697 ymin: 34.56369 xmax: 34.60609 ymax: 57.75166
#> Geodetic CRS: WGS 84
#> MOUNT_TYPE NAME_LATN CNTR_CODE
#> 1 0 SHQIPËRIA AL
#> 2 0 CESKÁ REPUBLIKA CZ
#> 3 0 DEUTSCHLAND DE
#> 4 0 DANMARK DK
#> 5 0 KYPROS CY
#> 6 0 ÖSTERREICH AT
#> NUTS_NAME LEVL_CODE NUTS_ID URBN_TYPE
#> 1 SHQIPËRIA 0 AL 0
#> 2 CESKÁ REPUBLIKA 0 CZ 0
#> 3 DEUTSCHLAND 0 DE 0
#> 4 DANMARK 0 DK 0
#> 5 <U+039A><U+03A5><U+03A0><U+03A1><U+039F>S 0 CY 0
#> 6 ÖSTERREICH 0 AT 0
#> COAST_TYPE FID geo geometry
#> 1 0 AL AL MULTIPOLYGON (((19.80816 42...
#> 2 0 CZ CZ MULTIPOLYGON (((14.49396 51...
#> 3 0 DE DE MULTIPOLYGON (((10.4732 47....
#> 4 0 DK DK MULTIPOLYGON (((15.1913 55....
#> 5 0 CY CY MULTIPOLYGON (((34.60297 35...
#> 6 0 AT AT MULTIPOLYGON (((10.43954 47...
Created on 2024-06-19 with reprex v2.1.0
Thank you, it has been temporary indeed. I am sorry I have not seen the previous posts about the problem. Thanks again for your quick response!
The script below returns an error message when the year is 2010, 2013, or 2016. For the remaining years (2003, 2006, 2021), everything works fine. The error is:
The script is: