GeoEnrichment

Demographic data for a 1 mile radius search from a location using the GeoEnrichment service in a map

What is GeoEnrichment?

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. For example, you can submit a point or polygon to the GeoEnrichment service and retrieve demographics and other facts associated with the location and surrounding area.

You can use GeoEnrichment 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 GeoEnrichment works

You can perform geoenrichment by making an HTTPS request to the Geoenrichment service enrich operation or by using client APIs. Specify the x, y, and optionally, additional parameters to refine the operation.

Submitting a point to the service is the most common use case and the default options create a 1 mile buffer around the point and return facts from the default data collection, Key Global Facts.

To refine the options, you can use parameters such as study areas options, data collections, analysis variables. These optional parameters provide control over how the point is buffered and which attributes are returned.

The GeoEnrichment service will return the facts requested for the input study area.

The GeoEnrichment service uses a sophisticated data apportionment methodology to aggregate demographic information for rings and other polygons. For example, in the U.S. and Canada, data apportionment relies mostly on census block points. Block points are centroids derived from census block boundaries, the most detailed level of census tabulation available. They contain attributes for the actual count of people and households living in the associated block. For most other countries and regions settlement points are used for data apportionment. Settlement points are modeled by Esri and provide an estimate of the likelihood of human settlement.

URL request

 
1
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/enrich?<parameters>

Key parameters

NameDescriptionExamples
studyAreasThe input point, address, line, polygon or administrative boundarystudyAreas=[{"geometry":{"x": -122.435, "y": 37.785}}]
studyAreas=[{"address":{"text":"380 New York St. Redlands, CA 92373"}}]
studyAreas=[{"sourceCountry":"US","layer":"US.ZIP5","ids":["92373"]}]

Additional parameters: Refine the operation by using parameters such as dataCollections to return a preassembled list of analysis variables curated for specific countries and regions. The analysisVariables parameter can return a subset of attributes from one or more data collections. To return percent, average and index attributes use addDerivativeVariables. The returnGeometry parameter retrieves the study area's geometry for display on a map. The intersectingGeographies parameter returns information about administrative boundaries intersected by an input point. The useData parameter provides a performance hint to the service when all input study areas lie within the same country or region.

Examples

Find global facts (1 mile buffer)

Use the GeoEnrichment service to enrich a 1 mile ring buffer using the only required parameter, studyAreas. 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

  1. Reference the service.
  2. Define studyAreas to submit a point.
  3. Set the API key.

APIs

