statistikat / STATcubeR

R interface for the STATcube REST API and data.statistik.gv.at
https://statistikat.github.io/STATcubeR/
GNU General Public License v2.0
14 stars 1 forks source link

documentation updates #13

Closed GregorDeCillia closed 3 years ago

GregorDeCillia commented 3 years ago

This PR will provide some documentation updates regarding the new Open Government Data functionalities

GregorDeCillia commented 3 years ago

The commits so far should cover all necessary changes to R/ except some functions for the resources article.

GregorDeCillia commented 3 years ago

Missing articles

Additional TODOs

GregorDeCillia commented 3 years ago

Reminder to self: The current articles assume that you have a persistent cache set up in ~/.cache/STATcubeR/open_data. There might be room for improvement.

GregorDeCillia commented 3 years ago

Github is currently experiencing some issues so I'll take the time to summarize the progress so far This branch is now "feature complete". There are two changes that will make sure devtools::check() runs without errors

After that, I need to check if the old articles about the STATcube REST API are still working properly. They did some days ago so only minor changes are not to be expected.

GregorDeCillia commented 3 years ago

The current version passes devtools::check() with no errors, warnings or notes. Furthermore, the pkgdown site can be rendered without any issues.

About the links

GregorDeCillia commented 3 years ago

@bernhard-da if you want to do updates on the docs, build them locally and transfer them to the webserver with our internal useSTAT package.

pkgdown::build_site()
useSTAT:::deploy_pkgdown_dev()

I'd recommend to set up caching for development by modifying .Renviron. Otherwise, you'll download the same cubes many times when building the articles and man pages.

usethis::edit_r_environ()
STATCUBE_KEY       = YOUR_API_KEY_GOES_HERE
STATCUBE_CACHE     = TRUE
OD_CACHE_DIR       = "~/.cache/STATcubeR/open_data/"
STATCUBE_CACHE_DIR = "~/.cache/STATcubeR/api/"

On that note - some possible improvements

GregorDeCillia commented 3 years ago

An updated version of the docs is available at https://statistikat.github.io/STATcubeR/dev/

GregorDeCillia commented 3 years ago

@bernhard-da could you please provide some feedback about the current state of the pkgdown documentation? I don't think it needs to be perfect but having a second opinion would be very useful.

Some remarks about the links

I suggest you start with article index and the reference index and decide if we should update any names or descriptions. The articles linked in the navbar are the most important ones.

I added you as an author and linked to your gh-account. Just let me know if this is okay https://github.com/statistikat/STATcubeR/blob/8c564510aac366794b67e8ddffe4eda60e8444e2/pkgdown/_pkgdown.yml#L13-L14

bernhard-da commented 3 years ago

@GregorDeCillia very nice work, all articles are very well written and very clear; just some very minor things

GregorDeCillia commented 3 years ago

@bernhard-da thank you. The link is now fixed in the VCS. Yes: the sc_table class is still a little bit weird: see the full class documentation. It is probably a good idea not to mention that in the introduction docs.

I am not sure if $raw will be fully removed because there are certain parts that are "lost" when we do so, but it is certainly something for advanced users.

GregorDeCillia commented 3 years ago

Maybe this PR should also be used to refactor the dependencies

Imports

Suggests

I'm still wondering why devtools::check() doesn't complain about {R6} not being in the dependencies.

GregorDeCillia commented 3 years ago