openspending / fiscal-data-package

MOVED TO https://github.com/frictionlessdata/specs/issues?q=is%3Aopen+is%3Aissue+label%3A%22Fiscal+Data+Package%22
24 stars 7 forks source link

Various notes from trying to implement #93

Closed pudo closed 8 years ago

pudo commented 8 years ago

Just for fun, I'm trying to hack up a FDP->babbage->FDP translator based on Dan's code. As some feedback, here's a sort of stream of consciousness of the issues that come up during this implementation effort:

Problems

danfowler commented 8 years ago

The term field is overloaded between resources and dimensions (both are often used in the same code, I'd guess). Proposing attribute (ref #40).

Thanks @pudo. I made a similar point here in a long discussion about restructuring the dimension object to support hierarchies. A given dimension field potentially, though not always, maps to multiple source fields.

rufuspollock commented 8 years ago

@danfowler can we make an issue for e.g. dimension fields as object rather than array?

danfowler commented 8 years ago

@rgrp I can, but I think there are actually (at least) two issues here:

  1. Dimension fields as objects, forcing each name to be unique.
  2. Dimension fields as objects that are each a collection of source CSV fields. Currently dimension fields map directly to source CSV fields.
danfowler commented 8 years ago

@rgrp I made the issue: https://github.com/openspending/fiscal-data-package/issues/94

danfowler commented 8 years ago

There are also more types of phases and directions (the last dataset I added to OHa has directions "revenue", "expenditure", "internal paid", "internal received", "balance").

@pudo would you class these as "directions"?

pudo commented 8 years ago

@danfowler I'm not actually sure, seems hacky to me. The city treasurer of Hildesheim apparently thinks they are directions, though. They live in a multi-dimensional universe.

pwalsh commented 8 years ago

I think much of this has been addressed. The main thing for me is that now that we use attributes in the logical model, I think we should support the proposed change @pudo suggests of source to field. It fits the semantics of the spec perfectly (example: an attributes maps to a field or a constant).

danfowler commented 8 years ago

@pwalsh +1

I see what you're saying and it makes sense.

In the physical model (the resources array), each resource has a schema and each schema has a fields array. If we make this change, we are mapping/modeling an element of the fields array to a field in the mapping/model.

rufuspollock commented 8 years ago

@pwalsh @danfowler can we get a dedicated issue for this as per (developing) standard practice.

pwalsh commented 8 years ago

@rgrp https://github.com/openspending/fiscal-data-package/issues/114

@pudo can we close this catch-all, or, is there something else worth pulling out to a distinct issue at this stage?

pwalsh commented 8 years ago

FIXED.