Population Services

Population data

This service provides population counts and densities for the world, when you specify either a single location, or a point to point route. Population data are derived from the NASA Socioeconomic Data and Applications Center (SEDAC), using the Gridded Population of the World dataset, v4.

API Paths
population/site
population/pointToPoint
HTTP Method
POST
Input Format

All population service requests can be performed at a site or along a point to point route, as specified in the API paths above. For the Path element below, use the JSON from the point to point route or a site location.

Note that when population data is requested along a route, the amount of time spent in an area affects the results. A route circling a densely populated area for an hour will have more weight applied to the population data from that area than a route that just crosses the dense population for a few minutes. The results contain both a weighted mean result, which takes this affect into account and a standard mean result that does not use this affect. The weights reported in the results for a point to point route call are calculated as the number of steps spent in a single population grid. For example, if you are traveling along a route, and the output step (in your output settings) is set to 60, you will see a weight value of 4 if you are over that population grid for 240 seconds. If you set your output step to 5 however, that weight will change to 48 (48x5 = 60x4 = 240 seconds).

Population data for a site represents the population value in the dataset nearest to your input location. Note that the weighted mean and the mean values will be identical for a site location. This is because all population grids in the site-based cylinder are equally likely to be traversed, so no weighting can be applied. All weights are set to one for this case.

{
    "Path": {}
    "PopulationType": "Density",
    "PointFlightRadius": 800
}
Path
JSON object defining the location or route on which population data will be calculated.
PopulationType
Either "Density" or "Count". If Density is used, population values returned will be the number of people per square kilometer. If Count is used, population values returned will be the number of people.
PointFlightRadius
Only required for population requests at a single location. This defines the radius of a cylinder, centered at your location, beyond which no population data will be retrieved.
Input Sample: Single Site

This sample shows the population density values at a single site.

{
    "Path": {
        "Location": {
            "Latitude": 44.0,
            "Longitude": -104.77,
            "Altitude": 0
        }
    },
    "PopulationType": "Density",
    "PointFlightRadius": "800"
}
Output Sample: Single Site
{
    "WeightedMean": 0.65041154623031616,
    "Mean": 0.65041154623031616,
    "SumOfWeights": 1,
    "PopulationValues": [
        0.65041154623031616
    ],
    "Weights": [
        1
    ]
}
Input Sample: Point to Point Route

This sample shows the population count values for a point to point route.

{
    "Path": {
        "Waypoints": [
            {
                "Position": {
                    "Latitude": 39.07096,
                    "Longitude": -104.78509,
                    "Altitude": 2000.0
                },
                "Time": "2014-03-25T18:30:00"
            },
            {
                "Position": {
                    "Latitude": 38.1,
                    "Longitude": -104.78500,
                    "Altitude": 1600.0
                },
                "Time": "2014-03-25T20:30:00"
            }
        ],
        "IncludeWaypointsInRoute": true,
        "OutputSettings": {
            "Step": 60,
            "TimeFormat": "Epoch",
            "CoordinateFormat": { "Coord": "LLA" }
        }
    },
    "PopulationType": "Count"
}
Output Sample: Point to Point Route
{
    "WeightedMean": 8088.3678982750444,
    "Mean": 7862.6120876669884,
    "SumOfWeights": 121,
    "PopulationValues": [
        1581.945556640625,
        2566.552490234375,
        13855.5927734375,
        36504.58984375,
        32002.38671875,
        34990.390625,
        39031.5703125,
        12273.1435546875,
        5321.60595703125,
        20.193782806396484,
        120.90422058105469,
        57.396709442138672,
        99.124313354492188,
        35.455841064453125,
        5.3519468307495117,
        4.8899245262146,
        50.682853698730469,
        1337.8116455078125,
        8527.3076171875,
        183.86534118652344,
        11.688127517700195,
        40.076324462890625,
        38.906455993652344,
        41.257167816162109
    ],
    "Weights": [
        4,
        5,
        5,
        6,
        5,
        5,
        5,
        5,
        5,
        5,
        8,
        3,
        5,
        5,
        3,
        7,
        6,
        5,
        5,
        5,
        5,
        5,
        5,
        4
    ]
}