tidy_rfrnds: Tidy "raw" RDB API referendum data

tidy_rfrndsR Documentation

Tidy "raw" RDB API referendum data

Description

Converts the "raw" MongoDB data from the RDB API to the tidied rfrnds() schema.

Usage

tidy_rfrnds(data, tidy = TRUE)

Arguments

data

The MongoDB data as a list (converted from the JSON returned by the RDB API using jsonlite::fromJSON()).

tidy

Whether or not to tidy the referendum data, i.e. apply various data cleansing tasks and add additional variables. If FALSE, the raw MongoDB referendum data will only be modified just enough to be able to return it as a tibble. Note that untidy data doesn't conform to the codebook (i.a. different variable names).

Details

You can reverse this function again using untidy_rfrnds().

Value

A tibble.


zdaarau/c2d documentation built on Dec. 18, 2024, 1:24 p.m.