The goal of paadcr is to provide access to the PAADCR API.
You can install paadcr
from GitHub with:
remotes::install_github("favstats/paadcr")
This is a basic example which shows you how to solve a common problem:
library(paadcr)
## basic example code
First you need to authenticate. Have your username and password ready and run this:
paadcr_auth()
Get the raw json for every week (1st week: 4-10th January 2021)
## Get week 1 data
paadcr_week(1)
## week 2 data
paadcr_week(2)
Get parsed data as rectangular data frame with each row being one timeline item:
paadcr_week(1, clean = T)
## create a vector with all weeks
1:2 %>%
map_dfr(~paadcr_week(.x, clean = T))