Geo Data Package

Geometrypath

I think I’d like to verify the “unverified use case” of “attributes and boundaries supplied separately in the same data package” (if I understand it correctly)…

 // OPTIONAL (TBD): local or web path to an actual source of those boundaries, in the absence of a codelist-resolving service.
 // this could also support the (unverified) use case of attributes and boundaries supplied separately in the same DP.
     "geometrypath": "http://..."

Given a data package with

  • datapackage.json
  • tourists_by_district_2016.csv
  • tourism_districts.geojson (tourism district geometry and district-name attribute)

tourists_by_district_2016.csv

tourism district visitors 2016
a 10000
b 23000

Should the data package be

{
  "profile": "data-package",
  "name": "tourists_2016",
  "version": "0.1.0",
  "resources": [
    {
      "path": "tourists_by_district_2016.csv",
      "name": "tourists_by_district_2016",
      "profile": "tabular-data-resource",
      "locations": {
        "type": "boundary_id",
        "field": "tourism district",
        "codelist": "district-name",
        "geometrypath": "tourism_districts.geojson"
      },
      "schema": {
        "fields": [
          {
            "name": "tourism district",
            "type": "string",
            "format": "default",
            "constraints": {
              "required": true,
              "unique": true
            }
          },
          {
            "name": "visitors 2016",
            "type": "integer",
            "format": "default"
          }
        ]
      },
      "primaryKeys": [
        "tourism district"
      ]
    },
    {
      "path": "tourism_districts.geojson",
      "name": "tourism_districts",
      "profile": "data-resource",
      "locations": {
        "type": "geojson"
      },
      "schema": {
        "fields": [
          {
            "name": "district-name",
            "type": "string",
            "format": "default",
            "constraints": {
              "required": true,
              "unique": true
            }
          }
        ]
      },
      "primaryKeys": [
        "district-name"
      ]
    }
  ]
}
  • Is the linking correct?
  • Are the constraints and primaryKeys needed in the geojson schema?