healthyregions / oeps

Opioid Environment Policy Scan - data explorer and backend management
https://oeps.healthyregions.org
GNU General Public License v3.0
0 stars 0 forks source link

JCOIN package - structure shapefile as nested data package #28

Closed mradamcox closed 1 month ago

mradamcox commented 3 months ago

Multiple files in the “path” property is intended to be used for chunking (see Data Resource | Data Package (v1) (frictionlessdata.io)) the same data resource (eg participants 1-100 in one file and participants 101-200 in another file). However, I have been using that convention for including the multiple sidecar files of a shapefile.

Instead, shapefiles are more like a data package within a data package so they should be restructured as such. Here is an example to start from: Patterns | Data Package (v1) (frictionlessdata.io).

It would be nice to also add mediatype for each file in the shapefile. Find these here Media Types (iana.org) and shp is application/vnd.shp for example.

{
    "profile": "data-package",
    "name": "oeps",
    "title": "Opioid Environment Policy Scan (OEPS)",
    "homepage": https://oeps.healthyregions.org,
    "resources": [
        {
            "profile":"data-package",
            "name": "counties-2010",
             “description”:”Helpful description annotation here?”
            "resources":[
                {"path":"data/counties2010.shp", “mediatype”:”application/vnd.shp”},
                {"path":"data/counties2010.shx"},
                {"path":"data/counties2010.dbf"},
                {"path":"data/counties2010.prj"},
                {"path":"data/counties2010.cpg"}
            ] 
        }, … rest of datapackage.json …
mradamcox commented 3 months ago

Update to this is that, due to the need for the schema to be applied to the resource as a whole, we'll actually stick with the original setup, multiple files in the same resource.