Enriching JSON-stat responses with maps

15 views
Skip to first unread message

Xavier Badosa

unread,
Feb 21, 2019, 10:20:59 AM2/21/19
to json-stat
I was recently contacted by an NSO asking how to reference GeoJSON maps in a JSON-stat Dataset response. Just in case it's useful, here is the relevant part of my answer:

The way to attach external information to a dimension (or a dataset, or a collection) is via "link":


The tricky thing is to use the best IANA link relation name:


What would the relation between the dataset's "geo" dimension and its GeoJSON map be?

1) You could use the generic "related".

2) You could consider that GeoJSON somehow "describes" (in geographical terms) the dimension. In this case, the relations would be "describedBy" (this interpretation of "describedBy" is probably far-fetched: as far as I know, "describedBy" was meant to point to description languages and GeoJSON is not a description language).

3) Finally, you could probably use "enclosure", originally meant for audio and video. A GeoJSON map probably fits the definition of "a related resource that is potentially large in size and might require special handling".

This third approach seems the best to me. So assuming 3), here is an example ("dimension" fragment only):

"dimension": {
  "province": {
    "label": "Province",
    "category": {
      ...
    },
    "link": {
      "enclosure": [
        {
          "type": "application/geo+json",
        }
      ]
    }
  }
}

X.
Reply all
Reply to author
Forward
0 new messages