cs_get_data: Download Crime Data from SLMPD

View source: R/get.R

cs_get_dataR Documentation

Download Crime Data from SLMPD

Description

Downloads crime data from the SLMPD website.

Usage

cs_get_data(year, month, index)

Arguments

year

A year value in the style YYYY

month

Optional; a month number, name, or abbreviation - 1, "Jan", and "January" are all acceptible inputs.

index

Optional; an index object created with cs_create_index. Building the index prior to downloading data, especially if you are downloading multiple years worth of data, will result in dramatically faster execution times for this function.

Value

A year-list object ready for validation.

Examples


# create index
i <- cs_create_index()

# download single month
may18 <- cs_get_data(year = 2018, month = "May", index = i)

# preview single month
may18

# download full year
yearList18 <- cs_get_data(year = 2018, index = i)

# preview year list object
yearList18



chris-prener/compStatR documentation built on Jan. 25, 2024, 10:03 p.m.