Categories
Tech

Outlook to Google Calendar Sync

Ah, the travails of academia. Like many universities, USC uses Microsoft Outlook as its email and calendar provider. This presents some integration challenges for those of us, like me, who use Google Calendar everywhere else in life. It’s effectively impossible to sync an Outlook Calendar with a Google Calendar, so I had to juggle between both when trying to schedule anything. Chaos ensues.

So, I created a script to perform an ongoing one-way sync from my USC Microsoft Office 365 Outlook calendar to my personal Google calendar, handling new, updated, and deleted events. I had to develop my own solution because Microsoft/Google inexplicably can’t get their own acts together. For example, you can publish your Outlook calendar’s ICS URL and add it to Google, but it only syncs roughly once per day so you miss any new appointments in the meantime. Microsoft Flow used to work (clumsily) for syncing, but even their official recipes are now broken. So I had to roll my own.

Categories
Data

New Article on Computational Notebooks

I have a new article out in Region: Journal of the European Regional Science Association, “Urban Street Network Analysis in a Computational Notebook.” It reflects on the use of Jupyter notebooks in applied data science research, pedagogy, and practice, and it uses the OSMnx examples repository as an example.

From the abstract:

Computational notebooks offer researchers, practitioners, students, and educators the ability to interactively conduct analytics and disseminate reproducible workflows that weave together code, visuals, and narratives. This article explores the potential of computational notebooks in urban analytics and planning, demonstrating their utility through a case study of OSMnx and its tutorials repository. OSMnx is a Python package for working with OpenStreetMap data and modeling, analyzing, and visualizing street networks anywhere in the world. Its official demos and tutorials are distributed as open-source Jupyter notebooks on GitHub. This article showcases this resource by documenting the repository and demonstrating OSMnx interactively through a synoptic tutorial adapted from the repository. It illustrates how to download urban data and model street networks for various study sites, compute network indicators, visualize street centrality, calculate routes, and work with other spatial data such as building footprints and points of interest. Computational notebooks help introduce methods to new users and help researchers reach broader audiences interested in learning from, adapting, and remixing their work. Due to their utility and versatility, the ongoing adoption of computational notebooks in urban planning, analytics, and related geocomputation disciplines should continue into the future.

For more, check out the article.

Categories
Data

Exporting Python Data to GeoJSON

I like to do my data wrangling and analysis work in Python, using the pandas library. I also use Python for much of my data visualization and simple mapping. But for interactive web maps, I usually use Leaflet. There isn’t dead-simple way to dump a pandas DataFrame with geographic data to something you can load with Leaflet. You could use GeoPandas to convert your DataFrame then dump it to GeoJSON, but that isn’t a very lightweight solution.

So, I wrote a simple reusable function to export any pandas DataFrame to GeoJSON:

Categories
Academia

Urban Informatics and Visualization at UC Berkeley

The fall semester begins next week at UC Berkeley. For the third year in a row, Paul Waddell and I will be teaching CP255: Urban Informatics and Visualization, and this is my first year as co-lead instructor.

This masters-level course trains students to analyze urban data, develop indicators, conduct spatial analyses, create data visualizations, and build Paris open datainteractive web maps. To do this, we use the Python programming language, open source analysis and visualization tools, and public data.

This course is designed to provide future city planners with a toolkit of technical skills for quantitative problem solving. We don’t require any prior programming experience – we teach this from the ground up – but we do expect prior knowledge of basic statistics and GIS.

Update, September 2017: I am no longer a Berkeley GSI, but Paul’s class is ongoing. Check out his fantastic teaching materials in his GitHub repo. From my experiences here, I have developed a course series on urban data science with Python and Jupyter, available in this GitHub repo.