Type: Package
Title: Convenient Access to NYC Open Data API Endpoints
Version: 0.1.2
Description: Provides a unified set of helper functions to access datasets from the NYC Open Data platform https://opendata.cityofnewyork.us/. Functions return results as tidy tibbles and support optional filtering, sorting, and row limits via the Socrata API. The package includes endpoints for 311 service requests, DOB job applications, juvenile justice metrics, school safety, environmental data, event permitting, and additional citywide datasets.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.3
Imports: httr, jsonlite, tibble
Suggests: knitr, rmarkdown
URL: https://github.com/martinezc1/nycOpenData
BugReports: https://github.com/martinezc1/nycOpenData/issues
NeedsCompilation: no
Packaged: 2025-11-13 04:15:08 UTC; christianmartinez
Author: Christian Martinez [aut, cre]
Maintainer: Christian Martinez <c.martinez0@outlook.com>
Repository: CRAN
Date/Publication: 2025-11-17 21:30:02 UTC

NYC 311 Service Requests

Description

Downloads NYC 311 Service Request data from NYC Open Data.

Usage

nyc_311(limit = 10000, filters = list())

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

Details

This dataset contains all service requests made to NYC 311 since 2010. Data is updated daily and includes agency, complaint type, location, and resolution.

Value

A tibble containing 311 Service Request data.

Source

NYC Open Data: <https://data.cityofnewyork.us/Social-Services/311-Service-Requests-from-2010-to-Present/erm2-nwe9/about_data>

Examples


# Quick example (fetch 10 rows)
small_sample <- nyc_311(limit = 10)
head(small_sample)


nyc_311(limit = 5000)
nyc_311(filters = list(agency = "NYPD", city = "BROOKLYN"))


NYC Borough/Community District Report

Description

Downloads Borough/Community District Report data from NYC Open Data.

Usage

nyc_borough_community_report(limit = 10000, filters = list())

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

Details

This dataset provides monthly reports by borough and community district, covering metrics such as service requests, inspections, and community outreach. It’s published by NYC Department of Social Services for transparency and analysis.

Value

A tibble containing Borough/Community District Report data.

Source

NYC Open Data: <https://data.cityofnewyork.us/resource/5awp-wfkt>

Examples

# Quick example (fetch 10 rows)
small_sample <- nyc_borough_community_report(limit = 10)
head(small_sample)


nyc_borough_community_report(limit = 5000)
nyc_borough_community_report(filters = list(borough = "Bronx"))


NYC Civil Service List (Active)

Description

Downloads Civil Service List (Active) data from NYC Open Data.

Usage

nyc_civil_service_list(limit = 10000, filters = list())

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

Details

This dataset provides information about active Civil Service lists, including eligible candidates, examination numbers, and certification status. Published by the NYC Department of Citywide Administrative Services (DCAS).

Value

A tibble containing Civil Service List (Active) data.

Source

NYC Open Data: <https://data.cityofnewyork.us/resource/vx8i-nprf>

Examples

# Quick example (fetch 10 rows)
small_sample <- nyc_civil_service_list(limit = 10)
head(small_sample)


nyc_civil_service_list(limit = 5000)
nyc_civil_service_list(filters = list(last_name = "Martinez"))


NYC Detention Admissions by Community District

Description

Downloads Detention Admissions by Community District data from NYC Open Data.

Usage

nyc_detention_admissions(limit = 10000, filters = list())

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

Details

This dataset reports annual counts of detention admissions across NYC community districts, disaggregated by borough and calendar year. Provided by the NYC Department of Correction and Department of Youth and Community Development.

Value

A tibble containing NYC Detention Admissions by Community District data.

Source

NYC Open Data: <https://data.cityofnewyork.us/resource/2hrw-qfsu>

Examples

# Quick example (fetch 10 rows)
small_sample <- nyc_detention_admissions(limit = 10)
head(small_sample)


nyc_detention_admissions(limit = 5000)
nyc_detention_admissions(filters = list(borough = "Bronx"))


NYC DOB Job Application Filings

Description

Downloads DOB Job Application Filings data from NYC Open Data.

Usage

nyc_dob_job_applications(limit = 10000, filters = list())

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

Details

This dataset includes job application filings submitted to the NYC Department of Buildings (DOB). Each record represents a construction or alteration project application, including location, work type, and approval status.

Value

