Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of region root, list and metadata files, + new hierarchy files #25

Merged
merged 5 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,103 @@ Sub regions fall in to a hierarchy, for example one HUC2 has many HUC4s.
## Examples

<details>
<summary>`region_hierarchy.json`</summary>
I believe this example doesn't quite fit with the specification outline above yet, it's
just an early draft.
<summary>`root_regions.json`</summary>
```{.json include="root_regions.json"}
```
</details>

<details>
<summary>`region_26000.json`</summary>
```{.json include="region_26000.json"}
```
</details>

<details>
<summary>`region_26101.json`</summary>
```{.json include="region_26101.json"}
```
</details>

<details>
<summary>`region_hierarchy_26000.json`</summary>
```{.json include="region_hierarchy_26000.json"}
```
</details>

```{.json include="regions.json"}
<details>
<summary>`region_hierarchy_26101.json`</summary>
```{.json include="region_hierarchy_26101.json"}
```
</details>


## Notes

I feel that we'll need a dedicated specification for the categorization of regions. E.g.

`region_category_26000.json`
```json
{
"HUC2": {"long-name": "Hydrologic Unit Code (2-digit)"},
"USSTATE": {"long-name": "U.S. State"}
}
```

and the hierarchy can define regions as members of categories instead of assigning
regions to categories as an attribute of a region. e.g.:

`region_hierarchy_26000.json`
```json
{
"HUC2": {
"children": {
"123123": {
"name": "HUC10",
"children": {
"HUC4": {
"234234": {
"name": "HUC1010",
"children": {
"HUC6": {
"345345": {
"name": "HUC101010"
},
"345346": {
"name": "HUC101011"
},
"345347": {
"name": "HUC101012"
}
}
}
},
"234234": {
"name": "HUC1011",
"children": {
"HUC6": {
"445345": {
"name": "HUC101110"
},
"445346": {
"name": "HUC101111"
},
"445347": {
"name": "HUC101112"
}
}
}
}
}
}
}
}
}
}
```

Here, top-level keys and keys that are members of `children` dicts are collection
identifiers, e.g. `HUC2` corresponds to `Hydrologic Unit Code (2-digit)` from
`region_category_26000.json`.

Perhaps instead of `children`, `items` is a more conventional name for members of a
collection?
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"11725": {
"name": "California",
"code": "US-CA",
"subdivisionType": "adm1",
"shapefileRelativePath": "regionshapefiles/11/region_shapefile_11725.geojson"
},
"11726": {
"name": "Colorado",
"code": "US-CO",
"subdivisionType": "adm1",
"shapefileRelativePath": "regionshapefiles/11/region_shapefile_11726.geojson"
},
"12516": {
"name": "Pacific Northwest",
"code": "HUC17",
"subdivisionType": "huc2",
"shapefileRelativePath": "regionshapefiles/12/region_shapefile_12516.geojson"
},
"12517": {
"name": "California",
"code": "HUC18",
"subdivisionType": "huc2",
"shapefileRelativePath": "regionshapefiles/12/region_shapefile_12517.geojson"
},
"12807": {
"name": "Lower Columbia",
"code": "HUC1708",
"subdivisionType": "huc4",
"shapefileRelativePath": "regionshapefiles/12/region_shapefile_12807.geojson"
},
"12809": {
"name": "Oregon-Washington Coastal",
"code": "HUC1710",
"subdivisionType": "huc4",
"shapefileRelativePath": "regionshapefiles/12/region_shapefile_12809.geojson"
},
"12815": {
"name": "San Joaquin",
"code": "HUC1804",
"subdivisionType": "huc4",
"shapefileRelativePath": "regionshapefiles/12/region_shapefile_12815.geojson"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"3701": {
"name": "Alberta",
"code": "CA-AB",
"subdivisionType": "adm1",
"shapefileRelativePath": "regionshapefiles/37/region_shapefile_3701.geojson"
},
"24989": {
"name": "Catchment HYD78268",
"code": "HYD78268",
"subdivisionType": "hydro5",
"shapefileRelativePath": "regionshapefiles/24/region_shapefile_24989.geojson"
},
"17376": {
"name": "Catchment HYD7821",
"code": "HYD7821",
"subdivisionType": "hydro4",
"shapefileRelativePath": "regionshapefiles/17/region_shapefile_17376.geojson"
},
"17381": {
"name": "Catchment HYD7826",
"code": "HYD7826",
"subdivisionType": "hydro4",
"shapefileRelativePath": "regionshapefiles/17/region_shapefile_17381.geojson"
},
"15269": {
"name": "Catchment HYD782",
"code": "HYD782",
"subdivisionType": "hydro3",
"shapefileRelativePath": "regionshapefiles/15/region_shapefile_15269.geojson"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"26000": {
"children": {
"11725": {},
"11726": {},
"12516": {
"children": {
"12807": {},
"12809": {}
}
},
"12517": {
"children": {
"12815": {}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"26000": {
"children": {
"11725": {},
"11726": {},
"12516": {
"children": {
"12807": {},
"12809": {}
}
},
"12517": {
"children": {
"12815": {}
}
}
}
},
"26004": {
"children": {
"26102": {
"children": {
"2684": {}
}
},
"2044": {
"children": {
"3908": {}
}
},
"15235": {
"children": {
"17138": {
"children": {
"24134": {}
}
}
}
}
}
},
"26100": {
"children": {
"12518": {
"children": {
"12825": {
"children": {
"13355": {},
"13368": {}
}
}
}
}
}
},
"26101": {
"children": {
"3701": {},
"15269": {
"children": {
"17376": {},
"17381": {
"children": {
"24989": {}
}
}
}
}
}
}
}
Loading