View source: R/get_md_crash_data.R
get_md_crash_data | R Documentation |
Get crash data using get_md_open_data()
. format_md_crash_data works with
a data frame of crash data from get_md_crash_data()
when type = "crashes".
format_md_crashes_person()
formats data when type = "persons".
format_md_crashes()
calls one or the other depending on the type
parameter.
get_md_crash_data(
location = NULL,
...,
report_no = NULL,
where = NULL,
type = "crashes"
)
format_md_crash_data(data, type = "crashes", drop_code = TRUE, ...)
format_md_crashes(data)
format_md_crash_date(data, cols = c("acc_date", "acc_time"))
format_md_crashes_person(
data,
start_year = 2022,
end_year = 2022,
na_dates = c("1/1/1900", "19000101", "19001111", "19001212", "19200202")
)
location |
A |
... |
Passed to |
report_no |
Crash report numbers. Defaults to |
where |
A query parameter passed to |
type |
Supported options include "crashes" (default), "persons" (or "crashes_person"), and "vehicles" (or "crashes_vehicle"). |
data |
Data frame with Maryland vehicular crash data; typically from
|
drop_code |
If |
cols |
Column names to use with |
start_year , end_year |
Start and end year to use when checking validity of birth dates. |
na_dates |
Character vector of invalid dates to replace with a
|
## Not run:
if (interactive()) {
get_md_crash_data(
where = "(year = '2020') AND (quarter = 'Q2')",
name_col = "county_desc",
name = "Cecil"
)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.