Skip to content
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

Some geojson are not reachable #69

Closed
dominicroye opened this issue Oct 19, 2023 · 8 comments
Closed

Some geojson are not reachable #69

dominicroye opened this issue Oct 19, 2023 · 8 comments
Labels
not-downloading Data is not downloaded from the server

Comments

@dominicroye
Copy link

It seems that some geojson are not reachables, but it can be opened in a browser.

provs <- gisco_get_nuts(
  country= "Spain",
  epsg = "4326",
  resolution = '03',
  nuts_level= "3"
)

url 
  https://gisco-services.ec.europa.eu/distribution/v2/nuts/geojson/NUTS_RG_03M_2016_4326_LEVL_3.geojson  not reachable.

Please download manually.  If you think this is a bug please consider opening an issue on  https://github.com/ropengov/giscoR/issues
Returning `NULL`
@trifick
Copy link

trifick commented Oct 23, 2023

Hi,
I'm having the same issue with multiple geojson urls.
e.g.

africa_map <- gisco_get_countries(
    year = "2020",
    epsg = "4326",
    resolution = "3",
    region = "Africa", cache = TRUE, #update_cache = TRUE
  )

url 
  https://gisco-services.ec.europa.eu/distribution/v2/countries/geojson/CNTR_RG_03M_2020_4326.geojson  not reachable.

Please download manually.  If you think this is a bug please consider opening an issue on  https://github.com/ropengov/giscoR/issues
Returning `NULL`

@dominicroye
Copy link
Author

My solution so far would be the following:

url <- "https://gisco-services.ec.europa.eu/distribution/v2/nuts/geojson/NUTS_RG_03M_2016_4326_LEVL_3.geojson"

option(timeout = 1000)

limit <- sf::st_read(httr::GET(url))

@dieghernan
Copy link
Member

I would have a look today, in the past I saw similiar issues due to changes on GISCO API see #57

Ping @hannesaddec (GISCO)

@Deleetdk
Copy link

Deleetdk commented Oct 27, 2023

Also the case for world map. This code used to work:

> # fine line in WGS84
> world <- gisco_get_countries(resolution = "10",
+                             epsg = 4326)

url 
  https://gisco-services.ec.europa.eu/distribution/v2/countries/geojson/CNTR_RG_10M_2016_4326.geojson  not reachable.

Please download manually.  If you think this is a bug please consider opening an issue on  https://github.com/ropengov/giscoR/issues
Returning `NULL`
> world
NULL

Following @dominicroye , this seems to be the manual approach:

world = sf::st_read(httr::GET("https://gisco-services.ec.europa.eu/distribution/v2/countries/geojson/CNTR_RG_10M_2020_4326.geojson"))

@dieghernan
Copy link
Member

dieghernan commented Oct 27, 2023

Thanks all for reporting, this should be fixed now after #70

Can you try with the dev version?

remotes::install_github("rOpenGov/giscoR")

world  <- gisco_get_countries(resolution = "10", epsg = 4326)

@hannesaddec
Copy link

Looking into it.. should be fixed now

I would have a look today, in the past I saw similiar issues due to changes on GISCO API see #57

Ping @hannesaddec (GISCO)

@trifick
Copy link

trifick commented Oct 30, 2023

Hi,
Working for me now thanks.

@dieghernan
Copy link
Member

Thanks @hannesaddec @trifick

Note that there is a new version of giscoR on CRAN implementing also the solution proposed by @dominicroye

Everything should be working now with the CRAN version

ping also @pitkant in relation with rOpenGov/eurostat#279

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-downloading Data is not downloaded from the server
Projects
None yet
Development

No branches or pull requests

5 participants