@esri/arcgis-rest-demographics 3.4.3 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/README.md +10 -11
  2. package/dist/bundled/demographics.esm.js +242 -0
  3. package/dist/bundled/demographics.esm.js.map +1 -0
  4. package/dist/bundled/demographics.esm.min.js +7 -0
  5. package/dist/bundled/demographics.esm.min.js.map +1 -0
  6. package/dist/bundled/demographics.umd.js +254 -0
  7. package/dist/bundled/demographics.umd.js.map +1 -0
  8. package/dist/bundled/demographics.umd.min.js +7 -0
  9. package/dist/bundled/demographics.umd.min.js.map +1 -0
  10. package/dist/{node → cjs}/getAvailableCountries.js +12 -11
  11. package/dist/cjs/getAvailableCountries.js.map +1 -0
  12. package/dist/{node → cjs}/getAvailableDataCollections.js +14 -16
  13. package/dist/cjs/getAvailableDataCollections.js.map +1 -0
  14. package/dist/{node → cjs}/getAvailableGeographyLevels.js +12 -9
  15. package/dist/cjs/getAvailableGeographyLevels.js.map +1 -0
  16. package/dist/{node → cjs}/getGeography.js +11 -10
  17. package/dist/cjs/getGeography.js.map +1 -0
  18. package/dist/cjs/helpers.js +9 -0
  19. package/dist/cjs/helpers.js.map +1 -0
  20. package/dist/cjs/index.js +11 -0
  21. package/dist/cjs/index.js.map +1 -0
  22. package/dist/cjs/package.json +3 -0
  23. package/dist/{node → cjs}/queryDemographicData.js +10 -9
  24. package/dist/cjs/queryDemographicData.js.map +1 -0
  25. package/dist/esm/getAvailableCountries.d.ts +7 -5
  26. package/dist/esm/getAvailableCountries.js +11 -10
  27. package/dist/esm/getAvailableCountries.js.map +1 -1
  28. package/dist/esm/getAvailableDataCollections.d.ts +9 -7
  29. package/dist/esm/getAvailableDataCollections.js +13 -15
  30. package/dist/esm/getAvailableDataCollections.js.map +1 -1
  31. package/dist/esm/getAvailableGeographyLevels.d.ts +4 -2
  32. package/dist/esm/getAvailableGeographyLevels.js +11 -8
  33. package/dist/esm/getAvailableGeographyLevels.js.map +1 -1
  34. package/dist/esm/getGeography.d.ts +4 -2
  35. package/dist/esm/getGeography.js +10 -9
  36. package/dist/esm/getGeography.js.map +1 -1
  37. package/dist/esm/helpers.d.ts +1 -2
  38. package/dist/esm/helpers.js +3 -3
  39. package/dist/esm/helpers.js.map +1 -1
  40. package/dist/esm/index.d.ts +6 -5
  41. package/dist/esm/index.js +5 -5
  42. package/dist/esm/index.js.map +1 -1
  43. package/dist/esm/package.json +3 -0
  44. package/dist/esm/queryDemographicData.d.ts +4 -2
  45. package/dist/esm/queryDemographicData.js +9 -8
  46. package/dist/esm/queryDemographicData.js.map +1 -1
  47. package/package.json +54 -47
  48. package/dist/node/getAvailableCountries.js.map +0 -1
  49. package/dist/node/getAvailableDataCollections.js.map +0 -1
  50. package/dist/node/getAvailableGeographyLevels.js.map +0 -1
  51. package/dist/node/getGeography.js.map +0 -1
  52. package/dist/node/helpers.js +0 -9
  53. package/dist/node/helpers.js.map +0 -1
  54. package/dist/node/index.js +0 -11
  55. package/dist/node/index.js.map +0 -1
  56. package/dist/node/queryDemographicData.js.map +0 -1
  57. package/dist/umd/demographics.umd.js +0 -271
  58. package/dist/umd/demographics.umd.js.map +0 -1
  59. package/dist/umd/demographics.umd.min.js +0 -7
  60. package/dist/umd/demographics.umd.min.js.map +0 -1
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  [npm-url]: https://www.npmjs.com/package/@esri/arcgis-rest-demographics
9
9
  [travis-img]: https://img.shields.io/travis/Esri/arcgis-rest-js/master.svg?style=flat-square
10
10
  [travis-url]: https://travis-ci.org/Esri/arcgis-rest-js
11
- [gzip-image]: https://img.badgesize.io/https://unpkg.com/@esri/arcgis-rest-demographics/dist/umd/demographics.umd.min.js?compression=gzip
11
+ [gzip-image]: https://img.badgesize.io/https://unpkg.com/@esri/arcgis-rest-demographics/dist/bundled/demographics.umd.min.js?compression=gzip
12
12
  [coverage-img]: https://codecov.io/gh/Esri/arcgis-rest-js/branch/master/graph/badge.svg
13
13
  [coverage-url]: https://codecov.io/gh/Esri/arcgis-rest-js
14
14
 
@@ -24,23 +24,22 @@ npm install @esri/arcgis-rest-demographics
24
24
  ```
25
25
 
26
26
  ```js
27
- import { getAvailableDataCollections } from '@esri/arcgis-rest-demographics';
27
+ import { getAvailableDataCollections } from "@esri/arcgis-rest-demographics";
28
28
 
