Skip To Content


In this topic

Version 3.7

Starting with version 3.5, the ArcGIS API for Flex provides access to the ArcGIS GeoEnrichment service. This service provides the ability to get facts about a location or area. Using GeoEnrichment, you can get information about the people, places, and businesses in a specific area or within a certain distance or drive time from a location. GeoEnrichment capabilities allow you to answer questions about locations that you can't answer with maps alone. What kind of people live here? What do people like to do in this area? What are their habits and lifestyles? What kind of businesses are in this area?

User experience

The two screen captures below depicts a typical user experience when working with GeoEnrichment functionality using the ArcGIS API for Flex.

Provide an input location

The first step is to click a location on the map to determine your study area and initiate a GeoEnrichment task.

Resulting study area and infographic

Next, the geometry of the study area and the infographic are returned.


Multiple components fall under the GeoEnrichment umbrella. The Infographic and InfographicsCarousel are the two main components you will use if working with GeoEnrichment functionality. After you specify a study area and geometry, either the Infographic or InfographicsCarousel automatically accesses the GeoEnrichment service where the information you requested is properly summarized and visualized in tables or/and charts.

These componenst provides a graphic layout with the information about your study area. Three types of Infographic components are available:

  1. One variable - shown below with a custom skin
  2. Related variables
  3. Tapestry

Infographic types

Variables can be thought of as the types of data you can add and work with using the GeoEnrichment service. An example of some types of variables could be:

  • Household income
  • Family size
  • Average home value
  • Percentage of developed land
  • Tapestry classification of residents

This is just a small sampling of the many variables you can access when working with GeoEnrichment functionality. See the Explore GeoEnrichment Data Coverage sample to browse the variables per country.

One variable Infographic

The screen captures provided in the user experience above displays a OneVar, or 'one variable', type of Infographic. This type displays the value of single variable. In the example provided, the variable displayed is 'average household size'.

The code snippet to create this is similar to the following:

<esri:Infographic id="infoGraphic"
   width="100%" height="100%"
   //KeyUSFacts is the datacollectionID and AVGHHSZ_CY, the variable.
   variableIds="['KeyUSFacts.AVGHHSZ_CY']" />

The Infographic component is created with a specified type and variableId. When working with the Infographic component, the default URL it defaults to is You can override this default URL with your own endpoint. An example of this may be if working with an internal Portal for ArcGIS installation.


In order to access the GeoEnrichment service, you need an ArcGIS Online subscription to either an Organization plan or a Developer plan.

In addition to the type and variableId, you will also need to set the studyArea property. This is what defines the location of the point or area that you want to enrich with additional information. See the 'Study areas' section in the GeoEnrichment service overview topic for additional information.

In the example shown above the studyArea is determined when the map is clicked or a buffer is specified. The snippet below was taken from the map's mapClickHandler event.

var studyArea:GeometryStudyArea = new GeometryStudyArea();
studyArea.geometry = mapPoint;
studyArea.options = new RingBuffer([1], RingBuffer.MILES);
//GeographyLevel takes in a (countryId, datasetId, and layerId, the last required)
//Admin levels are aliases that correspond to various levels of geography for 
each individual country
//US: Admin3 (US.Counties), Admin2 (US.States), Admin1 (US.WholeUSA)
studyArea.comparisonGeographyLevels = [
   new GeographyLevel(null, null, "Admin3"),
   new GeographyLevel(null, null, "Admin2"),
   new GeographyLevel(null, null, "Admin1")
studyArea.returnGeometry = true;
infoGraphic.studyArea = studyArea;

The GeometryStudyArea is created and is set to the geometry of the passed-in mapPoint. In addition, options is set to the studyArea. These options will be applied to the StudyArea's geometry to determine the area to enrich. See the StudyArea class' API reference for additional information.

If the study area's geometry is a MapPoint or a Polyline , the GeoEnrichment service will create a 1-mile ring buffer around the geometry to collect and append enrichment data. You can optionally change the ring buffer size or create drive-time service areas around the geometry by setting the options. In addition to this, there are three types of options you can set:

See the samples provided in the GeometryStudyArea API reference for further information.

Each country has its own standard geography levels. These geography levels are what gets passed in to the study area's comparisonGeographyLevels property. comparisonGeographyLevels allows you to request data for geography levels that intersect the study area. The Infographic displays the variables for those levels, this allows you to compare them against the study area variables. Please see the GeographyLevel API reference for additional information.

Last, the returnGeometry determines whether the geometry of your study area will be returned. Since we would like to show the study area with the results on map, set it to true.

For the full code used in the snippet above, see the Infographic sample.

Related variables infographic

Another type of infographic is RelatedVariables. This type displays values of multiple variables and the deviation with the comparison levels.

Infographic - Related Variables

For the above sample, all that needed updated were a couple of properties in the Infographic. First, the Infographic's type property was modified to RelatedVariables. Next, thevariableIds property was updated to reflect multiple variables. In this example, it displays 'Households by Income' for various ranges.

   ///HouseholdsByIncome is the datacollectionID for all variables listed


If you wish to request all the variableIds in a data collection, you can do so using a wildcard (*). For example, HouseholdsByIncome.* would iterate through all the variables within the HouseholdsByIncome data collection.

Tapestry infographic

The last type of infographic is Tapestry. Tapestry classifies US neighborhoods into 65 market segments based on socioeconomic and demographic factors. Please see Lifestyles-Esri Tapestry Segmentation data for additional information on how this works.

Infographic - Tapestry

In this sample, we updated the Infographic's type property to Tapestry and updated its variableIds to reflect the Tapestry DataCollection's ID.

   ///Tapestry is the datacollectionID and variables defined with a wildcard


The InfographicsCarousel component requests GeoEnrichment data for a specified location and visualizes the results in a collection of Infographics. This collection of Infographics can be scrolled through via its 'next' (right arrow) and 'previous' (left arrow) buttons.

The following screen captures display an InfographicsCarousel that shows both related variables and tapestry types.

InfographicsCarousel showing related variables infographic

InfographicsCarousel showing tapestry infographic

The code used to create the InfographicsCarousel is very similar to what is used when creating an Infographic.

<esri:InfographicsCarousel id="carousel"

   <geoEnrichmentClasses:GeometryStudyArea id="geometryStudyArea"

         <geoEnrichmentClasses:GeographyLevel layerId="Admin3"/>
         <geoEnrichmentClasses:GeographyLevel layerId="Admin2"/>
         <geoEnrichmentClasses:GeographyLevel layerId="Admin1"/>

This code snippet takes user input and returns GeoEnrichment data for a specified area. The InfographicsCarousel component is declared within the markup. The GeometryStudyArea is defined with its geometry set to the geometry specified by the user's input. The geography levels are also set to US: Admin3 (US.Counties), Admin2 (US.States), Admin1 (US.WholeUSA).

Once the carousel_enrichCompleteHandler event handler is fired, the resulting studyarea's geometry is set to the geometry of the graphic layer.

private function carousel_enrichCompleteHandler(event:InfographicEvent):void
   //put the result geometry on the graphics layer
   resultGeometry = event.studyAreaGraphics[0].geometry;
   //zoom to the geometry
   map.extent = resultGeometry.extent;

For the full code used in the snippet above, see the InfographicsCarousel sample.

Samples and additional references

To test out this functionality, see the samples:

The links below provide additional help documentation when working with GeoEnrichment functionality: