I love maps, but I don’t get to work on geospatial problems professionally. I majored in geography and geospatial science in undergrad, but my post academic life I don’t get to work on spatial projects very often.
My geospatial skills are out of date. When I was in school the primary tool for spatial analysis was ArcGIS, an expensive and proprietary suite of software. While ArcGIS is still dominant in the industry, there are now many more open source options available for visualization, manipulation and analysis.
I want to improve my Python skills. I currently work as an analyst in a very SQL heavy role and am looking to get more comfortable with Python.
I would like to explore different modes of transportation in Chicago and the network they form. I am particularly interested in incorporating Divvy. Google Maps does not include Divvy as a transit option, so I want to see if I can incorporate bike share into the routing for all or part of a given trip. I also want to look at ridership data to identify popular routes.
The world of geospatial analysis has changed a lot since I studied it a decade ago! There is a whole world of open source geospatial tools in Python that I wanted to explore. In fact, there are far too many for me to get anything close to a comprehensive overview in the 3 month period of the mentorship. After a bit of research here are some of the tools I’ll be using to complete my project:
GeoPandas: This package enables spatial operations with the GeoDataFrame structure, an extension of the Pandas DataFrame. I am already familiar with DataFrames, so being able to perform operations like intersect and spatial overlay with a similar structure is awesome.
OSMnx: Obtaining street network datasets used to be fairly difficult - a lot of it was proprietary - but Open Street Map has really changed the landscape. OSMnx makes it so simple to access topological data sourced from Open Street Map:
import osmnx as ox G = ox.graph_from_place('Chicago, Illinois, USA', network_type='drive')
contextily: Real talk, I’ve never been great at making pretty maps. I am always much more interested in the analysis than the visual appeal of the final product. Contextily allows me to use pre-existing map tiles as a background.
I will be sourcing most of my datasets from Chicago’s Open Data Portal. Here is what I have so far:
As I mentioned above, I’ll also be using network data from Open Street Map via OSMnx. I can change the
network_type parameter to get walking and biking networks well.
I have a fair bit of data-janitoring and data collection still ahead.
station_namebut these are not consistent and are not unique to each station. For example, the Damen stop on the Blue Line is different from the Damen stop on the Red Line.
And once data collection is complete I’ll start building my network. I’ll be looking for intersections and distances between the different transit mode datasets - the beginnings of a graph.