Thursday, June 22, 2017

Urban Picture: Venice from above

This picture comes from the Earth View, an extension for Chrome that displays some really beautiful satellite images from Google Earth every time you open a new tab. 

ps. and some people tell me I procrastinate too much, yeah right.

Wednesday, June 21, 2017

Difference-in-differences for spatial data

It just came to my knowledge today that Raymond Florax passed away a couple of months ago (in memorian). Prof. Florax was very influential in the field of spatial econometrics. In one his latest papers, he co-authored with Delgado and proposed a difference-in-differences method for spatial data, controlling for spatial dependence. Here is the paper.

Delgado, M. S., & Florax, R. J. (2015). Difference-in-differences techniques for spatial data: Local autocorrelation and spatial interaction. Economics Letters, 137, 123-126.

We consider treatment effect estimation via a difference-in-difference approach for spatial data with local spatial interaction such that the potential outcome of observed units depends on their own treatment as well as on the treatment status of proximate neighbors. We show that under standard assumptions (common trend and ignorability) a straightforward spatially explicit version of the benchmark difference-in-differences regression is capable of identifying both direct and indirect treatment effects. We demonstrate the finite sample performance of our spatial estimator via Monte Carlo simulations.

Tuesday, June 20, 2017

Assorted links

  1. Personal details of ~200 million US citizens exposed. A 1.1 terabyte data set with names, home addresses, phone numbers, political views etc. This is approx. 2/3 of the american population. Probably the largest data leak in history  thus far 

  2. I've recently found out that the principal scientist at Amazon‘s Modeling and Optimization team is Renato Werneck, a Brazilian researcher who is also one of the authors of Raptor, the Round-Based Public Transit Routing algorithm

  3. In the USA, both Democrats and Republicans agree there is a lot of discrimination against certain social groups. They just disagree which groups are discriminated against

  4. Health Effects of Overweight and Obesity in 195 Countries over 25 Years. Since 1980, obesity rates doubled in more than 70 countries and continuously increased in other countries

Prevalence of Obesity at the Global Level, According to Sociodemographic Index (SDI)

[click on the image to enlarge it]

Sunday, June 18, 2017

The effect of Uber on traffic congestion

Early this year, a paper in PNAS using a computer model estimated that car sharing services like Uber and Lyft could reduce the number of taxi vehicles on roads by ~76% without significantly impacting travel time. As Joe Cortright has said, the authors are overly optimistic. 

There is another study from last year that analyzed what actually happened to congestion levels when Uber entered the market in some US cities (abstract below). The results of this study are not really comparable to the the paper in PNAS, though. The methods are sound but I have the impression the authors pay too much attention to the statistical significance of the results and do not really discuss the magnitude of the effects of Uber entry on congestion. In any case, it's a good read. 

Li, Z., Hong, Y., & Zhang, Z. (2016). Do Ride-Sharing Services Affect Traffic Congestion? An Empirical Study of Uber Entry. Available at SSRN:

Sharing economy platform, which leverages information technology (IT) to re-distribute unused or underutilized assets to people who are willing to pay for the services, has received tremendous attention in the last few years. Its creative business models have disrupted many traditional industries (e.g., transportation, hotel) by fundamentally changing the mechanism to match demand with supply in real time. In this research, we investigate how Uber, a peer-to-peer mobile ride-sharing platform, affects traffic congestion and environment (carbon emissions) in the urban areas of the United States. Leveraging a unique data set combining data from Uber and the Urban Mobility Report, we examine whether the entry of Uber car services affects traffic congestion using a difference-in-difference framework. Our findings provide empirical evidence that ride-sharing services such as Uber significantly decrease the traffic congestion after entering an urban area. We perform further analysis including the use of instrumental variables, alternative measures, a relative time model using more granular data to assess the robustness of the results. A few plausible underlining mechanisms are discussed to help explain our findings.

A good-looking video of the computer simulation model of the PNAS paper.

Thursday, June 15, 2017

Mexicans didn’t cross the US border. The border crossed them

Carlos Goes pointed me to this short piece in The Economist:
"... communities have proved more durable than borders. The counties with the highest concentration of Mexicans (as defined by ethnicity, rather than citizenship) overlap closely with the area that belonged to Mexico before the great gringo land-grab of 1848."
For the most part, Mexicans didn’t cross the US border. The border crossed them.

Wednesday, June 14, 2017

Getting updates from Urban Demographics blog

This week we have crossed the milestone of 5000 followers on Twitter. If anything, this means there are a lot of procrastinators out there. If you're not on Twitter but you would like to  procrastinate  receive automatic updates when there is a new blog post, there are two options:

(1) You can subscribe to our RSS Feed in a reader . I'd recommend using Feedly. (2) Or you can get updates from our Facebook page.

if you like this blog, recommend it to your friends. If you don't like this blog, recommend it to your enemies. That's also fine.

Monday, June 12, 2017

The people who keep us company throughout our life cycle

Henrik Lindberg has put together this nice chart showing the people we spend the most time with throughout out life cycle. The data comes from the America Time Use Survey, and the the code to create this chart in R is available here. Thanks Steve Williams for the pointer.

This might be a good moment to reflect about life.

Friday, June 9, 2017

Time-lapse: Nightfall over Los Angeles

Nightfall, by Colin Rich. Remember to watch in high-definition full screen. Via Aaron Renn from Urbanphile.

NightFall from Colin Rich on Vimeo.

Wednesday, June 7, 2017

The Fundamental Law of Road Congestion

Duranton, G., & Turner, M. A. (2011). The fundamental law of road congestion: Evidence from US cities. The American Economic Review, 101(6), 2616-2652. Ungated version here.

We investigate the effect of lane kilometers of roads on vehicle-kilometers traveled (VKT) in US cities. VKT increases proportionately to roadway lane kilometers for interstate highways and probably slightly less rapidly for other types of roads. The sources for this extra VKT are increases in driving by current residents, increases in commercial traffic, and migration. Increasing lane kilometers for one type of road diverts little traffic from other types of road. We find no evidence that the provision of public transportation affects VKT. We conclude that increased provision of roads or public transit is unlikely to relieve congestion

This paper reminds of the Black Hole Theory of Highway Investment, which we posted about a while ago.

Monday, June 5, 2017

Making sense of smart cities

Last year (2016), Tim Schwanen, James Palmer and I put together a lecture series around the topic of "Urban Mobilities in the Smart City", hosted at the Transport Studies Unit (TSU) at Oxford University.

It was a great experience and I learned a lot from the speakers but also from the process of co-organizing the event. I would like to share here four papers that I've read back then and that I would recommend to anyone who wants to start a research on smart cities. These are quite influential papers so some of you might have read them already. Also, feel free to suggest in the comments some other publications you think have strongly contributed to the literature.

image credit : techcrunch

Thursday, June 1, 2017

What makes a good post-doc application ?

A heads up for those  unemployed  finishing their PhDs soon, by Martin Chalfie:

Wednesday, May 31, 2017

Visualizing the concept of prospective aging with R

In two great papers published in Science and Nature, W. Sanderson and  S. Scherbov proposed a new way to understand population aging. Instead of focusing on the time people have lived, the authors take a prospective look at the number of years people are still expected to live.

This concept of "prospective aging" is nicely summarized by Ilya Kashnitsky in a blog post:
"The underlying idea is really simple – age is not static: a person aged 65 (the conventional border deliminating elderly population) today is in many aspects not the same as a person ages 65 half a century ago. Health and lifespan improved a lot in the last decades, meaning that today people generally have much more remaining years of life at the moment of being recognized as elderly by the conventional standards. Thus, Sanderson and Scherbov proposed to define elderly population based on the estimation of the expected remaining length of life rather than years lived. Such a refined view of population ageing disqualifies the alarmist claims of the approaching demographic collapse."
If you're interested in the topic, I would highly recommend reading the whole post (and the papers, of course). Ilya brings not only a nice summary of the concept, he also presents some R scripts to create animated population pyramids to visualize prospective aging.

 Ilya Kashnitsky writes a great blog and twitter about demographic research and R more broadly, and I would highly recommend following his work online.

Related Links:

Tuesday, May 30, 2017

Wednesday, May 24, 2017

Urban Picture

Sunday, May 21, 2017

The impressive expansion of subway systems in China

I have posted in the past a GIF that compares the expansion of the subway systems of Rio and Shanghai between 1979 and 2014. This is a bit embarrassing for Rio, for sure, but let's be honest. Pretty much any developing country and even the USA in their efforts to develop mass transport infrastructure pales in comparison to China. Needless to say that massive expansion of infrastructure like this usually comes at high social and environmental costs that should not be neglected.

Peter Dovak (twitter) has created a new GIF that shows the expansion of subway systems in China between 1990 and 2020, giving a glimpse of the Chinese urban powerhouse. Peter has other great projects you might want to check out, including the Mini Metro Maps of the world.

ps. I saw this on the Transportation Planning and Analysis Facebook group, via Gonçalo Correia

Saturday, May 13, 2017

Time-lapse: night-flight over Europe

Great shot, by Thomas Pesquet.

Wednesday, May 10, 2017

Message of the Day

Dedicated to a dear friend, Claudia Comberti. From London to the Amazon forest.

Friday, May 5, 2017

Changing relation between wealth and left-wing vote: Piketty's guess on the French elections

I don't usually post about politics in the blog, but I had the chance to attend Thomas Piketty's presentation at the Marshall Lectures over the last two days and he dedicated a few minutes of his speech to talk about the 2017 French elections happening this weekend. 

He presented these two slides, where he shows the changing relationship between wealth + education and left-wing vote in France. The slides show what is Piketty's guess on what is going to happen in the French elections.  Hi guess are the red lines in both charts, suggesting that Macron will win the election. I think I'll just leave this here, for the record.

update after the elections: so, apparently, Piketty was correct.

photos: by Rafael H M Pereira

Thursday, May 4, 2017

Urban Picture

Street Chalking Games, New York city 1950

credit: ?, via MicropolisNYC

Wednesday, April 26, 2017

Map of Population Density Lines in R

If you are familiar with this famous Joy Division cover, you might remember that last year we shared a link that shows you how to reproduce the cover using R ggplot2. If you are a big fan of Joy Division and R, you should know that there is an R package just for that (by @mikefc).

About three years ago in 2014, James Cheshire created the Population Lines Print, a stylized map using lines to show population density in the world. It uses roughly the same data visualization style used in the Joy Division cover. 

credit: James Cheshire

How can you create a nice-looking map like this? Ask no more. James has recently shared the R script and a bit of the history behind his mapHenrik Lindberg has also generously written a gist with a simple and reproducible code to create a map with the same style showing the distribution of the population density in Europe, using R and ggplot2.

and you get this:

credit: Henrik Lindberg

UPDATE: Carson Sievert‏ shows how you can add two (2!) more lines of code to make this map interactive.

Tuesday, April 25, 2017

An unorthodox approach to spatial clustering

I left a question on gis.stackexchange about an unorthodox approach to spatial clustering that came to my mind a couple of days ago. I would be glad to hear if you have any thoughts on this. If you have any comments/answers, this time I'll ask you to write them on the gis.stackexchange website.

Monday, April 24, 2017

There is a boom in bicycle research

Although we don't know how the 'bicycle literature' has been growing relative to all publications in transport/mobility, there is a good sign there is boom in bicycle research! The method used by Jennifer to identify the publications is not supper systematic but it's insightful anyway. Jennifer's blog post is a quick and interesting read.

credit: Jennifer Dill

Thursday, April 20, 2017

Quote of the day: programming

Monday, April 10, 2017

A glimpse into the future of autonomous vehicles

Cesar Hidalgo (Twitter) has shared this mesmerizing video by People's Daily, China. It shows hundreds of autonomous robots sorting parcels in a warehouse of a Chinese delivery company.

It makes you think about many things related the technology density of the Chinese economy and the coming changes in the labor market of China and beyond. The obvious thought that occurred to me, though, is how these warehouses can be thought as a super simplified beta-version of integrated systems of autonomous vehicles we might see in cities in 100 years form now... maybe 50.

Wednesday, April 5, 2017

Two new libraries for working with Spatial data in R

A quick heads up for those interested in using R for spatial analysis and mapping data. There are two relatively new libraries you might want to check out:

  • The first one is the ggspatial library, created by Dewey Dunnington. ggspatial is a great package that makes it super simple to create maps using ggplot. It uses a single geom_spatial() for all types of spatial objects (polygons, lines, dots, etc.) and it dispenses the use fortify(), making things much faster.

  • Another library some of you might find useful is sf (as in simple features), created by Edzer Pebesma. This library makes it much faster to conduct several spatial operations, like reading/writing data, intersecting spatial objects, computing shortest distance matrices etc. The sf library is integrated with ggplot2 for creating maps with geom_sf() and it also makes it easy to connect to spatial data bases. This promises to be a real game changer for spatial analysis in R.

Monday, April 3, 2017

Saturday, April 1, 2017

Google Self-Driving Bike

This is from last year, but we can always use it on April 1st :)

Wednesday, March 29, 2017

On my way to Boston

Hi all. I'm flying to Boston in the next few days to participate at the AAG conference.

I'm very excited about this because I'll participate in a panel with Susan Fainstein and others. In the panel, I'll be talking about transportation equity and accessibility in the just city. My talk will be based on the 1st paper of my thesis and some future research questions on the topic.

I will also be at the session 3650 presenting the preliminary results of the 2nd paper of my thesis, where I analyze the distributional impacts of the transport legacy of recent mega-events in Rio de Janeiro (Brazil) in terms of their impacts in inequalities in access to opportunities. The paper combines population census data with geolocated time-tables in GTFS format in order to conduct a before-and-after comparison of Rio's public transport system between 2014 and 2017. The paper examines how the newly implemented transport investments have reconfigured the catchment areas of the Olympic sports venues and of healthcare facilities by public transport and walking, looking specifically at how the population composition within those areas has changed in terms of income categories.

The other papers of my PhD will focus on inequalities in accessibility to employment and educational opportunities, adding some new elements regarding methods and theoretical discussions. More info to come as I make progress on the research.

ps. In case you're in Boston next week and would like grab a  coffee  beer, drop me line or a tweet.

Saturday, March 25, 2017

Creating an animated world map of life expectancy changes from 1950 to 2100 in R

I've created this map after a couple of hours  procrastinating  testing the gganimate package in R, which makes it ridiculously simple to create this type animation in .gif or .mp4 format.

The map shows how the life expectancy of each country has changed from 1950 to 2015 and how it is expected to increase up to 2100. It looks better in full screen, but it's still a bit clunky.

I've also created a gist that shows how you can create this map yourself:

Thursday, March 23, 2017

cfp: special issue on informality in urban transport

Heads up. The Journal of Transport Geography has opened a call for papers for a special issue on "Concepts and methods on informality in urban transport across world regions".

Focus of the Special Issue:
The special issue intends to close the gap. Building on a set of original papers, it seeks to establish an account of the state-of-the-art of which concepts and methods are applied for what topics/aspects of informality in urban transport, an in-depth review of selected specific methods and their application in the field and the identification of their strengths and limitations, and the identification of lessons and directions for future research on the subject. The Symposium positions a set of overarching questions:
  • How and how well do existing concepts and methods capture the phenomenon of informality in urban transport? What are they missing out? What is the promise of new /emerging technology in data gathering? What can be won by combining methods?
  • What are the strengths and the limitations of approaches in specific case study contexts but also across cases and contexts?
  • How can case study and experiential-based methodologies inform network-scale analyses in more conventional transport geography?
  • What methods help to transfer knowledge from the research community across to policy making?

I saw this info on the new twitter account of the International Network for Transport and Accessibility in Low Income Communities, a research group recently created by Karen Lucas. You might wanna follow them.

Wednesday, March 22, 2017

Humans of Simulated New York: comprehensive ABM model of city life

Here is a very interesting project that aims towards building agent based models to simulate cities and the impacts of policies on them. The project is available on GitHub. Kudos to the authors, who are all on Twitter btw Francis TsengFei Liu and Bernardo Furtado.

Tseng, F., Liu, F., & Furtado, B. A. (2017). Humans of Simulated New York (HOSNY): an exploratory comprehensive model of city life. arXiv preprint arXiv:1703.05240.

The model presented in this paper experiments with a comprehensive simulant agent in order to provide an exploratory platform in which simulation modelers may try alternative scenarios and participation in policy decision-making. The framework is built in a computationally distributed online format in which users can join in and visually explore the results. Modeled activity involves daily routine errands, such as shopping, visiting the doctor or engaging in the labor market. Further, agents make everyday decisions based on individual behavioral attributes and minimal requirements, according to social and contagion networks. Fully developed firms and governments are also included in the model allowing for taxes collection, production decisions, bankruptcy and change in ownership. The contributions to the literature are multifold. They include (a) a comprehensive model with detailing of the agents and firms' activities and processes and original use of simultaneously (b) reinforcement learning for firm pricing and demand allocation; (c) social contagion for disease spreading and social network for hiring opportunities; and (d) Bayesian networks for demographic-like generation of agents. All of that within a (e) visually rich environment and multiple use of databases. Hence, the model provides a comprehensive framework from where interactions among citizens, firms and governments can be easily explored allowing for learning and visualization of policies and scenarios.

credit: Francis Tseng

Sunday, March 19, 2017

Quote of the day: the idea of community

A passage of the book "The Just City", where Susan Fainstein quotes D. Harvey to draw attention to how the idea of "Community" is a double-edged value. At the same time a community provides its members with social support, it is also exclusionary.

" 'Community' has ever been one of the key sites of social control and surveillance, bordering on overt social repression. Well-founded communities often exclude, define themselves against others, erect all sorts of keep-out signs (if not tangible walls) .... As a consequence, community has often been a barrier to rather than facilitator of progressive social change, and much of the populist migration out of villages (both rural and urban) arose precisely because they were oppressive to the human spirit and otiose as a form of sociopolitical organization". (David Harvey, 1997)

Friday, March 17, 2017

Chart of the Day: the gender gap in science

Elsevier has recently published the report "Gender in the Global Research Landscape", in which they analyze 'research performance through a gender lens across 20 years, 12 geographies, and 27 subject areas'. The team at The Economist wrote a short summary of the report, showing this chart. 

Thanks Claudio Ferraz for the pointer on twitter.

Thursday, March 16, 2017

Demographic fact of the day

Nigeria is the fastest growing countries in the world. The population of Nigeria will nearly double in the next 30 years.

Very interesting episode of BBC's Economic Tectonics on how economic power will shift as the world’s population changes, by Ruth Alexander.

Wednesday, March 15, 2017

Creative Process

This comes in cycles and I'm currently at stage #2, again.

Monday, March 13, 2017

The world's tallest and most densely populated slums

A short video about Tower of David, possibly the tallest slum today, located in Caracas, Venezuelza. (Thanks Telmo Ribeiro and Lucas Mation for the pointer)

And a short video about Kowloon Walled City of Hong Kong, which was of the most densely populated slums in the world until being demolished in 1994.

Thursday, March 2, 2017

Special issue on Human migration and refugees

Nature has a new special issue on migration and refugees (via Nicolsa Perra).

The United Nations has declared that the number of displaced people has surged to unprecedented numbers. But a close examination of data reveals that current flows are just as high as in they were in the 1990s. Because it is difficult to track refugees, official data and statistics must be handled with care, and yet misleading reports are creating unjustified fears about refugees.

source: UNHCR via Nature

Wednesday, March 1, 2017

Alternative Facts

via Daniel Pessini Sobreira on Facebook.

Tuesday, February 28, 2017

Quote of the day: Plans

For when you start your PhD: 
"Plans are worthless, but planning is everything" Eisenhower

When you get close to the end of your PhD:
“Everybody has a plan until they get punched in the face.” Mike Tyson

I could say Mike Tyson is my academic hero right now :)

Monday, February 20, 2017

Analyzing transport accessibility in Sweden, step 1

I've spent a few hours yesterday testing OpenTripPlanner to model transport accessibility by different transport modes in Swedish major metro areas, Stockholm, Gothenburg and Malmo. This is part of a project where I'm collaborating with colleagues from Lund University and K2 - The Swedish Knowledge Centre for Public Transport. Jean Ryan, Anders Wretstrand and I are engaging with the human capabilities approach and conducting a comparative study of transport accessibility of elderly people. Stay tuned.

Latter this year, I will post a detailed step-by-step + code of how I've been conducting accessibility analysis for my PhD and other projects. In short, I estimate travel-time matrices using OpenTripPlanner (I explain how to do this on GitHub). I then process the travel-time matrices with other spatial data in R, mainly using the super fast data.table library and make the plots using ggplot2 and ggmap.

These figures show just some preliminary tests for accessibility by bicycle + public transport. They values are meaningless here but the maps look good, right?

click on the image to enlarge it

Here are a couple of our recent publications related to this topic:

Sunday, February 19, 2017

Monday, February 13, 2017

On the specification of spatial models

One of best sentences I've read in an academic paper in years:
"Without divine intervention it is generally difficult to know with certainty which (if either) of the two above cases are true"
This is from Fotheringham et al (1998) on the specification of spatial models. I find this quite amusing but I must say this is one of the most well written and accessible articles on spatial econometric models I've come across so far. It's not by chance this paper has become a great reference on the topic with more than 500 citations.

I've only started reading more about spatial models recently. Here are four papers I would recommend to get started on the topic.
  • Anselin, L. (2002). Under the hood Issues in the specification and interpretation of spatial regression models. Agricultural Economics, 27(3), 247–267.
  • Fotheringham, A. S., Charlton, M. E., & Brunsdon, C. (1998). Geographically Weighted Regression: A Natural Evolution of the Expansion Method for Spatial Data Analysis. Environment and Planning A, 30(11), 1905–1927.
  • Florax, R. J. G. M., Folmer, H., & Rey, S. J. (2003). Specification searches in spatial econometrics: the relevance of Hendry’s methodology. Regional Science and Urban Economics, 33(5), 557–579. [thanks Leo Monasterio for the recommendation]
  • Páez, A., & Scott, D. M. (2005). Spatial statistics for urban analysis: A review of techniques with examples. GeoJournal, 61(1), 53–67.

This paper is particularly relevant to problem raised in the quote above:

  • Gibbons, S., & Overman, H. G. (2012). Mostly Pointless Spatial Econometrics?*. Journal of Regional Science, 52(2), 172–191

I just happened to like this plot.

Wednesday, February 8, 2017

Quote of the Day

"My interest is not data, it's the world. And part of world development you can see in numbers. Others, like human rights, empowerment of women, it's very difficult to measure in numbers." 
(Hans Rosling in an interview in 2013)

Thanks Sunniva Sandbukt for bringing this quote to my attention.

Tuesday, February 7, 2017

Hans Rosling passed away today

"We are extremely sad to announce that Professor Hans Rosling died this morning. Hans suffered from a pancreatic cancer which was diagnosed one year ago. He passed away early Tuesday morning, February 7, 2017, surrounded by his family in Uppsala, Sweden."
This information comes from Gapminder, which Hans was one the founders in 2006.

Hans was incredibly knowledgeable of social and economic dimensions behind population and health issues. He was also and incredible speaker who gave a great contribution to the public understanding of population studies (his Ignorance Project is one of my favorites). Also thanks to the great relevance of the Gapminder project, he became internationally famous because of his TED talks, to the point he became know as the “Mick Jagger" of TED.

I've included below a few links to some of our previous posts on Hans Rosling's work, but he has has many more incredible videos, material out there on the web that will keep a beautiful memory of Hans and his work.

My sentiments to the Rosling's family and close friends.

Some of our posts on Hans Rosling's work.