favstats / paadcr

Provide access to the PAADC API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

paadcr

Lifecycle: experimental CRAN status

The goal of paadcr is to provide access to the PAADCR API.

Installation

You can install paadcr from GitHub with:

remotes::install_github("favstats/paadcr")

Load library

This is a basic example which shows you how to solve a common problem:

library(paadcr)
## basic example code

Authentication

First you need to authenticate. Have your username and password ready and run this:

paadcr_auth()

Usage

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)

Get all data

## create a vector with all weeks
1:2 %>% 
    map_dfr(~paadcr_week(.x, clean = T))

About

Provide access to the PAADC API

License:Other


Languages

Language:R 100.0%