Facebook’s population density data
A group over at Facebook has released a valuable new dataset, High Resolution Population Density Maps. They used machine learning to look at aerial imagery and figure out where people live, then put dots on a map (one per arcsecond) with estimated density. Their post goes into detail; the data now is most of Africa with the whole world planned. There’s not a great browser for the data but the files are easy to work with and smaller than you’d think; a few megabytes per country.
I took a quick pass at the Liberia data in QGIS, here it is plotted by quantiles on top of Stamen Toner Light:

It’s immediately apparent that the density data is banded. Each red dot in Monrovia, for instance, has the (exact) value 23.255445274781373. Half the dots have no value, even in the middle of the city, maybe because no single building was reliably detected in them? The orange dots north of there are about 9.3. Some small villages out in the hinterlands show very high densities, like 45. I don’t know if that’s at all like reality or rather an artifact of detecting relatively few buildings in a big rural area.
By contrast Johannesburg has much more variation in densities. Maybe South Africa has better data on population-by-region than other places

Nigeria’s data is somewhere inbetween. Lagos has big regions of uniform density but there is at least some variation. I can’t figure out what the building detection did in the rural areas. Their system did correctly figure out there are people in this general area, but the dots and the buildings don’t particularly line up.

I’m no expert in this kind of data and have no idea what the state of the art is. But this looks to me like two separate datasets mushed together. One is new and fine grained, a binary yes/no building per arcsecond based on image analysis. And then there’s some larger granularity numerical “X people per building” that they’ve taken from some other data source, maybe government census data. The combined data is them just applying that number X to the binary thing about whether there’s a building or not.
It’s not bad! But I had initially thought they were doing something more subtle, where they were estimating building size or height or density. If I’d read their description more closely I would have already realized they were not doing that:
we redistributed all the census counts equally over all the buildings found within that census area. This method assumes equal population distribution per building within a census area, which we felt was the least error-prone method of obtaining population densities since it doesn’t make any assumptions on the number of people per building and constrains systematic errors to within one census area.
For an alternate take at the data, @Mikel took a shot at a slippy map using MapBox, you can see the result here. I had trouble getting it to load new points past the initial view. But see the screenshot below
