Designed to be including in a purrr call. This wraps mv_get_agency, mv_reformat, and mv_filter.

mv_batch_agency(browser, agency, statistic, format, category, year, pause = 3)

Arguments

browser

Name of a browser binding created with RSelenium

agency

An agency name (for St. Louis City and County agencies) or id number (for agencies statewide).

statistic

The statistic to download (see mv_get_agency)

format

Style to reformat raw data (see mv_reformat)

category

Category to extract (see mv_filter)

year

Year to extract (see mv_filter)

pause

Number of seconds to pause while pages load - adjust as needed depending on internet connection

Value

A tibble with the formatted and subset data.