csb_filter: Subset Based on Call Categories

Description Usage Arguments Value Examples

Description

csb_filter returns observations that match any combination of the predefined categories that are created

Usage

1

Arguments

.data

A tibble or data frame

var

name of the column containing original problem code data

category

a vector with the unquoted name(s) of the category(s) for the function to return. You can also explicitly state quoted problemcode(s). Valid categories are: admin, animal, construction, debris, degrade, disturbance, event, health, landscape, law, maintenance, nature, road, sewer, traffic, vacant, and waste. If categories are listed, each should be preceded by 'cat_'.

Value

csb_filter returns data with an additional variable for an intelligible category for CSB requests.

Examples

1
2
3
csb_filter(january_2018, var = problemcode, category = cat_vacant)
csb_filter(january_2018, var = problemcode, category = c(cat_waste, cat_debris))
csb_filter(january_2018, var = problemcode, category = "WTR-COMING-UP")

stlcsb documentation built on May 2, 2019, 4 a.m.