Named statistical areas

In all previous examples of different study area types, locations were defined as either points or polygons. Study area locations can also be passed as one or many named statistical areas. This form of study area lets you define an area by the ID of a standard geographic statistical feature, such as a census or postal area, for example, to obtain enrichment information for a U.S. state, county, or ZIP Code or a Canadian province or postal code.

Request parameters

ParameterDetails

studyAreas

Required parameter to specify a list of input features to be enriched. Study areas can be defined as map areas described as named administrative boundaries (e.g., postal codes, states, ZIP Codes and the like).

Examples

Example 1 - Map areas described as named administrative boundaries (e.g., U.S. state):

studyAreas=[{"sourceCountry":"US","layer":"US.States","ids":["06"]}]

Example 2 - Map areas described as multiple named administrative boundaries (e.g., U.S. ZIP Codes):

studyAreas=[{"sourceCountry":"US","layer":"US.ZIP5","ids":["92373","92129"]}]

Example 3 – Combined map areas described as multiple named administrative boundaries and return enrichment data for the union of the combined features (e.g., U.S. ZIP Codes):

studyAreas=[{"sourceCountry":"US","layer":"US.ZIP5","ids":["92373,92129"]}]

Example 4 - Find and return the U.S. state for an intersecting point:

studyareas=[{"geometry":{"x":-117.1956,"y":34.0572},"areaType":"StandardGeography","intersectingGeographies":[{"sourceCountry":"US","layer":"US.States"}]}]

Example 5 - Return a geograhy in the requested generalization level:

studyAreas=[{"sourceCountry":"US","layer":"US.States","ids":["06"],"generalizationLevel":"6"}]

Additional notes

  • You can use the Standard Geography Query lookup service to find the IDs for named statistical features.
  • The request sent to the service cannot be greater than 10mb.
  • Currently, a maximum of 100 features can be enriched with the service per request.

dataCollections

Optional parameter to specify a list of Data Collections.

A Data Collection is a preassembled list of attributes which will be used to enrich the input features. Enrichment attributes can describe various types of information such as demographic characteristics and geographic context for the locations or areas submitted as input features in studyAreas.

Default value

["KeyGlobalFacts"]

A standard list of enrichment attributes.

Examples

Example 1:

dataCollections=["KeyGlobalFacts"]

Example 2:

dataCollections=["KeyUSFacts"]

Example 3:

dataCollections=["KeyGlobalFacts","KeyUSFacts"]

Additional notes

analysisVariables

Optional parameter to specify a subset of variables to be returned from one or more Data Collections.

A Data Collection is a preassembled list of attributes that will be used to enrich the input features. With the analysisVariables parameter you can return a subset of variables Enrichment attributes can describe various types of information such as demographic characteristics and geographic context of the locations or areas submitted as input features in studyAreas.

Examples

Example 1:

analysisVariables=["KeyGlobalFacts.TOTPOP"]

Example 2:

analysisVariables=["KeyGlobalFacts.TOTPOP", "AGE.MALE0", "AGE.MALE5"]

Example 3:

analysisVariables=["KeyGlobalFacts.TOTPOP", "AGE.* "]

Additional notes

  • The Data Collection for an analysis variable should be appended before an analysis variable.
  • Usage and metering will only be based on the number of variables that are returned
  • You can use an asterisk to return all variables for a given data collection (e.g. "KeyGlobalFacts.*")

addDerivativeVariables

Optional parameter to specify an array of string values that describe what derivative variables to include in the output.

Examples

Example 1 - Return a data collection with the additional variables and associated metadata for percent's, averages and index values:

addDerivativeVariables=all

Example 2 - Return a data collection with the additional variables and associated metadata for index values:

addDerivativeVariables=index

