GeoEnrichVariables returns the complete list of available GeoEnrichment variables for a specified dataset.

A typical workflow involves first inspecting the available variables using the GeoEnrichVariables tool, once the appropriate variables have been identified, run the GeoEnrich tool with the selected variables.

Usage notes

  • When you inspect variables, some variables are intended for direct use in GeoEnrichment analysis, while others are supporting fields that help you validate or interpret those results. A simple way to tell them apart is to look at the variable prefix:
    • Variables that begin with the ACS prefix are the primary values to use in ACS-based analysis. For example, ACSA15I0 is the ACS estimate for households (HHr) headed by 15-to-24-year-olds with an annual income below $10,000 from the American Community Survey (ACS) 5-Year Estimates.
    • Variables that begin with MOE are Margin of Error fields for the matching ACS estimate. For example, MOEA15I0 contains the uncertainty measure for ACSA15I0 and is useful for validation, not as the main analysis value.
    • Variables that begin with REL are reliability fields for the matching ACS estimate. For example, RELA15I0 indicates how reliable ACSA15I0 is and should be used to assess fitness for use.
    • The shared suffix identifies the same underlying measure across related fields. In the example above, A15I0 links the estimate (ACSA15I0) with its validation fields (MOEA15I0 and RELA15I0).
    • U.S. Census count variables such as TOTPOP20 and HHPOP20 are complete counts and do not have corresponding MOE and REL fields.
  • The GeoEnrichment dataset must be accessible to all Spark cluster nodes. You can either copy the dataset to a node-local directory accessible to Spark, or use SparkContext.addFile to distribute files to Spark working directories. For environment-specific setup guidance, see GeoEnrichment dataset setup.

Limitations

  • GeoEnrichVariables currently supports only Esri-provided datasets. User-provided datasets are not supported.
  • Each ArcGIS GeoAnalytics Engine release is validated against its corresponding data package version. Compatibility with earlier or later data package versions is not guaranteed.

Results

The following fields are included in the output DataFrame:

FieldDescription
nameName of the GeoEnrichment variable. This is the value that should be passed into GeoEnrich setVariables() setter.
aliasAlias of the GeoEnrichment variable.
categoryCategory of the GeoEnrichment variable.

Syntax

For more details, go to the GeoAnalytics Engine API reference for GeoEnrichVariables.

Setter (Python)Setter (Scala)DescriptionRequired
run()run()Runs the GeoEnrichVariables tool.Yes
setDataPath(path)setDataPath(dataPath)Sets the path to the dataset used by GeoEnrichVariables. The dataset must be accessible on all cluster nodes.Yes

Examples

Run GeoEnrichVariables

PythonPythonScala
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11

# Imports
from geoanalytics.tools import GeoEnrichVariables

data_path = r"/data/GeoEnrich_Essentials_for_ArcGIS_GeoAnalytics_Engine.biz"

geoenrich_vars = GeoEnrichVariables() \
            .setDataPath(data_path) \
            .run()

geoenrich_vars.sort("name").show(5, truncate=False)
Result
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
+----------+------------------------------------------+-----------------------------+
|name      |alias                                     |category                     |
+----------+------------------------------------------+-----------------------------+
|ACSA15I0  |2023 HHr 15-24/Inc <$10000 (ACS 5-Yr)     |2019-2023 Income by Age (ACS)|
|ACSA15I10 |2023 HHr 15-24/Inc $10K-14999 (ACS 5-Yr)  |2019-2023 Income by Age (ACS)|
|ACSA15I100|2023 HHr 15-24/Inc $100K-124999 (ACS 5-Yr)|2019-2023 Income by Age (ACS)|
|ACSA15I125|2023 HHr 15-24/Inc $125K-149999 (ACS 5-Yr)|2019-2023 Income by Age (ACS)|
|ACSA15I15 |2023 HHr 15-24/Inc $15K-19999 (ACS 5-Yr)  |2019-2023 Income by Age (ACS)|
+----------+------------------------------------------+-----------------------------+
only showing top 5 rows

Version table

ReleaseNotes

2.1.0

Python tool introduced

2.1.0

Scala tool introduced

What's next?

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.