Comments (8)
units
package
https://cran.r-project.org/web/packages/units/index.html
from dataspice.
I guess it depends on whether we want to conform with the schema.org unit definition property of variableMeasured
.
The unitCode
property requires adherance to the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon.
But:
a) we are not using unitCode
property
b) there is no obvious link to definitive information on UN/CEFACT unit definitions
unitText
which we are using, requires text indicating the unit of measurement and is suggested as useful if you cannot provide a standard unit code forΒ unitCode
. Given this I'm not sure
which standard we should suggest adhering to in dataspice. UN/CEFACT seems to be geared towards commerce. Perhaps ISO (as per eml2
unit definition) would be more appropriate for our purposes?
Any opinions?
from dataspice.
Some other specifications I've come across for my work with ODM2 units
- QUDT: http://www.qudt.org/
- http://unitsofmeasure.org/trac
- https://www.unidata.ucar.edu/software/udunits/
from dataspice.
The units
package in R is based on the Unidata units, which include all SI units. I agree that Unidata units are probably a much better choice for us than schema's UN/CEFACT codes. The schema definition for unit code does suggest that you can use other unit codes if you provide a prefix, but this seems not ideal to me (1. not sure what the unidata prefix would be, and 2., most users would find unidata:m
a more confusing unit than m
.) I think we should stick with unitText, but we should warn if units::as_units()
does not recognize the unit?
We could go a step further in using units::as_units
to attempt to convert the provided text into a standard form, i.e. units
package recognizes these are all the same units:
library(units)
as_units("Meter/sec")
as_units("m/s")
as_units("meter / Second")
as_units("meter * seconds / Second ^ 2")
EML units are based on the older STMML standard, which I believe isn't really used by projects other than EML now(?).
from dataspice.
Oh as_units
is super nice. For match failures I bet we could do a string distance comparison to the controlled list and suggest a few candidates too which might be nice.
from dataspice.
Had a good question in my dataspice
demo at NCEAS today that prompted me to think more about this. Could we maybe even warn the user if their unit isn't in a controlled vocabulary? This pushes dataspice
further into the territory of metadata quality which I don't think is a bad idea.
from dataspice.
Sorry, error, I meant mainly based on SI units in EML
from dataspice.
as_units
looks great indeed. Maybe we could integrate using units::as_units()
to complete the unitText
attributes.csv column in the edit_attributes
shiny app? π
from dataspice.
Related Issues (20)
- Feature request: Add file to attributes
- Migrate from spread to pivot_wider
- Address width and scrolling in Shiny apps HOT 1
- Make use of rhandsontable's read only features
- Add ropensci onboarding reviewers in package acknowledgement section
- Complete final tasks from onboarding
- build_site() generates a docs folder even if user has set custom out_path HOT 4
- Using dataspice for multiple datasets
- Display citation and author fields in the html page
- Bug: Cannot use the biblio.csv metadata file due to keywords issue HOT 3
- Document eml_spice functions
- Do an editing pass of shiny apps
- Create 1.0 release HOT 1
- Fix CI HOT 1
- Fix CRAN issues HOT 2
- Go through ropensci onboarding
- Switch default branch to main HOT 1
- Add Test and covr workflows HOT 1
- Session_Info generator HOT 4
- Adding a DOI
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dataspice.