get_area_crashes: Get vehicle crashes for area in Baltimore from Maryland Open...

View source: R/get_area_crashes.R

get_area_crashesR Documentation

Get vehicle crashes for area in Baltimore from Maryland Open Data portal

Description

[Deprecated]

This function is deprecated because the functionality has been incorporated into the improved mapmaryland::get_md_crash_data() function which uses a similar set of parameters.

Get vehicle crashes for selected area in Baltimore City.

Usage

get_area_crashes(
  area,
  start_year = 2020,
  end_year = 2020,
  geometry = FALSE,
  trim = FALSE,
  type = c("crash", "person", "vehicle")
)

Arguments

area

sf object.

start_year

earliest year of crash data to return. Default 2020.

end_year

latest year of crash data to return. If end_year is not provided, only a single year is returned. Default 2020.

geometry

If TRUE, return a sf object. Default FALSE.

trim

If TRUE, data trimmed to area with sf::st_intersection(). Default FALSE.

type

Data type to return. Options include c("crash", "person", "vehicle"). Data types correspond to different tables. If 'person', an age at crash column is added based on the accident date and date of birth columns (after removing suspected placeholder values).


elipousson/mapbaltimore documentation built on Nov. 11, 2024, 8:25 p.m.