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

Enable lexical formatting for number type #374

Closed
Stephen-Gates opened this issue Jan 6, 2018 · 8 comments
Closed

Enable lexical formatting for number type #374

Stephen-Gates opened this issue Jan 6, 2018 · 8 comments
Labels
f:Feature-request This issue is a request for a new feature fn:Set-Properties priority:Medium
Milestone

Comments

@Stephen-Gates
Copy link
Contributor

Stephen-Gates commented Jan 6, 2018

Desired Behaviour

Support lexical formatting for number type with these additional properties:

  • decimalChar
  • groupChar
  • bareNumber
@Stephen-Gates Stephen-Gates added f:Feature-request This issue is a request for a new feature fn:Set-Properties labels Jan 6, 2018
@Stephen-Gates Stephen-Gates modified the milestones: v1.x.x, v1.9.0 Jan 6, 2018
@Stephen-Gates
Copy link
Contributor Author

Stephen-Gates commented Feb 13, 2018

example of why this is needed https://discuss.okfn.org/t/the-csv-standard-need-a-decimal-separator-parameter/6395

Open Knowledge Forums
This is a question, perhaps a suggestion for Frictionlessdata specs/CSV dialect … or perhaps only an opportunity to say “hello I am in the CSV hell of the decimal-separator interpretation”. Typical problem On my country we use comma as decimal separator, but we accept as human-readable, in data-interchange standards like JSON and CSV, the point as decimal separator. Imagining… I have an originalSpreadsheet with my dataset. I published my dataset as originalSpreadsheet.csv, saving it as CSV w...

@Stephen-Gates

This comment has been minimized.

@reminders reminders bot added the reminder label Mar 28, 2018
@reminders

This comment has been minimized.

@Stephen-Gates
Copy link
Contributor Author

User interface thoughts:

If type is number, allow entry of:

decimalChar: A string whose value is used to represent a decimal point within the number. The default value is "."

decimal character: Allow for input of a single character - default "."

groupChar: A string whose value is used to group digits within the number. The default value is null. A common value is "," e.g. "100,000"

group character: Allow for input of a single character

bareNumber: a boolean field with a default of true. If true the physical contents of this field must follow the formatting constraints already set out. If false the contents of this field may contain leading and/or trailing non-numeric characters (which implementors MUST therefore strip). The purpose of bareNumber is to allow publishers to publish numeric data that contains trailing characters such as percentages e.g. 95% or leading characters such as currencies e.g. €95 or EUR 95. Note that it is entirely up to implementors what, if anything, they do with stripped text

bare number: checkbox - default checked

Tooltip support on all labels:

  • decimal character: Character used to represent a decimal point within the number
  • group character: Character used to group digits within the number
  • bare number: Ignore leading and trailing non-numeric characters

@Stephen-Gates
Copy link
Contributor Author

Stephen-Gates commented Apr 9, 2018

Note the -£1000.00 edge case

frictionlessdata/tableschema-js#144

Ensure it is addressed or write about the limitation on the forum

@reminders reminders bot removed the reminder label Apr 18, 2018
@reminders

This comment has been minimized.

@Stephen-Gates
Copy link
Contributor Author

@mattRedBox would it help if I split this into 3 issues:

  • decimal character: Character used to represent a decimal point within the number
  • group character: Character used to group digits within the number
  • bare number: Ignore leading and trailing non-numeric characters

@Stephen-Gates
Copy link
Contributor Author

Split into #745, #746, #747

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f:Feature-request This issue is a request for a new feature fn:Set-Properties priority:Medium
Projects
None yet
Development

No branches or pull requests

1 participant