This is an UNOFFICIAL package that provides functions to facilitate the finding and retrieval of datasets from https://opendataphilly.org.

Usage


List datasets

This will download all datasets (or packages) available through the opendataphilly api. Data is provided in a number of formats, but only CSV is supported by this package right now. To see what formats are available for each dataset, you can try the following:

This may be slow so you may find filtering the list a little faster. For example:

odp_get_package_list('crime', format=TRUE)

Dataset description

Once you find a dataset to explore, you retrieve a description of the data with odp_pkg_describe(), which requires an index or package name.

odp_pkg_describe(418)
  or
odp_pkg_describe('ppr-spraygrounds')

Data dictionary (or field descriptions)

To get a summary of the data fields, the odp_get_metadata() will be helpful.

odp_get_metadata(418)
  or
odp_get_metadata('ppr-spraygrounds')

Download data

And odp_get_pkg_data() will download the dataset to dataframe, assuming a CSV format exists. Support for other formats (like shape files and GeoJSON) may come.

odp_get_pkg_data(418)
  or
odp_get_pkg_data('ppr-spraygrounds')

Recently updated data

odp_get_recent_chgs() is useful for identifying datasets that have recently changed.