All Projects → Chicago → Osd Bike Routes

Chicago / Osd Bike Routes

Licence: mit
Open source release of bike routes in Chicago.

Projects that are alternatives of or similar to Osd Bike Routes

Rsocrata
Provides easier interaction with Socrata open data portals http://dev.socrata.com. Users can provide a 'Socrata' data set resource URL, or a 'Socrata' Open Data API (SoDA) web query, or a 'Socrata' "human-friendly" URL, returns an R data frame. Converts dates to 'POSIX' format. Manages throttling by 'Socrata'.
Stars: ✭ 182 (+30%)
Mutual labels:  open-data, government
CityScoreToolkit
Open-source version of Boston's CityScore performance dashboard
Stars: ✭ 42 (-70%)
Mutual labels:  government, open-data
Data.gov
Data.gov source code and issue tracker
Stars: ✭ 1,856 (+1225.71%)
Mutual labels:  open-data, government
Forms
Tracking our progress moving all city paper and pdf forms online.
Stars: ✭ 14 (-90%)
Mutual labels:  government, open-data
311
New web portal for BOS:311
Stars: ✭ 15 (-89.29%)
Mutual labels:  government, open-data
Atd Data And Performance
Open data and performance hub for the City of Austin Transportation Department
Stars: ✭ 17 (-87.86%)
Mutual labels:  open-data, government
Open Data Etl Utility Kit
Use Pentaho's open source data integration tool (Kettle) to create Extract-Transform-Load (ETL) processes to update a Socrata open data portal. Documentation is available at http://open-data-etl-utility-kit.readthedocs.io/en/stable
Stars: ✭ 93 (-33.57%)
Mutual labels:  open-data, government
osd-building-footprints
Open source release of building footprints in Chicago.
Stars: ✭ 61 (-56.43%)
Mutual labels:  government, open-data
Osd Street Center Line
Open source release of street center lines in Chicago.
Stars: ✭ 108 (-22.86%)
Mutual labels:  open-data, government
Decidim
The participatory democracy framework. A generator and multiple gems made with Ruby on Rails
Stars: ✭ 894 (+538.57%)
Mutual labels:  open-data, government
Openpolice Platform
An open source web publishing platform for police forces.
Stars: ✭ 15 (-89.29%)
Mutual labels:  open-data, government
Adresse.data.gouv.fr
Le site officiel de l'Adresse
Stars: ✭ 117 (-16.43%)
Mutual labels:  open-data
Codesearchnet
Datasets, tools, and benchmarks for representation learning of code.
Stars: ✭ 1,378 (+884.29%)
Mutual labels:  open-data
Transitland Datastore
Transitland's centralized web service API for both querying and editing aggregated transit data from around the world
Stars: ✭ 101 (-27.86%)
Mutual labels:  open-data
Cobalt
Open data APIs for interfacing with public information from the University of Toronto.
Stars: ✭ 100 (-28.57%)
Mutual labels:  open-data
Awesome Italian Public Datasets
A selection of interesting Open dataset from the Italian Public Administration and Civic Data use cases
Stars: ✭ 132 (-5.71%)
Mutual labels:  open-data
The Building Data Genome Project
A collection of non-residential buildings for performance analysis and algorithm benchmarking
Stars: ✭ 117 (-16.43%)
Mutual labels:  open-data
Nycdb
Database of NYC Housing Data
Stars: ✭ 94 (-32.86%)
Mutual labels:  open-data
Ckanr
R client for the CKAN API
Stars: ✭ 91 (-35%)
Mutual labels:  open-data
Uswds Site
USWDS website and documentation
Stars: ✭ 135 (-3.57%)
Mutual labels:  government

README

The City of Chicago is releasing selected datasets from the data portal under the MIT License (see below). This repository contains:

  1. Data in a GeoJSON format.
  2. Examples of importing data into R, Python, and Ruby.
  3. Instructions to transform data from the data portal to data in the repository.

Working with GeoJSON Data

The data was released as a GeoJSON file. Below are some simple instructions which will show you how to load GeoJSON in R, Python, and Ruby.

R

Find an example script here. This example will import the data in R and create a couple of maps.

Instructions:

  1. Set the working directory to the location of the downloaded repository.

    setwd("path\\to\\repository\\folder")
    
  2. Install the "rgdal" library to let R read and translate the data from GeoJSON to a Shapefile. We will use "ggplot2" library to transform the spatial data frame to a regular data frame--and to make a map.

    install.packages(c("rgdal","ggplot2"))
    
  3. Load the libraries:

    library(rgdal)
    library(ggplot2)
    
  4. Import data to a spatial dataframe. City data is typically created using the transverse Mercator projection.

    ogrInfo("data\\Bikeroutes.geojson", layer="OGRGeoJSON")
    bikeroutes.shapefile <- readOGR(dsn="data\\Bikeroutes.geojson", layer="OGRGeoJSON", p4s="+proj=tmerc +ellps=WGS84")
    
  5. Ensure the map works:

    plot(bikeroutes.shapefile)
    
  6. Lets convert the spatial dataframe to a typical dataframe.

    bikeroutes.table <- fortify(bikeroutes.shapefile)
    
  7. Review the new dataframe.

    head(bikeroutes.table)
    
  8. Plot the data.

    ggplot(bikeroutes.table, aes(x=long, y=lat, group=group)) + geom_path()
    

Here is the output you should expect from the plot() command: plot(bikeroutes.shapefile)

Here is the output you should expect from the ggplot() command: ggplot(bikeroutes.df, aes(x=long, y=lat, group=group))+geom_path()

Python

Find an example script here.

  1. Load the necessary json and pprint libraries.

    import json
    
  2. Open GeoJSON data file.

    bikeroutes_json = open('PATH/TO/osd-street-center-line/data/Bikeroutes.json', 'r')
    
  3. Check first few lines of data (repeat this command several times)

    bikeroutes.readline()
    
  4. Load GeoJSON file.

    bikeroutes = json.load(bikeroutes_json)
    
  5. Close the open GeoJSON file.

    json.close(bikeroutes_json)
    

Ruby

An example ruby script is provided to show loading GeoJSON and running spatial analysis using the RGeo suite. A simple Gemfile is provided to make getting the dependencies and using them easy.

    $ cd PATH/TO/osd-bike-routes/examples/ruby
    $ bundle
    $ ruby example.rb

This example script filters the Bikeroutes.json to street segments within a 500ft buffer of 50 W Washington.

Differences between data portal and this repository

Though the data in this repository is also available on Chicago's data portal, the data in this repository is different in several ways. First, the data within this repository is released under the MIT License. Second, this data has been edited to remove internal codes which do not provide useful information. Third, after changes were made to the dataset, the original shapefile was converted to GeoJSON using GDAL's ogr2ogr

The resulting shapefile is then translated to GeoJSON using the ogr2ogr from the GDAL application. The transformation is completed in the command prompt:

ogr2ogr -f "GeoJSON" Bikeroutes_ogr.json /path/to/portal/data/Bikeroutes3.shp

Unfortunately, ogr2ogr outputs in machine, but not human-readable files. We use Python's simplejson.tool to transform the data to the final JSON file.

type Bikeroutes_ogr.json | python -m simplejson.tool > Bikeroutes.json

The folder "Transformations" contains the necessary code to transform data on the portal to the release in this repository.

License

This data is released under the MIT License. See LICENSE.txt.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].