What is a global data search?
You can retrieve global demographic data, also known as standard demographics, for 170 countries and regions. The data include population, income, age, households, education, spending, jobs, marital status, and key facts.
How to access the data
To get standard demographic data using the enrich
operation, you use the Key
data collection. This is provided for you by default if you do not provide a data collection for the enrich
operation.
The Key
data collection contains the following data variables, which will populated when you run the request:
Data variable | Description | Examples |
---|---|---|
TOTPOP | Total population | 619 |
TOTHH | Total households | 354 |
AVGHHSZ | Average household size | 1.75 |
MALES | Total male population | 292 |
FEMALES | Total female population | 328 |
URL request
Learn more about standard and enhanced endpoints in Service endpoints.
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/enrich?<parameters>
Required parameters
Name | Description | Examples |
---|---|---|
f | The format of the data returned. | f=json f=pjson f=geojson f=csv |
token | An API key or OAuth 2.0 access token. | token= |
study | The input point, address, line, polygon or administrative boundary | study study study |
Key parameters
Name | Description | Examples |
---|---|---|
analysis | Returns a subset of attributes from one or more data collections. | ["food. |
data | Returns a preassembled list of analysis variables curated for specific countries and regions. | [educationalattainment] |
return | Retrieves the study area's geometry for display on a map. | true , false |
Additional parameters:
The add
returns percent, average and index attributes. The intersecting
parameter returns information about administrative boundaries intersected by an input point. The use
parameter provides a performance hint to the service when all input study areas lie within the same country or region.
Code examples
Find global facts (1 mile buffer)
Use the GeoEnrichment service to enrich a 1 mile ring buffer using the only required parameter, study
. With the search box, select a pre-defined location or click on the map to submit a point and create a 1 mile ring buffer. Facts are returned from the default data collection, Key Global Facts. Key Global facts contains five analysis variables that are tabulated for all countries and regions.
Steps
-
Reference the service.
-
Define
study
to submit a point.Areas -
Set the API key.
APIs
function getDemographicData(point) {
// Request demographic data
arcgisRest.queryDemographicData({
studyAreas: [{ "geometry": { "x": point.longitude, "y": point.latitude } }],
authentication: authentication
})
.then((response) => {
if (response.results[0].value.FeatureSet.length > 0 &&
response.results[0].value.FeatureSet[0].features.length > 0) {
const attributes = response.results[0].value.FeatureSet[0].features[0].attributes;
showData(attributes, point);
} else {
console.log("No data found.");
}
});
}
REST API
curl https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/enrich? \
-d "studyAreas=[{'geometry':{'x': -117.1956, 'y': 34.0572}}]"
-d "f=json"
-d "token=<ACCESS_TOKEN>"
Tutorials
Query demographic data
Query demographic information for locations around the world with the GeoEnrichment service.