Skip to contents

Get Environmental Control Board (ECB) citations from 2007 to 2021.

Usage

get_area_citations(
  area_type = NULL,
  area_name = NULL,
  description = NULL,
  start_date = NULL,
  end_date = NULL,
  where = "1=1",
  geometry = TRUE,
  crs = pkgconfig::get_config("mapbaltimore.crs", 2804),
  ...
)

Arguments

area_type

Area type. Requires area_name is also provided. Options include "neighborhood", "council district", or "police district"

area_name

Area name. Requires area_type is also provided.

description

String matching description of citations, e.g. "SIGNS" filters citations to "PROHIBITED POSTING OF SIGNS ON PUBLIC PROPERTY"

start_date

Character string in format YYYY-MM-DD. Filters citations by violation date.

end_date

Character string in format YYYY-MM-DD. Filters citations by violation date.

where

string for where condition. Ignore where condition if area_type and area_name are provided.

geometry

Return sf object based on lat/lon. Default TRUE. Set to FALSE to return citations with missing coordinates.

crs

Coordinate reference system (CRS) to return. Default 2804

...

Additional parameters passed to getdata::get_esri_data() excluding url, where, crs, and .name_repair.

Examples

# Get bulk trash citations for Council District 5
get_area_citations(
   area_type = "council district",
   area_name = "5",
   description = "BULK TRASH")
#> ── Downloading "ECB" from <https://opendata.baltimorecity.gov/egis/rest/services
#> Layer type: "Table"
#> 
#> Simple feature collection with 1414 features and 30 fields
#> Geometry type: POINT
#> Dimension:     XY
#> Bounding box:  xmin: 424889.3 ymin: 184761.9 xmax: 430503.1 ymax: 189322.6
#> Projected CRS: NAD83(HARN) / Maryland
#> # A tibble: 1,414 × 31
#>    citation_no lien_code violation_date      due_date            agency         
#>  * <chr>       <chr>     <dttm>              <dttm>              <chr>          
#>  1 04382735    L         2007-03-15 04:00:00 2007-04-14 04:00:00 DEPARTMENT OF …
#>  2 05249719    L         2010-07-15 04:00:00 2010-08-14 04:00:00 BALTIMORE CITY…
#>  3 05335070    L         2011-08-26 04:00:00 2011-09-25 04:00:00 BALTIMORE CITY…
#>  4 50005016    L         2007-05-29 04:00:00 2007-06-28 04:00:00 DEPARTMENT OF …
#>  5 50053941    L         2007-08-01 04:00:00 2007-08-31 04:00:00 DEPARTMENT OF …
#>  6 50116920    L         2007-10-10 04:00:00 2007-11-09 05:00:00 DEPARTMENT OF …
#>  7 50263862    L         2008-03-27 04:00:00 2008-04-26 04:00:00 DEPARTMENT OF …
#>  8 50436708    L         2008-09-17 04:00:00 2008-10-17 04:00:00 DEPARTMENT OF …
#>  9 50493634    L         2008-11-12 05:00:00 2008-12-12 05:00:00 DEPARTMENT OF …
#> 10 50520915    L         2008-12-03 05:00:00 2009-01-02 05:00:00 DEPARTMENT OF …
#> # ℹ 1,404 more rows
#> # ℹ 26 more variables: fine_amount <dbl>, description <chr>, balance <dbl>,
#> #   last_paid_date <dttm>, last_paid_amount <dbl>, hearing_date <dttm>,
#> #   hearing_request_received_date <dttm>, citation_status <chr>,
#> #   violation_code_article <chr>, violation_code_section <chr>,
#> #   violation_location <chr>, block <chr>, lot <chr>, officer_id <chr>,
#> #   officer_presence_requested <chr>, hearing_status <chr>, hear_time <chr>, …