Nothing Special   »   [go: up one dir, main page]

WorldPop API Basics

The WorldPop Program Application Programming Interface (API) provides researcher and software developers access to WorldPop data. The API can be used to create various applications to help analyze, visualize, explore and disseminate data on population, health.

The WorldPop Program Application Programming Interface (API) provides researcher and software developers access to WorldPop data. The API can be used to create various applications to help analyze, visualize, explore and disseminate data on population, health.

The WorldPop REST API facilitates the querying of the WorldPop database to GET information on data held on the database, along with accompanying metadata associated with the data.

The root url for the API is https://www.worldpop.org/rest/data, from which a list of available datasets/metadata will be returned in JSON format. The following elements can be queried at this level:

  • Alias – WorldPop project aliases from which data can be obtained
  • Name – WorldPop project names
  • Title – As above
  • Desc – Brief description of project along with references for publications
{
  "data": [
    {
      "alias": "pop",
      "name": "Population",
      "title": "Population",
      "desc": "WorldPop produces different types of gridded population count datasets, depending on the methods used and end application. An overview of the data can be found in Tatem et al, and a description of the modelling methods used found in Stevens et al. The 'Global per country 2000-2020' datasets represent the outputs from a project focused on construction of consistent 100m resolution population count datasets for all countries of the World for each year 2000-2020. These efforts necessarily involved some shortcuts for consistency. The 'individual countries'  datasets represent older efforts to map populations for each country separately, using a set of tailored geospatial inputs and differing methods and time periods. The 'whole continent' datasets are mosaics of the individual countries datasets\r\n"
    },
    {
      "alias": "births",
      "name": "Births",
      "title": "Births",
      "desc": "The health and survival of women and their new-born babies in low income countries is a key public health priority, but basic and consistent subnational data on the number of live births to support decision making has been lacking. WorldPop integrates small area data on the distribution of women of childbearing age and age-specific fertility rates to map the estimated distributions of births for each 1x1km grid square across all low and middle income countries. Further details on the methods can be found in Tatem et al. and James et al.."
    },
    {
      "alias": "pregnancies",
      "name": "Pregnancies",
      "title": "Pregnancies",
      "desc": "The health and survival of women and their new-born babies in low income countries is a key public health priority, but basic and consistent subnational data on the number of pregnancies to support decision making has been lacking. WorldPop integrates small area data on the distribution of women of childbearing age, age-specific fertility rates, still births and abortions to map the estimated distributions of pregnancies for each 1x1km grid square across all low and middle income countries. Further details on the methods can be found in Tatem et al and James et al.."
    },
    {
      "alias": "urban_change",
      "name": "Urban change",
      "title": "Urban change",
      "desc": "East–Southeast Asia is currently one of the fastest urbanizing regions in the world, with countries such as China climbing from 20 to 50% urbanized in just a few decades. However, spatially-and temporally-detailed information on regional-scale changes in urban land or population distribution have not previously been available; previous efforts have been either sample-based, focused on one country, or drawn conclusions from datasets with substantial temporal/spatial mismatch and variability in urban definitions. In collaboration with the World Bank and University of Wisconsin-Madison, WorldPop used consistent methodology, satellite imagery and census data for >1000 agglomerations in the East–Southeast Asian region to map population changes between 2000 and 2010. The data are available here and described in detail in Schneider et al, and this report."
    }
  ]
}

Example of how to obtain information on population data held on a specific country using the API

Input the desired alias name into the URL in order to access a specific project (population, births, pregnancies, age structures, etc.): https://www.worldpop.org/rest/data/pop

 
{
  "data": [
    {
      "alias": "pic",
      "name": "Individual countries"
    },
    {
      "alias": "wpgp",
      "name": "Global per country 2000-2020"
    }
  ]
}

Input the level in which to view the data (global, continental or individual countries): https://www.worldpop.org/rest/data/pop/wpgp

 
{
  "data": [
    {
      "id": "1325",
      "iso3": "AUS"
    },
    {
      "id": "1326",
      "iso3": "RUS"
    },
    {
      "id": "1327",
      "iso3": "BRA"
    },
......
  ]
}

Query individual countries using the “?” symbol and iso3 code: https://www.worldpop.org/rest/data/pop/wpgp?iso3=AUS

{
  "data": [
    {
      "id": "1325",
      "title": "The spatial distribution of population in 2000, Australia",
      "desc": "Estimated total number of people per grid-cell. The dataset is available to download in Geotiff format at a resolution of 3 arc (approximately 100m at the equator). The projection is Geographic Coordinate System, WGS84. The units are number of people per pixel. The mapping approach is Random Forest-based dasymetric redistribution.",
      "doi": "10.5258/SOTON/WP00645",
      "date": "2018-11-01",
      "popyear": "2000",
      "citation": "WorldPop (www.worldpop.org - School of Geography and Environmental Science, University of Southampton; Department of Geography and Geosciences, University of Louisville; Departement de Geographie, Universite de Namur) and Center for International Earth Science Information Network (CIESIN), Columbia University (2018). Global High Resolution Population Denominators Project - Funded by The Bill and Melinda Gates Foundation (OPP1134076). https://dx.doi.org/10.5258/SOTON/WP00645",
      "data_file": "GIS/Population/Global_2000_2020/2000/AUS/aus_ppp_2000.tif",
      "archive": "N",
      "public": "Y",
      "source": "WorldPop, University of Southampton, UK",
      "data_format": "Geotiff",
      "author_email": "wp@worldpop.uk",
      "author_name": "WorldPop",
      "maintainer_name": "WorldPop",
      "maintainer_email": "wp@worldpop.uk",
      "project": "Population",
      "category": "Global per country 2000-2020",
      "gtype": "Population",
      "continent": "Oceania",
      "country": "Australia",
      "iso3": "AUS",
      "files": [
        "ftp://ftp.worldpop.org.uk/GIS/Population/Global_2000_2020/2000/AUS/aus_ppp_2000.tif"
      ],
      "url_img": "https://www.worldpop.org/tabs/gdata/img/1325/aus_ppp_wpgp_2000_Image.png",
      "organisation": "WorldPop, University of Southampton, UK, www.worldpop.org",
      "license": "https://www.worldpop.org/data/licence.txt",
      "url_summary": "https://www.worldpop.org/geodata/summary?id=1325"
    }
  ]
}