Learn R Programming

nycOpenData (version 0.1.6)

nyc_permit_events_historic: NYC Permitted Event Information - Historical

Description

Downloads historical permitted event data from NYC Open Data.

Usage

nyc_permit_events_historic(limit = 10000, filters = list(), timeout_sec = 60)

Value

A tibble containing NYC Permitted Event Information - Historical data.

Arguments

limit

Number of rows to retrieve (default = 10,000).

filters

Optional list of field-value pairs to filter results.

timeout_sec

Request timeout in seconds (default = 60).

Details

This dataset includes historical information about events permitted through the Office of Citywide Event Coordination and Management (CECM), including parades, festivals, street fairs, and other public gatherings.

Examples

Run this code
# Examples that hit the live NYC Open Data API are guarded so CRAN checks
# do not fail when the network is unavailable or slow.
if (interactive() && curl::has_internet()) {
  small_sample <- try(
    nyc_permit_events_historic(limit = 2, timeout_sec = 10),
    silent = TRUE
  )
  if (!inherits(small_sample, "try-error")) print(small_sample)

  filtered <- try(
    nyc_permit_events_historic(
      limit = 2,
      filters = list(event_type = "Construction"),
      timeout_sec = 10
    ),
    silent = TRUE
  )
  if (!inherits(filtered, "try-error")) print(filtered)
}

Run the code above in your browser using DataLab