jabr_fetch_group: Fetch group of datasets

Description Usage Arguments Value Examples

View source: R/jabr_fetch_group.R

Description

Download and parse the dataset available at Open Data Jawa Barat into R. This function will download multiple datasets which have same group_id.

Usage

1
jabr_fetch_group(group_id, keep_title = TRUE, as = "table")

Arguments

group_id

The group id of dataset. It only accepts single group id.

keep_title

Whether to keep the dataset title in result. If the result is a table, the title is saved in "title" column. If the result is a list, the title is saved as list name.

as

If as = "table", the fetched datasets will be saved in "dataset" column with list-column type where you can run tidyr::unnest() afterwards. Otherwise the fetched datasets will be saved as list.

Value

A tibble or list of tibble.

Examples

1
2
3
4
5
6
7
8
9
library(jabr)

(x <- jabr_list_dataset())


# for example, we want to fetch data about gini ratio in west java since 2011 to 2017.
# The group_id of this data is "78358b54".
jabr_fetch_group("78358b54") %>%
  tidyr::unnest(cols = c(dataset))

jabr documentation built on Jan. 13, 2020, 9:07 a.m.