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
ACSprefix are the primary values to use in ACS-based analysis. For example,ACSis 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.A15 I0 - Variables that begin with
MOEare Margin of Error fields for the matching ACS estimate. For example,MOEcontains the uncertainty measure forA15 I0 ACSand is useful for validation, not as the main analysis value.A15 I0 - Variables that begin with
RELare reliability fields for the matching ACS estimate. For example,RELindicates how reliableA15 I0 ACSis and should be used to assess fitness for use.A15 I0 - The shared suffix identifies the same underlying measure across related fields. In the example above,
A15links the estimate (I0 ACS) with its validation fields (A15 I0 MOEandA15 I0 REL).A15 I0 - U.S. Census count variables such as
TOTPOandP20 HHPOare complete counts and do not have correspondingP20 MOEandRELfields.
- Variables that begin with the
- 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
Sparkto distribute files to Spark working directories. For environment-specific setup guidance, see GeoEnrichment dataset setup.Context.add File
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:
| Field | Description |
|---|---|
name | Name of the GeoEnrichment variable. This is the value that should be passed into GeoEnrich set setter. |
alias | Alias of the GeoEnrichment variable. |
category | Category of the GeoEnrichment variable. |
Syntax
For more details, go to the GeoAnalytics Engine API reference for GeoEnrichVariables.
| Setter (Python) | Setter (Scala) | Description | Required |
|---|---|---|---|
run() | run() | Runs the GeoEnrichVariables tool. | Yes |
set | set | Sets the path to the dataset used by GeoEnrichVariables. The dataset must be accessible on all cluster nodes. | Yes |
Examples
Run GeoEnrichVariables
# 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
+----------+------------------------------------------+-----------------------------+
|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 rowsVersion table
| Release | Notes |
|---|---|
2.1.0 | Python tool introduced |
2.1.0 | Scala tool introduced |