Skip to content

beanumber/nyc311

Repository files navigation

NYC311 (Phone Call Tracking System Data)

Travis-CI Build Status

nyc311 is a R package based on ETL framework to interface with NYC311 Phone call tracking system data. This package contains information collected from NYC Open Data Portal, and it allows users to download multiple years of phone call data to a local SQL database.

NYC Open Data Portal updates NYC311 dataset everyday, so users can get access to phone call information from 2010-01-10 to yesterday. This package uses the ETL framework.

To install the package

install.packages("devtools")
devtools::install_github("beanumber/nyc311")

To load the package

This command loads both etl and dplyr.

library(nyc311)

Create an etl object:

calls <- etl("nyc311")
summary(calls)

Populate the database:

calls %>%
  etl_extract(years = 2010:2011, months = 1:2, num_calls = 100) %>%
  etl_transform(years = 2010:2011, months = 1:2) %>%
  etl_load(years = 2010:2011, months = 1:2)

Now you can pull the data that you are interested in into your R Environment.

my_calls <- calls %>%
  tbl("calls") %>%
  collect()

And take a look at it.

glimpse(my_calls)

Please read the vignette for more detailed examples.

About

R package providing an API to the NYC 311 data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages