Saturday, August 19, 2017

Magic roundabouts

Behold the "magic roundabout" in Swindon, England. It is a roundabout formed by 5 smaller roundabouts arranged around a sixth central, anticlock wise roundabout. I would also called it 'magic' if I managed to drive through it and survive. Jokes aside, it seems pretty safe.

Apparently, this is a thing in the UK where they have four other magic roundabouts. Here is how the one in Swindon works:

Friday, August 18, 2017

Social class and commuting in London from 1800 to 1940

In this video Simon Abernethy talks about his PhD thesis where he looked at how public transport shaped the distribution of social classes in London from 1800 to 1940. The interview covers some interesting details about the daily life of suburban commuters back then. I think some urban historians might enjoy it. Looking at you Yuri Gama.

This is a relatively old interview, though. It was recorded in 2013 and Simon has published a few studies since then.


Saturday, August 12, 2017

An R library to analyze and map John Snow's 1854 Cholera data

As many of you will know, an English physician called John Snow mapped the cholera outbreak in the Soho district of London in 1854. That map would later be a key element in the discovery that cholera was caused by contaminated water, not air. It's fair to say this map somehow changed history not only because of the lives it helped save, but perhaps more importantly because of the ways it opened human imagination to the role of spatial analysis in science and human development. Steven Johnson has written a book about the story of this map and its influence on modern science and cities. If you are short in time, there is a great 9-minute video summary of the book here.

All this introduction to say that now there is an R library that allows you to analyze and map John Snow's 1854 Cholera data yourself. Thanks Bob Rudis for calling attention to this library on twitter. Dani Arribas-Bel also pointed out to this chapter / online notebook that presents the documented code for a reproducible spatial analysis of John Snow’s map using mostly Python. This is great material for teaching.

update 16 Aug 2017: RJ Andrews has also pointed me to this paper analyzing the mortality rates and the space-time patterns of John Snow’s cholera epidemic map.



Sunday, August 6, 2017

Saturday, July 29, 2017

Computational social science and the dynamics of social trust

Just a quick  procrastination  post today since I'm still working on the paper I'll submit to TRB.

I read a few days ago a great piece by Pseudoerasmus (Twitter) on 'Where Do Pro-Social Institutions Come From?'. It's a long read but it gives a nice and beautifully written overview on the recent research on the dynamics of social trust and its relation to collective action, culture, institutions and evolutionary game theory.

On a related topic, I just saw today the new project by Nicky Case. Nick is a star programmer/interactive designer that uses code to build interactive websites to explain scientific theories to the wider public. He has many interesting projects so be aware you might loose a day or two playing with his projects. In his latest project, Nick applies computational social science to game theory to explore the dynamics of social trust. It's a super well designed project that explains in simple terms such a complex topic. I think this is a great complimentary material to Pseudoerasmus' piece and in fact to any course on collective action, social trust, game theory, chaos and complexity theory.

Now go on. Take 7 minutes of your day and give it a try. It's worth it. If you don't have 7 minutes, this is the main take away.
"If there's one big takeaway from all of game theory, it's this: What the game is, defines what the players do. Our problem today isn't just that people are losing trust, it's that our environment acts against the evolution of trust. [...] In the short run, the game defines the players. But in the long run, it's us players who define the game"

Friday, July 21, 2017

The high cost of free parking

Nice video by Vox and the Mobility Lab team on how parking requirements shaped American cities. Via Jeff Wood



Thursday, July 20, 2017

Map of the day: the public transport network of Tokyo

Simon Kuestenmacher tweeted the other day this map that shows the public transport network of Tokyo metropolitan area (higher quality image in Japanese here). Tokyo is today the largest metro area with almost 38 million people. The amount of planning and daily work they put in their transport network overt the decades it just jaw dropping, as this maps can tell. 

Monday, July 17, 2017

Vertical Hong Kong

Beautiful drone footage of Hong Kong, by Mariana Bisti (2017). It's better in full screen.




Friday, July 14, 2017

Heads up for some useful R packages

As you can see from this post, the community of R users and developers is alive and kicking on Twitter. If you would like to recommend other packages, send me an email or leave a comment on this post.

  1. data.table: high-performance data manipulation, by Matt Dowle and Arun Srinivasan. This is certainly among my favourite packages. I've been working with datasets of a few hundreds of millions observations and it makes things much faster. I stopped using dplyr long time ago


  2. tidycensus: a new library to get the US Census Bureau spatial and demographic data in R ready for use with sf and the tidyverse. This package was created by Kyle Walker, who is a must-follow if you're into R and spatial analysis


  3. mapview: interactive viewing of spatial objects in R, by Tim Salabim


  4. mapedit: interactive editing of spatial data in R, by Kent Russel






  5. ggsci, a collection color palettes inspired by colors used in scientific journals to be used in ggplot2, by Nan Xiao


  6. ourworldindata: a package by Simon Jackson to access the datasets from OurWorldInData.org, which is a great project by Max Roser


  7. magick: advanced image-processing in R, which can be really useful for including gifs in your plots and impress reviewer #2 . ht Danielp Hadley


Sunday, July 9, 2017

Thursday, July 6, 2017

Bicycles empower women: evidence from a quasi-experiment in India

In 1896, the American civil rights leader Susan B Anthony wrote about the crucial role that the bicycle had in women's emancipation and independence. Gradually, more and more evidence shows she was right.

Four years ago we posted about a study by K. Muralidharan and N. Prakash, who analyzed an Indian program "... aimed to reduce the gender gap in secondary school enrolment by providing girls who continued to secondary school with a bicycle that would improve access to school". They have found that the program was an extremely cost-effective way to increase girls’ access to secondary schools and enrolment rates. Their paper just came out published in the American Economic Journal: Applied Economics. (ungated older version here).

Muralidharan, K., and Prakash, N.. 2017. "Cycling to School: Increasing Secondary School Enrollment for Girls in India." American Economic Journal: Applied Economics, 9(3): 321-50. 

Abstract
We study the impact of an innovative program in the Indian state of Bihar that aimed to reduce the gender gap in secondary school enrollment by providing girls who continued to secondary school with a bicycle that would improve access to school. Using data from a large representative household survey, we employ a triple difference approach (using boys and the neighboring state of Jharkhand as comparison groups) and find that being in a cohort that was exposed to the Cycle program increased girls' age-appropriate enrollment in secondary school by 32 percent and reduced the corresponding gender gap by 40 percent. We also find an 18 percent increase in the number of girls who appear for the high-stakes secondary school certificate exam, and a 12 percent increase in the number of girls who pass it. Parametric and non-parametric decompositions of the triple- difference estimate as a function of distance to the nearest secondary school show that the increases in enrollment mostly took place in villages that were further away from a secondary school [> 3km], suggesting that the mechanism of impact was the reduction in the time and safety cost of school attendance made possible by the bicycle. We also find that the Cycle program was much more cost effective at increasing girls' secondary school enrollment than comparable conditional cash transfer programs in South Asia.


And here is an old video briefing on the study.

Assorted Links
















  1. Using geographic profiling to investigate the real identity of Banksy. There is a nice interview with one of the authors about the paper in the podcast 'What's the point'

Monday, July 3, 2017

The rise of 'nuance' in the Social Sciences

About two years ago, we put a link to Kieran Healy's work titled "Fuck nuance". His study has now been published as a paper in Sociological Theory (ungated version here). One of his main arguments is that the search for more nuanced understandings of social phenomena often end up obstructing the development of robust social theories. This is certainly open for debate.

Although Kieran's paper focuses on studies in Sociology, he has recently expanded some his analysis to other fields of the social sciences, showing how the the percentage of articles mentioning the words ‘nuance’ or ‘nuanced’ has sharply risen since the 1990s in pretty much every field.



credit: Kieran Healy

Thursday, June 29, 2017

World population distribution by altitude

Another interesting chart by Bill Rankin, this one showing how the world population is distributed by altitude.
  • 6% of the world's population leaves above 1.6 Kilometres (1 mile)
  • 50% leaves below 165 meters of altitude
  • 0.2%  leaves below sea level
click on the image to enlarge it

Sunday, June 25, 2017

7th Anniversary of Urban Demographics !

Today is the 7th Anniversary of Urban Demographics. I hope the blog has been a valuable source of  procrastination  information for you as much as it has been for me. Thanks all the readers for the support \o/

Here are some stats that show a summary of the blog over the past year. Please, feel free to drop me a line with suggestions on how to improve the blog. If you have any criticisms, please direct them to this other blog here.


The most popular posts:
  1. How Brazil compares to other countries in terms of area, population and human development
  2. Mexicans didn’t cross the US border. The border crossed them 
  3. The people who keep us company throughout our life cycle
  4. Comparing house price trends worldwide
  5. The world’s most violent cities

and 10 of my favourite posts:
  1. How much of the world is covered by cities? not much
  2. The impressive expansion of subway systems in China
  3. Distributive justice and equity in transportation
  4. The cost of every Olympics Games since 1960
  5. Creating an animated world map of life expectancy changes from 1950 to 2100 in R
  6. Mapped history of population expansion in the US
  7. Income segregation at the block level
  8. Measuring exposure to air pollution using mobile phone data
  9. Map of Population Density Lines in R
  10. Visualizing the space-time geography of flow data

Where do readers come from? (202 Countries - 4,482 Cities) 
  • Brazil (44.6%) 
  • United States (17.9%) 
  • United Kingdom (4.6%) 
  • Mexico (2.8%) 
  • Russia (2.7%) 
  • other countries (27.4%) Not many readers in Siberia nor Greenland, though


    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.


    Abstract:
    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: https://ssrn.com/abstract=2838043

    Abstract:
    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.

    Abstract:
    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