all_disruptions_to_tibble: Convert the contents of a disruptions API call to a single...

Description Usage Arguments Details Value

View source: R/disruptions.R

Description

Disruptions API responses contain an element for every service type, eg. metro train, taxis, Skybus. Normally we would map-reduce the content of an API call with a function analogous to disruption_to_tibble. But because of the extra layer of nesting in the response, we have to map-reduce the service types first.

Usage

1
all_disruptions_to_tibble(disruptions_content)

Arguments

disruptions_content

The raw disruptions content returned by the disruptions API call.

Details

Note that we return an empty tibble if there are no disruptions, so that this situation is omitted.

Value

A tibble with the following columns:


ptvapi documentation built on May 2, 2021, 9:06 a.m.