Additional notes

  • The enumerated list of accepted values are as follows:

    addDerivativeVariables=percent,index,average,all,*

  • Support the use of the derivative statistics can also be performed in the enrich operation through the analysisVariables parameter.
  • Example:

    https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/Enrich?studyareas=[{"sourceCountry":"US","layer":"US.ZIP5","ids":["92373"]}]&addDerivativeVariables=index,average&f=pjson

    {
      "results" : [ {
        "paramName" : "GeoEnrichmentResult",
        "dataType" : "GeoEnrichmentResult",
        "value" : {
          "version" : "2.0",
          "FeatureSet" : [ {
            "displayFieldName" : "",
            "fieldAliases" : {
              "ID" : "ID",
              "OBJECTID" : "Object ID",
              "sourceCountry" : "sourceCountry",
              "areaType" : "areaType",
              "bufferUnits" : "bufferUnits",
              "bufferUnitsAlias" : "bufferUnitsAlias",
              "bufferRadii" : "bufferRadii",
              "aggregationMethod" : "aggregationMethod",
              "HasData" : "HasData",
              "X7003_X" : "Airline Fares",
              "X7003_X_I" : "Airline Fares: Index"
            },
            "spatialReference" : {
              "wkid" : 4326,
              "latestWkid" : 4326
            },
            "fields" : [ {
              "name" : "ID",
              "type" : "esriFieldTypeString",
              "alias" : "ID",
              "length" : 256
            }, {
              "name" : "OBJECTID",
              "type" : "esriFieldTypeOID",
              "alias" : "Object ID"
            }, {
              "name" : "sourceCountry",
              "type" : "esriFieldTypeString",
              "alias" : "sourceCountry",
              "length" : 256
            }, {
              "name" : "areaType",
              "type" : "esriFieldTypeString",
              "alias" : "areaType",
              "length" : 256
            }, {
              "name" : "bufferUnits",
              "type" : "esriFieldTypeString",
              "alias" : "bufferUnits",
              "length" : 256
            }, {
              "name" : "bufferUnitsAlias",
              "type" : "esriFieldTypeString",
              "alias" : "bufferUnitsAlias",
              "length" : 256
            }, {
              "name" : "bufferRadii",
              "type" : "esriFieldTypeDouble",
              "alias" : "bufferRadii"
            }, {
              "name" : "aggregationMethod",
              "type" : "esriFieldTypeString",
              "alias" : "aggregationMethod",
              "length" : 256
            }, {
              "name" : "HasData",
              "type" : "esriFieldTypeInteger",
              "alias" : "HasData"
            }, {
              "name" : "X7003_X",
              "type" : "esriFieldTypeDouble",
              "alias" : "Airline Fares",
              "fullName" : "TravelCEX.X7003_X",
              "component" : "demographics",
              "decimals" : 0,
              "units" : "currency",
              "currency" : "$"
            }, {
              "name" : "X7003_X_I",
              "type" : "esriFieldTypeInteger",
              "alias" : "Airline Fares: Index",
              "fullName" : "TravelCEX.X7003_X_I",
              "decimals" : 0,
              "units" : "other"
            } ],
            "features" : [ {
              "attributes" : {
                "ID" : "0",
                "OBJECTID" : 1,
                "sourceCountry" : "US",
                "areaType" : "RingBuffer",
                "bufferUnits" : "esriMiles",
                "bufferUnitsAlias" : "mile",
                "bufferRadii" : 1,
                "aggregationMethod" : "BlockApportionment:US.BlockGroups",
                "HasData" : 1,
                "X7003_X" : 4691891,
                "X7003_X_I" : 103
              }
            } ]
          } ]
        }
      } ],
      "messages" : [ ]
    }

studyAreasOptions

This parameter is only applicable to input study areas that are based on points. This parameter is not needed and ignored for standard geography study areas.

Default value

(null or empty)

Additional notes

  • This parameter should only be set for input points, street address study areas, and point-based feature services.

useData

Optional parameter to explicitly specify the country or dataset to query.

When all input features specified in the studyAreas parameter describe locations or areas that lie in the same country or dataset, this optional parameter can be specified to provide an additional performance hint to the service.

By default, the service will automatically determine the country or dataset that is associated with each location or area submitted in the studyAreas parameter; however, there is an associated computational cost that can lengthen the time it takes to return a response. To skip this intermediate step and potentially improve the speed and performance of the service, the caller can specify the country or dataset information up front through this parameter.

Default value

(null or empty)

The default behavior will be followed.

Examples

Example 1 - Indicate to the service that all of the input features in the studyAreas parameter describe locations or areas in the U.S.:

useData={"country":"US"}

Example 2 - Indicate to the service that all of the input features in the studyAreas parameter describe locations or areas in Canada:

useData={"country":"CA"}

Example 3 - Indicate to the service that all of the input features in the studyAreas parameter describe locations or areas in the U.S. USA_ESRI_2017 dataset:

useData={"sourceCountry":"US","dataset":"USA_ESRI_2017"}

Additional notes

  • GeoEnrichment is available for a number of countries described in the coverage section of the documentation. New countries will be added in the future.
  • Use the countries discovery method to obtain a list of available datasets:

    https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/Countries/United States?f=pjson

    {
     "countries": [
      {
       "id": "US",
       "name": "United States",
       "abbr3": "USA",
       "altName": "UNITED STATES",
       "continent": "North America",
       "distanceUnits": "Miles",
       "esriUnits": "esriMiles",
       "defaultExtent": {
        "xmin": -178.48633078029144,
        "ymin": 18.871742416926232,
        "xmax": -66.90765216180796,
        "ymax": 71.403759083950263
       },
       "defaultDatasetID": "USA_ESRI_2017",
       "datasets": [
        "LANDSCAPE",
        "USA_ACS_2017",
        "USA_ASR_2017",
        "USA_ESRI_2017",
        "USA_RMP_2017"
       ],
       "hierarchies": [
        {
         "ID": "census",
         "datasets": [
          "USA_ACS_2017",
          "USA_ASR_2017",
          "USA_ESRI_2017",
          "USA_RMP_2017"
         ]
        },
        {
         "ID": "landscape",
         "datasets": [
          "LANDSCAPE"
         ]
        }
       ],
       "defaultDataCollection": "KeyGlobalFacts",
       "dataCollections": "",
       "defaultReportTemplate": "Demographic and Income Profile",
       "currencySymbol": "$",
       "currencyFormat": "$0;-$0"
      }
     ]
    }

