Skip to content

jonhehir/world-pop-by-tz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

World Population by Timezone

Have you ever wondered...

  • what are the world's most/least populous timezones?
  • what percentage of the world population lives in timezones with irregular offsets like UTC+5:30?
  • how many people live within X hours of a given timezone?
  • what percentage of the world observes DST?
  • what other countries share my timezone?
  • what is the distribution of population by timezone for a given country?

So have I! Good data on this is hard to find.

The Database

⭐ A downloadable SQLite DB can be found on the Releases page.

Here's how that was made:

  • tally.py produces a table of world population grouped by IANA timezone code (e.g., America/New_York) and country code.
  • timezones.py produces a table of timezone data by IANA code.
  • The GPWv4 National Identifier dataset (see "Data Sources" below) includes a table of country data.
  • These can be compiled into one nice SQLite DB via sql/import.sql.

Data Sources

Population data comes from Gridded Population of the World (GPW) v4 from Socioeconomic Data and Applications Center (SEDAC). This is a raster dataset of world population available at various resolutions. Each country's population data is sourced differently, so the effective resolution of the data varies from one nation to another. For the United States, for example, the raster data is produced by rasterization of small areal units from the U.S. Census. Each country's data in GPWv4 is adjusted to match the 2015 Revision of the United Nation's World Population Prospects country totals.

Geographic timezone lookup is powered by timezonefinder. Additional timezone information is pulled from the IANA tz database via pytz.

Similar Work

This is not the first time someone has tried to get to address the question of world population by timezone. The two methods I'm familiar with from the past are:

  • Manual data aggregation (example): This is painstaking work.
  • Heuristics based on country-level data (example): The linked example takes a list of country populations and divides it evenly across timezones that intersect that country. Thus, for example, Canada is assumed to be evenly divided across six timezones, when in reality, the majority of the population resides in one timezone.

Limitations

Since we're working with rasterized data here, it will be the case that some small portion of the population is misattributed to the wrong country and/or timezone. This would be mitigated by using a higher resolution dataset. The current version is, shall we say, optimized for low resolution data but scales acceptably to a 2.5-minute resolution (the second highest resolution offered in GPWv4). At some point, I may get around to running this on the highest resolution data.

If very high resolution data is desired, it would probably be wise to rewrite the tally to rasterize the GeoJSON from timezone-boundary-builder and do a fully GeoTIFF/numpy approach to reading and aggregating.

About

World population by timezone and country

Resources

Stars

Watchers

Forks

Languages