datastory-org / frame2package

Frame2Package: Dataframe to Datapackage
1 stars 0 forks source link

Add support for extra data in entities files #1

Closed miroli closed 5 years ago

miroli commented 5 years ago

Currently, all ddf--entities--<x> files just list all the unique values of that entity, which is the minimum requirement for the datapackage to validate. What is the easiest way to add additional data for the entities, for instance names of countries side by side with ISO 3 code?

lapidus commented 5 years ago

Interesting question ... some hints but nothing conclusive ....

Gapminder keeps a "core ontology": https://github.com/open-numbers/ddf--open_numbers https://github.com/open-numbers/ddf--gapminder--geo_entity_domain

I think the "recipes" are meant to simplify merging in attributest etc: https://ddf-utils.readthedocs.io/en/latest/recipe.html#recipe-execution

At the same time, in the ETL examples, it seems Gapminder does this mostly manually: https://github.com/open-numbers/ddf--ihme--lex/blob/master/etl/scripts/etl.py

lapidus commented 5 years ago

Here's a more concrete example of mapping to core geo entities using a recipe:

https://github.com/open-numbers/ddf--ihme--lex/commit/0f992e361a8b492621022225b7158f27c5120a9d#diff-3a6fdf60120a1febb119d447545491f0R1

Maybe we could try something like this after establishing a sample core ontology?

miroli commented 5 years ago

Resolved here.