This is an UNOFFICIAL package that provides functions to facilitate the finding and retrieval of datasets from https://opendataphilly.org.
# Install development version from GitLab
devtools::install_gitlab("db369/opendataphilly")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:
odp_get_package_list(format=TRUE)This may be slow so you may find filtering the list a little faster. For example:
odp_get_package_list('crime', format=TRUE)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')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')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')odp_get_recent_chgs() is useful for identifying datasets that have recently changed.