Code Monkey home page Code Monkey logo

data-models's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

data-models's Issues

What's the difference between 'timestamp' and 'dateModified'?

In some datamodels are used 2 different attribute name to represent time instant, timestamp or dateModified.

For exemple in Device on batteryLevel are used timestamp and on configuration, dateModified.

dateModified : It captures the last modification timestamp of this attribute.

timestamp: Timestamp when the last update of the attribute happened. This value can also appear as a FIWARE TimeInstant

It's sounds quite similar. The difference between this two attributes justify use a two different names?

Check for the existence of the same attribute on any of the other models and reuse it, if pertinent.

Update Transportation link (404)

Clicking on the Transportation link, available in https://schema.fiware.org or https://www.fiware.org/data-models leads to http://fiware-datamodels.readthedocs.io/en/latest/Vehicle/doc/introduction/index.html which provides a 404 - NOT FOUND.

The correct link should be: http://fiware-datamodels.readthedocs.io/en/latest/Transportation/doc/introduction/index.html

I didn't find the code for this index page in this repository, so I couldn't be more direct and provide a Pull Request. Hence, my apologies if this is not the correct place to publish the issue

Would be nice to have a json schema for each data model

The documentation is easily readable to humans. Thinking about machine-readable concept would be nice to have a file containing the JSON data model schema because markdown isn't a good structure to do that, anyway using this format could be easily consumed by developers also.

Despite having a pretty good documentation, references and links, there is no kind of support to developers or ways to automatize and consumers of this standardize the data models as schemes or another way to be a machine-redabe model.
Data Models there's no limits, new models and changes on currently ones will be necessary along time. It will evolve aligned to new discoveries, news technologies. So, I think Data Models should be flexible, with version control and scheme standard files on a own repository to be consumed or "learned" by smart applications and developers through a know semantic.

Extracting from the docs, I could build a scheme with all attributes of the Device Data Model. I tried to cover all specs to be consumed by an application. The result was:

{
    "namespace": "Environment",
    "name": "WaterQualityObserved",
    "attributes": {
        "id": {
            "descr": "Unique identifier.",
            "type": "Text",
            "mandatory": true
        },
        "type": {
            "descr": "Entity type. It must be equal to WaterQualityObserved.",
            "type": "Text",
            "allowedvalues": "WaterQualityObserved",
            "mandatory": true
        },
        "location": {
            "descr": "Location where measurements have been taken, represented by a GeoJSON Point.",
            "type": "geo:json",
            "allowedvalues": {
                "normative": "https://tools.ietf.org/html/rfc7946"
            },
            "mandatory-if": [
                {
                    "attribute": "address",
                    "rule": "equals",
                    "value": "undefined"
                }
            ]
        },
        "address": {
            "descr": "Civic address where the Water Quality measurement is taken.",
            "type": "address",
            "allowedvalues": {
                "normative": "https://schema.org/address"
            },
            "mandatory-if": [
                {
                    "attribute": "location",
                    "rule": "equals",
                    "value": "undefined"
                }
            ]
        },
        "temperature": {
            "descr": "Temperature.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "Cº",
                "descr": "Celsius Degrees"
            }
        },
        "conductivity": {
            "descr": "Electrical Conductivity.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "S/m",
                "descr": "Siemens per meter"
            }
        },
        "conductance": {
            "descr": "Specific Conductance.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "S/m",
                "descr": "Siemens per meter at 25 ºC"
            }
        },
        "tss": {
            "descr": "Total suspended solids.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "mg/L",
                "descr": "milligrams per liter"
            }
        },
        "tds": {
            "descr": "Total dissolved solids.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "mg/L",
                "descr": "milligrams per liter"
            }
        },
        "turbidity": {
            "descr": "Amount of light scattered by particles in the water column.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "FTU",
                "descr": "Formazin Turbidity Unit"
            }
        },
        "salinity": {
            "descr": "Amount of salts dissolved in water.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "ppt",
                "descr": "Parts per thousand"
            }
        },
        "pH": {
            "descr": "acidity or basicity of an aqueous solution.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "",
                "descr": "Negative of the logarithm to base 10 of the activity of the hydrogen ion."
            }
        },
        "orp": {
            "descr": "Oxidation-Reduction potential.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "mV",
                "descr": "millivolts"
            }
        },
        "O2": {
            "descr": "Level of free, non-compound oxygen present.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "mg/L",
                "descr": "milligrams per liter"
            }
        },
        "Chla": {
            "descr": "Concentration of chlorophyll A.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "mg/L",
                "descr": "milligrams per liter"
            }
        },
        "PE": {
            "descr": "Concentration of pigment phycoerythrin which can be measured to estimate cyanobacteria concentrations specifically.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "mg/L",
                "descr": "milligrams per liter"
            }
        },
        "NH4": {
            "descr": "Concentration of ammonia.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "mg/L",
                "descr": "milligrams per liter"
            }
        },
        "Cl": {
            "descr": "Concentration of chlorides.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "mg/L",
                "descr": "milligrams per liter"
            }
        },
        "NO3": {
            "descr": "Concentration of nitrates.",
            "type": "Number",
            "metadata": {
                "timestamp": {
                    "type": "DateTime"
                }
            },
            "unit": {
                "symbol": "mg/L",
                "descr": "milligrams per liter"
            }
        },
         "dateModified": {
            "descr": "Last update timestamp of this entity.",
            "type": "DateTime"
        },
    }
}
  • namespace : Represent the universe domain/group/universe from a DataModel.

  • name : DataModel Name.

  • attributes : Dataset of a DataModel, each key represents an attribute from DataModel, using a StructuredValue to represent properties:

    • type : Represent a Data Type, could be a Schema's Data Type or another DataModel. The Value can be a Text or a List of Text to represent mixed values,
      (obs. : I used TextList to represent Arrays because I do not find the correct schema datatype to represent a List of values)
    • unit : Structured Value composed by symbol and a description
    • metadata : Structured Value with same structure from the main structure, but metadata could not have a nested metadata attribute.
    • allowedvalues : A Structured Value, List or Text to flexibilize all posibilities , data model reference, normative reference and possible values. Default. "*"
    • from: URL or URI to from referenced datamodel or context.
    • attribute : Text representing the attribute name from the reference.
    • interval: A list of 2 Numeric Values that represent a range of Numeric Values. e.g. [0.0,1.0].
    • normative : URL with normative reference
    • mandatory : Boolean value to represent if the attribute should aways exists on referenced datamodel (defaulf. false)
    • mandatory-if : A list of Structured Values with attribute (name of attribute that rule applies), rule(rule description) and value (Value based on rule that define if is mandatory ). eg.
    (...)
    "mandatory-if":[
     {"attribute": "category", "rule": "contains", "value":["tracked"]},
    {"attribute": "category", "rule": "no-contains", "value":["specialUsage"]}
    ]
    (...)
    

The other option could also be used a jsonld like https://schema.org/docs/tree.jsonld, that's had a much richer and complex structure.

I believe that it is not possible to speak of a harmonized data model without be closer of the ontology concepts. But this proposal isn't intended as a universal ontology for this harmonized datasets, but to provide ways to developers implement it with more fluidity. I made a fork and I'll work on a structured json to be consumed by our Fiware Powered applications to evaluate this model applied on our concepts.

[Vehicle] "heading" or "Azimuth"? Terminology review

heading : Denotes the direction of travel of the vehicle and is specified in decimal degrees, where 0° ≤ heading < 360°, counting clockwise relative to the true north. If the vehicle is stationary (i.e. the value of the speed attribute is 0), then the value of the heading attribute must be equal to null. null MAY be used if heading is transiently unknown for some reason.

The value thats represent direction degrees relative to north is common called azimuth, an azimuth is an angular measurement in a spherical coordinate system.
Looking for a terminology, on VM9 models we use azimuth as terminology because this post:

A heading (in the general case of moving "forward") is the direction your nose(of a plane) is pointed in. This may not be your course (as discussed here).
Headings are measured from onboard a traveling vehicle or object (e.g. from the cockpit of an aircraft or the bridge of a ship at sea).

An azimuth is a bearing, more precisely a compass bearing from a specific point of observation like a radar station. (The "North" used as a reference may be either magnetic or true depending on the system you're working with, but for purposes of this discussion it doesn't matter.)
Often the point of observation is fixed (ground radar, a control tower, an artillery spotter, etc.), though it need not be as long as the observation can be mapped to a compass bearing somehow.

Source: http://aviation.stackexchange.com/questions/24899/what-is-the-difference-between-azimuth-and-heading

So, exists a big difference between heading and azimuth.

Almost all compass as the sensors will use a magnetic sensor (so will use magnetic north) to determine the Azimuth degrees or will calculate based on 2 positions . In all cases, the terminology used is Azimuth.

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.