Note:

You can now navigate using the ISO standardized two-digit country code for each country.

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

intersectingGeographies

Optional parameter to explicitly define the geographic layers used to provide geographic context during the enrichment process. For example, you can use this optional parameter to return the U.S. county and ZIP Code that each input study area intersects.

You can intersect input features defined in the studyAreas parameter with standard geography layers that are provided be the GeoEnrichment service for each country. You can also intersect features from a publicly available feature service.

The intersectingGeographies parameter should be constructed as a JSON array of an IntersectingGeographies object which consists of the following elements:

Value Description

geographyType

Used to specify the type of intersection layer. Specify standard to intersect with standard geography layers that are provided by the GeoEnrichment service for each country. Specify external to intersect features from a publicly available feature service.

layer

Specifies which Standard Geography layer should be intersected (e.g., U.S.Counties). These are an array of layers, so you can set one or many layers to intersect. These layers are defined in the Coverage section. At least one layer must be defined if geographyType is set to standard.

URL

Optional URL if you want to intersect features from an external feature service. This layer must be defined if geographyType is set to external.

name

Optional alias name of the output geography layer being intersected. For example, you can set the name of US.Counties to Counties in the GeoEnrichment output.

geometryType

Specifies how input studyAreas should intersect specified geography. If this is set to esriGeometryPoint, one intersecting feature is returned that intersects the centroid of each input polygon. If this is set to esriGeometryPolygon, all intersecting features are returned that intersect the input study area polygon.

outFields

You can optionally define the list of output fields from the intersected layer that will be appended to the GeoEnrichment response as geocontext items.

spatialRel

The optional spatial relationship to be applied on the intersecting layer. The supported spatial relationships include intersects, contains, envelope intersects, within, and so on. The default spatial relationship is intersects (esriSpatialRelIntersects).

where

You can define an optional where clause.

Default value

none

No intersecting geographies will be included in the output response.

returnGeometry

Optional parameter to request the output geometries in the response.

When this parameter is set to true, the output geometries associated with each feature will be included in the response. The output geometries will be in the spatial reference system defined by outSR.

Default value

false

The output geometries will not be returned with each feature in the response.

Examples

Example 1 - Request the output geometries in the response:

returnGeometry=true

Additional notes

  • Requesting output geometries can significantly increase the payload size of the output response which will increase the amount of time it takes to receive the response and negatively affect the speed and performance of any client applications consuming the service.

inSR

This parameter is only applicable to input study areas that are based on points or polygon geometry. This parameter is not needed and ignored for Named Statistical Areas.

Default value

(null or empty)

Additional notes

  • This parameter should only be set for input points and input polygons study area types.

outSR

Optional parameter to request the output geometries in a specified spatial reference system.

When returnGeometry is set to true, this optional parameter can be specified to explicitly indicate the spatial reference system of the output geometry. The parameter value can be specified as the well-known ID describing the projected coordinate system or geographic coordinate system.

Default value

4326

The standard latitude and longitude-based geographic coordinate system based on the WGS 1984 datum will be used.

Examples

Example 1 - Specify the output geometry in the Web Mercator (Auxiliary Sphere) projected coordinate system based on the WGS 1984 datum:

outSR=3857

Additional notes

suppressNullValues

Optional parameter to return only values that are not NULL in the output response. Adding the optional suppressNullValues parameter to any data collections discovery method will reduce the size of the output that is returned.

Default value

false

Example

suppressNullValues=true

Additional notes

  • Setting this optional parameter to true will significantly reduce the size of the output of the data collection response.
  • You will have to handle duck typed cases where some metadata may not be returned for a given variables because a value is set to NULL.

f

Optional parameter to specify the output response format.

Default value

json

The output response will be returned in HTML format.

Examples

Example 1 - Request the output geometries in JSON format:

f=json

Additional notes

  • Supported formats include JSON and XML.

Example usage

        
      

Request example 1:

Enrich a single area defined by a named administrative boundary area and include the associated geometry in the response.

http://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/enrich?StudyAreas=[{"sourceCountry":"US","layer":"US.Counties","ids":["06071"]}]&returnGeometry=true&f=pjson

