Giter VIP home page Giter VIP logo

giscor's People

Contributors

actions-user avatar dependabot[bot] avatar dieghernan avatar github-actions[bot] avatar imgbot[bot] avatar imgbotapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

cgodlewski

giscor's Issues

Release giscoR 0.3.5

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Polish NEWS
  • urlchecker::url_check()
  • devtools::build_readme()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md
  • git push

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)

Release giscoR 0.2.4

Prepare for release:

  • Check current CRAN check results
  • Polish NEWS
  • 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)
  • Update cran-comments.md
  • Review pkgdown reference index for, e.g., missing topics
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • usethis::use_github_release()
  • usethis::use_dev_version()
  • Finish blog post
  • Tweet
  • Add link to blog post in pkgdown news menu

Release giscoR 0.4.1

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Polish NEWS
  • urlchecker::url_check()
  • devtools::build_readme()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md
  • git push

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)

Release giscoR 0.3.0

Prepare for release:

  • Check current CRAN check results
  • Polish NEWS
  • 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)
  • Update cran-comments.md
  • Review pkgdown reference index for, e.g., missing topics
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • usethis::use_github_release()
  • usethis::use_dev_version()
  • Finish blog post
  • Tweet
  • Add link to blog post in pkgdown news menu

Release giscoR 0.3.4

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Polish NEWS
  • 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)
  • Update cran-comments.md
  • git push

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • git push
  • usethis::use_github_release()
  • usethis::use_dev_version()
  • git push

Some geojson are not reachable

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`

pkgcheck results - main

Checks for giscoR (v0.3.5.9000)

git hash: 282078e0

  • โœ”๏ธ Package is already on CRAN.
  • โœ”๏ธ has a 'codemeta.json' file.
  • โœ–๏ธ does not have a 'contributing' file.
  • โœ”๏ธ uses 'roxygen2'.
  • โœ”๏ธ 'DESCRIPTION' has a URL field.
  • โœ”๏ธ 'DESCRIPTION' has a BugReports field.
  • โœ”๏ธ Package has at least one HTML vignette
  • โœ”๏ธ All functions have examples.
  • โœ”๏ธ Package has continuous integration checks.
  • โœ”๏ธ Package coverage is 97.5%.
  • โœ–๏ธ Package contains unexpected files.
  • โœ”๏ธ R CMD check found no errors.
  • โœ”๏ธ R CMD check found no warnings.

Important: All failing checks above must be addressed prior to proceeding

Package License: GPL-3


1. Package Dependencies

Details of Package Dependency Usage (click to open)

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.

base

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)

giscoR

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)

sf

st_read (7), st_crs (1), st_drop_geometry (1), st_geometry (1)

utils

unzip (4), menu (1), read.csv2 (1)

rappdirs

user_config_dir (3)

tools

file_path_sans_ext (3)

countrycode

countryname (1)

graphics

text (1)

stats

df (1)

NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 19 files) and
  • 1 authors
  • 2 vignettes
  • 6 internal data files
  • 5 imported packages
  • 19 exported functions (median 34 lines of code)
  • 47 non-exported functions in R (median 42 lines of code)

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 exported

All 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

2a. Network visualisation

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.


3. goodpractice and other checks

Details of goodpractice checks (click to open)

3a. Continuous Integration Badges

R-CMD-check

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

3b. goodpractice results

R CMD check with rcmdcheck

R CMD check generated the following note:

  1. checking data for non-ASCII characters ... NOTE
    Note: found 1178 marked UTF-8 strings

R CMD check generated the following check_fail:

  1. rcmdcheck_non_ascii_characters_in_data

Test coverage with covr

Package coverage: 97.46

Cyclocomplexity with cyclocomp

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

Static code analyses with lintr

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


4. Other Checks

Details of other checks (click to open)

โœ–๏ธ Package contains the following unexpected files:

  • data-raw/PORT_2009_SH/shape/metadata/XML/Thumbs.db
  • data-raw/PORT_2013_SH/Metadata/Thumbs.db


Package Versions

package version
pkgstats 0.1.3.4
pkgcheck 0.1.2.1

gisco_get_nuts does not consider country argument when nuts_level = "0" AND spatialtype = "BN"

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()

image

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()

image

`countrycode` reverse dependency break

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!

Better error message for temporary network / server problems

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

Release giscoR 0.4.0

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Polish NEWS
  • urlchecker::url_check()
  • devtools::build_readme()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md
  • git push
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • Finish & publish blog post
  • Add link to blog post in pkgdown news menu
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)
  • Tweet

Release giscoR 0.3.1

Prepare for release:

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • usethis::use_github_release()
  • usethis::use_dev_version()

Release giscoR 0.3.3

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Polish NEWS
  • 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)
  • Update cran-comments.md
  • git push

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • git push
  • usethis::use_github_release()
  • usethis::use_dev_version()
  • git push

Unable to download single country data if spatialtype is specified

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

Release giscoR 0.4.2

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Polish NEWS
  • urlchecker::url_check()
  • devtools::build_readme()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md
  • git push

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)

States/provinces for other countries

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.