Git Product home page Git Product logo

Comments (9)

shifucun avatar shifucun commented on July 29, 2024

It would be nice to have a "preferred" unit for energy related import and check it in the import tool? @pradh

from data.

pradh avatar pradh commented on July 29, 2024

I agree it is nicer to have the same unit for a given StatVar.

But we probably shouldn't plot different units in a single bar/line chart ? Also, in this case, are we able to prefer UNEnergy as the source, given US has both: https://screenshot.googleplex.com/Aj6PeKqb4ovWHv3 ?

from data.

beets avatar beets commented on July 29, 2024

Ah, I missed that there are two datasources plotted together! Sorry @ajaits.

We should be able to do this conversion easily if we understand these units. But we can prefer UNEnergy for now

from data.

pradh avatar pradh commented on July 29, 2024

Bo, to generalize your suggestion to have some check in import tool, instead of picking a specific unit, we can perhaps lookup the "StatVarSummary" cache for a stat-var and Warn if a new unit (not part of the existing series) gets added for a pre-existing stat-var.

WDYT?

from data.

shifucun avatar shifucun commented on July 29, 2024

From a API client point view (in this case website is a client), it would be nice that we can convert data to a unified common unit if possible.

If there are multiple source series with different unit, then mixer would ideally pick the most used unit, then some places are dropped. Or, website would have a the logic to do number conversion. In either case, I think conversion in the source is better, as users have to do the conversion any way.

from data.

shifucun avatar shifucun commented on July 29, 2024

Bo, to generalize your suggestion to have some check in import tool, instead of picking a specific unit, we can perhaps lookup the "StatVarSummary" cache for a stat-var and Warn if a new unit (not part of the existing series) gets added for a pre-existing stat-var.

WDYT?

That works. But still feel a unified unit is better.. It should happen somewhere before the data is given back to users. Common data (with common unit) :)

from data.

pradh avatar pradh commented on July 29, 2024

Bo, to generalize your suggestion to have some check in import tool, instead of picking a specific unit, we can perhaps lookup the "StatVarSummary" cache for a stat-var and Warn if a new unit (not part of the existing series) gets added for a pre-existing stat-var.
WDYT?

That works. But still feel a unified unit is better.. It should happen somewhere before the data is given back to users. Common data (with common unit) :)

Unless we support conversion capability in the schema/API, we can only notify the importing user to unify it. And that's what this does?

from data.

pradh avatar pradh commented on July 29, 2024

If there are multiple source series with different unit, then mixer would ideally pick the most used unit, then some places are dropped. Or, website would have a the logic to do number conversion. In either case, I think conversion in the source is better, as users have to do the conversion any way.

Conversion is source is better, but we probably have this and other diverging cases in the KG now. For these, might be nice to include conversion support in API layer. For now perhaps the logic can be hard-coded/config-driven, but eventually it can perhaps read the schema to do conversions (b/197723426 talks about schema for this).

from data.

shifucun avatar shifucun commented on July 29, 2024

I will do this in API for now datacommonsorg/mixer#631. When conversion schema is available, we can move the conversion during import time.

from data.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.