JSON response example 1
{
 "results": [
  {
   "paramName": "GeoEnrichmentResult",
   "dataType": "GeoEnrichmentResult",
   "value": {
    "version": "2.0",
    "FeatureSet": [
     {
      "displayFieldName": "",
      "fieldAliases": {
       "ID": "ID",
       "OBJECTID": "Object ID",
       "StdGeographyLevel": "StdGeographyLevel",
       "StdGeographyName": "StdGeographyName",
       "StdGeographyID": "StdGeographyID",
       "sourceCountry": "sourceCountry",
       "aggregationMethod": "aggregationMethod",
       "HasData": "HasData",
       "TOTPOP": "Total Population",
       "TOTHH": "Total Households",
       "AVGHHSZ": "Average Household Size",
       "TOTMALES": "Male Population",
       "TOTFEMALES": "Female Population"
      },
      "geometryType": "esriGeometryPolygon",
      "spatialReference": {
       "wkid": 4326,
       "latestWkid": 4326
      },
      "fields": [
       {
        "name": "ID",
        "type": "esriFieldTypeString",
        "alias": "ID",
        "length": 256
       },
       {
        "name": "OBJECTID",
        "type": "esriFieldTypeOID",
        "alias": "Object ID"
       },
       {
        "name": "StdGeographyLevel",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyLevel",
        "length": 256
       },
       {
        "name": "StdGeographyName",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyName",
        "length": 256
       },
       {
        "name": "StdGeographyID",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyID",
        "length": 256
       },
       {
        "name": "sourceCountry",
        "type": "esriFieldTypeString",
        "alias": "sourceCountry",
        "length": 256
       },
       {
        "name": "aggregationMethod",
        "type": "esriFieldTypeString",
        "alias": "aggregationMethod",
        "length": 256
       },
       {
        "name": "HasData",
        "type": "esriFieldTypeInteger",
        "alias": "HasData"
       },
       {
        "name": "TOTPOP",
        "type": "esriFieldTypeDouble",
        "alias": "Total Population",
        "fullName": "KeyGlobalFacts.TOTPOP",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       },
       {
        "name": "TOTHH",
        "type": "esriFieldTypeDouble",
        "alias": "Total Households",
        "fullName": "KeyGlobalFacts.TOTHH",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       },
       {
        "name": "AVGHHSZ",
        "type": "esriFieldTypeDouble",
        "alias": "Average Household Size",
        "fullName": "KeyGlobalFacts.AVGHHSZ",
        "component": "scripts",
        "decimals": 2,
        "units": "count"
       },
       {
        "name": "TOTMALES",
        "type": "esriFieldTypeDouble",
        "alias": "Male Population",
        "fullName": "KeyGlobalFacts.TOTMALES",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       },
       {
        "name": "TOTFEMALES",
        "type": "esriFieldTypeDouble",
        "alias": "Female Population",
        "fullName": "KeyGlobalFacts.TOTFEMALES",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       }
      ],
      "features": [
       {
        "attributes": {
         "ID": "0",
         "OBJECTID": 1,
         "StdGeographyLevel": "US.Counties",
         "StdGeographyName": "San Bernardino County",
         "StdGeographyID": "06071",
         "sourceCountry": "US",
         "aggregationMethod": "Query:US.Counties",
         "HasData": 1,
         "TOTPOP": 2118866,
         "TOTHH": 628314,
         "AVGHHSZ": 3.31,
         "TOTMALES": 1054127,
         "TOTFEMALES": 1064739
        },
        "geometry": {
         "rings": [
          [
           [
            -115.71750000041715,
            35.809140001809844
           ],
           [
            -115.69967999941925,
            35.808940001009425
           ],

           ...

           [
            -115.71750000041715,
            35.809140001809844
           ]
          ]
         ]
        }
       }
      ]
     }
    ]
   }
  }
 ],
 "messages": []
}

Notes:

  • The response has been abbreviated in the example where "..." is noted.
  • Rather than specifying the polygon feature, identifiers are used to specify San Bernardino County, California, in the example. Named administrative boundary areas can be looked up with administrative boundary lookup or utility services.
  • A list of attributes describing the area's demographic characteristics and geographic context, as defined in the default Data Collection, is returned in the response.

JSON response rendered with ArcGIS for Desktop.

San Bernardino county

Notes:

  • Transparency and fill properties have been adjusted for illustrative purposes.

        
      

Request example 2:

Enrich multiple areas defined by a named administrative boundary area.

http://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/enrich?StudyAreas=[{"sourceCountry":"US","layer":"US.States","ids":["06","08"]}]&dataCollections=["KeyUSFacts"]&f=pjson

