Use the simple Cranlogs API to obtain R package download summaries in 2018
The R-Hub cranlogs API is a very simple API to query using a web browser or R. You can read more about this API here: https://github.com/r-hub/cranlogs.app
This task involves using this API to obtain data for total R package downloads for a specified period of time.
Example 1 - Using a web browser: Copy and paste the following URL into a web browser https://cranlogs.r-pkg.org/downloads/total/2019-01-01:2019-06-01
The response is a JSON object that contains the start date (Jan 01, 2019), end date (Jun 01, 2019) and the total download of all R packages for the time period.
Example 2 - Using R: install the
jsonlite R package. Then from the R console execute this statement:
Now, the task is to obtain the total downloads of all R packages in 2018 and save the results in a single CSV file.
Submit the result at https://github.com/benubah/gci2019