ArcGIS JS APIEsri LeafletMapbox GL JSOpenLayersArcGIS REST JSArcGIS Python API
                                                                                                                                                                   
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>ArcGIS Developer Guide: Find global facts</title>
    <style>
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      .esri-view .esri-search {
        width: 300px;
      .esri-view .esri-popup__button.esri-popup__button--dock {
        display: none;
      .esri-popup__header-title {
        text-align: left;
    </style>

    <!-- require ArcGIS REST JS libraries from https://unpkg.com -->
 <script src="https://unpkg.com/@esri/arcgis-rest-request@3.0.0/dist/umd/request.umd.js"></script>
  <script src="https://unpkg.com/@esri/arcgis-rest-auth@3.0.0/dist/umd/auth.umd.js"></script>
  <script src="https://unpkg.com/@esri/arcgis-rest-demographics@3.0.0/dist/umd/demographics.umd.js"></script>

    <link rel="stylesheet" href="https://js.arcgis.com/4.19/esri/themes/light/main.css">
    <script src="https://js.arcgis.com/4.19/"></script>

    <script>
      require([
        "esri/Map",
        "esri/views/MapView",
        "esri/geometry/Point",
        "esri/Graphic",
        "esri/geometry/geometryEngine",
        "esri/core/watchUtils",
        "esri/config"
      (Map, MapView, Point, Graphic, geometryEngine, watchUtils, esriConfig)=> {
        const apiKey = "YOUR-API-KEY";
        const authentication = new arcgisRest.ApiKey({
           key: apiKey
        const start = new Point([151.2093,-33.8688]);  // Sydney
        const zoom = 9;
        const map = new Map({
          basemap: "arcgis-light-gray"
        const view = new MapView({
          map: map,
          center: start,
          zoom: zoom,
          container: "viewDiv",
          constraints: {
            snapToZoom: false
        view.when(() => {
          const elem = document.getElementById("selectContainer");
          view.ui.add(elem, "top-right");
          elem.addEventListener("change", goToLocation);
        view.on("click", (e) => {
        function goToLocation(e) {
          if (!e.target.value) {
              target: [-25, 35],
              zoom: 2
          } else {
            const point = new Point(JSON.parse("[" + e.target.value + "]"));
              center: point,
              zoom: zoom
        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.");
              }
            });
        }
        function showData (attributes, point) {
          if (!attributes || !point) {
            return;
          const title = "Global facts (1 mile search)";
          const content = `Population: ${attributes.TOTPOP}<br>Males: ${attributes.TOTMALES} <br>Females: ${attributes.TOTFEMALES}<br>Average Household Size: ${attributes.AVGHHSZ}`;
            location: point,
            title: title,
            content: content
          const buffer = geometryEngine.geodesicBuffer(point, 1, "miles");
          const graphicBuffer = new Graphic({
            geometry: buffer,
            symbol:  {
              type: "simple-fill",
                color: [ 50,50,50, 0.1 ],
                outline: {
                  color: [0,0,0, 0.25],
                  width: .5
  </script>
  </head>
  <body>
    <div id="viewDiv"></div>
    <div id="selectContainer" class="esri-widget">
      <select id="selectLocation" class="esri-select esri-input" style="min-width: 150px; font-size: 16px">
        <option value="">Choose a place...</option>
        <option value="-74.0060,40.7128">New York</option>
        <option value="-0.1278,51.5074">London</option>
        <option selected value="151.2093,-33.8688">Sydney</option>
        <option value="-79.3832,43.6532">Toronto</option>
      </select>
    </div>
  </body>
</html>

REST API

RequestResponse
cURLcURL (Formatted)
    
1
2
3
4
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>"
                                                                                                                                                  
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
{
  "results" : [ {
    "paramName" : "GeoEnrichmentResult",
    "dataType" : "GeoEnrichmentResult",
    "value" : {
      "version" : "2.0",
      "FeatureSet" : [ {
        "displayFieldName" : "",
        "fieldAliases" : {
          "ID" : "Id",
          "OBJECTID" : "Object ID",
          "sourceCountry" : "Country code",
          "areaType" : "Area type",
          "bufferUnits" : "Buffer units",
          "bufferUnitsAlias" : "Buffer units alias",
          "bufferRadii" : "Buffer radii",
          "aggregationMethod" : "Aggregation method",
          "populationToPolygonSizeRating" : "Population to polygon size rating for the country",
          "apportionmentConfidence" : "Apportionment confidence for the country",
          "HasData" : "Has data",
          "TOTPOP" : "Total Population",
          "TOTHH" : "Total Households",
          "AVGHHSZ" : "Average Household Size",
          "TOTMALES" : "Male Population",
          "TOTFEMALES" : "Female Population"
        },
        "spatialReference" : {
          "wkid" : 4326,
          "latestWkid" : 4326
        },
        "fields" : [ {
          "name" : "ID",
          "alias" : "Id",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "OBJECTID",
          "alias" : "Object ID",
          "type" : "esriFieldTypeOID"
        }, {
          "name" : "sourceCountry",
          "alias" : "Country code",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "areaType",
          "alias" : "Area type",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "bufferUnits",
          "alias" : "Buffer units",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "bufferUnitsAlias",
          "alias" : "Buffer units alias",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "bufferRadii",
          "alias" : "Buffer radii",
          "type" : "esriFieldTypeDouble"
        }, {
          "name" : "aggregationMethod",
          "alias" : "Aggregation method",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "populationToPolygonSizeRating",
          "alias" : "Population to polygon size rating for the country",
          "type" : "esriFieldTypeDouble"
        }, {
          "name" : "apportionmentConfidence",
          "alias" : "Apportionment confidence for the country",
          "type" : "esriFieldTypeDouble"
        }, {
          "name" : "HasData",
          "alias" : "Has data",
          "type" : "esriFieldTypeInteger"
        }, {
          "name" : "TOTPOP",
          "alias" : "Total Population",
          "type" : "esriFieldTypeDouble",
          "fullName" : "KeyGlobalFacts.TOTPOP",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "TOTHH",
          "alias" : "Total Households",
          "type" : "esriFieldTypeDouble",
          "fullName" : "KeyGlobalFacts.TOTHH",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "AVGHHSZ",
          "alias" : "Average Household Size",
          "type" : "esriFieldTypeDouble",
          "fullName" : "KeyGlobalFacts.AVGHHSZ",
          "component" : "scripts",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "TOTMALES",
          "alias" : "Male Population",
          "type" : "esriFieldTypeDouble",
          "fullName" : "KeyGlobalFacts.TOTMALES",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "TOTFEMALES",
          "alias" : "Female Population",
          "type" : "esriFieldTypeDouble",
          "fullName" : "KeyGlobalFacts.TOTFEMALES",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        } ],
        "features" : [ {
          "attributes" : {
            "ID" : "0",
            "OBJECTID" : 1,
            "sourceCountry" : "US",
            "areaType" : "RingBuffer",
            "bufferUnits" : "esriMiles",
            "bufferUnitsAlias" : "Miles",
            "bufferRadii" : 1,
            "aggregationMethod" : "BlockApportionment:US.BlockGroups",
            "populationToPolygonSizeRating" : 2.191,
            "apportionmentConfidence" : 2.576,
            "HasData" : 1,
            "TOTPOP" : 12995,
            "TOTHH" : 5179,
            "AVGHHSZ" : 2.49,
            "TOTMALES" : 6271,
            "TOTFEMALES" : 6724
          }
        } ]
      } ]
    }
  } ],
  "messages" : [ ]
}

Find local facts (1 mile buffer)

In this exmple the dataCollections parameter is used to return a different set of facts. With the search box, select a pre-defined location or click on the map to create a 1 mile ring buffer around a point. Facts are returned from the requested data collection, Household Totals.

 
1
https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/datacollections/US?f=pjson

Steps

  1. Reference the service.

  2. Define studyAreas to submit a point.

  3. Define dataCollections to return a curated list of facts.

  4. Set the API key.

APIs

ArcGIS JS APIEsri LeafletMapbox GL JSOpenLayersArcGIS REST JSArcGIS Python API
                                                                                                                                                                                                                    
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>ArcGIS Developer Guide: Find local facts</title>
    <style>
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      .esri-view .esri-popup__button.esri-popup__button--dock {
        display: none;
      .esri-popup__header-title {
        text-align: left;
    </style>

    <!-- require ArcGIS REST JS libraries from https://unpkg.com -->
 <script src="https://unpkg.com/@esri/arcgis-rest-request@3.0.0/dist/umd/request.umd.js"></script>
  <script src="https://unpkg.com/@esri/arcgis-rest-auth@3.0.0/dist/umd/auth.umd.js"></script>
  <script src="https://unpkg.com/@esri/arcgis-rest-demographics@3.0.0/dist/umd/demographics.umd.js"></script>

    <link rel="stylesheet" href="https://js.arcgis.com/4.19/esri/themes/light/main.css">
    <script src="https://js.arcgis.com/4.19/"></script>

    <script>
      require([
        "esri/Map",
        "esri/views/MapView",
        "esri/geometry/Point",
        "esri/Graphic",
        "esri/geometry/geometryEngine",
        "esri/core/watchUtils",
        "esri/config"
      (Map, MapView, Point, Graphic, geometryEngine, watchUtils, esriConfig)=> {
        const apiKey = "YOUR-API-KEY";
        const authentication = new arcgisRest.ApiKey({
           key: apiKey
        const start = [-74.0060,40.7128];  // New York
        const zoom = 13;
        const map = new Map({
          basemap: "osm-standard"
        const view = new MapView({
          map: map,
          center: start, // longitude, latitude
          zoom: zoom, // zoom level
          container: "viewDiv",
          constraints: {
            snapToZoom: false
        let lastPoint;
        let selectDataCollection;
        view.when(() => {
          const elem = document.getElementById("selectContainer");
          view.ui.add(elem, "top-right");
          selectDataCollection = document.getElementById("selectDataCollection");
          selectDataCollection.addEventListener("change", refreshPopup);
        view.on("click", (e) => {
        function refreshPopup(e) {
        function getDemographicData(point, dataCollection) {
          if (!dataCollection) {
            return;
          }
          // Request demographic data
          arcgisRest.queryDemographicData({
              studyAreas: [{ "geometry": { "x": point.longitude, "y": point.latitude } }],
              authentication: authentication,
              dataCollections: [dataCollection]
            })
            .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, dataCollection);
              } else {
                console.log("No data found or point not in the United States.");
              }
            });
        }
        function showData (attributes, point, dataCollection) {
          if (!attributes || !point) {
            return;
          switch (dataCollection) {
              case "householdincome":
                title = "Household Income facts (1 mile search)";
                content = "Median Household Income " + formatMoney(attributes.MEDHINC_CY) +
                "<br>" + "Average Household Income: " + formatMoney(attributes.AVGHINC_CY) +
                "<br>" + "Per Capita Income: " + formatMoney(attributes.PCI_CY) +
                "<br>" + "Aggregate Income: " + formatMoney(attributes.AGGINC_CY);
                break;
              case "entertainment":
                title = "Entertainment facts (1 mile search)";
                content = "Tickets to Movies: " + formatMoney(attributes.X9078_X) +
                "<br>" + "Streaming/Downloaded Audio: " + formatMoney(attributes.X9029_X) +
                "<br>" + "Online Gaming Services: " + formatMoney(attributes.X9045_X) +
                "<br>" + "Camping Equipment: " + formatMoney(attributes.X9054_X) +
                "<br>" + "Books: " + formatMoney(attributes.X9068_X);
                break;
              case "PopulationTotals":
                title = "Population facts (1 mile search)";
                content = "Total Population: " + attributes.TOTPOP_CY +
                "<br>" + "Household Population: " + attributes.HHPOP_CY +
                "<br>" + "Popluation Density (per sq. mile): " + attributes.POPDENS_CY +
                "<br>" + "Population: Annual Growth Rate: " + attributes.POPGRW10CY +
                "<br>" + "Housing Affordability Index: " + attributes.HAI_CY;
                break;
              case "businesses":
                title = "Business facts (1 mile search)";
                content = "Total Businesses: " + attributes.S01_BUS +
                "<br>" + "Manufacturing Businesses: " + attributes.S04_BUS +
                "<br>" + "Food Store Businesses: " + attributes.S12_BUS +
                "<br>" + "Communication Businesses: " + attributes.S06_BUS +
                "<br>" + "Apparel/Accessory Businesses: " + attributes.S14_BUS +
                "<br>" + "Movie/Amusement Businesses: " + attributes.S26_BUS +
                "<br>" + "Auto Services - Businesses: " + attributes.S25_BUS;
                break;
              case "educationalattainment":
                title = "Education facts (1 mile search)";
                content = "Age 25+ < 9th Grade: " + attributes.NOHS_CY +
                "<br>" + "Age 25+ High School/No Diploma: " + attributes.SOMEHS_CY +
                "<br>" + "Age 25+ High School Diploma: " + attributes.HSGRAD_CY +
                "<br>" + "Age 25+ Associate's Degree: " + attributes.ASSCDEG_CY +
                "<br>" + "Age 25+ Bachelor's Degree: " + attributes.BACHDEG_CY +
                "<br>" + "Age 25+ Grad/Professional Degree " + attributes.GRADDEG_CY;
                break;
            location: point,
            title: title,
            content: content
          const buffer = geometryEngine.geodesicBuffer(point, 1, "miles");
          const graphicBuffer = new Graphic({
            geometry: buffer,
            symbol:  {
              type: "simple-fill",
                color: [ 50,50,50, 0.1 ],
                outline: {
                  color: [0,0,0, 0.1],
                  width: .5
        function formatMoney(number) {
            return number.toLocaleString('en-US', { style: 'currency', currency: 'USD' });
  </script>
  </head>
  <body>
    <div id="viewDiv"></div>
    <div id="selectContainer" class="esri-widget">
      <select id="selectDataCollection" class="esri-select esri-input" style="font-size: 16px; padding: 2px 4px;">
        <option value="">Select a data collection...</option>
        <option selected value="householdincome">Household Income</option>
        <option value="entertainment">Entertainment</option>
        <option value="PopulationTotals">Population Totals</option>
        <option value="businesses">Businesses</option>
        <option value="educationalattainment">Education</option>
      </select>
    </div>
  </body>
</html>

REST API

RequestResponse
cURLcURL (Formatted)
     
1
2
3
4
5
curl https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/enrich? \
-d "studyAreas=[{'geometry':{'x': -74.0060, 'y': 40.7128}}]" \
-d "dataCollections=[educationalattainment]" \
-d "f=json" \
-d "token=<ACCESS-TOKEN>"
                                                                                                                                                                                          
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
{
  "results" : [ {
    "paramName" : "GeoEnrichmentResult",
    "dataType" : "GeoEnrichmentResult",
    "value" : {
      "version" : "2.0",
      "FeatureSet" : [ {
        "displayFieldName" : "",
        "fieldAliases" : {
          "ID" : "Id",
          "OBJECTID" : "Object ID",
          "sourceCountry" : "Country code",
          "areaType" : "Area type",
          "bufferUnits" : "Buffer units",
          "bufferUnitsAlias" : "Buffer units alias",
          "bufferRadii" : "Buffer radii",
          "aggregationMethod" : "Aggregation method",
          "populationToPolygonSizeRating" : "Population to polygon size rating for the country",
          "apportionmentConfidence" : "Apportionment confidence for the country",
          "HasData" : "Has data",
          "NOHS_CY" : "2020 Pop Age 25+: < 9th Grade",
          "SOMEHS_CY" : "2020 Pop Age 25+: High School/No Diploma",
          "HSGRAD_CY" : "2020 Pop Age 25+: High School Diploma",
          "GED_CY" : "2020 Pop Age 25+: GED",
          "SMCOLL_CY" : "2020 Pop Age 25+: Some College/No Degree",
          "ASSCDEG_CY" : "2020 Pop Age 25+: Associate's Degree",
          "BACHDEG_CY" : "2020 Pop Age 25+: Bachelor's Degree",
          "GRADDEG_CY" : "2020 Pop Age 25+: Grad/Professional Degree",
          "EDUCBASECY" : "2020 Educational Attainment Base"
        },
        "spatialReference" : {
          "wkid" : 4326,
          "latestWkid" : 4326
        },
        "fields" : [ {
          "name" : "ID",
          "alias" : "Id",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "OBJECTID",
          "alias" : "Object ID",
          "type" : "esriFieldTypeOID"
        }, {
          "name" : "sourceCountry",
          "alias" : "Country code",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "areaType",
          "alias" : "Area type",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "bufferUnits",
          "alias" : "Buffer units",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "bufferUnitsAlias",
          "alias" : "Buffer units alias",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "bufferRadii",
          "alias" : "Buffer radii",
          "type" : "esriFieldTypeDouble"
        }, {
          "name" : "aggregationMethod",
          "alias" : "Aggregation method",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "populationToPolygonSizeRating",
          "alias" : "Population to polygon size rating for the country",
          "type" : "esriFieldTypeDouble"
        }, {
          "name" : "apportionmentConfidence",
          "alias" : "Apportionment confidence for the country",
          "type" : "esriFieldTypeDouble"
        }, {
          "name" : "HasData",
          "alias" : "Has data",
          "type" : "esriFieldTypeInteger"
        }, {
          "name" : "NOHS_CY",
          "alias" : "2020 Pop Age 25+: < 9th Grade",
          "type" : "esriFieldTypeDouble",
          "fullName" : "educationalattainment.NOHS_CY",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "SOMEHS_CY",
          "alias" : "2020 Pop Age 25+: High School/No Diploma",
          "type" : "esriFieldTypeDouble",
          "fullName" : "educationalattainment.SOMEHS_CY",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "HSGRAD_CY",
          "alias" : "2020 Pop Age 25+: High School Diploma",
          "type" : "esriFieldTypeDouble",
          "fullName" : "educationalattainment.HSGRAD_CY",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "GED_CY",
          "alias" : "2020 Pop Age 25+: GED",
          "type" : "esriFieldTypeDouble",
          "fullName" : "educationalattainment.GED_CY",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "SMCOLL_CY",
          "alias" : "2020 Pop Age 25+: Some College/No Degree",
          "type" : "esriFieldTypeDouble",
          "fullName" : "educationalattainment.SMCOLL_CY",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "ASSCDEG_CY",
          "alias" : "2020 Pop Age 25+: Associate's Degree",
          "type" : "esriFieldTypeDouble",
          "fullName" : "educationalattainment.ASSCDEG_CY",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "BACHDEG_CY",
          "alias" : "2020 Pop Age 25+: Bachelor's Degree",
          "type" : "esriFieldTypeDouble",
          "fullName" : "educationalattainment.BACHDEG_CY",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "GRADDEG_CY",
          "alias" : "2020 Pop Age 25+: Grad/Professional Degree",
          "type" : "esriFieldTypeDouble",
          "fullName" : "educationalattainment.GRADDEG_CY",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "EDUCBASECY",
          "alias" : "2020 Educational Attainment Base",
          "type" : "esriFieldTypeDouble",
          "fullName" : "educationalattainment.EDUCBASECY",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        } ],
        "features" : [ {
          "attributes" : {
            "ID" : "0",
            "OBJECTID" : 1,
            "sourceCountry" : "US",
            "areaType" : "RingBuffer",
            "bufferUnits" : "esriMiles",
            "bufferUnitsAlias" : "Miles",
            "bufferRadii" : 1,
            "aggregationMethod" : "BlockApportionment:US.BlockGroups",
            "populationToPolygonSizeRating" : 2.191,
            "apportionmentConfidence" : 2.576,
            "HasData" : 1,
            "NOHS_CY" : 14005,
            "SOMEHS_CY" : 7547,
            "HSGRAD_CY" : 9097,
            "GED_CY" : 1572,
            "SMCOLL_CY" : 6190,
            "ASSCDEG_CY" : 3017,
            "BACHDEG_CY" : 39320,
            "GRADDEG_CY" : 28524,
            "EDUCBASECY" : 109272
          }
        } ]
      } ]
    }
  } ],
  "messages" : [ ]
}

Find facts for a 5 minute drive area

In this example the studyAreasOptions parameter is used to define a 5 minute drive time service area instead of the default 1 mile ring buffer. Select a data collection then click on the map to show data within a 5 minute drive area.

Steps

  1. Reference the service.

  2. Define studyAreas to submit a point.

  3. Define studyAreasOptions to create a drive time service area around the point.

  4. Define dataCollections to return a specific lists of variables.

  5. Define returnGeometry as true so the service area can be displayed on the map.

  6. Set the API key.

APIs

ArcGIS JS APIEsri LeafletMapbox GL JSOpenLayersArcGIS REST JSArcGIS Python API
                                                                                                                                                                                                                                     
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>ArcGIS Developer Guide: Find facts for a service area</title>
    <style>
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      .esri-view .esri-popup__button.esri-popup__button--dock {
        display: none;
      .esri-popup__header-title {
        text-align: left;
    </style>

    <!-- require ArcGIS REST JS libraries from https://unpkg.com -->
 <script src="https://unpkg.com/@esri/arcgis-rest-request@3.0.0/dist/umd/request.umd.js"></script>
  <script src="https://unpkg.com/@esri/arcgis-rest-auth@3.0.0/dist/umd/auth.umd.js"></script>
  <script src="https://unpkg.com/@esri/arcgis-rest-demographics@3.0.0/dist/umd/demographics.umd.js"></script>

    <link rel="stylesheet" href="https://js.arcgis.com/4.19/esri/themes/light/main.css">
    <script src="https://js.arcgis.com/4.19/"></script>

    <script>
      require([
        "esri/Map",
        "esri/views/MapView",
        "esri/geometry/Point",
        "esri/Graphic",
        "esri/tasks/support/FeatureSet",
        "esri/core/watchUtils",
        "esri/config"
      (Map, MapView, Point, Graphic, FeatureSet, watchUtils, esriConfig)=> {
        const apiKey = "YOUR-API-KEY";
        const authentication = new arcgisRest.ApiKey({
           key: apiKey
        const start = new Point([-74.0060,40.7128]);  // New York
        const zoom = 12;
        let lastPoint;
        let selectDataCollection;
        const map = new Map({
          basemap: "arcgis-streets-night"
        const view = new MapView({
          map: map,
          center: start,
          zoom: zoom,
          container: "viewDiv",
          constraints: {
            snapToZoom: false
        view.when(() => {
          const elem = document.getElementById("selectContainer");
          view.ui.add(elem, "top-right");
          view.popup.dockEnabled = true;
            breakPoint: false,
            buttonEnabled: false,
            position: "bottom-right"
          selectDataCollection = document.getElementById("selectDataCollection");
          selectDataCollection.addEventListener("change", refreshPopup);
        view.on("click", (e) => {
        function refreshPopup(e) {
        function getDemographicData(point, dataCollection) {
          if (!dataCollection) {
            return;
          }
          // Request demographic data
          arcgisRest.queryDemographicData({
              studyAreas: [{ "geometry": { "x": point.longitude, "y": point.latitude } }],
              authentication: authentication,
              dataCollections: [dataCollection],
              params: {"studyareasoptions": '{"areaType": "NetworkServiceArea", "bufferUnits": "Minutes", "bufferRadii": [5], "travel_mode": "Driving"}'},
              returnGeometry: true
            })
            .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;
                const geometry = response.results[0].value.FeatureSet[0].features[0].geometry;
                drawGeometry(geometry);
                showData(attributes, point, dataCollection);
              } else {
                console.log("No data found.");
              }
            });
        }
        function drawGeometry(geometry) {
          const polygon = {
            type: "polygon",
            rings: geometry.rings
          const simpleFillSymbol = {
            type: "simple-fill",
            color: [227, 139, 79, 0.5],  // orange, opacity 50%
            outline: {
              color: [227, 139, 79, 0.95],
              width: 0.5
          const polygonGraphic = new Graphic({
            geometry: polygon,
            symbol: simpleFillSymbol
        function showData (attributes, point, dataCollection) {
          switch (dataCollection) {
              case "householdincome":
                title = "Household Income facts (5 min drive time)";
                content = "Median Household Income " + formatMoney(attributes.MEDHINC_CY) +
                "<br>" + "Average Household Income: " + formatMoney(attributes.AVGHINC_CY) +
                "<br>" + "Per Capita Income: " + formatMoney(attributes.PCI_CY) +
                "<br>" + "Aggregate Income: " + formatMoney(attributes.AGGINC_CY);
                break;
              case "entertainment":
                title = "Entertainment facts (5 min drive time)";
                content = "Tickets to Movies: " + formatMoney(attributes.X9078_X) +
                "<br>" + "Streaming/Downloaded Audio: " + formatMoney(attributes.X9029_X) +
                "<br>" + "Online Gaming Services: " + formatMoney(attributes.X9045_X) +
                "<br>" + "Camping Equipment: " + formatMoney(attributes.X9054_X) +
                "<br>" + "Books: " + formatMoney(attributes.X9068_X);
                break;
              case "PopulationTotals":
                title = "Population facts (5 min drive time)";
                content = "Total Population: " + attributes.TOTPOP_CY +
                "<br>" + "Household Population: " + attributes.HHPOP_CY +
                "<br>" + "Popluation Density (per sq. mile): " + attributes.POPDENS_CY +
                "<br>" + "Population: Annual Growth Rate: " + attributes.POPGRW10CY +
                "<br>" + "Housing Affordability Index: " + attributes.HAI_CY;
                break;
              case "businesses":
                title = "Business facts (5 min drive time)";
                content = "Total Businesses: " + attributes.S01_BUS +
                "<br>" + "Manufacturing Businesses: " + attributes.S04_BUS +
                "<br>" + "Food Store Businesses: " + attributes.S12_BUS +
                "<br>" + "Communication Businesses: " + attributes.S06_BUS +
                "<br>" + "Apparel/Accessory Businesses: " + attributes.S14_BUS +
                "<br>" + "Movie/Amusement Businesses: " + attributes.S26_BUS +
                "<br>" + "Auto Services - Businesses: " + attributes.S25_BUS;
                break;
              case "educationalattainment":
                title = "Education facts (5 min drive time)";
                content = "Age 25+ < 9th Grade: " + attributes.NOHS_CY +
                "<br>" + "Age 25+ High School/No Diploma: " + attributes.SOMEHS_CY +
                "<br>" + "Age 25+ High School Diploma: " + attributes.HSGRAD_CY +
                "<br>" + "Age 25+ Associate's Degree: " + attributes.ASSCDEG_CY +
                "<br>" + "Age 25+ Bachelor's Degree: " + attributes.BACHDEG_CY +
                "<br>" + "Age 25+ Grad/Professional Degree " + attributes.GRADDEG_CY;
                break;
            location: point,
            title: title,
            content: content
        function formatMoney(number) {
            return number.toLocaleString('en-US', { style: 'currency', currency: 'USD' });
  </script>
  </head>
  <body>
    <div id="viewDiv"></div>
    <div id="selectContainer" class="esri-widget">
      <select id="selectDataCollection" class="esri-select esri-input" style="width: 220px; font-size: 16px">
        <option value="">Select a data collection...</option>
        <option selected value="householdincome">Household Income</option>
        <option value="entertainment">Entertainment</option>
        <option value="PopulationTotals">Population Totals</option>
        <option value="businesses">Businesses</option>
        <option value="educationalattainment">Education</option>
      </select>
    </div>
  </body>
</html>

REST API

RequestResponse
cURLcURL (Formatted)
       
1
2
3
4
5
6
7
curl https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/enrich? \
-d "studyAreas=[{'geometry':{'x': -74.0060, 'y': 40.7128}}]" \
-d "studyAreasOptions={'areaType': 'NetworkServiceArea', 'bufferUnits': 'Minutes', 'bufferRadii': [10],'travel_mode': 'Driving'}" \
-d "dataCollections=HouseholdTotals" \
-d "returnGeometry=true" \
-d "f=json" \
-d "token=<ACCESS-TOKEN>"
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
{
  "results" : [ {
    "paramName" : "GeoEnrichmentResult",
    "dataType" : "GeoEnrichmentResult",
    "value" : {
      "version" : "2.0",
      "FeatureSet" : [ {
        "displayFieldName" : "",
        "fieldAliases" : {
          "ID" : "Id",
          "OBJECTID" : "Object ID",
          "sourceCountry" : "Country code",
          "areaType" : "Area type",
          "bufferUnits" : "Buffer units",
          "bufferUnitsAlias" : "Buffer units alias",
          "bufferRadii" : "Buffer radii",
          "aggregationMethod" : "Aggregation method",
          "populationToPolygonSizeRating" : "Population to polygon size rating for the country",
          "apportionmentConfidence" : "Apportionment confidence for the country",
          "HasData" : "Has data",
          "TOTHH_CY" : "2020 Total Households",
          "AVGHHSZ_CY" : "2020 Average Household Size",
          "FAMHH_CY" : "2020 Family Households",
          "AVGFMSZ_CY" : "2020 Average Family Size",
          "HHGRW10CY" : "2010-2020 Growth Rate: Households",
          "FAMGRW10CY" : "2010-2020 Growth Rate: Families",
          "TOTHH_FY" : "2025 Total Households",
          "AVGHHSZ_FY" : "2025 Average Household Size",
          "FAMHH_FY" : "2025 Family Households",
          "AVGFMSZ_FY" : "2025 Average Family Size",
          "HHGRWCYFY" : "2020-2025 Growth Rate: Households",
          "FAMGRWCYFY" : "2020-2025 Growth Rate: Families",
          "TOTHH10" : "2010 Total Households",
          "HHU18C10" : "2010 HHs with Population <18",
          "MLTGENHH10" : "2010 Multigenerational HHs",
          "UNMARRMF10" : "2010 Unmarried-partner HH: M&F",
          "UNMARRSS10" : "2010 Unmarried-partner HH: Same Sex",
          "FAMSENR10" : "2010 HHs w/Pop 65+: Family HH",
          "HHGRW0010" : "2000-2010 Growth Rate: Households",
          "FAMGRW0010" : "2000-2010 Growth Rate: Families",
          "AVGHHSZ10" : "2010 Average Household Size",
          "AVGHSZOO10" : "2010 Avg HH Size of OOHUs",
          "AVGHSZRO10" : "2010 Avg HH Size of ROHUs",
          "AVGFMSZ10" : "2010 Average Family Size",
          "AVGNFMSZ10" : "2010 Average Nonfamily Size",
          "AVGHSZWH10" : "2010 Avg HH Size: White HHr",
          "AVGHSZBL10" : "2010 Avg HH Size: Black HHr",
          "AVGHSZAI10" : "2010 Avg HH Size: American Ind HHr",
          "AVGHSZAS10" : "2010 Avg HH Size: Asian HHr",
          "AVGHSZPI10" : "2010 Avg HH Size: Pacific Islander HHr",
          "AVGHSZOT10" : "2010 Avg HH Size: Other Race HHr",
          "AVGHSZ2R10" : "2010 Avg HH Size: 2+ Races HHr",
          "AVGHSZHS10" : "2010 Avg HH Size: Hispanic HHr",
          "TOTHH00" : "2000 Total Households",
          "FAMHH00" : "2000 Family Households",
          "INCMORT_CY" : "2020 Pct of Income for Mortgage"
        },
        "geometryType" : "esriGeometryPolygon",
        "spatialReference" : {
          "wkid" : 4326,
          "latestWkid" : 4326
        },
        "fields" : [ {
          "name" : "ID",
          "alias" : "Id",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "OBJECTID",
          "alias" : "Object ID",
          "type" : "esriFieldTypeOID"
        }, {
          "name" : "sourceCountry",
          "alias" : "Country code",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "areaType",
          "alias" : "Area type",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "bufferUnits",
          "alias" : "Buffer units",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "bufferUnitsAlias",
          "alias" : "Buffer units alias",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "bufferRadii",
          "alias" : "Buffer radii",
          "type" : "esriFieldTypeDouble"
        }, {
          "name" : "aggregationMethod",
          "alias" : "Aggregation method",
          "type" : "esriFieldTypeString",
          "length" : 256
        }, {
          "name" : "populationToPolygonSizeRating",
          "alias" : "Population to polygon size rating for the country",
          "type" : "esriFieldTypeDouble"
        }, {
          "name" : "apportionmentConfidence",
          "alias" : "Apportionment confidence for the country",
          "type" : "esriFieldTypeDouble"
        }, {
          "name" : "HasData",
          "alias" : "Has data",
          "type" : "esriFieldTypeInteger"
        }, {
          "name" : "TOTHH_CY",
          "alias" : "2020 Total Households",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.TOTHH_CY",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "AVGHHSZ_CY",
          "alias" : "2020 Average Household Size",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGHHSZ_CY",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "FAMHH_CY",
          "alias" : "2020 Family Households",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.FAMHH_CY",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "AVGFMSZ_CY",
          "alias" : "2020 Average Family Size",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGFMSZ_CY",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "HHGRW10CY",
          "alias" : "2010-2020 Growth Rate: Households",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.HHGRW10CY",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "pct"
        }, {
          "name" : "FAMGRW10CY",
          "alias" : "2010-2020 Growth Rate: Families",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.FAMGRW10CY",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "pct"
        }, {
          "name" : "TOTHH_FY",
          "alias" : "2025 Total Households",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.TOTHH_FY",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "AVGHHSZ_FY",
          "alias" : "2025 Average Household Size",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGHHSZ_FY",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "FAMHH_FY",
          "alias" : "2025 Family Households",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.FAMHH_FY",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "AVGFMSZ_FY",
          "alias" : "2025 Average Family Size",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGFMSZ_FY",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "HHGRWCYFY",
          "alias" : "2020-2025 Growth Rate: Households",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.HHGRWCYFY",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "pct"
        }, {
          "name" : "FAMGRWCYFY",
          "alias" : "2020-2025 Growth Rate: Families",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.FAMGRWCYFY",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "pct"
        }, {
          "name" : "TOTHH10",
          "alias" : "2010 Total Households",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.TOTHH10",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "HHU18C10",
          "alias" : "2010 HHs with Population <18",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.HHU18C10",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "MLTGENHH10",
          "alias" : "2010 Multigenerational HHs",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.MLTGENHH10",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "UNMARRMF10",
          "alias" : "2010 Unmarried-partner HH: M&F",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.UNMARRMF10",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "UNMARRSS10",
          "alias" : "2010 Unmarried-partner HH: Same Sex",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.UNMARRSS10",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "FAMSENR10",
          "alias" : "2010 HHs w/Pop 65+: Family HH",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.FAMSENR10",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "HHGRW0010",
          "alias" : "2000-2010 Growth Rate: Households",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.HHGRW0010",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "pct"
        }, {
          "name" : "FAMGRW0010",
          "alias" : "2000-2010 Growth Rate: Families",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.FAMGRW0010",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "pct"
        }, {
          "name" : "AVGHHSZ10",
          "alias" : "2010 Average Household Size",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGHHSZ10",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "AVGHSZOO10",
          "alias" : "2010 Avg HH Size of OOHUs",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGHSZOO10",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "AVGHSZRO10",
          "alias" : "2010 Avg HH Size of ROHUs",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGHSZRO10",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "AVGFMSZ10",
          "alias" : "2010 Average Family Size",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGFMSZ10",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "AVGNFMSZ10",
          "alias" : "2010 Average Nonfamily Size",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGNFMSZ10",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "AVGHSZWH10",
          "alias" : "2010 Avg HH Size: White HHr",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGHSZWH10",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "AVGHSZBL10",
          "alias" : "2010 Avg HH Size: Black HHr",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGHSZBL10",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "AVGHSZAI10",
          "alias" : "2010 Avg HH Size: American Ind HHr",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGHSZAI10",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "AVGHSZAS10",
          "alias" : "2010 Avg HH Size: Asian HHr",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGHSZAS10",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "AVGHSZPI10",
          "alias" : "2010 Avg HH Size: Pacific Islander HHr",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGHSZPI10",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "AVGHSZOT10",
          "alias" : "2010 Avg HH Size: Other Race HHr",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGHSZOT10",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "AVGHSZ2R10",
          "alias" : "2010 Avg HH Size: 2+ Races HHr",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGHSZ2R10",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "AVGHSZHS10",
          "alias" : "2010 Avg HH Size: Hispanic HHr",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.AVGHSZHS10",
          "component" : "demographics",
          "decimals" : 2,
          "units" : "count"
        }, {
          "name" : "TOTHH00",
          "alias" : "2000 Total Households",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.TOTHH00",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "FAMHH00",
          "alias" : "2000 Family Households",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.FAMHH00",
          "component" : "demographics",
          "decimals" : 0,
          "units" : "count"
        }, {
          "name" : "INCMORT_CY",
          "alias" : "2020 Pct of Income for Mortgage",
          "type" : "esriFieldTypeDouble",
          "fullName" : "householdtotals.INCMORT_CY",
          "component" : "demographics",
          "decimals" : 1,
          "units" : "pct"
        } ],
        "features" : [ {
          "attributes" : {
            "ID" : "0",
            "OBJECTID" : 1,
            "sourceCountry" : "US",
            "areaType" : "NetworkServiceArea",
            "bufferUnits" : "Minutes",
            "bufferUnitsAlias" : "Drive Time Minutes",
            "bufferRadii" : 10,
            "aggregationMethod" : "BlockApportionment:US.BlockGroups",
            "populationToPolygonSizeRating" : 2.191,
            "apportionmentConfidence" : 2.576,
            "HasData" : 1,
            "TOTHH_CY" : 141725,
            "AVGHHSZ_CY" : 2.03,
            "FAMHH_CY" : 58365,
            "AVGFMSZ_CY" : 2.95,
            "HHGRW10CY" : 0.88,
            "FAMGRW10CY" : 0.62,
            "TOTHH_FY" : 145692,
            "AVGHHSZ_FY" : 2.03,
            "FAMHH_FY" : 59563,
            "AVGFMSZ_FY" : 2.96,
            "HHGRWCYFY" : 0.55,
            "FAMGRWCYFY" : 0.41,
            "TOTHH10" : 129555,
            "HHU18C10" : 23525,
            "MLTGENHH10" : 3651,
            "UNMARRMF10" : 7832,
            "UNMARRSS10" : 2358,
            "FAMSENR10" : 13337,
            "HHGRW0010" : 1.39,
            "FAMGRW0010" : 0.78,
            "AVGHHSZ10" : 2.03,
            "AVGHSZOO10" : 2.06,
            "AVGHSZRO10" : 2.02,
            "AVGFMSZ10" : 2.94,
            "AVGNFMSZ10" : 1.31,
            "AVGHSZWH10" : 1.82,
            "AVGHSZBL10" : 2.13,
            "AVGHSZAI10" : 2.31,
            "AVGHSZAS10" : 2.48,
            "AVGHSZPI10" : 2.26,
            "AVGHSZOT10" : 2.61,
            "AVGHSZ2R10" : 2.08,
            "AVGHSZHS10" : 2.34,
            "TOTHH00" : 112880,
            "FAMHH00" : 50690,
            "INCMORT_CY" : 49.9
          },
          "geometry" : {
            "rings" : [ [ [ -74.00826424008231, 40.74579435922033 ], [ -74.00714135136705, 40.74489604691587 ], [ -74.00736592928978, 40.74377315818871 ], [ -74.00669219462331, 40.74309942470032 ], [ -74.00669219462331, 40.74175195766784 ], [ -74.00714135136705, 40.74107822480485 ], [ -74.00803966215959, 40.74085364725552 ], [ -74.00893797295214, 40.73860786885593 ], [ -74.00714135136705, 40.73860786885593 ], [ -74.0064676175989, 40.739057024747964 ], [ -74.00556930680635, 40.738383291133964 ], [ -74.0046709951155, 40.73860786885593 ], [ -74.00399726224568, 40.738158714015114 ], [ -74.00422184016838, 40.736137513055354 ], [ -74.00354810640023, 40.735463779823064 ], [ -74.00377268432295, 40.734565468897436 ], [ -74.00332352937586, 40.73344258003103 ], [ -74.00220063976228, 40.73187053482076 ], [ -74.00152690599413, 40.7323196912734 ], [ -74.00220063976228, 40.73321800188962 ], [ -74.00175148391685, 40.734116313310665 ], [ -73.99905654974258, 40.73434089114273 ], [ -73.99860739479547, 40.733667158095166 ], [ -73.99905654974258, 40.732544269043416 ], [ -73.99838281687276, 40.7323196912734 ], [ -73.99793366192564, 40.730523069054264 ], [ -73.99838281687276, 40.72984933478793 ], [ -73.9992811276653, 40.72984933478793 ], [ -73.9992811276653, 40.7294001800397 ], [ -73.9972599281575, 40.72827729113767 ], [ -73.9972599281575, 40.72648066801483 ], [ -73.99456499488156, 40.72558235698596 ], [ -73.99434041695885, 40.72490862375625 ], [ -73.99501414982866, 40.72401031329365 ], [ -73.99411583903613, 40.72401031329365 ], [ -73.99389126111342, 40.72490862375625 ], [ -73.99254379357711, 40.725806935028935 ], [ -73.9898488611995, 40.724234889833426 ], [ -73.98962428327678, 40.72356115725995 ], [ -73.98872597158592, 40.724234889833426 ], [ -73.98782766079339, 40.72401031329365 ], [ -73.98692935000082, 40.722438267871354 ], [ -73.98603103830997, 40.72221369003511 ], [ -73.98558188336287, 40.72153995674582 ], [ -73.98625561623268, 40.72041706798107 ], [ -73.98603103830997, 40.71974333488924 ], [ -73.9849081486964, 40.72019249013368 ], [ -73.9828869491886, 40.71951875681131 ], [ -73.98311152711132, 40.72041706798107 ], [ -73.98400983790386, 40.72041706798107 ], [ -73.9849081486964, 40.72131537928278 ], [ -73.98468357167201, 40.72221369003511 ], [ -73.98400983790386, 40.72266284631146 ], [ -73.98221321631877, 40.72198911212201 ], [ -73.98041659383537, 40.72266284631146 ], [ -73.97929370512013, 40.72176453481278 ], [ -73.9772725038157, 40.72288742399381 ], [ -73.97637419302313, 40.72198911212201 ], [ -73.97659877094586, 40.72109080106202 ], [ -73.9757004601533, 40.72064164575158 ], [ -73.97525130430789, 40.72288742399381 ], [ -73.97278094895466, 40.726705245749585 ], [ -73.97255637103194, 40.7287264459769 ], [ -73.97502672728349, 40.73097222371111 ], [ -73.97592503807601, 40.73658666929083 ], [ -73.97457757143806, 40.73883244718104 ], [ -73.97323010390177, 40.73883244718104 ], [ -73.97278094895466, 40.73770955818363 ], [ -73.9736792597472, 40.73681124695204 ], [ -73.97390383766991, 40.735463779823064 ], [ -73.97300552597906, 40.73187053482076 ], [ -73.97210721518651, 40.731421380101196 ], [ -73.97053517062582, 40.7294001800397 ], [ -73.97075974765023, 40.72648066801483 ], [ -73.97345468182448, 40.72198911212201 ], [ -73.9736792597472, 40.71817129013524 ], [ -73.97502672728349, 40.715700934080736 ], [ -73.97480214936078, 40.71525177917048 ], [ -73.97278094895466, 40.714802623272625 ], [ -73.97233179310923, 40.71412888987239 ], [ -73.97255637103194, 40.71323057896128 ], [ -73.9736792597472, 40.712781423046124 ], [ -73.97614961599874, 40.71345515578257 ], [ -73.97682334886858, 40.71165853430161 ], [ -73.97794623758382, 40.71053564500564 ], [ -73.97951828214451, 40.70986191200823 ], [ -73.98086574878249, 40.70986191200823 ], [ -73.98400983790386, 40.708739023057916 ], [ -73.98468357167201, 40.70918817832259 ], [ -73.98692935000082, 40.708739023057916 ], [ -73.99007343912221, 40.708963600047525 ], [ -73.99007343912221, 40.70828986680657 ], [ -73.9885013936632, 40.70559493377826 ], [ -73.98445899374929, 40.70537035632417 ], [ -73.98356068295675, 40.70469662214225 ], [ -73.98333610503404, 40.70537035632417 ], [ -73.98243779424148, 40.705819511156015 ], [ -73.98176405957503, 40.70492119982518 ], [ -73.98086574878249, 40.70514577811284 ], [ -73.98019201591266, 40.70447204506402 ], [ -73.9772725038157, 40.70514577811284 ], [ -73.97659877094586, 40.70469662214225 ], [ -73.97637419302313, 40.70334915580518 ], [ -73.97547588223058, 40.70245084384323 ], [ -73.9757004601533, 40.70110337770093 ], [ -73.97457757143806, 40.70087880008449 ], [ -73.97323010390177, 40.70132795524118 ], [ -73.97255637103194, 40.700654221710884 ], [ -73.9680648152726, 40.700205066097446 ], [ -73.96761565942717, 40.69953133278753 ], [ -73.96784023734988, 40.698633021777646 ], [ -73.96963685983327, 40.69818386615688 ], [ -73.97075974765023, 40.69683640019436 ], [ -73.96424699238308, 40.69683640019436 ], [ -73.96357325861493, 40.69728555468408 ], [ -73.96267494782238, 40.69930675531944 ], [ -73.96200121495256, 40.69953133278753 ], [ -73.9611029032617, 40.698633021777646 ], [ -73.96200121495256, 40.69616266618725 ], [ -73.96379783743596, 40.694815198846655 ], [ -73.97502672728349, 40.695039777153596 ], [ -73.97525130430789, 40.69391688826535 ], [ -73.97592503807601, 40.69369231026006 ], [ -73.97592503807601, 40.69279399884244 ], [ -73.97794623758382, 40.69234484404085 ], [ -73.97817081640486, 40.69144653284681 ], [ -73.9788445492747, 40.690997377135616 ], [ -73.97974286006722, 40.69144653284681 ], [ -73.97996743798994, 40.69256942113899 ], [ -73.98041659383537, 40.69256942113899 ], [ -73.98131490462792, 40.69189568825487 ], [ -73.98041659383537, 40.69009906616639 ], [ -73.98064117085977, 40.68897617711323 ], [ -73.98131490462792, 40.688527021098245 ], [ -73.98198863839605, 40.688751598803016 ], [ -73.98176405957503, 40.68830244331786 ], [ -73.98221321631877, 40.68762871020378 ], [ -73.98333610503404, 40.68762871020378 ], [ -73.98333610503404, 40.68650582107589 ], [ -73.98423441582658, 40.68560751018377 ], [ -73.98648019415539, 40.68650582107589 ], [ -73.98692935000082, 40.68560751018377 ], [ -73.9885013936632, 40.684933775710284 ], [ -73.98939970535406, 40.6860566647592 ], [ -73.99142090486187, 40.686730398780206 ], [ -73.9918700607073, 40.68628124329594 ], [ -73.99299295032085, 40.68650582107589 ], [ -73.99321752824358, 40.68560751018377 ], [ -73.99434041695885, 40.685158353943656 ], [ -73.99523872775138, 40.68628124329594 ], [ -73.99411583903613, 40.688527021098245 ], [ -73.99523872775138, 40.688751598803016 ], [ -73.99568788359682, 40.689649910227374 ], [ -73.99658619528768, 40.6892007546666 ], [ -73.99770908400293, 40.69009906616639 ], [ -73.99770908400293, 40.68897617711323 ], [ -73.99860739479547, 40.68807786614294 ], [ -74.00130232807142, 40.682014264747714 ], [ -74.00242521678668, 40.681565110179136 ], [ -74.00332352937586, 40.68268799875973 ], [ -74.00130232807142, 40.686730398780206 ], [ -74.00242521678668, 40.68762871020378 ], [ -74.00197606183956, 40.688751598803016 ], [ -74.00354810640023, 40.688751598803016 ], [ -74.00399726224568, 40.69009906616639 ], [ -74.00309895055481, 40.690997377135616 ], [ -74.00130232807142, 40.690997377135616 ], [ -74.00175148391685, 40.69167111024816 ], [ -74.00152690599413, 40.69256942113899 ], [ -73.99973028440904, 40.694815198846655 ], [ -74.00017943935616, 40.696387244038576 ], [ -73.99860739479547, 40.69751013283659 ], [ -73.99793366192564, 40.69953133278753 ], [ -73.9972599281575, 40.699980488857626 ], [ -73.99568788359682, 40.70312457826951 ], [ -73.99568788359682, 40.70402288931685 ], [ -73.99703535023478, 40.70469662214225 ], [ -73.9988319727182, 40.706493244874345 ], [ -73.99995486233175, 40.70671782194679 ], [ -74.00579388383076, 40.70334915580518 ], [ -74.00916255087485, 40.700654221710884 ], [ -74.0102854395901, 40.70087880008449 ], [ -74.01185748504912, 40.700205066097446 ], [ -74.01365410663419, 40.700205066097446 ], [ -74.01387868455691, 40.69953133278753 ], [ -74.01073459633385, 40.69122195468855 ], [ -74.00714135136705, 40.68717955396208 ], [ -74.00422184016838, 40.681115953946396 ], [ -74.00197606183956, 40.679543908844494 ], [ -74.00220063976228, 40.678870175753545 ], [ -74.00130232807142, 40.67752270890081 ], [ -74.00242521678668, 40.67639981983066 ], [ -74.00332352937586, 40.676848975820725 ], [ -74.00422184016838, 40.67864559813302 ], [ -74.00556930680635, 40.679543908844494 ], [ -74.00871339592774, 40.6860566647592 ], [ -74.01230663999623, 40.69009906616639 ], [ -74.01634904080845, 40.70132795524118 ], [ -74.017247351601, 40.70245084384323 ], [ -74.01747193042202, 40.70379831132883 ], [ -74.01859481913728, 40.70447204506402 ], [ -74.0190439740844, 40.70537035632417 ], [ -74.0190439740844, 40.70716697790563 ], [ -74.01859481913728, 40.707840710930576 ], [ -74.01949312992983, 40.708963600047525 ], [ -74.01859481913728, 40.70963733396247 ], [ -74.01859481913728, 40.71098480108974 ], [ -74.01792108536915, 40.711433956186866 ], [ -74.01702277367828, 40.711209377995615 ], [ -74.01634904080845, 40.71233226682467 ], [ -74.0152261520932, 40.71233226682467 ], [ -74.01500157417048, 40.713006000701526 ], [ -74.0154507291176, 40.71345515578257 ], [ -74.01657361783285, 40.713006000701526 ], [ -74.01769650744643, 40.71345515578257 ], [ -74.01747193042202, 40.71704840105631 ], [ -74.01679819575557, 40.71817129013524 ], [ -74.0154507291176, 40.71906960110591 ], [ -74.01365410663419, 40.71862044577418 ], [ -74.01230663999623, 40.7253577788659 ], [ -74.01589988496303, 40.72558235698596 ], [ -74.02667961896512, 40.727603557279124 ], [ -74.0316203305699, 40.727828135309096 ], [ -74.033641530976, 40.728501868255506 ], [ -74.03409068592312, 40.72917560186902 ], [ -74.033641530976, 40.730073912727015 ], [ -74.03251864226075, 40.730298491269586 ], [ -74.03139575264719, 40.72984933478793 ], [ -74.02488299738005, 40.7294001800397 ], [ -74.01567530704031, 40.727603557279124 ], [ -74.01185748504912, 40.72737897985277 ], [ -74.01073459633385, 40.73726040204212 ], [ -74.01118375128097, 40.73883244718104 ], [ -74.00983628464299, 40.74130280295722 ], [ -74.00938712879757, 40.74467147000653 ], [ -74.00826424008231, 40.74556978126089 ], [ -74.00826424008231, 40.74579435922033 ] ] ]
          }
        } ]
      } ]
    }
  } ],
  "messages" : [ ]
}

Find normalized facts for a 1 mile buffer

In this example the addDerivativeVariables parameter is used to calculate percentages from facts. Use the search box to select a pre-defined location or click on the map to create the default 1 mile ring around a point. The addDerivativeVariables parameter is set to percent. The list of accepted values are percent, index, average, all.

Steps

  1. Reference the service.

  2. Define the studyAreas

  3. Define the dataCollections

  4. Define addDerivativeVariables to return averages

  5. Set the API key.

APIs

ArcGIS JS APIEsri LeafletMapbox GL JSOpenLayersArcGIS REST JSArcGIS Python API
                                                                                                                                                                         
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>ArcGIS Developer Guide: Find fact averages for an area</title>
    <style>
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      .esri-view .esri-popup__button.esri-popup__button--dock {
        display: none;
      .esri-popup__header-title {
        text-align: left;
    </style>

    <!-- require ArcGIS REST JS libraries from https://unpkg.com -->
 <script src="https://unpkg.com/@esri/arcgis-rest-request@3.0.0/dist/umd/request.umd.js"></script>
  <script src="https://unpkg.com/@esri/arcgis-rest-auth@3.0.0/dist/umd/auth.umd.js"></script>
  <script src="https://unpkg.com/@esri/arcgis-rest-demographics@3.0.0/dist/umd/demographics.umd.js"></script>

    <link rel="stylesheet" href="https://js.arcgis.com/4.19/esri/themes/light/main.css">
    <script src="https://js.arcgis.com/4.19/"></script>

    <script>
      require([
        "esri/Map",
        "esri/views/MapView",
        "esri/geometry/Point",
        "esri/Graphic",
        "esri/geometry/geometryEngine",
        "esri/core/watchUtils",
        "esri/config"
      (Map, MapView, Point, Graphic, geometryEngine, watchUtils, esriConfig)=> {
        const apiKey = "YOUR-API-KEY";
        const authentication = new arcgisRest.ApiKey({
           key: apiKey
        const start = new Point([-74.0060,40.7128]);  // New York
        const zoom = 13;
        const map = new Map({
          basemap: "topo"
        const view = new MapView({
          map: map,
          center: start,
          zoom: zoom,
          container: "viewDiv",
          constraints: {
            snapToZoom: false
        view.when(() => {
          const elem = document.getElementById("selectContainer");
          view.ui.add(elem, "top-right");
          elem.addEventListener("change", goToLocation);
        view.on("click", (e) => {
        function goToLocation(e) {
          if (!e.target.value) {
              target: [-25, 35],
              zoom: 2
          } else {
            const point = new Point(JSON.parse("[" + e.target.value + "]"));
              center: point,
              zoom: zoom
        function getDemographicData(point) {
          // Request demographic data
          arcgisRest.queryDemographicData({
              studyAreas: [{ "geometry": { "x": point.longitude, "y": point.latitude } }],
              dataCollections: ["Health"],
              addderivativevariables: ["average"],
              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.");
              }
            });
        }
        function showData (attributes, point) {
          if (!attributes || !point) {
            return;
          const title = "Health facts (with Averages) 1 mile search";
          const content = "Health Care Average: " + formatMoney(attributes.X8001_A) +
          "<br>" + "Dental Services Average: " + formatMoney(attributes.X8021_A) +
          "<br>" + "Physician Services Average: " + formatMoney(attributes.X8020_A) +
          "<br>" + "Medical Supplies Average: " + formatMoney(attributes.X8033_A);
            location: point,
            title: title,
            content: content
          const buffer = geometryEngine.geodesicBuffer(point, 1, "miles");
          const graphicBuffer = new Graphic({
            geometry: buffer,
            symbol:  {
              type: "simple-fill",
                color: [ 50,50,50, 0.1 ],
                outline: {
                  color: [0,0,0, 0.1],
                  width: .5
        function formatMoney(number) {
            return number.toLocaleString('en-US', { style: 'currency', currency: 'USD' });
  </script>
  </head>
  <body>
    <div id="viewDiv"></div>
    <div id="selectContainer" class="esri-widget">
      <select id="selectLocation" class="esri-select esri-input" style="min-width: 150px; font-size: 16px">
        <option value="">Choose a place...</option>
        <option selected value="-74.0060,40.7128">New York</option>
        <option value="-122.4194,37.7749">San Francisco</option>
        <option value="-86.158,39.7684">Indianapolis</option>
        <option value="-80.1918,25.7617">Miami</option>
        <option value="-115.1398,36.1699">Las Vegas</option>
      </select>
    </div>
  </body>
</html>

REST API

RequestResponse
cURLcURL (Formatted)
      
1
2
3
4
5
6
curl https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/enrich? \
-d "studyAreas=[{'geometry':{'x': -74.0060, 'y': 40.7128}}]" \
-d "dataCollections=Health" \
-d "addDerivativeVariables=average" \
-d "f=json" \
-d "token=<ACCESS-TOKEN>"