A tibble containing DOB Job Application Filings data.

Source

NYC Open Data: <https://data.cityofnewyork.us/resource/ic3t-wcy2>

Examples

# Quick example (fetch 10 rows)
small_sample <- nyc_dob_job_applications(limit = 10)
head(small_sample)


nyc_dob_job_applications(limit = 10)


NYC DOP Juvenile Case Count By Type

Description

Downloads DOP Juvenile Case Count By Type data from NYC Open Data.

Usage

nyc_dop_Juvenile_cases(limit = 10000, filters = list())

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

Details

This dataset tracks the number of juvenile cases handled by the NYC Department of Probation (DOP), broken down by case type and region. It provides insight into trends in youth justice and probation supervision citywide.

Value

A tibble containing DOP Juvenile Case Count By Type data.

Source

NYC Open Data: <https://data.cityofnewyork.us/resource/c49b-3kmd>

Examples

# Quick example (fetch 10 rows)
small_sample <- nyc_dop_Juvenile_cases(limit = 10)
head(small_sample)


nyc_dop_Juvenile_cases(limit = 5000)
nyc_dop_Juvenile_cases(filters = list(borough = "Citywide"))


NYC DOP Juvenile Rearrest Rate (Monthly Average)

Description

Downloads DOP Juvenile Rearrest Rate (Monthly Average) data from NYC Open Data.

Usage

nyc_dop_juvenile_rearrest_rate(limit = 10000, filters = list())

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

Details

This dataset provides the average monthly rate of juvenile rearrests reported by the NYC Department of Probation (DOP). Data includes region, year, and monthly averages, allowing for trend analysis across boroughs.

Value

A tibble containing NYC DOP Juvenile Rearrest Rate (Monthly Average) data.

Source

NYC Open Data: <https://data.cityofnewyork.us/resource/c87b-2j3i>

Examples

# Quick example (fetch 10 rows)
small_sample <- nyc_dop_juvenile_rearrest_rate(limit = 10)
head(small_sample)


nyc_dop_juvenile_rearrest_rate(limit = 5000)
nyc_dop_juvenile_rearrest_rate(filters = list(borough = "Citywide"))


NYC For-Hire Vehicles (FHV) - Active

Description

Downloads For-Hire Vehicles (FHV) - Active data from NYC Open Data.

Usage

nyc_for_hire_vehicles(limit = 10000, filters = list())

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

Details

This dataset includes all active For-Hire Vehicle (FHV) licenses in NYC, such as taxis, limousines, and app-based services (e.g., Uber, Lyft). Maintained by the NYC Taxi and Limousine Commission (TLC).

Value

A tibble containing For-Hire Vehicles (FHV) - Active data.

Source

NYC Open Data: <https://data.cityofnewyork.us/resource/8wbx-tsch>

Examples

# Quick example (fetch 10 rows)
small_sample <- nyc_for_hire_vehicles(limit = 10)
head(small_sample)


nyc_for_hire_vehicles(limit = 5000)
nyc_for_hire_vehicles(filters = list(active = "YES"))


NYC NYPD Hate Crimes

Description

Downloads NYPD Hate Crimes data from NYC Open Data.

Usage

nyc_nypd_hate_crimes(limit = 10000, filters = list())

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

Details

This dataset contains records of hate crime incidents reported by the NYPD. Each entry includes the bias motivation, offense category, and borough, providing insight into hate crime trends across New York City.

Value

A tibble containing NYC NYPD Hate Crimes data.

Source

NYC Open Data: <https://data.cityofnewyork.us/resource/bqiq-cu78>

Examples

# Quick example (fetch 10 rows)
small_sample <- nyc_nypd_hate_crimes(limit = 10)
head(small_sample)


nyc_nypd_hate_crimes(limit = 5000)
nyc_nypd_hate_crimes(filters = list(county = "KINGS"))


NYC Permitted Event Information - Historical

Description

Downloads historical permitted event data from NYC Open Data.

Usage

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

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

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.

Value

A tibble containing NYC Permitted Event Information - Historical data.

Source

NYC Open Data: <https://data.cityofnewyork.us/resource/bkfu-528j>

Examples

## Not run: 
# Fetch a small sample
small_sample <- nyc_permit_events_historic(limit = 10)
head(small_sample)

# Larger pull (will depend on API stability)
nyc_permit_events_historic(limit = 5000)

