ropengov / giscor Goto Github PK
View Code? Open in Web Editor NEWDownload geospatial data from GISCO API - Eurostat
Home Page: https://ropengov.github.io/giscoR/
License: GNU General Public License v3.0
Download geospatial data from GISCO API - Eurostat
Home Page: https://ropengov.github.io/giscoR/
License: GNU General Public License v3.0
Prepare for release:
git pull
urlchecker::url_check()
devtools::build_readme()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
git push
Submit to CRAN:
usethis::use_version('patch')
devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version(push = TRUE)
Email received (related with #57):
Dear maintainer,
Please see the problems shown on
https://cran.r-project.org/web/checks/check_results_giscoR.html.Please correct before 2023-07-11 to safely retain your package on CRAN.
Do remember to look at the 'Additional issues'.
The CRAN Team
Prepare for release:
devtools::build_readme()
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
rhub::check_for_cran()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
Submit to CRAN:
usethis::use_version('minor')
devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version()
Prepare for release:
git pull
urlchecker::url_check()
devtools::build_readme()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
git push
Submit to CRAN:
usethis::use_version('patch')
devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version(push = TRUE)
Prepare for release:
devtools::build_readme()
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
rhub::check_for_cran()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
Submit to CRAN:
usethis::use_version('minor')
devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version()
Hi,
Great package.
Small note that I observed that Cyprus is missing when you use gisco_get_countries with the option Region="Europe".
Error on the gisco page, link should be https://gisco-services.ec.europa.eu/pub/healthcare/gpkg/EU/EU.gpkg instead of https://gisco-services.ec.europa.eu/pub/healthcare/gpkg/EU.gpkg
url
https://gisco-services.ec.europa.eu/distribution/v2/countries/distribution/AL-region-01m-4326-2016.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
Skipping unit = AL
Not found
Error: No results for c('AL')
Prepare for release:
git pull
devtools::build_readme()
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
rhub::check_for_cran()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
git push
Submit to CRAN:
usethis::use_version('patch')
devtools::submit_cran()
Wait for CRAN...
git push
usethis::use_github_release()
usethis::use_dev_version()
git push
httr
Status
httr is superseded: only changes necessary to keep it on CRAN will be made. We recommend using httr2 instead.
Since Friday getting nuts2 geodata does not work for me, everytime i try run
nuts <- gisco_get_nuts(year = 2021, nuts_level = "3", resolution = "01", cache = TRUE, update_cache = TRUE)
I get an error https://gisco-services.ec.europa.eu/distribution/v2/nuts/geojson/NUTS_RG_01M_2021_4326_LEVL_3.geojson not reachable.
But when I type the url in a browser, I get to the GeoJson file.
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`
git hash: 282078e0
Important: All failing checks above must be addressed prior to proceeding
Package License: GPL-3
The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.
type | package | ncalls |
---|---|---|
internal | base | 160 |
internal | giscoR | 42 |
internal | tools | 3 |
internal | graphics | 1 |
internal | stats | 1 |
imports | sf | 10 |
imports | utils | 6 |
imports | rappdirs | 3 |
imports | countrycode | 1 |
imports | geojsonsf | NA |
suggests | eurostat | NA |
suggests | ggplot2 | NA |
suggests | knitr | NA |
suggests | lwgeom | NA |
suggests | rmarkdown | NA |
suggests | testthat | NA |
linking_to | NA | NA |
Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.
basename (19), file.path (12), url (12), paste0 (10), c (9), names (9), paste (9), try (9), q (7), grep (6), strsplit (5), unlist (5), length (4), list (4), getOption (3), gsub (3), suppressWarnings (3), file.exists (2), file.size (2), for (2), is.na (2), local (2), seq_len (2), which (2), as.character (1), as.data.frame (1), as.integer (1), eval (1), file (1), max (1), nchar (1), parse (1), rbind (1), readLines (1), switch (1), Sys.getenv (1), tempfile (1), tolower (1), tryCatch (1), vapply (1), warning (1)
gsc_api_cache (11), gsc_api_url (8), gsc_helper_detect_cache_dir (3), gisco_clear_cache (2), gsc_api_load (2), gsc_load_shp (2), gisco_attributions (1), gisco_bulk_download (1), gisco_check_access (1), gisco_detect_cache_dir (1), gisco_get_airports (1), gisco_get_coastallines (1), gisco_get_communes (1), gisco_get_countries (1), gisco_get_grid (1), gisco_set_cache_dir (1), gsc_helper_cachedir (1), gsc_units_df (1), gsc_units_sf (1), set_utf8 (1)
st_read (7), st_crs (1), st_drop_geometry (1), st_geometry (1)
unzip (4), menu (1), read.csv2 (1)
user_config_dir (3)
file_path_sans_ext (3)
countryname (1)
text (1)
df (1)
NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately.
This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.
The package has:
Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages
The following terminology is used:
loc
= "Lines of Code"fn
= "function"exp
/not_exp
= exported / not exportedAll parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown()
function
The final measure (fn_call_network_size
) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.
measure | value | percentile | noteworthy |
---|---|---|---|
files_R | 19 | 79.7 | |
files_vignettes | 2 | 85.7 | |
files_tests | 16 | 94.9 | |
loc_R | 1445 | 77.2 | |
loc_vignettes | 268 | 60.0 | |
loc_tests | 891 | 85.2 | |
num_vignettes | 2 | 89.2 | |
data_size_total | 700244 | 93.6 | |
data_size_median | 96938 | 91.2 | |
n_fns_r | 66 | 65.1 | |
n_fns_r_exported | 19 | 65.9 | |
n_fns_r_not_exported | 47 | 65.9 | |
n_fns_per_file_r | 2 | 34.5 | |
num_params_per_fn | 5 | 69.6 | |
loc_per_fn_r | 38 | 83.4 | |
loc_per_fn_r_exp | 34 | 67.5 | |
loc_per_fn_r_not_exp | 42 | 87.1 | |
rel_whitespace_R | 25 | 83.5 | |
rel_whitespace_vignettes | 25 | 49.2 | |
rel_whitespace_tests | 21 | 83.6 | |
doclines_per_fn_exp | 79 | 84.1 | |
doclines_per_fn_not_exp | 0 | 0.0 | TRUE |
fn_call_network_size | 113 | 81.2 |
An interactive visualisation of calls between objects in the package has been uploaded as a workflow artefact. To view it, click on results from the latest 'pkgcheck' action, scroll to the bottom, and click on the 'visual-network' artefact.
goodpractice
and other checks
GitHub Workflow Results
id | name | conclusion | sha | run_number | date |
---|---|---|---|---|---|
5743538592 | CITATION-cff | success | 8850e9 | 157 | 2023-08-02 |
5743386423 | Clear GHA caches manually | success | d2be5d | 11 | 2023-08-02 |
5737580803 | CRAN Status Monitor | success | 2d820f | 72 | 2023-08-02 |
5743538597 | lintr | success | 8850e9 | 6 | 2023-08-02 |
5743636202 | pages build and deployment | success | 8961a9 | 74 | 2023-08-02 |
5745121640 | pkgcheck | NA | 282078 | 1 | 2023-08-03 |
5743538586 | R-CMD-check | success | 8850e9 | 720 | 2023-08-02 |
5743538590 | rogtemplate-gh-pages | success | 8850e9 | 131 | 2023-08-02 |
5743538596 | test-coverage | success | 8850e9 | 623 | 2023-08-02 |
5743543219 | update-docs | success | 8850e9 | 187 | 2023-08-02 |
goodpractice
resultsR CMD check
with rcmdcheckR CMD check generated the following note:
R CMD check generated the following check_fail:
Package coverage: 97.46
The following functions have cyclocomplexity >= 15:
function | cyclocomplexity |
---|---|
gisco_get_lau | 26 |
gsc_api_url | 22 |
gsc_helper_detect_cache_dir | 21 |
gisco_get_nuts | 19 |
gisco_get_countries | 18 |
gisco_get_units | 16 |
gsc_units_sf | 15 |
lintr found the following 16 potential issues:
message | number of times |
---|---|
Avoid library() and require() calls in packages | 6 |
Lines should not be more than 80 characters. | 10 |
โ๏ธ Package contains the following unexpected files:
package | version |
---|---|
pkgstats | 0.1.3.4 |
pkgcheck | 0.1.2.1 |
oops! Sorry -- wrong repo.
When I try to run this code:
country_lines <- gisco_get_nuts(
year = "2016",
epsg = "3035",
resolution = "20",
nuts_level = "0",
spatialtype = "BN",
country = c("Czechia", "Germany", "Lithuania", "Estonia", "Italy", "Spain")
)
I get this map
ggplot(country_lines) + geom_sf()
However, if I use another spatialtype
other than "BN"
, I get the correct countries (same applies to spatialtype = "LB"
:
country_lines <- gisco_get_nuts(
year = "2016",
epsg = "3035",
resolution = "20",
nuts_level = "0",
spatialtype = "RG",
country = c("Czechia", "Germany", "Lithuania", "Estonia", "Italy", "Spain")
)
ggplot(country_lines) + geom_sf()
Hi,
I maintain the countrycode
package and it looks like the upcoming version will cause a break in your package. The issue seems minor, related only to a reference in the documentation:
Changes to worse in reverse depends:
Package: giscoR
Check: Rd cross-references
New result: WARNING
Missing link or links in Rd file 'gisco_countrycode.Rd':
โ[countrycode:countrycode-package]{countrycode::countrycode-package}โ
See section 'Cross-references' in the 'Writing R Extensions' manual.
Sorry for the trouble!
GISCO services were unavailable earlier today. Running in v4-dev branch of eurostat package, I got the following message:
> sf <- get_eurostat_geospatial(
+ output_class = "sf",
+ year = 2006,
+ resolution = "60",
+ nuts_level = 0
+ )
Extracting data using giscoR package, please report issues on https://github.com/rOpenGov/giscoR/issues
url
https://gisco-services.ec.europa.eu/distribution/v2/nuts/geojson/NUTS_RG_60M_2006_4326_LEVL_0.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`
Of course it was probably different for users running on last CRAN release but I didn't test that. I just figured that we could be pre-emptive about such issues in the future and have a more descriptive message in case things go wrong because of server issues, in addition to "Please download manually" or "If you think this is a bug [...]", indicating the possibility of a problem being in the server.
The error message from disco-services.ec.europa.eu was 502 Bad gateway. Mozilla docs had a nice description of that (bold mine):
"A Gateway might refer to different things in networking and a 502 error is usually not something you can fix, but requires a fix by the web server or the proxies you are trying to get access through."
See also rOpenGov/eurostat#266
Prepare for release:
git pull
urlchecker::url_check()
devtools::build_readme()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
git push
Submit to CRAN:
usethis::use_version('minor')
devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version(push = TRUE)
Prepare for release:
devtools::build_readme()
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
rhub::check_for_cran()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
Submit to CRAN:
usethis::use_version('patch')
devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version()
Prepare for release:
git pull
devtools::build_readme()
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
rhub::check_for_cran()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
git push
Submit to CRAN:
usethis::use_version('patch')
devtools::submit_cran()
Wait for CRAN...
git push
usethis::use_github_release()
usethis::use_dev_version()
git push
For compatibility with eurostat
Entire dataset downloads if any spatialtype is specified.
E.g.,
khm01 <- gisco_get_countries(resolution = "01", country = "KHM", spatialtype = "INLAND", cache_dir = "downloads/gisco")
plot(st_geometry(khm01))
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
Prepare for release:
git pull
urlchecker::url_check()
devtools::build_readme()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
git push
Submit to CRAN:
usethis::use_version('patch')
devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_dev_version(push = TRUE)
First of all, thank you so much for the package.
If I want to create a map of Nigeria, I only see the map (as in the outline) without the states nor state borders.
Imagining I want to compare the states of Nigeria, is it possible with your package?
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.