29
- getAvailableDataCollections()
30
- .then((response) => {
31
- response.DataCollections;
32
- // => [{ dataCollectionId: "KeyGlobalFacts", metadata: { ... }, data: [ ... ] }, ... ]
33
- });
29
+ getAvailableDataCollections().then((response) => {
30
+ response.DataCollections;
31
+ // => [{ dataCollectionId: "KeyGlobalFacts", metadata: { ... }, data: [ ... ] }, ... ]
32
+ });
34
33
  ```
35
34
 
36
35
  ### [API Reference](https://esri.github.io/arcgis-rest-js/api/demographics/)
37
36
 
38
- * [`getAvailableDataCollections({countryCode: 'us'})`](https://esri.github.io/arcgis-rest-js/api/demographics/getAvailableDataCollections/)
39
- * [`queryDemographicData({studyAreas: [{"geometry":{"x":-117.1956,"y":34.0572}}], authentication})`](https://esri.github.io/arcgis-rest-js/api/demographics/queryDemographicData/)
37
+ - [`getAvailableDataCollections({countryCode: 'us'})`](https://esri.github.io/arcgis-rest-js/api/demographics/getAvailableDataCollections/)
38
+ - [`queryDemographicData({studyAreas: [{"geometry":{"x":-117.1956,"y":34.0572}}], authentication})`](https://esri.github.io/arcgis-rest-js/api/demographics/queryDemographicData/)
40
39
 
41
40
  ### Issues
42
41
 
43
- If something isn't working the way you expected, please take a look at [previously logged issues](https://github.com/Esri/arcgis-rest-js/issues) first. Have you found a new bug? Want to request a new feature? We'd [**love**](https://github.com/Esri/arcgis-rest-js/issues/new) to hear from you.
42
+ If something isn't working the way you expected, please take a look at [previously logged issues](https://github.com/Esri/arcgis-rest-js/issues) first. Have you found a new bug? Want to request a new feature? We'd [**love**](https://github.com/Esri/arcgis-rest-js/issues/new) to hear from you.
44
43
 
45
44
  If you're looking for help you can also post issues on [GIS Stackexchange](http://gis.stackexchange.com/questions/ask?tags=esri-oss).
46
45
 
@@ -58,7 +57,7 @@ Esri welcomes contributions from anyone and everyone. Please see our [guidelines
58
57
 
59
58
  ### License
60
59
 
61
- Copyright © 2017-2019 Esri
60
+ Copyright © 2017-2022 Esri
62
61
 
63
62
  Licensed under the Apache License, Version 2.0 (the "License");
64
63
  you may not use this file except in compliance with the License.
@@ -0,0 +1,242 @@
1
+ /* @preserve
2
+ * @esri/arcgis-rest-demographics - v4.0.0-beta.5 - Apache-2.0
3
+ * Copyright (c) 2017-2022 Esri, Inc.
4
+ * Mon Apr 18 2022 16:42:05 GMT+0000 (Coordinated Universal Time)
5
+ */
6
+ import { appendCustomParams, request, cleanUrl } from '@esri/arcgis-rest-request';
7
+
8
+ /* Copyright (c) 2020 Environmental Systems Research Institute, Inc.
9
+ * Apache-2.0 */
10
+ const ARCGIS_ONLINE_GEOENRICHMENTSERVER_URL = "https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver";
11
+ const ARCGIS_ONLINE_GEOENRICHMENT_URL = `${ARCGIS_ONLINE_GEOENRICHMENTSERVER_URL}/Geoenrichment`;
12
+ const ARCGIS_ONLINE_STANDARD_GEOGRAPHY_QUERY_URL = `${ARCGIS_ONLINE_GEOENRICHMENTSERVER_URL}/StandardGeographyQuery`;
13
+
14
+ /* Copyright (c) 2020 Environmental Systems Research Institute, Inc.
15
+ * Apache-2.0 */
16
+ /**
17
+ * Return a list of information for all countries. See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/countries.htm) for more information.
18
+ *
19
+ * ```js
20
+ * import { getAvailableCountries } from '@esri/arcgis-rest-demographics';
21
+ *
22
+ * getAvailableCountries()
23
+ * .then((response) => {
24
+ * response; // => { countries: [ ... ] }
25
+ * });
26
+ * ```
27
+ *
28
+ * @param requestOptions Options to pass through to the geoenrichment service.
29
+ * @returns A Promise that will resolve with available geography levels for the request.
30
+ */
31
+ function getAvailableCountries(requestOptions) {
32
+ let options = {};
33
+ let endpoint = `${ARCGIS_ONLINE_GEOENRICHMENT_URL}/countries`;
34
+ if (!requestOptions) {
35
+ options.params = {};
36
+ }
37
+ else {
38
+ if (requestOptions.endpoint) {
39
+ endpoint = `${requestOptions.endpoint}/countries`;
40
+ }
41
+ options = appendCustomParams(requestOptions, [], { params: Object.assign({}, requestOptions.params) });
42
+ if (requestOptions.countryCode) {
43
+ endpoint = `${endpoint}/${requestOptions.countryCode}`;
44
+ }
45
+ }
46
+ return request(cleanUrl(endpoint), options).then((response) => {
47
+ return response;
48
+ });
49
+ }
50
+
51
+ /* Copyright (c) 2020 Environmental Systems Research Institute, Inc.
52
+ * Apache-2.0 */
53
+ /**
54
+ * Used to determine the data collections available for usage with the Geoenrichment service. See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/data-collections.htm) for more information.
55
+ *
56
+ * ```js
57
+ * import { getAvailableDataCollections } from '@esri/arcgis-rest-demographics';
58
+ *
59
+ * getAvailableDataCollections()
60
+ * .then((response) => {
61
+ * response; // => { DataCollections: [ ... ] }
62
+ * });
63
+ *
64
+ * getAvailableDataCollections({
65
+ * countryCode: "se",
66
+ * dataCollection: "EducationalAttainment"
67
+ * })
68
+ * .then((response) => {
69
+ * response.; // => { DataCollections: [ ... ] }
70
+ * });
71
+ * ```
72
+ *
73
+ * @param requestOptions Options to pass through to the geoenrichment service.
74
+ * @returns A Promise that will resolve with data collections for the request.
75
+ */
76
+ function getAvailableDataCollections(requestOptions) {
77
+ let options = {};
78
+ let endpoint = `${ARCGIS_ONLINE_GEOENRICHMENT_URL}/dataCollections`;
79
+ if (!requestOptions) {
80
+ options.params = {};
81
+ }
82
+ else {
83
+ if (requestOptions.endpoint) {
84
+ endpoint = `${requestOptions.endpoint}/dataCollections`;
85
+ }
86
+ options = appendCustomParams(requestOptions, ["addDerivativeVariables", "suppressNullValues"], { params: Object.assign({}, requestOptions.params) });
87
+ if (options.params.addDerivativeVariables) {
88
+ options.params.addDerivativeVariables = JSON.stringify(options.params.addDerivativeVariables);
89
+ }
90
+ if (requestOptions.countryCode) {
91
+ endpoint = `${endpoint}/${requestOptions.countryCode}`;
92
+ if (requestOptions.dataCollection) {
93
+ endpoint = `${endpoint}/${requestOptions.dataCollection}`;
94
+ }
95
+ }
96
+ }
97
+ // add spatialReference property to individual matches
98
+ return request(`${cleanUrl(endpoint)}`, options).then((response) => {
99
+ return response;
100
+ });
101
+ }
102
+
103
+ /* Copyright (c) 2020 Environmental Systems Research Institute, Inc.
104
+ * Apache-2.0 */
105
+ /**
106
+ * Returns a list of available geography data layers, which can then be used in [getGeography()](). See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/standard-geography-levels.htm) for more information.
107
+ *
108
+ * ```js
109
+ * import { getAvailableGeographyLevels } from '@esri/arcgis-rest-demographics';
110
+ * //
111
+ * getAvailableGeographyLevels()
112
+ * .then((response) => {
113
+ * response; // => { geographyLevels: [ ... ] }
114
+ * });
115
+ * ```
116
+ *
117
+ * @param requestOptions Options to pass through to the geoenrichment service.
118
+ * @returns A Promise that will resolve with available geography levels for the request.
119
+ */
120
+ function getAvailableGeographyLevels(requestOptions) {
121
+ let options = {};
122
+ let endpoint = `${ARCGIS_ONLINE_GEOENRICHMENT_URL}/StandardGeographyLevels`;
123
+ if (!requestOptions) {
124
+ options.params = {};
125
+ }
126
+ else {
127
+ if (requestOptions.endpoint) {
128
+ endpoint = `${requestOptions.endpoint}/StandardGeographyLevels`;
129
+ }
130
+ options = appendCustomParams(requestOptions, [], {
131
+ params: Object.assign({}, requestOptions.params)
132
+ });
133
+ }
134
+ return request(`${cleanUrl(endpoint)}`, options).then((response) => {
135
+ return response;
136
+ });
137
+ }
138
+
139
+ /* Copyright (c) 2020 Environmental Systems Research Institute, Inc.
140
+ * Apache-2.0 */
141
+ /**
142
+ * Used to get standard geography IDs and features for the supported geographic levels. See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/standard-geography-query.htm) and the [best practices post](https://www.esri.com/arcgis-blog/products/arcgis-online/uncategorized/best-practices-how-to-query-standard-geographies-branches) for more information.
143
+ *
144
+ * ```js
145
+ * import { getGeography } from '@esri/arcgis-rest-demographics';
146
+ * //
147
+ * getGeography({
148
+ * sourceCountry: "CA",
149
+ * geographyIDs: ["35"]
150
+ * })
151
+ * .then((response) => {
152
+ * response.; // => { results: [ ... ] }
153
+ * });
154
+ * ```
155
+ *
156
+ * @param requestOptions Options to pass through to the service. All properties are optional, but either `geographyIds` or `geographyQuery` must be sent at a minimum.
157
+ * @returns A Promise that will resolve with return data defined and optionally geometry for the feature.
158
+ */
159
+ function getGeography(requestOptions) {
160
+ const endpoint = `${requestOptions.endpoint || ARCGIS_ONLINE_STANDARD_GEOGRAPHY_QUERY_URL}/execute`;
161
+ const options = appendCustomParams(requestOptions, [
162
+ "sourceCountry",
163
+ "optionalCountryDataset",
164
+ "geographyLayers",
165
+ "geographyIDs",
166
+ "geographyQuery",
167
+ "returnSubGeographyLayer",
168
+ "subGeographyLayer",
169
+ "subGeographyQuery",
170
+ "outSR",
171
+ "returnGeometry",
172
+ "returnCentroids",
173
+ "generalizationLevel",
174
+ "useFuzzySearch",
175
+ "featureLimit",
176
+ "featureOffset",
177
+ "langCode"
178
+ ], { params: Object.assign({}, requestOptions.params) });
179
+ // the SAAS service does not support anonymous requests
180
+ if (!requestOptions.authentication) {
181
+ return Promise.reject("Geoenrichment using the ArcGIS service requires authentication");
182
+ }
183
+ // These parameters are passed as JSON-style strings:
184
+ ["geographyLayers", "geographyIDs"].forEach((parameter) => {
185
+ if (options.params[parameter]) {
186
+ options.params[parameter] = JSON.stringify(options.params[parameter]);
187
+ }
188
+ });
189
+ // add spatialReference property to individual matches
190
+ return request(`${cleanUrl(endpoint)}`, options).then((response) => {
191
+ return response;
192
+ });
193
+ }
194
+
195
+ /* Copyright (c) 2020 Environmental Systems Research Institute, Inc.
196
+ * Apache-2.0 */
197
+ /**
198
+ * Used to get facts about a location or area. See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/enrich.htm) for more information.
199
+ *
200
+ * ```js
201
+ * import { queryDemographicData } from '@esri/arcgis-rest-demographics';
202
+ * //
203
+ * queryDemographicData({
204
+ * studyAreas: [{"geometry":{"x":-117.1956,"y":34.0572}}],
205
+ * authentication
206
+ * })
207
+ * .then((response) => {
208
+ * response; // => { results: [ ... ] }
209
+ * });
210
+ * ```
211
+ *
212
+ * @param requestOptions Options to pass through to the service.
213
+ * @returns A Promise that will resolve with results for the request.
214
+ */
215
+ function queryDemographicData(requestOptions) {
216
+ const options = appendCustomParams(requestOptions, [
217
+ "studyAreas",
218
+ "dataCollections",
219
+ "analysisVariables",
220
+ "addDerivativeVariables",
221
+ "returnGeometry",
222
+ "inSR",
223
+ "outSR"
224
+ ], { params: Object.assign({}, requestOptions.params) });
225
+ // the SAAS service does not support anonymous requests
226
+ if (!requestOptions.authentication) {
227
+ return Promise.reject("Geoenrichment using the ArcGIS service requires authentication");
228
+ }
229
+ // These parameters are passed as JSON-style strings:
230
+ ["dataCollections", "analysisVariables"].forEach((parameter) => {
231
+ if (options.params[parameter]) {
232
+ options.params[parameter] = JSON.stringify(options.params[parameter]);
233
+ }
234
+ });
235
+ // add spatialReference property to individual matches
236
+ return request(`${cleanUrl(`${requestOptions.endpoint || ARCGIS_ONLINE_GEOENRICHMENT_URL}/enrich`)}`, options).then((response) => {
237
+ return response;
238
+ });
239
+ }
240
+
241
+ export { getAvailableCountries, getAvailableDataCollections, getAvailableGeographyLevels, getGeography, queryDemographicData };
242
+ //# sourceMappingURL=demographics.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"demographics.esm.js","sources":["../../src/helpers.ts","../../src/getAvailableCountries.ts","../../src/getAvailableDataCollections.ts","../../src/getAvailableGeographyLevels.ts","../../src/getGeography.ts","../../src/queryDemographicData.ts"],"sourcesContent":["/* Copyright (c) 2020 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nimport {\n IRequestOptions,\n IFeatureSet\n} from \"@esri/arcgis-rest-request\";\n\nconst ARCGIS_ONLINE_GEOENRICHMENTSERVER_URL = \"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver\"\nexport const ARCGIS_ONLINE_GEOENRICHMENT_URL = `${ARCGIS_ONLINE_GEOENRICHMENTSERVER_URL}/Geoenrichment`;\nexport const ARCGIS_ONLINE_STANDARD_GEOGRAPHY_QUERY_URL = `${ARCGIS_ONLINE_GEOENRICHMENTSERVER_URL}/StandardGeographyQuery`;\n\nexport interface IEndpointOptions extends IRequestOptions {\n /**\n * Any ArcGIS Geoenrichment service (example: https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment )\n */\n endpoint?: string;\n}\n\nexport interface IGeoenrichmentResult {\n paramName: string;\n dataType: string;\n value: {\n version: string;\n FeatureSet: IFeatureSet[];\n };\n}","/* Copyright (c) 2020 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nimport {\n request,\n cleanUrl,\n appendCustomParams,\n IExtent\n} from \"@esri/arcgis-rest-request\";\n\nimport {\n ARCGIS_ONLINE_GEOENRICHMENT_URL,\n IEndpointOptions\n} from \"./helpers.js\";\n\nexport interface IGetAvailableCountriesOptions extends IEndpointOptions {\n /**\n * View a description for a given country. If not specified, will return a list of all countries.\n */\n countryCode?: string;\n}\n\nexport interface IGetAvailableCountriesResponse {\n messages?: string[];\n countries?: ICountry[];\n childResources?: any[];\n}\nexport interface ICountry {\n id: string;\n name: string;\n abbr3: string;\n altName: string;\n continent: string;\n distanceUnits: string;\n esriUnits: string;\n defaultExtent: IExtent;\n defaultDatasetID: string;\n datasets?: string[];\n hierarchies?: IHierarchy[];\n defaultDataCollection: string;\n dataCollections: string;\n defaultReportTemplate: string;\n currencySymbol: string;\n currencyFormat: string;\n}\nexport interface IHierarchy {\n ID: string;\n alias: string;\n shortDescription: string;\n default: boolean;\n longDescription: string;\n locales?: string[];\n datasets?: string[];\n levelsInfo: ILevelsInfo;\n variablesInfo: IVariablesInfo;\n populationToPolygonSizeRating: number;\n apportionmentConfidence: number;\n apportionmentThresholds?: IApportionmentThreshold[];\n hasMarginOfErrorData?: boolean;\n}\nexport interface ILevelsInfo {\n geographyLevels?: string[];\n}\nexport interface IVariablesInfo {\n categories?: string[];\n}\nexport interface IApportionmentThreshold {\n method: string;\n dataLayer: string;\n pointsLayer?: string;\n maximumSize?: number;\n}\n\n/**\n * Return a list of information for all countries. See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/countries.htm) for more information.\n *\n * ```js\n * import { getAvailableCountries } from '@esri/arcgis-rest-demographics';\n *\n * getAvailableCountries()\n * .then((response) => {\n * response; // => { countries: [ ... ] }\n * });\n * ```\n *\n * @param requestOptions Options to pass through to the geoenrichment service.\n * @returns A Promise that will resolve with available geography levels for the request.\n */\nexport function getAvailableCountries(\n requestOptions?: IGetAvailableCountriesOptions\n): Promise<IGetAvailableCountriesResponse> {\n let options: IEndpointOptions = {};\n let endpoint = `${ARCGIS_ONLINE_GEOENRICHMENT_URL}/countries`;\n if (!requestOptions) {\n options.params = {};\n } else {\n if (requestOptions.endpoint) {\n endpoint = `${requestOptions.endpoint}/countries`;\n }\n\n options = appendCustomParams<IGetAvailableCountriesOptions>(\n requestOptions,\n [],\n { params: { ...requestOptions.params } }\n );\n if (requestOptions.countryCode) {\n endpoint = `${endpoint}/${requestOptions.countryCode}`;\n }\n }\n\n return request(cleanUrl(endpoint), options).then((response: any) => {\n return response;\n });\n}\n","/* Copyright (c) 2020 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nimport {\n request,\n cleanUrl,\n appendCustomParams\n} from \"@esri/arcgis-rest-request\";\n\nimport {\n ARCGIS_ONLINE_GEOENRICHMENT_URL,\n IEndpointOptions\n} from \"./helpers.js\";\n\nexport interface IGetAvailableDataCollectionsOptions extends IEndpointOptions {\n /**\n * Optional parameter to specify an array of string values that describe what derivative variables to include in the output.\n */\n addDerivativeVariables?: string[];\n /**\n * Optional parameter to return only values that are not NULL in the output response.\n */\n suppressNullValues?: boolean;\n /**\n * View a description for a single data collection within a given country. If not specified, will return a list of data collections that can be run in any country.\n */\n countryCode?: string;\n dataCollection?: string;\n}\n\nexport interface IGetAvailableDataCollectionsResponse {\n DataCollections?: IDataCollection[] | null;\n}\nexport interface IDataCollection {\n dataCollectionID: string;\n metadata: IMetadata;\n data?: IDataInfo[] | null;\n}\nexport interface IMetadata {\n title: string;\n name: string;\n shortDescription: string;\n longDescription: string;\n url: string;\n keywords: string;\n creationDate: number;\n lastRevisionDate: number;\n webmap: string;\n author: string;\n countries?: string | null;\n IsRoyalties: boolean;\n categories?: ICategory[] | null;\n filters?: IFilter[] | null;\n datasets?: string | null;\n hierarchies: string;\n coverage?: string | null;\n mobileinfographics?: string | null;\n icon?: string | null;\n}\nexport interface ICategory {\n id: string;\n name: string;\n alias: string;\n description: string;\n displayOrder: string;\n}\nexport interface IFilter {\n id: string;\n name: string;\n aliasname: string;\n type: string;\n rangeMax?: string | null;\n rangeMin?: string | null;\n enumValues?: string | null;\n}\nexport interface IDataInfo {\n id: string;\n alias: string;\n type: string;\n precision: number;\n length?: null;\n averageBase?: null;\n averageBaseAlias?: null;\n description: string;\n fieldCategory: string;\n indexBase?: number | null;\n percentBase?: string | null;\n percentBaseAlias?: string | null;\n popularity?: number | null;\n units: string;\n vintage?: string | null;\n hideInDataBrowser: boolean;\n filteringTags?: IFilteringTag[] | null;\n derivative: boolean;\n provider: string;\n indexType?: string | null;\n}\nexport interface IFilteringTag {\n id: string;\n name: string;\n value: string;\n}\n\n/**\n * Used to determine the data collections available for usage with the Geoenrichment service. See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/data-collections.htm) for more information.\n *\n * ```js\n * import { getAvailableDataCollections } from '@esri/arcgis-rest-demographics';\n *\n * getAvailableDataCollections()\n * .then((response) => {\n * response; // => { DataCollections: [ ... ] }\n * });\n *\n * getAvailableDataCollections({\n * countryCode: \"se\",\n * dataCollection: \"EducationalAttainment\"\n * })\n * .then((response) => {\n * response.; // => { DataCollections: [ ... ] }\n * });\n * ```\n *\n * @param requestOptions Options to pass through to the geoenrichment service.\n * @returns A Promise that will resolve with data collections for the request.\n */\nexport function getAvailableDataCollections(\n requestOptions?: IGetAvailableDataCollectionsOptions\n): Promise<IGetAvailableDataCollectionsResponse> {\n let options: IGetAvailableDataCollectionsOptions = {};\n let endpoint = `${ARCGIS_ONLINE_GEOENRICHMENT_URL}/dataCollections`;\n\n if (!requestOptions) {\n options.params = {};\n } else {\n if (requestOptions.endpoint) {\n endpoint = `${requestOptions.endpoint}/dataCollections`;\n }\n options = appendCustomParams<IGetAvailableDataCollectionsOptions>(\n requestOptions,\n [\"addDerivativeVariables\", \"suppressNullValues\"],\n { params: { ...requestOptions.params } }\n );\n\n if (options.params.addDerivativeVariables) {\n options.params.addDerivativeVariables = JSON.stringify(\n options.params.addDerivativeVariables\n );\n }\n\n if (requestOptions.countryCode) {\n endpoint = `${endpoint}/${requestOptions.countryCode}`;\n if (requestOptions.dataCollection) {\n endpoint = `${endpoint}/${requestOptions.dataCollection}`;\n }\n }\n }\n\n // add spatialReference property to individual matches\n return request(`${cleanUrl(endpoint)}`, options).then((response: any) => {\n return response;\n });\n}\n","/* Copyright (c) 2020 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nimport {\n request,\n cleanUrl,\n appendCustomParams\n} from \"@esri/arcgis-rest-request\";\n\nimport {\n ARCGIS_ONLINE_GEOENRICHMENT_URL,\n IEndpointOptions\n} from \"./helpers.js\";\n\nexport interface IGetAvailableGeographyLevelsResponse {\n messages?: string[] | null;\n childResources?: any[] | null;\n childDatasets?: any[] | null;\n childHierarchies?: any[] | null;\n geographyLevels?: IGeographyLevel[] | null;\n}\nexport interface IGeographyLevel {\n countryID: string;\n countryName: string;\n datasets?: IDataset[] | null;\n hierarchies?: IGeographyLevelHierarchy[] | null;\n}\nexport interface IDataset {\n datasetID: string;\n branches?: IBranch[] | null;\n levels?: ILevel[] | null;\n}\nexport interface IBranch {\n id: string;\n name: string;\n levels?: string[] | null;\n}\nexport interface ILevel {\n id: string;\n name: string;\n isWholeCountry: boolean;\n adminLevel: string;\n singularName: string;\n pluralName: string;\n description?: string | null;\n}\nexport interface IGeographyLevelHierarchy {\n ID: string;\n branches?: IBranch[] | null;\n levels?: ILevel[] | null;\n}\n\n/**\n * Returns a list of available geography data layers, which can then be used in [getGeography()](). See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/standard-geography-levels.htm) for more information.\n *\n * ```js\n * import { getAvailableGeographyLevels } from '@esri/arcgis-rest-demographics';\n * //\n * getAvailableGeographyLevels()\n * .then((response) => {\n * response; // => { geographyLevels: [ ... ] }\n * });\n * ```\n *\n * @param requestOptions Options to pass through to the geoenrichment service.\n * @returns A Promise that will resolve with available geography levels for the request.\n */\nexport function getAvailableGeographyLevels(\n requestOptions?: IEndpointOptions\n): Promise<IGetAvailableGeographyLevelsResponse> {\n let options: IEndpointOptions = {};\n let endpoint = `${ARCGIS_ONLINE_GEOENRICHMENT_URL}/StandardGeographyLevels`;\n\n if (!requestOptions) {\n options.params = {};\n } else {\n if (requestOptions.endpoint) {\n endpoint = `${requestOptions.endpoint}/StandardGeographyLevels`;\n }\n options = appendCustomParams<IEndpointOptions>(requestOptions, [], {\n params: { ...requestOptions.params }\n });\n }\n\n return request(`${cleanUrl(endpoint)}`, options).then((response: any) => {\n return response;\n });\n}\n","/* Copyright (c) 2020 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nimport {\n request,\n cleanUrl,\n appendCustomParams\n} from \"@esri/arcgis-rest-request\";\n\nimport {\n ARCGIS_ONLINE_STANDARD_GEOGRAPHY_QUERY_URL,\n IGeoenrichmentResult,\n IEndpointOptions\n} from \"./helpers.js\";\n\nexport interface IGetGeographyOptions extends IEndpointOptions {\n /**\n * Specify the source country for the search.\n */\n sourceCountry?: string;\n /**\n * Specify a specific dataset within a defined country.\n */\n optionalCountryDataset?: string;\n /**\n * Specify which standard geography layers are being queried or searched.\n */\n geographyLayers?: string[] | string;\n /**\n * Specify which IDs for the standard geography layers are being queried or searched.\n */\n geographyIDs?: string[];\n /**\n * Specify the text to query and search the standard geography layers specified.\n */\n geographyQuery?: string;\n /**\n * Return all the subgeographic areas that are within a parent geography.\n */\n returnSubGeographyLayer?: boolean;\n /**\n * Return all the subgeographic areas that are within a parent geography.\n */\n subGeographyLayer?: string;\n /**\n * Filter the results of the subgeography features that are returned by a search term.\n */\n subGeographyQuery?: string;\n /**\n * Request the output geometries in a specified spatial reference system.\n */\n outSR?: number;\n /**\n * Request the output geometries in the response.\n */\n returnGeometry?: boolean;\n /**\n * Request the output geometry to return the center point for each feature.\n */\n returnCentroids?: boolean;\n /**\n * Integer that specifies the level of generalization or detail in the area representations of the administrative boundary or standard geographic data layers.\n */\n generalizationLevel?: number;\n /**\n * Define if text provided in the geographyQuery parameter should utilize fuzzy search logic.\n */\n useFuzzySearch?: boolean;\n /**\n * Limits the number of features that are returned from the geographyQuery parameter.\n */\n featureLimit?: number;\n /**\n * Starts the results on the number of the records specified.\n */\n featureOffset?: number;\n /**\n * Specifies the language you wish to receive your GeoEnrichment results.\n */\n langCode?: string;\n}\n\nexport interface IGetGeographyResponse {\n results: IGeoenrichmentResult[] | null;\n messages: string[] | null;\n}\n\n/**\n * Used to get standard geography IDs and features for the supported geographic levels. See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/standard-geography-query.htm) and the [best practices post](https://www.esri.com/arcgis-blog/products/arcgis-online/uncategorized/best-practices-how-to-query-standard-geographies-branches) for more information.\n *\n * ```js\n * import { getGeography } from '@esri/arcgis-rest-demographics';\n * //\n * getGeography({\n * sourceCountry: \"CA\",\n * geographyIDs: [\"35\"]\n * })\n * .then((response) => {\n * response.; // => { results: [ ... ] }\n * });\n * ```\n *\n * @param requestOptions Options to pass through to the service. All properties are optional, but either `geographyIds` or `geographyQuery` must be sent at a minimum.\n * @returns A Promise that will resolve with return data defined and optionally geometry for the feature.\n */\nexport function getGeography(\n requestOptions?: IGetGeographyOptions\n): Promise<IGetGeographyResponse> {\n const endpoint = `${\n requestOptions.endpoint || ARCGIS_ONLINE_STANDARD_GEOGRAPHY_QUERY_URL\n }/execute`;\n\n const options = appendCustomParams<IGetGeographyOptions>(\n requestOptions,\n [\n \"sourceCountry\",\n \"optionalCountryDataset\",\n \"geographyLayers\",\n \"geographyIDs\",\n \"geographyQuery\",\n \"returnSubGeographyLayer\",\n \"subGeographyLayer\",\n \"subGeographyQuery\",\n \"outSR\",\n \"returnGeometry\",\n \"returnCentroids\",\n \"generalizationLevel\",\n \"useFuzzySearch\",\n \"featureLimit\",\n \"featureOffset\",\n \"langCode\"\n ],\n { params: { ...requestOptions.params } }\n );\n\n // the SAAS service does not support anonymous requests\n if (!requestOptions.authentication) {\n return Promise.reject(\n \"Geoenrichment using the ArcGIS service requires authentication\"\n );\n }\n\n // These parameters are passed as JSON-style strings:\n [\"geographyLayers\", \"geographyIDs\"].forEach((parameter) => {\n if (options.params[parameter]) {\n options.params[parameter] = JSON.stringify(options.params[parameter]);\n }\n });\n\n // add spatialReference property to individual matches\n return request(`${cleanUrl(endpoint)}`, options).then((response: any) => {\n return response;\n });\n}\n","/* Copyright (c) 2020 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nimport {\n request,\n cleanUrl,\n appendCustomParams\n} from \"@esri/arcgis-rest-request\";\n\nimport {\n ARCGIS_ONLINE_GEOENRICHMENT_URL,\n IGeoenrichmentResult,\n IEndpointOptions\n} from \"./helpers.js\";\n\nexport interface IQueryDemographicDataOptions extends IEndpointOptions {\n /**\n * Defines the area on a map which is being analyzed\n */\n studyAreas: any[];\n /**\n * A Data Collection is a preassembled list of attributes that will be used to enrich the input features. Enrichment attributes can describe various types of information such as demographic characteristics and geographic context of the locations or areas submitted as input features in studyAreas.\n */\n dataCollections?: string[];\n /**\n * Specify a subset of variables to be returned from one or more Data Collections\n */\n analysisVariables?: string[];\n /**\n * Specify an array of string values that describe what derivative variables to include in the output\n */\n addDerivativeVariables?: boolean;\n /**\n * Request the output geometries in the response\n */\n returnGeometry?: boolean;\n /**\n * Define the input geometries in the studyAreas parameter in a specified spatial reference system\n */\n inSR?: number;\n /**\n * Request the output geometries in a specified spatial reference system\n */\n outSR?: number;\n}\n\nexport interface IQueryDemographicDataResponse {\n results: IGeoenrichmentResult[] | null;\n messages: string[] | null;\n}\n\n/**\n * Used to get facts about a location or area. See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/enrich.htm) for more information.\n *\n * ```js\n * import { queryDemographicData } from '@esri/arcgis-rest-demographics';\n * //\n * queryDemographicData({\n * studyAreas: [{\"geometry\":{\"x\":-117.1956,\"y\":34.0572}}],\n * authentication\n * })\n * .then((response) => {\n * response; // => { results: [ ... ] }\n * });\n * ```\n *\n * @param requestOptions Options to pass through to the service.\n * @returns A Promise that will resolve with results for the request.\n */\nexport function queryDemographicData(\n requestOptions?: IQueryDemographicDataOptions\n): Promise<IQueryDemographicDataResponse> {\n const options = appendCustomParams<IQueryDemographicDataOptions>(\n requestOptions,\n [\n \"studyAreas\",\n \"dataCollections\",\n \"analysisVariables\",\n \"addDerivativeVariables\",\n \"returnGeometry\",\n \"inSR\",\n \"outSR\"\n ],\n { params: { ...requestOptions.params } }\n );\n\n // the SAAS service does not support anonymous requests\n if (!requestOptions.authentication) {\n return Promise.reject(\n \"Geoenrichment using the ArcGIS service requires authentication\"\n );\n }\n\n // These parameters are passed as JSON-style strings:\n [\"dataCollections\", \"analysisVariables\"].forEach((parameter) => {\n if (options.params[parameter]) {\n options.params[parameter] = JSON.stringify(options.params[parameter]);\n }\n });\n\n // add spatialReference property to individual matches\n return request(\n `${cleanUrl(\n `${requestOptions.endpoint || ARCGIS_ONLINE_GEOENRICHMENT_URL}/enrich`\n )}`,\n options\n ).then((response: any) => {\n return response;\n });\n}\n"],"names":[],"mappings":";;;;;;;AAAA;;AAQA,MAAM,qCAAqC,GAAG,6EAA6E,CAAA;AACpH,MAAM,+BAA+B,GAA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EAAE,MAAM,oBAAO,cAAc,CAAC,MAAM,CAAE,EAAE,CACzC,CAAC;;IAGF,IAAI,CAAC,cAAc,CAAC,cAAc,EAAE;QAClC,OAAO,OAAO,CAAC,MAAM,CACnB,gEAAgE,CACjE,CAAC;KACH;;IAGD,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS;QACzD,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;YAC7B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;SACvE;KACF,CAAC,CAAC;;IAGH,OAAO,OAAO,CACZ,GAAG,QAAQ,CACT,GAAG,cAAc,CAAC,QAAQ,IAAI,+BAA+B,SAAS,CACvE,EAAE,EACH,OAAO,CACR,CAAC,IAAI,CAAC,CAAC,QAAa;QACnB,OAAO,QAAQ,CAAC;KACjB,CAAC,CAAC;AACL;;;;"}
@@ -0,0 +1,7 @@
1
+ /* @preserve
2
+ * @esri/arcgis-rest-demographics - v4.0.0-beta.5 - Apache-2.0
3
+ * Copyright (c) 2017-2022 Esri, Inc.
4
+ * Mon Apr 18 2022 16:42:05 GMT+0000 (Coordinated Universal Time)
5
+ */
6
+ import{appendCustomParams as e,request as r,cleanUrl as a}from"@esri/arcgis-rest-request";const t="https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment";function s(s){let n={},i=`${t}/countries`;return s?(s.endpoint&&(i=`${s.endpoint}/countries`),n=e(s,[],{params:Object.assign({},s.params)}),s.countryCode&&(i=`${i}/${s.countryCode}`)):n.params={},r(a(i),n).then((e=>e))}function n(s){let n={},i=`${t}/dataCollections`;return s?(s.endpoint&&(i=`${s.endpoint}/dataCollections`),n=e(s,["addDerivativeVariables","suppressNullValues"],{params:Object.assign({},s.params)}),n.params.addDerivativeVariables&&(n.params.addDerivativeVariables=JSON.stringify(n.params.addDerivativeVariables)),s.countryCode&&(i=`${i}/${s.countryCode}`,s.dataCollection&&(i=`${i}/${s.dataCollection}`))):n.params={},r(`${a(i)}`,n).then((e=>e))}function i(s){let n={},i=`${t}/StandardGeographyLevels`;return s?(s.endpoint&&(i=`${s.endpoint}/StandardGeographyLevels`),n=e(s,[],{params:Object.assign({},s.params)})):n.params={},r(`${a(i)}`,n).then((e=>e))}function o(t){const s=`${t.endpoint||"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/StandardGeographyQuery"}/execute`,n=e(t,["sourceCountry","optionalCountryDataset","geographyLayers","geographyIDs","geographyQuery","returnSubGeographyLayer","subGeographyLayer","subGeographyQuery","outSR","returnGeometry","returnCentroids","generalizationLevel","useFuzzySearch","featureLimit","featureOffset","langCode"],{params:Object.assign({},t.params)});return t.authentication?(["geographyLayers","geographyIDs"].forEach((e=>{n.params[e]&&(n.params[e]=JSON.stringify(n.params[e]))})),r(`${a(s)}`,n).then((e=>e))):Promise.reject("Geoenrichment using the ArcGIS service requires authentication")}function c(s){const n=e(s,["studyAreas","dataCollections","analysisVariables","addDerivativeVariables","returnGeometry","inSR","outSR"],{params:Object.assign({},s.params)});return s.authentication?(["dataCollections","analysisVariables"].forEach((e=>{n.params[e]&&(n.params[e]=JSON.stringify(n.params[e]))})),r(`${a(`${s.endpoint||t}/enrich`)}`,n).then((e=>e))):Promise.reject("Geoenrichment using the ArcGIS service requires authentication")}export{s as getAvailableCountries,n as getAvailableDataCollections,i as getAvailableGeographyLevels,o as getGeography,c as queryDemographicData};
7
+ //# sourceMappingURL=demographics.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"demographics.esm.min.js","sources":["../../src/helpers.ts","../../src/getAvailableCountries.ts","../../src/getAvailableDataCollections.ts","../../src/getAvailableGeographyLevels.ts","../../src/getGeography.ts","../../src/queryDemographicData.ts"],"sourcesContent":["/* Copyright (c) 2020 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nimport {\n IRequestOptions,\n IFeatureSet\n} from \"@esri/arcgis-rest-request\";\n\nconst ARCGIS_ONLINE_GEOENRICHMENTSERVER_URL = \"https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver\"\nexport const ARCGIS_ONLINE_GEOENRICHMENT_URL = `${ARCGIS_ONLINE_GEOENRICHMENTSERVER_URL}/Geoenrichment`;\nexport const ARCGIS_ONLINE_STANDARD_GEOGRAPHY_QUERY_URL = `${ARCGIS_ONLINE_GEOENRICHMENTSERVER_URL}/StandardGeographyQuery`;\n\nexport interface IEndpointOptions extends IRequestOptions {\n /**\n * Any ArcGIS Geoenrichment service (example: https://geoenrich.arcgis.com/arcgis/rest/services/World/geoenrichmentserver/Geoenrichment )\n */\n endpoint?: string;\n}\n\nexport interface IGeoenrichmentResult {\n paramName: string;\n dataType: string;\n value: {\n version: string;\n FeatureSet: IFeatureSet[];\n };\n}","/* Copyright (c) 2020 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nimport {\n request,\n cleanUrl,\n appendCustomParams,\n IExtent\n} from \"@esri/arcgis-rest-request\";\n\nimport {\n ARCGIS_ONLINE_GEOENRICHMENT_URL,\n IEndpointOptions\n} from \"./helpers.js\";\n\nexport interface IGetAvailableCountriesOptions extends IEndpointOptions {\n /**\n * View a description for a given country. If not specified, will return a list of all countries.\n */\n countryCode?: string;\n}\n\nexport interface IGetAvailableCountriesResponse {\n messages?: string[];\n countries?: ICountry[];\n childResources?: any[];\n}\nexport interface ICountry {\n id: string;\n name: string;\n abbr3: string;\n altName: string;\n continent: string;\n distanceUnits: string;\n esriUnits: string;\n defaultExtent: IExtent;\n defaultDatasetID: string;\n datasets?: string[];\n hierarchies?: IHierarchy[];\n defaultDataCollection: string;\n dataCollections: string;\n defaultReportTemplate: string;\n currencySymbol: string;\n currencyFormat: string;\n}\nexport interface IHierarchy {\n ID: string;\n alias: string;\n shortDescription: string;\n default: boolean;\n longDescription: string;\n locales?: string[];\n datasets?: string[];\n levelsInfo: ILevelsInfo;\n variablesInfo: IVariablesInfo;\n populationToPolygonSizeRating: number;\n apportionmentConfidence: number;\n apportionmentThresholds?: IApportionmentThreshold[];\n hasMarginOfErrorData?: boolean;\n}\nexport interface ILevelsInfo {\n geographyLevels?: string[];\n}\nexport interface IVariablesInfo {\n categories?: string[];\n}\nexport interface IApportionmentThreshold {\n method: string;\n dataLayer: string;\n pointsLayer?: string;\n maximumSize?: number;\n}\n\n/**\n * Return a list of information for all countries. See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/countries.htm) for more information.\n *\n * ```js\n * import { getAvailableCountries } from '@esri/arcgis-rest-demographics';\n *\n * getAvailableCountries()\n * .then((response) => {\n * response; // => { countries: [ ... ] }\n * });\n * ```\n *\n * @param requestOptions Options to pass through to the geoenrichment service.\n * @returns A Promise that will resolve with available geography levels for the request.\n */\nexport function getAvailableCountries(\n requestOptions?: IGetAvailableCountriesOptions\n): Promise<IGetAvailableCountriesResponse> {\n let options: IEndpointOptions = {};\n let endpoint = `${ARCGIS_ONLINE_GEOENRICHMENT_URL}/countries`;\n if (!requestOptions) {\n options.params = {};\n } else {\n if (requestOptions.endpoint) {\n endpoint = `${requestOptions.endpoint}/countries`;\n }\n\n options = appendCustomParams<IGetAvailableCountriesOptions>(\n requestOptions,\n [],\n { params: { ...requestOptions.params } }\n );\n if (requestOptions.countryCode) {\n endpoint = `${endpoint}/${requestOptions.countryCode}`;\n }\n }\n\n return request(cleanUrl(endpoint), options).then((response: any) => {\n return response;\n });\n}\n","/* Copyright (c) 2020 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nimport {\n request,\n cleanUrl,\n appendCustomParams\n} from \"@esri/arcgis-rest-request\";\n\nimport {\n ARCGIS_ONLINE_GEOENRICHMENT_URL,\n IEndpointOptions\n} from \"./helpers.js\";\n\nexport interface IGetAvailableDataCollectionsOptions extends IEndpointOptions {\n /**\n * Optional parameter to specify an array of string values that describe what derivative variables to include in the output.\n */\n addDerivativeVariables?: string[];\n /**\n * Optional parameter to return only values that are not NULL in the output response.\n */\n suppressNullValues?: boolean;\n /**\n * View a description for a single data collection within a given country. If not specified, will return a list of data collections that can be run in any country.\n */\n countryCode?: string;\n dataCollection?: string;\n}\n\nexport interface IGetAvailableDataCollectionsResponse {\n DataCollections?: IDataCollection[] | null;\n}\nexport interface IDataCollection {\n dataCollectionID: string;\n metadata: IMetadata;\n data?: IDataInfo[] | null;\n}\nexport interface IMetadata {\n title: string;\n name: string;\n shortDescription: string;\n longDescription: string;\n url: string;\n keywords: string;\n creationDate: number;\n lastRevisionDate: number;\n webmap: string;\n author: string;\n countries?: string | null;\n IsRoyalties: boolean;\n categories?: ICategory[] | null;\n filters?: IFilter[] | null;\n datasets?: string | null;\n hierarchies: string;\n coverage?: string | null;\n mobileinfographics?: string | null;\n icon?: string | null;\n}\nexport interface ICategory {\n id: string;\n name: string;\n alias: string;\n description: string;\n displayOrder: string;\n}\nexport interface IFilter {\n id: string;\n name: string;\n aliasname: string;\n type: string;\n rangeMax?: string | null;\n rangeMin?: string | null;\n enumValues?: string | null;\n}\nexport interface IDataInfo {\n id: string;\n alias: string;\n type: string;\n precision: number;\n length?: null;\n averageBase?: null;\n averageBaseAlias?: null;\n description: string;\n fieldCategory: string;\n indexBase?: number | null;\n percentBase?: string | null;\n percentBaseAlias?: string | null;\n popularity?: number | null;\n units: string;\n vintage?: string | null;\n hideInDataBrowser: boolean;\n filteringTags?: IFilteringTag[] | null;\n derivative: boolean;\n provider: string;\n indexType?: string | null;\n}\nexport interface IFilteringTag {\n id: string;\n name: string;\n value: string;\n}\n\n/**\n * Used to determine the data collections available for usage with the Geoenrichment service. See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/data-collections.htm) for more information.\n *\n * ```js\n * import { getAvailableDataCollections } from '@esri/arcgis-rest-demographics';\n *\n * getAvailableDataCollections()\n * .then((response) => {\n * response; // => { DataCollections: [ ... ] }\n * });\n *\n * getAvailableDataCollections({\n * countryCode: \"se\",\n * dataCollection: \"EducationalAttainment\"\n * })\n * .then((response) => {\n * response.; // => { DataCollections: [ ... ] }\n * });\n * ```\n *\n * @param requestOptions Options to pass through to the geoenrichment service.\n * @returns A Promise that will resolve with data collections for the request.\n */\nexport function getAvailableDataCollections(\n requestOptions?: IGetAvailableDataCollectionsOptions\n): Promise<IGetAvailableDataCollectionsResponse> {\n let options: IGetAvailableDataCollectionsOptions = {};\n let endpoint = `${ARCGIS_ONLINE_GEOENRICHMENT_URL}/dataCollections`;\n\n if (!requestOptions) {\n options.params = {};\n } else {\n if (requestOptions.endpoint) {\n endpoint = `${requestOptions.endpoint}/dataCollections`;\n }\n options = appendCustomParams<IGetAvailableDataCollectionsOptions>(\n requestOptions,\n [\"addDerivativeVariables\", \"suppressNullValues\"],\n { params: { ...requestOptions.params } }\n );\n\n if (options.params.addDerivativeVariables) {\n options.params.addDerivativeVariables = JSON.stringify(\n options.params.addDerivativeVariables\n );\n }\n\n if (requestOptions.countryCode) {\n endpoint = `${endpoint}/${requestOptions.countryCode}`;\n if (requestOptions.dataCollection) {\n endpoint = `${endpoint}/${requestOptions.dataCollection}`;\n }\n }\n }\n\n // add spatialReference property to individual matches\n return request(`${cleanUrl(endpoint)}`, options).then((response: any) => {\n return response;\n });\n}\n","/* Copyright (c) 2020 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nimport {\n request,\n cleanUrl,\n appendCustomParams\n} from \"@esri/arcgis-rest-request\";\n\nimport {\n ARCGIS_ONLINE_GEOENRICHMENT_URL,\n IEndpointOptions\n} from \"./helpers.js\";\n\nexport interface IGetAvailableGeographyLevelsResponse {\n messages?: string[] | null;\n childResources?: any[] | null;\n childDatasets?: any[] | null;\n childHierarchies?: any[] | null;\n geographyLevels?: IGeographyLevel[] | null;\n}\nexport interface IGeographyLevel {\n countryID: string;\n countryName: string;\n datasets?: IDataset[] | null;\n hierarchies?: IGeographyLevelHierarchy[] | null;\n}\nexport interface IDataset {\n datasetID: string;\n branches?: IBranch[] | null;\n levels?: ILevel[] | null;\n}\nexport interface IBranch {\n id: string;\n name: string;\n levels?: string[] | null;\n}\nexport interface ILevel {\n id: string;\n name: string;\n isWholeCountry: boolean;\n adminLevel: string;\n singularName: string;\n pluralName: string;\n description?: string | null;\n}\nexport interface IGeographyLevelHierarchy {\n ID: string;\n branches?: IBranch[] | null;\n levels?: ILevel[] | null;\n}\n\n/**\n * Returns a list of available geography data layers, which can then be used in [getGeography()](). See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/standard-geography-levels.htm) for more information.\n *\n * ```js\n * import { getAvailableGeographyLevels } from '@esri/arcgis-rest-demographics';\n * //\n * getAvailableGeographyLevels()\n * .then((response) => {\n * response; // => { geographyLevels: [ ... ] }\n * });\n * ```\n *\n * @param requestOptions Options to pass through to the geoenrichment service.\n * @returns A Promise that will resolve with available geography levels for the request.\n */\nexport function getAvailableGeographyLevels(\n requestOptions?: IEndpointOptions\n): Promise<IGetAvailableGeographyLevelsResponse> {\n let options: IEndpointOptions = {};\n let endpoint = `${ARCGIS_ONLINE_GEOENRICHMENT_URL}/StandardGeographyLevels`;\n\n if (!requestOptions) {\n options.params = {};\n } else {\n if (requestOptions.endpoint) {\n endpoint = `${requestOptions.endpoint}/StandardGeographyLevels`;\n }\n options = appendCustomParams<IEndpointOptions>(requestOptions, [], {\n params: { ...requestOptions.params }\n });\n }\n\n return request(`${cleanUrl(endpoint)}`, options).then((response: any) => {\n return response;\n });\n}\n","/* Copyright (c) 2020 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nimport {\n request,\n cleanUrl,\n appendCustomParams\n} from \"@esri/arcgis-rest-request\";\n\nimport {\n ARCGIS_ONLINE_STANDARD_GEOGRAPHY_QUERY_URL,\n IGeoenrichmentResult,\n IEndpointOptions\n} from \"./helpers.js\";\n\nexport interface IGetGeographyOptions extends IEndpointOptions {\n /**\n * Specify the source country for the search.\n */\n sourceCountry?: string;\n /**\n * Specify a specific dataset within a defined country.\n */\n optionalCountryDataset?: string;\n /**\n * Specify which standard geography layers are being queried or searched.\n */\n geographyLayers?: string[] | string;\n /**\n * Specify which IDs for the standard geography layers are being queried or searched.\n */\n geographyIDs?: string[];\n /**\n * Specify the text to query and search the standard geography layers specified.\n */\n geographyQuery?: string;\n /**\n * Return all the subgeographic areas that are within a parent geography.\n */\n returnSubGeographyLayer?: boolean;\n /**\n * Return all the subgeographic areas that are within a parent geography.\n */\n subGeographyLayer?: string;\n /**\n * Filter the results of the subgeography features that are returned by a search term.\n */\n subGeographyQuery?: string;\n /**\n * Request the output geometries in a specified spatial reference system.\n */\n outSR?: number;\n /**\n * Request the output geometries in the response.\n */\n returnGeometry?: boolean;\n /**\n * Request the output geometry to return the center point for each feature.\n */\n returnCentroids?: boolean;\n /**\n * Integer that specifies the level of generalization or detail in the area representations of the administrative boundary or standard geographic data layers.\n */\n generalizationLevel?: number;\n /**\n * Define if text provided in the geographyQuery parameter should utilize fuzzy search logic.\n */\n useFuzzySearch?: boolean;\n /**\n * Limits the number of features that are returned from the geographyQuery parameter.\n */\n featureLimit?: number;\n /**\n * Starts the results on the number of the records specified.\n */\n featureOffset?: number;\n /**\n * Specifies the language you wish to receive your GeoEnrichment results.\n */\n langCode?: string;\n}\n\nexport interface IGetGeographyResponse {\n results: IGeoenrichmentResult[] | null;\n messages: string[] | null;\n}\n\n/**\n * Used to get standard geography IDs and features for the supported geographic levels. See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/standard-geography-query.htm) and the [best practices post](https://www.esri.com/arcgis-blog/products/arcgis-online/uncategorized/best-practices-how-to-query-standard-geographies-branches) for more information.\n *\n * ```js\n * import { getGeography } from '@esri/arcgis-rest-demographics';\n * //\n * getGeography({\n * sourceCountry: \"CA\",\n * geographyIDs: [\"35\"]\n * })\n * .then((response) => {\n * response.; // => { results: [ ... ] }\n * });\n * ```\n *\n * @param requestOptions Options to pass through to the service. All properties are optional, but either `geographyIds` or `geographyQuery` must be sent at a minimum.\n * @returns A Promise that will resolve with return data defined and optionally geometry for the feature.\n */\nexport function getGeography(\n requestOptions?: IGetGeographyOptions\n): Promise<IGetGeographyResponse> {\n const endpoint = `${\n requestOptions.endpoint || ARCGIS_ONLINE_STANDARD_GEOGRAPHY_QUERY_URL\n }/execute`;\n\n const options = appendCustomParams<IGetGeographyOptions>(\n requestOptions,\n [\n \"sourceCountry\",\n \"optionalCountryDataset\",\n \"geographyLayers\",\n \"geographyIDs\",\n \"geographyQuery\",\n \"returnSubGeographyLayer\",\n \"subGeographyLayer\",\n \"subGeographyQuery\",\n \"outSR\",\n \"returnGeometry\",\n \"returnCentroids\",\n \"generalizationLevel\",\n \"useFuzzySearch\",\n \"featureLimit\",\n \"featureOffset\",\n \"langCode\"\n ],\n { params: { ...requestOptions.params } }\n );\n\n // the SAAS service does not support anonymous requests\n if (!requestOptions.authentication) {\n return Promise.reject(\n \"Geoenrichment using the ArcGIS service requires authentication\"\n );\n }\n\n // These parameters are passed as JSON-style strings:\n [\"geographyLayers\", \"geographyIDs\"].forEach((parameter) => {\n if (options.params[parameter]) {\n options.params[parameter] = JSON.stringify(options.params[parameter]);\n }\n });\n\n // add spatialReference property to individual matches\n return request(`${cleanUrl(endpoint)}`, options).then((response: any) => {\n return response;\n });\n}\n","/* Copyright (c) 2020 Environmental Systems Research Institute, Inc.\n * Apache-2.0 */\n\nimport {\n request,\n cleanUrl,\n appendCustomParams\n} from \"@esri/arcgis-rest-request\";\n\nimport {\n ARCGIS_ONLINE_GEOENRICHMENT_URL,\n IGeoenrichmentResult,\n IEndpointOptions\n} from \"./helpers.js\";\n\nexport interface IQueryDemographicDataOptions extends IEndpointOptions {\n /**\n * Defines the area on a map which is being analyzed\n */\n studyAreas: any[];\n /**\n * A Data Collection is a preassembled list of attributes that will be used to enrich the input features. Enrichment attributes can describe various types of information such as demographic characteristics and geographic context of the locations or areas submitted as input features in studyAreas.\n */\n dataCollections?: string[];\n /**\n * Specify a subset of variables to be returned from one or more Data Collections\n */\n analysisVariables?: string[];\n /**\n * Specify an array of string values that describe what derivative variables to include in the output\n */\n addDerivativeVariables?: boolean;\n /**\n * Request the output geometries in the response\n */\n returnGeometry?: boolean;\n /**\n * Define the input geometries in the studyAreas parameter in a specified spatial reference system\n */\n inSR?: number;\n /**\n * Request the output geometries in a specified spatial reference system\n */\n outSR?: number;\n}\n\nexport interface IQueryDemographicDataResponse {\n results: IGeoenrichmentResult[] | null;\n messages: string[] | null;\n}\n\n/**\n * Used to get facts about a location or area. See the [REST Documentation](https://developers.arcgis.com/rest/geoenrichment/api-reference/enrich.htm) for more information.\n *\n * ```js\n * import { queryDemographicData } from '@esri/arcgis-rest-demographics';\n * //\n * queryDemographicData({\n * studyAreas: [{\"geometry\":{\"x\":-117.1956,\"y\":34.0572}}],\n * authentication\n * })\n * .then((response) => {\n * response; // => { results: [ ... ] }\n * });\n * ```\n *\n * @param requestOptions Options to pass through to the service.\n * @returns A Promise that will resolve with results for the request.\n */\nexport function queryDemographicData(\n requestOptions?: IQueryDemographicDataOptions\n): Promise<IQueryDemographicDataResponse> {\n const options = appendCustomParams<IQueryDemographicDataOptions>(\n requestOptions,\n [\n \"studyAreas\",\n \"dataCollections\",\n \"analysisVariables\",\n \"addDerivativeVariables\",\n \"returnGeometry\",\n \"inSR\",\n \"outSR\"\n ],\n { params: { ...requestOptions.params } }\n );\n\n // the SAAS service does not support anonymous requests\n if (!requestOptions.authentication) {\n return Promise.reject(\n \"Geoenrichment using the ArcGIS service requires authentication\"\n );\n }\n\n // These parameters are passed as JSON-style strings:\n [\"dataCollections\", \"analysisVariables\"].forEach((parameter) => {\n if (options.params[parameter]) {\n options.params[parameter] = JSON.stringify(options.params[parameter]);\n }\n });\n\n // add spatialReference property to individual matches\n return request(\n `${cleanUrl(\n `${requestOptions.endpoint || ARCGIS_ONLINE_GEOENRICHMENT_URL}/enrich`\n )}`,\n options\n ).then((response: any) => {\n return response;\n });\n}\n"],"names":["ARCGIS_ONLINE_GEOENRICHMENT_URL","getAvailableCountries","requestOptions","options","endpoint","appendCustomParams","params","countryCode","request","cleanUrl","then","response","getAvailableDataCollections","addDerivativeVariables","JSON","stringify","dataCollection","getAvailableGeographyLevels","getGeography","authentication","forEach","parameter","Promise","reject","queryDemographicData"],"mappings":";;;;;0FAQA,MACaA,EAAkC,qGC+E/BC,EACdC,GAEA,IAAIC,EAA4B,GAC5BC,EAAW,GAAGJ,cAkBlB,OAjBKE,GAGCA,EAAeE,WACjBA,EAAW,GAAGF,EAAeE,sBAG/BD,EAAUE,EACRH,EACA,GACA,CAAEI,wBAAaJ,EAAeI,UAE5BJ,EAAeK,cACjBH,EAAW,GAAGA,KAAYF,EAAeK,gBAZ3CJ,EAAQG,OAAS,GAgBZE,EAAQC,EAASL,GAAWD,GAASO,MAAMC,GACzCA,aCeKC,EACdV,GAEA,IAAIC,EAA+C,GAC/CC,EAAW,GAAGJ,oBA6BlB,OA3BKE,GAGCA,EAAeE,WACjBA,EAAW,GAAGF,EAAeE,4BAE/BD,EAAUE,EACRH,EACA,CAAC,yBAA0B,sBAC3B,CAAEI,wBAAaJ,EAAeI,UAG5BH,EAAQG,OAAOO,yBACjBV,EAAQG,OAAOO,uBAAyBC,KAAKC,UAC3CZ,EAAQG,OAAOO,yBAIfX,EAAeK,cACjBH,EAAW,GAAGA,KAAYF,EAAeK,cACrCL,EAAec,iBACjBZ,EAAW,GAAGA,KAAYF,EAAec,oBApB7Cb,EAAQG,OAAS,GA0BZE,EAAQ,GAAGC,EAASL,KAAaD,GAASO,MAAMC,GAC9CA,aC7FKM,EACdf,GAEA,IAAIC,EAA4B,GAC5BC,EAAW,GAAGJ,4BAalB,OAXKE,GAGCA,EAAeE,WACjBA,EAAW,GAAGF,EAAeE,oCAE/BD,EAAUE,EAAqCH,EAAgB,GAAI,CACjEI,wBAAaJ,EAAeI,WAN9BH,EAAQG,OAAS,GAUZE,EAAQ,GAAGC,EAASL,KAAaD,GAASO,MAAMC,GAC9CA,aCoBKO,EACdhB,GAEA,MAAME,EAAW,GACfF,EAAeE,U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