Package 'nycomplaints'

Title: NYC Complaints
Description: CouncilStat data on constituent issues in New York City.
Authors: Kieran Healy [aut, cre] (ORCID: <https://orcid.org/0000-0001-9114-981X>)
Maintainer: Kieran Healy <[email protected]>
License: MIT + file LICENSE
Version: 0.3.0
Built: 2026-05-12 09:30:30 UTC
Source: https://github.com/kjhealy/nycomplaints

Help Index


Census variables

Description

Lookup table for ACS variable names

Usage

census_vars

Format

A data frame with 9 rows and 2 variables:

variable

character Census variable name

varname

character Short name used in zipcode table

Details

None.


fmt_nc

Description

Format fmt_nc in df

Usage

fmt_nc(x)

Arguments

x

df

Details

use in fn documentation

Value

formatted string

Author(s)

Kieran Healy

Examples

## Not run: 
if(interactive()){
 #EXAMPLE1
 }

## End(Not run)

fmt_nr

Description

Format fmt_nr in df

Usage

fmt_nr(x)

Arguments

x

df

Details

use in fn documentation

Value

formatted string

Author(s)

Kieran Healy

Examples

## Not run: 
if(interactive()){
 #EXAMPLE1
 }

## End(Not run)

NYC Zip Codes by borough

Description

Zip codes and borough names

Usage

nyc_zips

Format

A data frame with 211 rows and 5 variables:

  • zip Zip code (char)

  • borough Borough name

  • city City name (USPS)

  • county County name

  • long_county County name, New York

  • short_county One word county name

Details

Sources: https://www.nyc.gov/assets/planning/download/office/data-maps/nyc-population/census2000/sf1p11.xls and https://worldpopulationreview.com/zips/new-york


Complaints to NYC Council Constituent Services

Description

Complaints data from New York City's CouncilStat

Usage

nycomplaints

Format

A data frame with 341,299 rows and 11 variables:

unique_key

character Complaint identifier.

account

character NYC Council District that created the casework, this may or not be the district that the constituent lives in.

opendate

date Date the casework is created by staff.

closedate

date Close Date is the date the casework was closed. A casework could be closed because the issue is resolved or because no further action could be taken.

complaint_type

character Broader category designated by staff for the constituent casework. complaint_type corresponds to NYC Council Legislative Committees.

descriptor

character Specific category designated by staff for the constituent casework.

zip

integer Zip code of the constituent.

borough

character Borough of the constituent.

city

character City of the constituent.

council_dist

Council District of the constituent.

community_board

Community Board of the constituent.

Details

Table: Data summary

Name nycomplaints
Number of rows 341299
Number of columns 11
_______________________
Column type frequency:
Date 2
character 9
________________________
Group variables None

Variable type: Date

skim_variable n_missing complete_rate min max median n_unique
opendate 0 1.00 2015-01-01 2025-01-09 2018-06-19 3296
closedate 14142 0.96 2015-01-02 2025-01-09 2018-11-20 2686

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
unique_key 0 1.00 12 12 0 341194 0
account 0 1.00 6 6 0 51 0
complaint_type 7431 0.98 3 25 0 59 0
descriptor 20507 0.94 1 56 0 1259 0
zip 50624 0.85 1 5 0 1370 0
borough 63097 0.82 5 13 0 5 0
city 35555 0.90 1 49 0 1465 0
council_dist 60210 0.82 4 12 0 156 0
community_board 72772 0.79 1 16 0 99 0

Produced from NYC Open Data Initiative data. The dataset comes from CouncilStat, which is used by many NYC Council district offices to enter and track constituent cases that can range from issues around affordable housing, to potholes and pedestrian safety. This dataset aggregates the information that individual staff have input. However, district staffs handle a wide range of complex issues. Each offices uses the program differently, and thus records cases, differently and so comparisons between accounts may be difficult. Not all offices use the program. For more info - http://labs.council.nyc/districts/data/

Author(s)

Kieran Healy

References

https://data.cityofnewyork.us/City-Government/NYC-Council-Constituent-Services/9hzi-kbqb,http://labs.council.nyc/districts/data/