You're viewing the legacy docs. They are deprecated as of May 18, 2016.
Go to current docs

Firebase Open Data Sets

SF Parking Open Data Sets

Get the latest street parking pricing information and garage availability.

Firebase Open Data Sets are deprecated and will be shut down on March 30th, 2016.

Overview

You can view the realtime San Francisco parking data in the App Dashboard.

Live Example

We've used this open data set to create an a map of San Francisco's street and garage parking data prices which can be seen below.


View source of this map.

Data Structure

The data is structured by city, currently the only city supported is "san_francisco". Below we can see the data is broken into "streets" and "garages" and each location has several peices of data which can be accessed.

{
    san_francisco: {
        _credits: String,               // The source of the data.
        _updated: String,               // A timestamp of the last update.
        (garages, streets): {            // A list of garages or streets
            $location: {
                friendlyName: String,   // A name for this location
                open_spaces: String,    // The number of open parking spaces
                total_spaces: String,   // The number of total parking spaces
                points: [
                    Number,             // Latitude of location
                    Number             // Longitude of location
                ],
                rates: {                // Pricing info for location
                    $time: {
                        BEG: String,    // Begin time
                        END: String,    // End time
                        RATE: String,   // Dollar rate
                        RQ: String      // Type of rate (i.e. Per Hour)
                    }
                }
                hours: {                // Operating hours for location
                    $time: {
                        BEG: String,    // Begin time
                        END: String,    // End time
                        FROM: String,   // A day of the week
                        TO: String      // A day of the week
                    }
                }
            }
        }
    }
}

Example Code

Retrieve all parking garages within 6 kilometers of the Golden Gate Bridge using GeoFire:

var ref = new Firebase('https://publicdata-parking.firebaseio.com');
var geoFire = new GeoFire(ref.child('garages'));

var location = [37.8197, -122.4786];
var distance = 6;

var geoQuery = geoFire.query({
  center: location,
  radius: distance
});

geoQuery.on("key_entered", function(id, location) {
    console.log("Found a garage: " + id);
});

Data Source

Parking data is provided by SFpark.org.