JSON response example 2
{
 "results": [
  {
   "paramName": "GeoEnrichmentResult",
   "dataType": "GeoEnrichmentResult",
   "value": {
    "version": "2.0",
    "FeatureSet": [
     {
      "displayFieldName": "",
      "fieldAliases": {
       "ID": "ID",
       "OBJECTID": "Object ID",
       "StdGeographyLevel": "StdGeographyLevel",
       "StdGeographyName": "StdGeographyName",
       "StdGeographyID": "StdGeographyID",
       "sourceCountry": "sourceCountry",
       "aggregationMethod": "aggregationMethod",
       "HasData": "HasData",
       "TOTPOP00": "2000 Total Population",
       "TOTPOP10": "2010 Total Population",
       "TOTPOP_CY": "2016 Total Population",
       "TOTPOP_FY": "2021 Total Population",
       "GQPOP_CY": "2016 Population in Group Quarters",
       "DIVINDX_CY": "2016 Diversity Index",
       "TOTHH00": "2000 Total Households",
       "TOTHH10": "2010 Total Households",
       "TOTHH_CY": "2016 Total Households",
       "TOTHH_FY": "2021 Total Households",
       "AVGHHSZ_CY": "2016 Average Household Size",
       "MEDHINC_CY": "2016 Median Household Income",
       "MEDHINC_FY": "2021 Median Household Income",
       "AVGHINC_CY": "2016 Average Household Income",
       "AVGHINC_FY": "2021 Average Household Income",
       "PCI_CY": "2016 Per Capita Income",
       "PCI_FY": "2021 Per Capita Income",
       "TOTHU00": "2000 Total Housing Units",
       "TOTHU10": "2010 Total Housing Units",
       "TOTHU_CY": "2016 Total Housing Units",
       "TOTHU_FY": "2021 Total Housing Units",
       "OWNER_CY": "2016 Owner Occupied HUs",
       "OWNER_FY": "2021 Owner Occupied HUs",
       "RENTER_CY": "2016 Renter Occupied HUs",
       "RENTER_FY": "2021 Renter Occupied HUs",
       "VACANT_CY": "2016 Vacant Housing Units",
       "VACANT_FY": "2021 Vacant Housing Units",
       "MEDVAL_CY": "2016 Median Home Value",
       "MEDVAL_FY": "2021 Median Home Value",
       "AVGVAL_CY": "2016 Average Home Value",
       "AVGVAL_FY": "2021 Average Home Value",
       "POPGRW10CY": "2010-2016 Growth Rate: Population",
       "HHGRW10CY": "2010-2016 Growth Rate: Households",
       "FAMGRW10CY": "2010-2016 Growth Rate: Families",
       "POPGRWCYFY": "2016-2021 Growth/Yr: Population",
       "HHGRWCYFY": "2016-2021 Growth/Yr: Households",
       "FAMGRWCYFY": "2016-2021 Growth/Yr: Families",
       "MHIGRWCYFY": "2016-2021 Growth/Yr: Median HH Inc",
       "PCIGRWCYFY": "2016-2021 Growth/Yr: Per Capita Income"
      },
      "fields": [
       {
        "name": "ID",
        "type": "esriFieldTypeString",
        "alias": "ID",
        "length": 256
       },
       {
        "name": "OBJECTID",
        "type": "esriFieldTypeOID",
        "alias": "Object ID"
       },
       {
        "name": "StdGeographyLevel",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyLevel",
        "length": 256
       },
       {
        "name": "StdGeographyName",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyName",
        "length": 256
       },
       {
        "name": "StdGeographyID",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyID",
        "length": 256
       },
       {
        "name": "sourceCountry",
        "type": "esriFieldTypeString",
        "alias": "sourceCountry",
        "length": 256
       },
       {
        "name": "aggregationMethod",
        "type": "esriFieldTypeString",
        "alias": "aggregationMethod",
        "length": 256
       },
       {
        "name": "HasData",
        "type": "esriFieldTypeInteger",
        "alias": "HasData"
       },
       {
        "name": "TOTPOP00",
        "type": "esriFieldTypeDouble",
        "alias": "2000 Total Population",
        "fullName": "KeyUSFacts.TOTPOP00",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       },
       {
        "name": "TOTPOP10",
        "type": "esriFieldTypeDouble",
        "alias": "2010 Total Population",
        "fullName": "KeyUSFacts.TOTPOP10",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       },

         ...

       {
        "name": "PCIGRWCYFY",
        "type": "esriFieldTypeDouble",
        "alias": "2016-2021 Growth/Yr: Per Capita Income",
        "fullName": "KeyUSFacts.PCIGRWCYFY",
        "component": "demographics",
        "decimals": 2,
        "units": "pct"
       }
      ],
      "features": [
       {
        "attributes": {
         "ID": "0",
         "OBJECTID": 1,
         "StdGeographyLevel": "US.States",
         "StdGeographyName": "California",
         "StdGeographyID": "06",
         "sourceCountry": "US",
         "aggregationMethod": "Query:US.States",
         "HasData": 1,
         "TOTPOP00": 33871648,
         "TOTPOP10": 37253956,

         ...

         "PCIGRWCYFY": 1.58
        }
       },
       {
        "attributes": {
         "ID": "0",
         "OBJECTID": 2,
         "StdGeographyLevel": "US.States",
         "StdGeographyName": "Colorado",
         "StdGeographyID": "08",
         "sourceCountry": "US",
         "aggregationMethod": "Query:US.States",
         "HasData": 1,
         "TOTPOP00": 4301261,
         "TOTPOP10": 5029196,

         ...

         "PCIGRWCYFY": 1.8
        }
       }
      ]
     }
    ]
   }
  }
 ],
 "messages": []
}

