Introduction to demographics

To access demographic data, you can use the GeoEnrichment service. GeoEnrichment is the process of enhancing existing data with additional location-based information about the people and places in a specific area. The additional information can drive better understanding, analysis, and decision making. The GeoEnrichment service can find facts and demographic information about a location or area.

You can build applications that use the service to:

  • Find demographics and other relevant characteristics within an area around a point.
  • Choose from over 15,000 analysis variables in more than 130 countries and regions including demographics, lifestyle segmentation, consumer spending, and market potential.
  • Enrich your own data with location based context about the people and places in an area.
  • Analyze markets and consumers, identify underserved communities, and formulate better business and policy decisions.

How to access the GeoEnrichment service

There is no direct integration with the Esri Leaflet plugin to access the GeoEnrichment service. To access the service in your application, you use the demographics and request modules from ArcGIS REST JS in addition to the Esri Leaflet plugin.

Steps

  1. Reference the Esri Leaflet plugin.
  2. Reference the appropriate ArcGIS REST JS package.
  3. Set the API key to authenticate the request.
  4. Define parameters to pass to the service.
  5. Call the service and handle the results.

Example

Find demographic data

This example illustrates how to query demographic data from the GeoEnrichment service using ArcGIS REST JS. The default study area is a one mile buffer around a point. It returns facts from the default data collection, Key global facts.

Use dark colors for code blocks
                       
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<script src="https://unpkg.com/esri-leaflet@3.0.8/dist/esri-leaflet.js"
    integrity="sha512-oUArlxr7VpoY7f/dd3ZdUL7FGOvS79nXVVQhxlg6ij4Fhdc4QID43LUFRs7abwHNJ0EYWijiN5LP2ZRR2PY4hQ=="
    crossorigin=""></script>

<script
  src="https://unpkg.com/@esri/arcgis-rest-request@4.0.2/dist/bundled/request.umd.min.js"
  integrity="sha512-9Q977kmOqSCe/ClsYEWydCwneAHm6shnkRHga25f1R5HnnnGovB5nxtGqosYLfrMIIj6wDBSUfvkOyIC5Ph7bg==">
</script>

<script
  src="https://unpkg.com/@esri/arcgis-rest-demographics@4.0.1/dist/bundled/demographics.umd.min.js"
  integrity="sha512-MisDmTOSyN6FtMUUvJ7mtU2ZOQV9moszfT/xLRpijhfqwoBd9nYBUZD8KWSbb/VYfvcmxS9SMc+nQigMk/j0pg==">
</script>

<script>
  arcgisRest.queryDemographicData({
    studyAreas: [{ "geometry": { "x": latlng.lng, "y": latlng.lat } }],
    authentication: authentication
  })
  .then((response) => {
    console.log(response)
  });
</script>

Learn more in the Query demographic data tutorial.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.