Get Standard Geography Levels Service
URL http://baoapi.esri.com/rest/report/GetStandardGeographyLevels

Get a list of all available geographic boundary data layers in the dataset.

Output

The Get Standard Geography Levels utility service returns a list of available data layers corresponding to different standardized areas such as U.S. states, counties, Core Based Statistical Areas (CBSAs), Designated Market Areas (DMAs), cities, ZIP codes, Congressional Districts, Census tracts, and Census block groups. The result of this service is an IDNamePairsArray which will contain the data layer IDs and their corresponding names. These IDs can be used to specify data layers in other analysis.

Description

The Get Standard Geography Levels service returns a list of available geography data layers. These geography data layer IDs may be used to specify specific areas to perform a Summary Reports analysis on using a StdLayer type for the value of the Boundaries parameter. These IDs may also be used to specify a geography data layer for a name based query (Standard Geographies by Attributes) or a spatial query (Standard Geographies from Extent).

Some applications of Get Standard Geography Levels include the following:

Usage Tips

You can provide arguments to the Get Standard Geography Levels utility service as defined in the parameters table below.

Parameters

Parameter Details
Token (Required) Description: A valid REST services token string.

Syntax: Token=<string>

Example: Token=ABC123...

Notes: The value associated with the Token parameter is for example purposes only. See Get Token for more information on obtaining a token.

ActiveDatasetID Description: Specify a dataset to perform Online API tasks or operations.

Default: USA

Syntax: ActiveDatasetID=<string>

Example: ActiveDatasetID=Canada

Notes: See the Get Datasets task to dynamically query the available dataset IDs.

Access to additional datasets is subject to the type, terms and restrictions associated with your Online API subscription.

Callback Description: Wrap the JSON or PJSON response in a named function that can be executed by client-side JavaScript upon receipt.

Default: null

Syntax: Callback=<string>

Example: Callback=MyCallbackFunction

Notes:
The response will be wrapped in a callback function only if a non-null Callback parameter value is specified and if the response format (the f parameter) is set to JSON or PJSON
.

Callback functions are useful for consuming the service in JavaScript-based client applications as shown in this basic example.

f Description: The response format.

Default: HTML

Syntax: f=<HTML | JSON | PJSON>

Example: f=JSON

Example Usage


Example 1: Obtain a list of currently available standard geography levels (administrative boundary data layers) in the default U.S. dataset for use in subsequent analysis.

Request Example (1)

http://baoapi.esri.com/rest/report/GetStandardGeographyLevels?
f=PJSON
&Token=ABC123
(Live example uses limited demo account)

Notes:See Get Token for more information on obtaining a token.


Example 2: Obtain a list of currently available standard geography levels (administrative boundary data layers) in an alternate dataset for use in subsequent analysis.

Add'l Note: Requires a subscription with access to the Canadian dataset. See example response below.

Request Example (2)

http://baoapi.esri.com/rest/report/GetStandardGeographyLevels?
f=PJSON&
ActiveDatasetID=Canada&
Token=ABC123

Notes:See Get Token for more information on obtaining a token.

See GetDatasets to obtain a list of available analysis datasets.

Additional dataset availability is subject to the terms and conditions of your Online API subscription.


Example Response

JSON Response Syntax

{
  "Result": <IDNamePairsArray>
}

JSON Response Example (1)

{
  "Result": [
    {
      "ID": "US.WholeUSA",
      "Name": "Entire Country"
    },
    {
      "ID": "US.States",
      "Name": "States"
    },
    {
      "ID": "US.Counties",
      "Name": "Counties"
    },
    {
      "ID": "US.Tracts",
      "Name": "Tracts"
    },
    {
      "ID": "US.ZIP5",
      "Name": "ZIPs"
    },
 
    ...
 
    {
      "ID": "US.CS",
      "Name": "County Subdivisions"
    }
  ]
}

Notes: The response has been abbreviated in the example where "..." is noted.

 


JSON Response Example (2)

{
  "Result": [
    {
      "ID": "CAN.WholeCanada",
      "Name": "Whole Canada"
    },
    {
      "ID": "CAN.PR",
      "Name": "Provinces"
    },
    {
      "ID": "CAN.CD",
      "Name": "Census Division"
    },
    {
      "ID": "CAN.CSD",
      "Name": "Census Subdivision"
    },
    {
      "ID": "CAN.DA",
      "Name": "Dissemination Areas"
    },
    {
      "ID": "CAN.FED",
      "Name": "Federal Electoral Districts"
    },
 
    ...
 
    {
      "ID": "CAN.CT",
      "Name": "Census Tracts"
    }
  ]
}

Notes: The response has been abbreviated in the example where "..." is noted.



See Also

Get Token

Standard Geographies by Attributes

Standard Geographies from Extent

Summary Reports