# With a filter
nyc_permit_events_historic(filters = list(event_type = "Construction"))

## End(Not run)


NYC School Discharge Reporting (Local Law 42)

Description

Downloads School Discharge Reporting (Local Law 42) data from NYC Open Data.

Usage

nyc_school_discharge(limit = 10000, filters = list())

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

Details

This dataset reports student discharges from NYC public schools, as required under Local Law 42. It includes counts and percentages of students discharged by category, such as transfer, dropout, or other reasons. Data are aggregated by school and year, supporting analysis of student outcomes across the city.

Value

A tibble containing School Discharge Reporting (Local Law 42) data.

Source

NYC Open Data: <https://data.cityofnewyork.us/resource/a2gn-nyzs>

Examples

# Quick example (fetch 10 rows)
small_sample <- nyc_school_discharge(limit = 10)
head(small_sample)


nyc_school_discharge(limit = 5000)
nyc_school_discharge(filters = list(school_level = "High School"))


NYC TLC New Driver Application Status

Description

Downloads TLC New Driver Application Status data from NYC Open Data.

Usage

nyc_tlc_new_driver_app_status(limit = 10000, filters = list())

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

Details

This dataset provides the application status for individuals applying for a New York City Taxi and Limousine Commission (TLC) driver's license. It includes details such as application date, drug test status, defensive driving completion, and final approval outcome.

Value

A tibble containing TLC New Driver Application Status data.

Source

NYC Open Data: <https://data.cityofnewyork.us/resource/dpec-ucu7>

Examples

# Quick example (fetch 10 rows)
small_sample <- nyc_tlc_new_driver_app_status(limit = 10)
head(small_sample)


nyc_tlc_new_driver_app_status(limit = 5000)
nyc_tlc_new_driver_app_status(filters = list(drug_test = "NEEDED"))


NYC 2015 Street Tree Census - Tree Data

Description

Downloads 2015 Street Tree Census - Tree Data from NYC Open Data.

Usage

nyc_tree_census_2015(limit = 10000, filters = list())

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

Details

This dataset contains records from the 2015 Street Tree Census, including species, health, and location information for each recorded tree. Data collected by NYC Parks and volunteers.

Value

A tibble containing 2015 Street Tree Census - Tree Data.

Source

NYC Open Data: <https://data.cityofnewyork.us/resource/uvpi-gqnh>

Examples

# Quick example (fetch 10 rows)
small_sample <- nyc_tree_census_2015(limit = 10)
head(small_sample)


nyc_tree_census_2015(limit = 5000)
nyc_tree_census_2015(filters = list(curb_loc = "OnCurb"))


NYC Urban Park Ranger Animal Condition Response

Description

Downloads Urban Park Ranger Animal Condition Response data from NYC Open Data.

Usage

nyc_urban_park_animal_condition(limit = 10000, filters = list())

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

Details

This dataset records responses by NYC Urban Park Rangers to animal-related incidents across the five boroughs. It includes information on species, condition, location, and outcome, helping to monitor urban wildlife trends and public safety interactions.

Value

A tibble containing Urban Park Ranger Animal Condition Response data.

Source

NYC Open Data: <https://data.cityofnewyork.us/resource/fuhs-xmg2>

Examples

# Quick example (fetch 10 rows)
small_sample <- nyc_urban_park_animal_condition(limit = 10)
head(small_sample)


nyc_urban_park_animal_condition(limit = 5000)
nyc_urban_park_animal_condition(filters = list(age = "Infant"))



NYC Violent and Disruptive Incidents

Description

Downloads Violent and Disruptive Incidents data from NYC Open Data.

Usage

nyc_violent_disruptive_school_incidents(limit = 10000, filters = list())

Arguments

limit

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

filters

Optional list of field-value pairs to filter results.

Details

Incident counts and rates reported by NYC schools, broken out by incident category, school, and school year. Useful for safety trend analyses and comparisons across school types.

Value

A tibble containing Violent and Disruptive Incidents data.

Source

NYC Open Data: <https://data.cityofnewyork.us/resource/fpci-ws56>

Examples

# Quick example (fetch 10 rows)
small_sample <- nyc_violent_disruptive_school_incidents(limit = 10)
head(small_sample)


nyc_violent_disruptive_school_incidents(limit = 5000)
nyc_violent_disruptive_school_incidents(filters = list(school_type = "Public"))