Combine Regions - Implan-Group/api GitHub Wiki
This endpoint allows for the creation of custom Regions by combining existing regions.
Property | Type | Details |
---|---|---|
description | str | A description for the newly combined region. |
hashids | array[str] | A list of all the HashIds for all the Regions to combine. |
urids | array[int] | A list of all the Urids for all the Regions to combine. |
Warning
You may only specify hashids
or urids
not both.
Parameter | Spec | Type | Details |
---|---|---|---|
aggregationSchemeId | route | int | The Aggregation Scheme the new Region will belong to |
body | body | json | A Combine Regions object that specifies the regions to combine. |
POST /api/v1/region/build/batch/combined/1
[ { "description": "Batch Example", "urids": [ 1012134, 1012675 ] } ]
[
{
"hashId": "VBB1oBpjmV",
"urid": null,
"userModelId": 176907,
"description": "Batch Example",
"modelId": 297812,
"modelBuildStatus": "New",
"employment": 3128947.4409169536,
"output": 511251288284.0769,
"valueAdded": 263919560401.47504,
"aggregationSchemeId": 1,
"datasetId": 49,
"datasetDescription": "2017",
"fipsCode": "45",
"provinceCode": null,
"m49Code": null,
"regionType": "State",
"hasAccessibleChildren": false,
"regionTypeDescription": "State",
"geoId": "45",
"isMrioAllowed": true
}
]
If you would to create more than one Combined Region at a time, use this batch version of the above endpoint.
Parameter | Spec | Type | Details |
---|---|---|---|
aggregationSchemeId | route | int | The Aggregation Schemes the new Region will belong to |
body | body | json | A list of Combine Region objects. |
If you would like to specify the Regions to be combined with a csv
file, you can use this endpoint.
Parameter | Spec | Type | Details |
---|---|---|---|
aggregationSchemeId | route | int | The Aggregation Schemes the new Region will belong to |
body | body | form | A csv specifying the regions to combine (see below). |
Please do not include a header row, just the data for the Regions to be combined:
description, hashid_1, hashid_2
description, urid_1, hashid_1, urid_2
Each row is the definition for a combined region. The first column is the combined Region's description, the second and subsequent columns (as many as needed) should be filled in with the Glossary#HashId and/or Glossary#URID that are to be combined in that region.
POST /api/v1/region/build/batch/combined/1/csv
combined CSV int3,1685191,5Oad9nJPbZ combined CSV int4,1685676,W1aQJy8pbj
[]