Demographics data helpers for ArcGIS REST JS.
Node.js
To use ArcGIS REST JS in a backend or Node.js application, first install the package using your preferred package manager, such as NPM or Yarn.
npm install @esri/arcgis-rest-demographicsOnce installed, you can import or require modules depending on your Node setup.
ES modules
import { queryDemographicData } from "@esri/arcgis-rest-demographics"CommonJS
const queryDemographicData = require("@esri/arcgis-rest-demographics");CDN
You can load ArcGIS REST JS directly in the browser using CDN with a global object or with an import map.
Global object
<script src="https://unpkg.com/@esri/arcgis-rest-demographics@4.0.3/dist/bundled/demographics.umd.min.js"
integrity="sha512-+m9laIT4kobFx85AuNViVijxH9/KuFEFJo+Sdw2s5WAR5Cr7+OiWWl3tqxnxpLA7NNJmXxdzOqIeQ7BGoAnarQ==">
</script>
<script>
import { queryDemographicData } from "@esri/arcgis-rest-demographics";
</script>Import map
<script type="importmap">
{
"imports": {
"@esri/arcgis-rest-demographics": "https://esm.run/@esri/arcgis-rest-demographics@4.0.3"
}
}
</script>
<script type="module">
import { queryDemographicData } from "@esri/arcgis-rest-demographics";
</script>Exports
- getAvailableCountries
- getAvailableDataCollections
- getAvailableGeographyLevels
- getGeography
- queryDemographicData
- IApportionmentThreshold
- IBranch
- ICategory
- ICountry
- IDataCollection
- IDataInfo
- IDataset
- IEndpointOptions
- IFilter
- IFilteringTag
- IGeoenrichmentResult
- IGeographyLevel
- IGeographyLevelHierarchy
- IGetAvailableCountriesOptions
- IGetAvailableCountriesResponse
- IGetAvailableDataCollectionsOptions
- IGetAvailableDataCollectionsResponse
- IGetAvailableGeographyLevelsResponse
- IGetGeographyOptions
- IGetGeographyResponse
- IHierarchy
- ILevel
- ILevelsInfo
- IMetadata
- IQueryDemographicDataOptions
- IQueryDemographicDataResponse
- IVariablesInfo
- ARCGIS_ONLINE_GEOENRICHMENT_URL
- ARCGIS_ONLINE_STANDARD_GEOGRAPHY_QUERY_URL