Notes:

  • The response has been abbreviated in the example where "..." is noted.
  • Rather than specifying the polygon feature, identifiers are used to specify the states of California and Colorado, respectively, in the example. Named administrative boundary areas can be looked up with administrative boundary lookup or utility services.
  • A list of attributes describing the area's demographic characteristics and geographic context, as defined in the KeyUSFacts Data Collection, is returned in the response.

        
      

Request example 3:

Enrich an area consisting of the union of multiple areas within the same administrative boundary data layer with attributes defined in the Data Collection.

http://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/enrich?StudyAreas=[{"sourceCountry":"US","layer":"US.ZIP5","ids":["95123,92123"]}]&dataCollections=["KeyGlobalFacts"]&f=pjson

JSON response example 3
{
 "results": [
  {
   "paramName": "GeoEnrichmentResult",
   "dataType": "GeoEnrichmentResult",
   "value": {
    "version": "2.0",
    "FeatureSet": [
     {
      "displayFieldName": "",
      "fieldAliases": {
       "ID": "ID",
       "OBJECTID": "Object ID",
       "StdGeographyLevel": "StdGeographyLevel",
       "StdGeographyName": "StdGeographyName",
       "StdGeographyID": "StdGeographyID",
       "sourceCountry": "sourceCountry",
       "aggregationMethod": "aggregationMethod",
       "HasData": "HasData",
       "TOTPOP": "Total Population",
       "TOTHH": "Total Households",
       "AVGHHSZ": "Average Household Size",
       "TOTMALES": "Male Population",
       "TOTFEMALES": "Female Population"
      },
      "fields": [
       {
        "name": "ID",
        "type": "esriFieldTypeString",
        "alias": "ID",
        "length": 256
       },
       {
        "name": "OBJECTID",
        "type": "esriFieldTypeOID",
        "alias": "Object ID"
       },
       {
        "name": "StdGeographyLevel",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyLevel",
        "length": 256
       },
       {
        "name": "StdGeographyName",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyName",
        "length": 256
       },
       {
        "name": "StdGeographyID",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyID",
        "length": 256
       },
       {
        "name": "sourceCountry",
        "type": "esriFieldTypeString",
        "alias": "sourceCountry",
        "length": 256
       },
       {
        "name": "aggregationMethod",
        "type": "esriFieldTypeString",
        "alias": "aggregationMethod",
        "length": 256
       },
       {
        "name": "HasData",
        "type": "esriFieldTypeInteger",
        "alias": "HasData"
       },
       {
        "name": "TOTPOP",
        "type": "esriFieldTypeDouble",
        "alias": "Total Population",
        "fullName": "KeyGlobalFacts.TOTPOP",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       },
       {
        "name": "TOTHH",
        "type": "esriFieldTypeDouble",
        "alias": "Total Households",
        "fullName": "KeyGlobalFacts.TOTHH",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       },
       {
        "name": "AVGHHSZ",
        "type": "esriFieldTypeDouble",
        "alias": "Average Household Size",
        "fullName": "KeyGlobalFacts.AVGHHSZ",
        "component": "scripts",
        "decimals": 2,
        "units": "count"
       },
       {
        "name": "TOTMALES",
        "type": "esriFieldTypeDouble",
        "alias": "Male Population",
        "fullName": "KeyGlobalFacts.TOTMALES",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       },
       {
        "name": "TOTFEMALES",
        "type": "esriFieldTypeDouble",
        "alias": "Female Population",
        "fullName": "KeyGlobalFacts.TOTFEMALES",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       }
      ],
      "features": [
       {
        "attributes": {
         "ID": "0",
         "OBJECTID": 1,
         "StdGeographyLevel": "US.ZIP5",
         "StdGeographyName": "San Jose,San Diego",
         "StdGeographyID": "95123,92123",
         "sourceCountry": "US",
         "aggregationMethod": "Query:US.ZIP5",
         "HasData": 1,
         "TOTPOP": 93433,
         "TOTHH": 32254,
         "AVGHHSZ": 2.86,
         "TOTMALES": 46068,
         "TOTFEMALES": 47365
        }
       }
      ]
     }
    ]
   }
  }
 ],
 "messages": []
}

