8. π§βπ€βπ§ Demographics & GeoEnrichment API
Number of APIs: 21
π§βπ€βπ§ Demographics & GeoEnrichment API
The requests on this collection use the environment variables. If you haven't followed the steps in the **How to set your free API key π**
section in the [Qodex ArcGIS Location Service workspace] now is a good time to do it π.
NOTE: If you have an ArcGIS Developer account, you will need to enable Pay-as-you-go to access the service.
π Guides and API reference
- GeoEnrichment API: Guide
- REST API parameters
π οΈ Integration
Libraries and wrappers to access this API:
- Backend: ArcGIS REST JS (Node.js) and ArcGIS API for Python.
-
Enrich-π‘ Examples - KeyGlobalFacts & generalized geometry of the state of California study area GET https://{{geoenrich-service}}.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&token={{access_token}}
-
Enrich-π‘ Examples - KeyGlobalFacts from a FeatureSet (multiple locations) and 1 mile radius GET https://{{geoenrich-service}}.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/Enrich?studyareas=[{"FeatureSet":{"objectIdFieldName":"OBJECTID","globalIdFieldName":"","geometryType":"esriGeometryPoint","spatialReference":{"wkid":102100,"latestWkid":3857},"fields":[{"name":"OBJECTID","type":"esriFieldTypeOID","alias":"OBJECTID","sqlType":"sqlTypeInteger","domain":null,"defaultValue":null},{"name":"Station_ID","type":"esriFieldTypeString","alias":"Station_ID","sqlType":"sqlTypeNVarchar","length":255,"domain":null,"defaultValue":null},{"name":"FirstOfAddress","type":"esriFieldTypeString","alias":"FirstOfAddress","sqlType":"sqlTypeNVarchar","length":255,"domain":null,"defaultValue":null},{"name":"Price","type":"esriFieldTypeDouble","alias":"Price","sqlType":"sqlTypeDecimal","domain":null,"defaultValue":null},{"name":"UniqueID","type":"esriFieldTypeInteger","alias":"UniqueID","sqlType":"sqlTypeInteger","domain":null,"defaultValue":null}],"features":[{"attributes":{"OBJECTID":1,"Station_ID":"202382","FirstOfAddress":"12030ROSECRANSAVE","Price":2.95716667,"UniqueID":512},"geometry":{"x":-13144272.4606,"y":4015682.7760000005}},{"attributes":{"OBJECTID":2,"Station_ID":"517080","FirstOfAddress":"2402EANAHEIMST","Price":2.95233333,"UniqueID":1256},"geometry":{"x":-13161572.144000001,"y":3999537.5165000036}},{"attributes":{"OBJECTID":3,"Station_ID":"521883","FirstOfAddress":"1660W25THST","Price":2.919,"UniqueID":1306},"geometry":{"x":-13170715.4594,"y":3991785.8429000005}}]}}]&datacollections=&analysisvariables=&studyareasoptions={"areaType":"RingBuffer","BufferRadii":[11]}&usedata=&f=pjson&token={{access_token}}
-
Enrich-π‘ Examples - Travel Spending (2021 Airline Fares) around 1 mile radius -117.1042,32.7671 (4218 Biona Pl, San Diego) GET https://{{geoenrich-service}}.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/Enrich?studyareas=[{"geometry":{"x":-117.1042,"y":32.7671}}]&analysisvariables=["TravelCEX.X7003_X"]&addDerivativeVariables=index&f=pjson&token={{access_token}}
-
Enrich - β‘οΈ enrich-direct-spec POST https://{{geoenrich-service}}.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/enrich
-
Structures and definitions-Discovery methods-Discover by country-Examples - Available info (for JP) GET https://{{geoenrich-service}}.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/countries/:country-code?f=pjson
-
Create report-π‘ Examples - Infographic Export GET https://{{geoenrich-service}}.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/createReport?report={"itemid":"845dcb9f53294b578820be924c4a31ee"}&format=pdf&f=bin&studyAreas=[{"sourceCountry":"US","layer":"US.ZIP5","ids":["92373"]}]&token={{access_token}}
-
Create report - β‘οΈ createReport-direct-spec GET https://{{geoenrich-service}}.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/GeoEnrichment/createReport
-
Structures and definitions-Discovery methods-Discover by data collection-Examples - Data collection description (EducationalAttainment within SE) (suppressing null values) GET https://{{geoenrich-service}}.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/dataCollections/:country-code/:data-collection-id?f=pjson&suppressNullValues=true
-
Structures and definitions-Discovery methods-Discover by data collection - Data collections available in any country GET https://{{geoenrich-service}}.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/dataCollections?f=pjson
-
Structures and definitions-Discovery methods-Discover by data collection - Data collection description in a country (suppressing null values) GET https://{{geoenrich-service}}.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment/dataCollections/:country-code/:data-collection-id?f=pjson&suppressNullValues=true