These are chat archives for frictionlessdata/chat

16th
Jun 2017
Daniel Fowler
@danfowler
Jun 16 2017 09:18
Great @ivarref Super neat! Did you load straight from the CSV or did you happen to use the datapackage.json file?
Rufus Pollock
@rufuspollock
Jun 16 2017 11:41

FYI: interesting proposal about how we reference resources inside data packages using urls - frictionlessdata/specs#373 - comments wanted

The goal here is to have a URI that could point to a specific resource inside a datapackage.
We already have a standard way for identifying a datapackage: http://specs.frictionlessdata.io/data-package-identifier/.

This proposal suggests to add a means for referencing the data file contained inside the data package.

Implementation options (not mutually exclusive):

  • Using a JSON pointer notation:
    <datapackage-identifier>#/resources/<resource-index>/data
    Examples:
    • http://mywebsite.com/mydatapackage/datapackage.json#/resources/0/data
    • http://mywebsite.com/mydatapackage/#/resources/1/data
    • http://github.com/datasets/gold-prices#/resources/2/data
    • gold-prices#/resources/3/data
  • Using the resource name:
    <datapackage-identifier>#<resource-name>
    Since resources is an array, you can't reference a resource by its name - unless we start using stronger pointing mechanisms such as XPath (and we shouldn't...)
    Examples:
    • http://mywebsite.com/mydatapackage/datapackage.json#my-lovely-resource
    • http://mywebsite.com/mydatapackage/#finances-2012-q3
    • http://github.com/datasets/gold-prices#all-data
    • gold-prices#all-data

+rfc

roll
@roll
Jun 16 2017 12:15
@rufuspollock Current specs say resource.name is required and must be unique - so why you can't reference its by name?
roll
@roll
Jun 16 2017 12:22
I think we're pretty capable to do things like this http://github.com/datasets/gold-prices#resource/field/row (second part of @akariv 's idea)
Ivar Refsdal
@ivarref
Jun 16 2017 18:06
@danfowler Thanks. I built everything into a single TSV file (from three sources, BP, population/okfn/wb, gdp/okfn/wb): https://github.com/ivarref/bp-diagrams/blob/master/data/data.tsv
The code is not pretty, but here it is: https://github.com/ivarref/bp-diagrams/blob/master/gen_data.py ... Well, well. So it goes.
Wrote that mostly in 2014 it seems. It still worked this year, yay.