Notes:

  • Rather than specifying the polygon feature, identifiers are used to specify two U.S. ZIP Codes in the example. Named administrative boundary areas can be looked up with administrative boundary lookup or utility services.
  • A list of attributes describing the area's demographic characteristics and geographic context, as defined in the default Data Collection, is returned in the response.
    Note:

    The union function can be specified on administrative boundary areas by specifying the comma-delimited area IDs within the same string (rather than in separate strings) in the ids array.

        
      

Request example 4:

Find the intersecting U.S. state and county features for an input point. Data is returned for the default Data Collection.

http://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/enrich?studyareas=[{"geometry":{"x":-117.1956,"y":34.0572},"areaType":"StandardGeography","intersectingGeographies":[{"sourceCountry":"US","layer":"US.States"},{"sourceCountry":"US","layer":"US.Counties"}]}]&useData={"sourceCountry":"US"}&f=pjson

JSON response example 4
{
 "results": [
  {
   "paramName": "GeoEnrichmentResult",
   "dataType": "GeoEnrichmentResult",
   "value": {
    "version": "2.0",
    "FeatureSet": [
     {
      "displayFieldName": "",
      "fieldAliases": {
       "ID": "ID",
       "OBJECTID": "Object ID",
       "StdGeographyLevel": "StdGeographyLevel",
       "StdGeographyName": "StdGeographyName",
       "StdGeographyID": "StdGeographyID",
       "sourceCountry": "sourceCountry",
       "aggregationMethod": "aggregationMethod",
       "HasData": "HasData",
       "TOTPOP": "Total Population",
       "TOTHH": "Total Households",
       "AVGHHSZ": "Average Household Size",
       "TOTMALES": "Male Population",
       "TOTFEMALES": "Female Population"
      },
      "fields": [
       {
        "name": "ID",
        "type": "esriFieldTypeString",
        "alias": "ID",
        "length": 256
       },
       {
        "name": "OBJECTID",
        "type": "esriFieldTypeOID",
        "alias": "Object ID"
       },
       {
        "name": "StdGeographyLevel",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyLevel",
        "length": 256
       },
       {
        "name": "StdGeographyName",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyName",
        "length": 256
       },
       {
        "name": "StdGeographyID",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyID",
        "length": 256
       },
       {
        "name": "sourceCountry",
        "type": "esriFieldTypeString",
        "alias": "sourceCountry",
        "length": 256
       },
       {
        "name": "aggregationMethod",
        "type": "esriFieldTypeString",
        "alias": "aggregationMethod",
        "length": 256
       },
       {
        "name": "HasData",
        "type": "esriFieldTypeInteger",
        "alias": "HasData"
       },
       {
        "name": "TOTPOP",
        "type": "esriFieldTypeDouble",
        "alias": "Total Population",
        "fullName": "KeyGlobalFacts.TOTPOP",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       },
       {
        "name": "TOTHH",
        "type": "esriFieldTypeDouble",
        "alias": "Total Households",
        "fullName": "KeyGlobalFacts.TOTHH",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       },
       {
        "name": "AVGHHSZ",
        "type": "esriFieldTypeDouble",
        "alias": "Average Household Size",
        "fullName": "KeyGlobalFacts.AVGHHSZ",
        "component": "scripts",
        "decimals": 2,
        "units": "count"
       },
       {
        "name": "TOTMALES",
        "type": "esriFieldTypeDouble",
        "alias": "Male Population",
        "fullName": "KeyGlobalFacts.TOTMALES",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       },
       {
        "name": "TOTFEMALES",
        "type": "esriFieldTypeDouble",
        "alias": "Female Population",
        "fullName": "KeyGlobalFacts.TOTFEMALES",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       }
      ],
      "features": [
       {
        "attributes": {
         "ID": "0",
         "OBJECTID": 1,
         "StdGeographyLevel": "US.States",
         "StdGeographyName": "California",
         "StdGeographyID": "06",
         "sourceCountry": "US",
         "aggregationMethod": "Query:US.States",
         "HasData": 1,
         "TOTPOP": 38986171,
         "TOTHH": 13029292,
         "AVGHHSZ": 2.93,
         "TOTMALES": 19393908,
         "TOTFEMALES": 19592263
        }
       },
       {
        "attributes": {
         "ID": "0",
         "OBJECTID": 2,
         "StdGeographyLevel": "US.Counties",
         "StdGeographyName": "San Bernardino County",
         "StdGeographyID": "06071",
         "sourceCountry": "US",
         "aggregationMethod": "Query:US.Counties",
         "HasData": 1,
         "TOTPOP": 2118866,
         "TOTHH": 628314,
         "AVGHHSZ": 3.31,
         "TOTMALES": 1054127,
         "TOTFEMALES": 1064739
        }
       }
      ]
     }
    ]
   }
  }
 ],
 "messages": []
}

