Categories
Tech

Global Healthy and Sustainable City Indicators

I recently co-authored an article, “Global Healthy and Sustainable City Indicators: Collaborative Development of an Open Science Toolkit for Calculating and Reporting on Urban Indicators Internationally,” now published in Environment and Planning B: Urban Analytics and City Science. This was a collaboration with my colleagues at the Global Observatory of Healthy and Sustainable Cities, in which we discuss our spatial software co-development process with collaborators and practitioners around the world.

From the abstract:

Measuring and monitoring progress towards achieving healthy, equitable and sustainable cities is a priority for planners, policymakers and researchers in diverse contexts globally. Yet data collection, analysis, visualisation and reporting on policy and spatial indicators involve specialised knowledge, skills, and collaboration across disciplines. Integrated open-source tools for calculating and communicating urban indicators for diverse urban contexts are needed, which provide the multiple streams of evidence required to influence policy agendas and enable local changes towards healthier and more sustainable cities. This paper reports on the development of open-source software for planning, analysis and generation of data, maps and reports on policy and spatial indicators of urban design and transport features for healthy and sustainable cities. We engaged a collaborative network of researchers and practitioners from diverse geographic contexts through an online survey and workshops, to understand and progressively meet their requirements for policy and spatial indicators. We outline our framework for action research-informed open-source software development and discuss benefits and challenges of this approach. The resulting Global Healthy and Sustainable City Indicators software is designed to meet the needs of researchers, planners, policy makers and community advocates in diverse settings for planning, calculating and disseminating policy and spatial urban indicators.

For more, check out the article.

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
Tech

Describing Cities with Computer Vision

What does artificial intelligence see when it looks at your city? I recently created a Twitter bot in Python called CityDescriber that takes popular photos of cities from Reddit and describes them using Microsoft’s computer vision AI. The bot typically does pretty well with straightforward images of city skylines and street scenes:

Some are even kind of wryly poetic, such as this description of Los Angeles:

Categories
Tech

Getting Started with Python

Piedmont, California street network created in Python with OSMnx, networkx, matplotlibThis is a guide for absolute beginners to get started using Python. Since releasing OSMnx a few weeks ago, I’ve received a lot of comments from people who would love to try it out, but don’t know where to begin with Python. I’ll demonstrate how to get Python up and running on your system, how to install packages, and how to run code.

Categories
Tech

Scientific Python for Raspberry Pi

Raspberry Pi 3 Model BA guide to setting up the Python scientific stack, well-suited for geospatial analysis, on a Raspberry Pi 3. The whole process takes just a few minutes.

The Raspberry Pi 3 was announced two weeks ago and presents a substantial step up in computational power over its predecessors. It can serve as a functional Wi-Fi connected Linux desktop computer, albeit underpowered. However it’s perfectly capable of running the Python scientific computing stack including Jupyter, pandas, matplotlib, scipy, scikit-learn, and OSMnx.

Despite (or because of?) its low power, it’s ideal for low-overhead and repetitive tasks that researchers and engineers often face, including geocoding, web scraping, scheduled API calls, or recurring statistical or spatial analyses (with small-ish data sets). It’s also a great way to set up a simple server or experiment with Linux. This guide is aimed at newcomers to the world of Raspberry Pi and Linux, but who have an interest in setting up a Python environment on these $35 credit card sized computers. We’ll run through everything you need to do to get started (if your Pi is already up and running, skip steps 1 and 2).

Categories
Tech

Pattern Unlock an Encrypted Android Phone

We’re all familiar with the possibility of data security breaches. Web sites get hacked, passwords get compromised, laptops get stolen. To mitigate these risks, we (try to) use strong passwords, keep our computers under lock and key, and encrypt our personal data. But what about our phones? They are increasingly relied on as mini-computers in our pockets, replete with email accounts, banking apps, and sensitive Dropbox files. Many apps store usernames and passwords in plain text.

What happens if your phone gets stolen? Many people don’t have any security or lock screen enabled at all. Others simply use a pattern or short PIN that is easily cracked in minutes. Android offers encryption, but it’s turned off by default. It’s also very inconvenient. To be effective, encryption requires a strong password, and Android (4.x) requires that you enter this password to unlock your phone when it boots-up, and also every time you unlock the screen.

The problem is that once you encrypt your phone, Android (again, versions 4.x – maybe this will change in a future release!) disables the ability to lock/unlock it with a pattern (annoyingly) or with a different, shorter PIN (perhaps understandably). Having to type in a long password every time you want to use your phone makes this is a non-starter for most users.

Ideally, we would enter a strong password to unlock and decrypt the phone at boot-up, and then use a simpler, user-friendly security mechanism (such as a pattern) to unlock the phone throughout the day. This would balance the benefits of strong-password encryption with the practicalities of making the phone accessible throughout the day.

Categories
Tech

How to Root a Nexus 4 in (Almost) Plain English

Unlock and root a Nexus 4One of the major benefits of owning an Android phone is its flexibility. You’re not boxed into Apple’s heavily circumscribed walled garden. Your phone is part of a fairly wide-open ecosystem and you can have total administrative control to tinker with its powerful hardware and software. How? By rooting the phone to give yourself administrative root access.

The main hurdle for most users is the confusing technical process to go about rooting the phone. There are plenty of tutorials online, but most of them rely on jargon, use imprecise language, or skip steps while assuming the user is familiar with the nuts and bolts of what the author means. The purpose of this tutorial is to provide a clear, precise, plain-English procedure to beginners for rooting an Android phone. Please give me any feedback you have if a step should include clearer language or needs to be updated in any way.

I validated this tutorial with a Nexus 4 running Android 4.4.4 and a computer running 64-bit Windows 8.1. However, the same basic steps apply to Linux and Mac as well as other versions of Android and Android phones. Rooting your phone carries some risk. You may invalidate your warranty, and following the procedure incorrectly could render your phone inoperable. Nevertheless, it is a common process that has been done by many, many Android users. Follow this tutorial at your own risk (disclaimer: the author accepts no responsibility) and make sure you backup all of your data first. Let’s begin.