Writing about cities, urban planning, mapping & data visualization
Pedestrian Collision Hot Spot Detection Using Machine Learning and Embeddings
Cities in North America have adopted vision zero policies with the goal of eliminating all traffic fatalities and injuries. There’s no doubt that the design of transportation infrastructure plays a major factor in collision occurrence. How can machine learning and geospatial embeddings play a role in predicting hot spots based on infrastructure design and other geographic features?
Query GTFS Parquet Data in the Browser with DuckDB-Wasm
GTFS data is typically served though traditional relational database systems such as PostGreSQL or SQlite. Using DuckDB and Parquet opens the door for analyzing GTFS data in the browser using a cloud native data format.
Urban Tree Canopy and Tree Equity using Satellite Data
Research has shown how urban forests have a number of social, environmental and economic benefits in cities. They will play an important role in climate change adaptation in urban areas.
Energy Consumption Modelling for Electric Bus Schedule Design
Designing a schedule for electric buses takes more than simply replacing the same service delivered by diesel buses. Due to range limitations of EVs, understanding how battery state of charge changes over a route is important. In this post I introduce a way to determine energy consumption metrics using a visualization tool that uses the Drivecycle python package.
Developing a Battery Energy Model for Electric Vehicles
Modelling electric vehicles (EV) performance and range is an important aspect in addressing fears of so-called range anxiety. Understanding battery performance is one of the more effective ways to do this. I explore the science (and equations) behind modelling battery State of Change (SoC) and how they are used in Drivecycle.
Creating a Bus Drive Cycle Simulation
Drive cycles play an important role in determining the energy consumption of electric vehicles. Using OSM speed limit and intersection data along with bus stop locations, I created a tool that simulates drive cycles for bus routes in different transit networks. This information can help transit agencies understand the constaints when operating electric buses on existing routes.
Perceiving Streetscape Quality with Semantic Segmentation of Street-Level Imagery: Experimenting with Deeplab V3
I had previously posted an article about using the DeepLab V3+ atrous convolution neural network model to segment street level images and use the output to assess streetscape quality. My prior results were poor because I was using an off-the-shelve model using the Cityscapes dataset. In this post I discuss training Deeplab V3+ on my own dataset using transfer learning and visualizing the segmentation of classes in a city.
Visualizing Bus Schedule Deviation using Vehicle Position and GTFS Data
Using data released as part of the Canadian Urban Transit Association “Data Blitz” I created a system wide visualization of bus schedule deviation for Calgary Transit buses. The analysis and visualization help us understand how well certain bus routes perform and potentially where to focus improvements.
Exploratory Geospatial Analysis of Property Assessments using Deck.gl
Deck.gl is a visualization framework developed by Uber to help visualize very large mobility datasets. Since being open sourced it’s been used in a variety of geospatial analysis. Let’s see how it works on visualizing property assessments with over 500,000 data points.
Building a Curb Rules Map
Curbs have become the next public infrastructure digitizing opportunity. In this post, I discuss the process of creating my own curb map and rules API using on–street parking rules data and SharedStreets draft CurbLR spec.
Visualizing Transit Flows in Canadian Cities
Sometimes you want to just admire the craziness of public transit. Transitflow is a tool that visualizes the flow of transit systems using static GTFS. I tried it out on a bunch of Canadian cities.
Designing Calgary’s Historic Streetcar Map
Calgary once had an extensive street car network. Using a copy of a 1945 map, I created a streetcar system map of the now defunct Calgary Municipal Railway. The result shows a vastly different fixed rail transit network than we see today.
Segmenting Street-Level Images with Computer Vision using Tensorflow
In this post I outline my workflow in training a toy convolutional neural network (CNN) model from start to finish including creating my own ground truth images. The model is then used to predict semantic segmentation masks of street-level images, a tool popular in autonomous vehicle driving applications.
Exploratory Data Analysis of Urban Trees in Calgary
The City of Calgary estimates there are almost 7 million trees growing within city limits. The urban forest we see today is the result of over a century of careful planning, planting and maintenance. Using a dataset of public trees, I did a short exploratory data analysis to understand the distribution of tree species.
Designing a Transit Map: User Experience Design
With the launch of Calgary’s new Bus Rapid Transit (BRT), I experimented with designing an interactive transit map to visualize the new system. The challenge involved creating an accessible, intuitive map where a user could quickly see the new routes and explore connections.
The Online Transit Map: Challenging a One Size Fits All Approach
Transit agencies must influence how their transit maps are displayed online. By relinquishing the design and mapping to tech companies, they lose out on the opportunity to communicate effectively with their customers.
Working with GTFS Realtime Transit Data
Decoding GTFS Realtime transit data can be a challenging endeavour for simple front end development. By using protobuf.js, AWS Lambda and Serverless, we can make the data accessible for web application and visualizations.
Using Open Data and Machine Learning to Predict Traffic Collisions
With the recent release of a traffic incident data set in Calgary, I was interested in utilizing the data to create a simple prediction model using machine learning. The availability of traffic incident data is still lacking in parts of Canada and its release can create an opportunity to analyze, interpret and predict urban transport behaviours.
Predict and Visualize Traffic Collisions using Keras and tensorflow.js
A simple traffic collision predictor and visualization created using Keras, tensorflow.js, React and Mapbox.
Using Google DeepLab v3+ to Evaluate Streetscape Quality
I’m a little late posting a follow up to my original article about using Machine Learning, specifically Deep Learning to help segment and classify streetscapes. It was actually the release of Google’s Deep Lab V3+ Convolutional Neural Network (CNN) in March 2018 that drew me back to this topic. Here is the final result of evaluating pedestrian routes in the Ramsay neighbourhood of Calgary.
Urban Farms, Land Use and Soil Contamination
Urban farming offers cities both economic and social benefits. With increasing populations migrating to urban centres, the development of sustainable, secure foods sources is a boon, however the potential for soil contamination is a barrier.
Transit Connectivity and Network Centrality
How do we know if transit routes are traveling through the most connected areas of a City? If we were to map bus routes and network centrality for communities what would that tell us about transit planning? Continuing on from my post about Social Street Networks, I’ve created an interactive map showing Calgary Transit bus routes and closeness centrality measures of the neighbourhoods they intersect.
Using React and Mapbox to Map Bus Routes
With all the hype surrounding React and Angular and JavaScript frameworks lately, it’s probably time to get familiar with this new fad. My recent post and project about Network Analysis required some type of application UI so why not try out React?
Social Street Networks
I’m always excited about discovering new ways to visualize how cities are planned and how street networks impact mobility and use. Recently I came across the study of Network Science and Social Network Analysis and its application to Transportation Planning.
Using Deep Learning to Perceive Streetscape Quality
Through my research on the basic operations of Artificial Neural Networks (ANN) and deep learning I’ve experimented with Caffe and a (somewhat) dated program called Segnet. Although it was developed in 2015 I was intrigued by the application of pixel wise segmentation of streets.
Drawing 3D Arcs
This is a simple sketch of 3D arcs using bezier curves. They can be a little tricky to figure out, especially when you can’t see the handles. I’ve been using them for a while in photoshop and have a pretty good grasp on how to manipulate them. I might try implementing this in a mapping visualization. Here is the code.
Streetscape Feature Segmentation with Deep Learning
I’ve been a little obsessed with artificial neural networks recently. A couple weeks ago I came across some research by the Machine Intelligence Lab at Cambridge which led to a segmentation program called SegNet. The accuracy of predicting and segmenting streetscape features had me curious about how the program worked.
Drawing Roads with GeoJSON and Processing
Continuing with my 3D mapping theme, I’ve built onto my previous map with GeoJSON road data from the City of Calgary Open Data catalogue.
Advection Dispersion Visualization in Processing
I recently took a Environmental Engineering graduate course about contaminant transport. Part of the course involved finite difference analysis and modelling so I thought I’d do a simple visualization with Processing to see the equations in action. The coding part was pretty simple but it was interesting to see how I could apply Processing to visualize a contaminant plume.
3D Mapping – Visualizing Population Data
Since the City of Calgary began releasing open data through the online catalogue I’ve been trying to come up with an interesting way to represent and visualize census data. It’s often difficult to represent something as boring as population and demographic data in a compelling way. The City of Calgary’s own census page presents the data in pages and pages of tables and graphs.
Drawing GeoJSON files in p5.js
Although using mapping application like Google Maps, Mapbox or Leaflet can be extremely useful, I was looking for a way to draw simple GeoJSON files in my Processing/p5.js sketches. I didn’t want to use a library to integrate my GeoJSON files and I wanted more flexibility in how my maps could be drawn and manipulated. I came across this post by Mike Fowler that achieved exactly what I was considering so I went about implementing this method in p5.js.
Mapping Pies - Visualizing Housing Type Data in Calgary
Over the past few months I’ve been learning and developing my skills in Processing and P5.js. Processing was brought by my attention earlier this summer by a graphic designer friend who thought I should give it a try. At that time I was learning python and looking for a more creative platform for coding. Since then I’ve been studying the tutorials by Daniel Shiffman, a contributor to Processing and associate professor at NYU’s Tisch School of the Arts. His youtube channel has been an awesome resources in getting started with Processing as well as picking up some basic Java and Javascript.