Notes:

  • Data Collection data is returned for the intersecting U.S. state and county features.
  • A list of attributes describing the location's demographic characteristics and geographic context, as defined in the default Data Collection and based on the generated area, is returned in the response.
  • This example will return data for two areas if the input point intersects the state and county layers.

        
      

Request example 5:

Return the state of California study area in the most generalized geometry.

http://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/enrich?dataCollections=["KeyGlobalFacts"]&studyAreas=[{"sourceCountry":"US","layer":"US.States","ids":["06"],"generalizationLevel":"6"}]&returnGeometry=true&f=pjson

JSON response example 5
{
 "results": [
  {
   "paramName": "GeoEnrichmentResult",
   "dataType": "GeoEnrichmentResult",
   "value": {
    "version": "2.0",
    "FeatureSet": [
     {
      "displayFieldName": "",
      "fieldAliases": {
       "ID": "ID",
       "OBJECTID": "Object ID",
       "StdGeographyLevel": "StdGeographyLevel",
       "StdGeographyName": "StdGeographyName",
       "StdGeographyID": "StdGeographyID",
       "sourceCountry": "sourceCountry",
       "aggregationMethod": "aggregationMethod",
       "HasData": "HasData",
       "TOTPOP": "Total Population",
       "TOTHH": "Total Households",
       "AVGHHSZ": "Average Household Size",
       "TOTMALES": "Male Population",
       "TOTFEMALES": "Female Population"
      },
      "geometryType": "esriGeometryPolygon",
      "spatialReference": {
       "wkid": 4326,
       "latestWkid": 4326
      },
      "fields": [
       {
        "name": "ID",
        "type": "esriFieldTypeString",
        "alias": "ID",
        "length": 256
       },
       {
        "name": "OBJECTID",
        "type": "esriFieldTypeOID",
        "alias": "Object ID"
       },
       {
        "name": "StdGeographyLevel",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyLevel",
        "length": 256
       },
       {
        "name": "StdGeographyName",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyName",
        "length": 256
       },
       {
        "name": "StdGeographyID",
        "type": "esriFieldTypeString",
        "alias": "StdGeographyID",
        "length": 256
       },
       {
        "name": "sourceCountry",
        "type": "esriFieldTypeString",
        "alias": "sourceCountry",
        "length": 256
       },
       {
        "name": "aggregationMethod",
        "type": "esriFieldTypeString",
        "alias": "aggregationMethod",
        "length": 256
       },
       {
        "name": "HasData",
        "type": "esriFieldTypeInteger",
        "alias": "HasData"
       },
       {
        "name": "TOTPOP",
        "type": "esriFieldTypeDouble",
        "alias": "Total Population",
        "fullName": "KeyGlobalFacts.TOTPOP",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       },
       {
        "name": "TOTHH",
        "type": "esriFieldTypeDouble",
        "alias": "Total Households",
        "fullName": "KeyGlobalFacts.TOTHH",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       },
       {
        "name": "AVGHHSZ",
        "type": "esriFieldTypeDouble",
        "alias": "Average Household Size",
        "fullName": "KeyGlobalFacts.AVGHHSZ",
        "component": "scripts",
        "decimals": 2,
        "units": "count"
       },
       {
        "name": "TOTMALES",
        "type": "esriFieldTypeDouble",
        "alias": "Male Population",
        "fullName": "KeyGlobalFacts.TOTMALES",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       },
       {
        "name": "TOTFEMALES",
        "type": "esriFieldTypeDouble",
        "alias": "Female Population",
        "fullName": "KeyGlobalFacts.TOTFEMALES",
        "component": "demographics",
        "decimals": 0,
        "units": "count"
       }
      ],
      "features": [
       {
        "attributes": {
         "ID": "0",
         "OBJECTID": 1,
         "StdGeographyLevel": "US.States",
         "StdGeographyName": "California",
         "StdGeographyID": "06",
         "sourceCountry": "US",
         "aggregationMethod": "Query:US.States",
         "HasData": 1,
         "TOTPOP": 38986171,
         "TOTHH": 13029292,
         "AVGHHSZ": 2.93,
         "TOTMALES": 19393908,
         "TOTFEMALES": 19592263
        },
        "geometry": {
         "rings": [
          [
           [
            -117.03805999881229,
            32.54170000146816
           ],
           [
            -117.10276999973645,
            32.56319999996718
           ],

           ...

           [
            -122.03229999955798,
            38.2291700003321
           ]
          ]
         ]
        }
       }
      ]
     }
    ]
   }
  }
 ],
 "messages": []
}

Notes:

  • The response has been abbreviated in the example where "..." is noted.
  • You only need to specify generalizationLevel if returnGeometry is set to true.
  • Generalization levels are from 0 through 6 with 0 being the most detailed and 6 being the most generalized.
    Generalization level 6 (left) vs. generalization level 2
  • You can't return more than one feature in a detailed geometry.