Transportation analysis in R

A code blog by Alex Karner

Comparing Transit Travel Times From Two Different Sources

My go-to tool for transit travel time calculations has been Melinda Morang’s Add GTFS to a Network Dataset (AGtND) software. It’s an add-in for ArcGIS that allows you to run standard network analyses for transit systems, using any publicly available GTFS feeds and assuming you can generate a reasonable pedestrian network to facilitate boardings and alightings.

I wanted to do some validation of the results I’ve been getting out of Arc by comparing AGtND to estimated travel times from Google Maps. In principle they should be the same. My instinct was to use Python to query one of the Maps APIs, but I’m not quite as bilingual as I’d like, so I did the same in R.

Manually Defining a Diverging Legend in Ggplot

I’m in the process of mapping some data from the LEHD Origin-Destination Employment Statistics (LODES) helpfully provided by the US Census Bureau. LODES contains information on place of work, place of residence, and flows at the block level. The data are updated annually. As such they’re an invaluable resource for studying the commute patterns of demographic groups.

The analysis I’m working on is looking at changes over time in number of jobs at the census place level (currently 2009 - 2011). I identified the common locations for the region I’m looking at and created an identically structured data frame for each year so that I can easily calculate the difference. Each year of data is identified as wac.place.year where year varies. I ran into some problems visualizing temporal changes using a built in diverging color scheme that I solved through its manual definition.

Hello, World

I create a lot of code (mostly in R, but some Python too) to conduct my analyses. Most of that code sits on my computer, some of it makes its way to GitHub. I want more of a social outlet to work through issues I’m having and to share my successes. This blog should serve that purpose. Thanks for stopping by!