csb_filter: Subset Based on Call Categories

View source: R/csb_filter.R

csb_filterR Documentation

Subset Based on Call Categories

Description

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

Usage

csb_filter(.data, var, category)

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

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")


slu-openGIS/stlcsb documentation built on Jan. 28, 2024, 12:10 p.m.