Introduction to demographics

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

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 OpenLayers to access the GeoEnrichment service. To access the service in your application, you use the demographics and request modules from ArcGIS REST JS.

To access the service with ArcGIS REST JS, you typically perform the following steps:

  1. Reference the appropriate package.
  2. Set the API key to authenticate the request.
  3. Define parameters to pass to the service.
  4. 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 blocksCopy
                                                                                                             
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
    <script src="https://unpkg.com/@esri/arcgis-rest-request@4.0.0/dist/bundled/request.umd.js"></script>
    <script src="https://unpkg.com/ol-popup@4.0.0"></script>

    <script>

          const authentication = arcgisRest.ApiKeyManager.fromKey(apiKey);

          arcgisRest
            .queryDemographicData({
              studyAreas: [{ geometry: { x: lonLat[0], y: lonLat[1] } }],
              authentication: authentication
            })

            .then((response) => {

              const featureSet = response.results[0].value.FeatureSet;

              let message;
              if (featureSet.length > 0 && featureSet[0].features.length > 0) {
                const attributes = featureSet[0].features[0].attributes;
                message =
                  `<b>Data for a 1 mile search radius</b>` +
                  [
                    `<br>Population: ${attributes.TOTPOP}`,
                    `Males: ${attributes.TOTMALES} `,
                    `Females: ${attributes.TOTFEMALES}`,
                    `Average Household Size: ${attributes.AVGHHSZ}`
                  ].join("<br>");
              } else {
                message = "Data not available for this location.";
              }
              popup.show(event.coordinate, message);

            });

    </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.