Load libraries and begin exploring

library(opendataphilly)
library(tidyverse)

After loading the opendataphilly package – and anything else that makes your life easier – it’s time to start exploring. You might use odp_get_recent_chgs() to find the freshest datasets or odp_get_group_names() to get a sense of how data is categorized on https://opendataphilly.org. Personally, I like to start with odp_get_package_list() and filter for datasets that are available in CSV format (which is all that’s downloadable for now).

List of Datasets
index packages format
11 311-service-and-information-requests HTML,CSV,GeoJSON,SHP,API Documentation
12 active-residential-parking-permits-by-district CSV,API Documentation,HTML
16 air-monitoring-stations api,CSV,SHP,HTML,GeoJSON,KML
17 airport-airside-pavement CSV,HTML,SHP,GeoJSON,api,KML
18 airport-buildings HTML,CSV,SHP,GeoJSON,api,KML
20 airport-parking-locations CSV,SHP,GeoJSON,HTML,api,KML

Exploring a little deeper

Once you find a dataset (or two) that sounds interesting, you can load the description to get a better sense of what it’s about. Note that the last line of the description contains a link to the dataset’s location on opendataphilly.org.

The data dictionary may also be available. This will provide fields and descriptions. Sometimes the html tags make it difficult to read so using knitr will make this easier to read in this case.

Data Dictionary
Field.Name Alias Description Type
COMMENTS NA Any additional information related to sprayground location. Text
DATA_SOURCE NA The source of the data about the sprayground location. Text
DATE_INSTALLED NA Approximate date when the sprayground was installed. Date
PARK_NAME NA Name of the PPR site that the sprayground is located within. Text
SPRAY_STATUS NA Current status of the sprayground.
Active
Inactive
Text

Downloading the dataset

Now that you found a dataset to explore, you can download it to a standard dataframe using odp_get_pkg_data().

Philly Spraygrounds
X Y OBJECTID PARK_NAME DATE_INSTALLED SPRAY_STATUS COMMENTS DATA_SOURCE
-75.23211 39.91532 1 J. Francis Finnegan Playground ACTIVE Sprinkler Finder; Cyclomedia; Aerials 2019
-75.16129 40.00624 2 Jerome Brown/Kenderton Playground ACTIVE Sprinkler Finder; Google Street Photos; Aerials 2019
-75.03365 40.09992 3 William A. Lackman Memorial Playground 2014-01-01T00:00:00.000Z ACTIVE Sprinkler Finder; Capital 2019; Google Street Photos; Aerials 2019
-75.06105 40.02913 4 Lower Mayfair Playground ACTIVE Sprinkler Finder; Google Street Photos; Aerials 2019
-75.18764 39.98907 5 Joseph E. Mander Playground 2016-01-01T00:00:00.000Z ACTIVE Sprinkler Finder; Capital 2019; Aerials 2019
-75.18324 39.94811 6 William H. (Billy) Markward Memorial Playground 2017-01-01T00:00:00.000Z ACTIVE Sprayground Finder; Capital 2019; Aerials 2019

Problems?

I hope you enjoy using this package. Should you have any issues, please submit it on GitLab at https://gitlab.com/db369/opendataphilly/issues.