Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display name for dimensions #137

Closed
danfowler opened this issue Feb 8, 2016 · 5 comments
Closed

Display name for dimensions #137

danfowler opened this issue Feb 8, 2016 · 5 comments

Comments

@danfowler
Copy link
Contributor

Currently, measures, dimensions, and attributes of a dimension are "named" via their keys which are understood to be internal references for use in an implementation, but not necessarily intended to be displayed for humans. FDP has no way of presenting a "display name" for either a dimension, attribute of a dimension, or measure. Dimensions should have some way of specifying a human-readable display name for presentation to the user in an implementation. As an example, the dimension "administrative-classification" below could have a title attribute with a value like "Administrative Classification".

"model": {
  "dimensions": {
    "administrative-classification": {
      "title": "Administrative Classification",
      ...
    }
  },
  "measures": {
    ...
  }
}

See https://github.com/openspending/os-viewer/issues/63#issuecomment-181451034

@danfowler danfowler changed the title Display name for dimension Display name for dimension and attributes Feb 9, 2016
@danfowler danfowler changed the title Display name for dimension and attributes Display name for dimensions, attributes, and measures Feb 9, 2016
@rufuspollock
Copy link
Member

I thought we already had "title" as a recommended field :-)

If not, definitely agree we should add it (similar to title we have for JSON Table Schema).

@akariv
Copy link
Member

akariv commented Jun 5, 2016

+1

What's currently missing is the display name for dimension as a whole (esp. if it spans multiple columns).

For attributes, we should probably define that in case the title attribute is missing then the title attribute from the JTS in the resources section will be used instead as fallback (only applies when the attribute is resource bound - n.a for constant attributes etc.)

@rufuspollock rufuspollock changed the title Display name for dimensions, attributes, and measures Display name for dimensions Jun 11, 2016
@rufuspollock
Copy link
Member

OK i've updated the title of this issue to better reflect what it is about since it is just about labels for dimensions.

@akariv when do you need the dimension title for users?

@akariv on your point re fallback to resource title I agree though it seems one is straying into implementation details that maybe should be in an implementor's tutorial vs in the spec.

Implementation

Unfortunately the fact we made dimensions attributes a "dict" directly on the dimension mean that adding the title is going to be a bit painful. Any suggestions for how we would do this? (Obviously we could just reserve title as a word and not allow any attribute on a dimension to be called that but sort of ugly).

@akariv
Copy link
Member

akariv commented Jun 11, 2016

As an example we might have a po-date dimension with title Date of Purchase and day, month and year attributes.
I would like to be able to show the actual dimension title with the attribute titles to the user, and never show the internal identifiers - e.g. Date of Purchase (Year) instead of po-date/year.

As for implementation:

  1. as all attributes are located under the attributes property in each dimension, so adding a sibling title property shouldn't create any ambiguity.
  2. My fallback comment was just to point out that there is some duplication here, but I agree it's an implementation detail and not part of the spec.

@pwalsh
Copy link
Member

pwalsh commented Sep 7, 2017

Moving to frictionlessdata/datapackage-fiscal#3

@pwalsh pwalsh closed this as completed Sep 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants