Skip to content

Commit

Permalink
update function to load country and region even with accents
Browse files Browse the repository at this point in the history
  • Loading branch information
MaIsAp committed Mar 14, 2024
1 parent 336e102 commit 64c67af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/SHI/scp_SHI_02_GetAOH.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ get_country<-function(country){
}

get_state<-function(country,region){
resp <- req_perform( request(paste0("https://geoio.biodiversite-quebec.ca/state_geojson/?state_name=",region,"&country_name=",country)))
resp <- request("https://geoio.biodiversite-quebec.ca/state_geojson/") |> req_url_query("state_name" = region, "country_name" = country) |> req_perform()
geojson_sf(resp_body_string(resp))
}

Expand Down

0 comments on commit 64c67af

Please sign in to comment.