{"id":255,"date":"2020-04-03T12:42:36","date_gmt":"2020-04-03T12:42:36","guid":{"rendered":"http:\/\/data-models.fiware.org\/?page_id=255"},"modified":"2022-01-28T17:39:18","modified_gmt":"2022-01-28T16:39:18","slug":"how-to-use-data-models","status":"publish","type":"page","link":"https:\/\/smartdatamodels.org\/index.php\/how-to-use-data-models\/","title":{"rendered":"How to use data models"},"content":{"rendered":"<h5>Simple user:<\/h5>\n<ul>\n<li>Use the csv (comma separated values) like this table, a csv is available in every data model and its specification and explanation in the \/doc\/spec.md that explains the meaning of the fields<\/li>\n<\/ul>\n<div style=\"overflow-x: auto;\">\n<table class=\"js-csv-data csv-data js-file-line-container\" border=\"1\">\n<thead>\n<tr id=\"LC1\" class=\"js-file-line\">\n<th>id<\/th>\n<th>type<\/th>\n<th>address__addressLocality<\/th>\n<th>address__addressCountry<\/th>\n<th>atmosphericPressure<\/th>\n<th>dataProvider<\/th>\n<th>dateObserved<\/th>\n<th>location__coordinates<\/th>\n<th>precipitation<\/th>\n<th>pressureTendency<\/th>\n<th>relativeHumidity<\/th>\n<th>source<\/th>\n<th>stationCode<\/th>\n<th>stationName<\/th>\n<th>temperature<\/th>\n<th>windDirection<\/th>\n<th>windSpeed<\/th>\n<th>illuminance<\/th>\n<th>refDevice<\/th>\n<th>streamGauge<\/th>\n<th>snowHeight<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr id=\"LC2\" class=\"js-file-line\">\n<td>Spain-WeatherObserved-Valladolid-2016-11-30T07:00:00.00Z<\/td>\n<td>WeatherObserved<\/td>\n<td>Valladolid<\/td>\n<td>ES<\/td>\n<td>938.9<\/td>\n<td>TEF<\/td>\n<td>2016-11-30T07:00:00.00Z<\/td>\n<td>[-4.754444444, 41.640833333]<\/td>\n<td>0<\/td>\n<td>0.5<\/td>\n<td>1<\/td>\n<td>http:\/\/www.aemet.es<\/td>\n<td>2422<\/td>\n<td>Valladolid<\/td>\n<td>3.3<\/td>\n<td>-45<\/td>\n<td>2<\/td>\n<td>1000<\/td>\n<td>device-0A3478<\/td>\n<td>50<\/td>\n<td>20<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><a href=\"https:\/\/github.com\/smart-data-models\/dataModel.Weather\/blob\/master\/WeatherObserved\/examples\/example.json\">Source<\/a><\/p>\n<ul>\n<li>The specification described in the <a href=\"https:\/\/github.com\/smart-data-models\/dataModel.Weather\/blob\/master\/WeatherObserved\/README.md\">READ.me<\/a><\/li>\n<\/ul>\n<h5>Bit more expert user (use json):<\/h5>\n<p><code>{<br \/>\n\"id\": \"Spain-WeatherObserved-Valladolid-2016-11-30T07:00:00.00Z\",<br \/>\n\"type\": \"WeatherObserved\",<br \/>\n\"address\": {<br \/>\n\"addressLocality\": \"Valladolid\",<br \/>\n\"addressCountry\": \"ES\"<br \/>\n},<br \/>\n\"atmosphericPressure\": 938.9,<br \/>\n\"dataProvider\": \"TEF\",<br \/>\n\"dateObserved\": \"2016-11-30T07:00:00.00Z\",<br \/>\n\"location\": {<br \/>\n\"type\": \"Point\",<br \/>\n\"coordinates\": [-4.754444444, 41.640833333]\n},<br \/>\n\"precipitation\": 0,<br \/>\n\"pressureTendency\": 0.5,<br \/>\n\"relativeHumidity\": 1,<br \/>\n\"source\": \"http:\/\/www.aemet.es\",<br \/>\n\"stationCode\": \"2422\",<br \/>\n\"stationName\": \"Valladolid\",<br \/>\n\"temperature\": 3.3,<br \/>\n\"windDirection\": -45,<br \/>\n\"windSpeed\": 2,<br \/>\n\"illuminance\": 1000,<br \/>\n\"refDevice\": \"device-0A3478\",<br \/>\n\"streamGauge\": 50,<br \/>\n\"snowHeight\": 20,<br \/>\n\"uvIndexMax\": 1.0<br \/>\n}<\/code><\/p>\n<p>You can insert a normalized version of these payloads through this command<\/p>\n<blockquote><p>curl -iX POST &#8216;http:\/\/localhost:1026\/v2\/entities&#8217; -H &#8216;Content-Type: application\/json&#8217; -d &#8216; <strong><em>payload<\/em><\/strong>&#8216;<\/p><\/blockquote>\n<p>where <strong><em>payload<\/em><\/strong> take these values<\/p>\n<p>for NGSI-Ld <a href=\"https:\/\/github.com\/smart-data-models\/dataModel.Weather\/blob\/master\/WeatherObserved\/examples\/example-normalized.jsonld\">https:\/\/github.com\/smart-data-models\/dataModel.Weather\/blob\/master\/WeatherObserved\/examples\/example-normalized.jsonld<\/a><\/p>\n<p>for NGSI v2 https:\/\/github.com\/smart-data-models\/dataModel.Weather\/blob\/master\/WeatherObserved\/examples\/example-normalized.json<\/p>\n<ul>\n<li style=\"list-style-type: none;\"><a href=\"https:\/\/github.com\/smart-data-models\/dataModel.Weather\/blob\/master\/WeatherObserved\/examples\/example.json\">Source<\/a><\/li>\n<\/ul>\n<h5>Quite expert, you can validate your json payloads against the json schemas:<\/h5>\n<p><code><br \/>\n{<br \/>\n\"$schema\": \"http:\/\/json-schema.org\/schema#\",<br \/>\n\"$id\": \"https:\/\/smart-data-models.github.io\/dataModel.Weather\/WeatherObserved\/schema.json\",<br \/>\n\"title\": \" - Weather Observed schema\",<br \/>\n\"description\": \"An observation of weather conditions at a certain place and time. This data model has been developed in cooperation with mobile operators and the GSMA.\",<br \/>\n\"type\": \"object\",<br \/>\n\"allOf\": [<br \/>\n{<br \/>\n\"$ref\": \"https:\/\/smart-data-models.github.io\/data-models\/common-schema.json#\/definitions\/GSMA-Commons\"<br \/>\n},<br \/>\n{<br \/>\n\"$ref\": \"https:\/\/smart-data-models.github.io\/data-models\/common-schema.json#\/definitions\/Location-Commons\"<br \/>\n},<br \/>\n{<br \/>\n\"$ref\": \"https:\/\/smart-data-models.github.io\/dataModel.Weather\/weather-schema.json#\/definitions\/Weather-Commons\"<br \/>\n},<br \/>\n{<br \/>\n\"properties\": {<br \/>\n\"type\": {<br \/>\n\"type\": \"string\",<br \/>\n\"enum\": [\"WeatherObserved\"],<br \/>\n\"description\": \"NGSI Entity type\"<br \/>\n},<br \/>\n\"dateObserved\": {<br \/>\n\"type\": \"string\",<br \/>\n\"format\": \"date-time\"<br \/>\n},<br \/>\n\"precipitation\": {<br \/>\n\"type\": \"number\",<br \/>\n\"minimum\": 0<br \/>\n},<br \/>\n\"atmosphericPressure\": {<br \/>\n\"type\": \"number\",<br \/>\n\"minimum\": 0<br \/>\n},<br \/>\n\"solarRadiation\": {<br \/>\n\"type\": \"number\",<br \/>\n\"minimum\": 0<br \/>\n},<br \/>\n\"illuminance\": {<br \/>\n\"type\": \"number\",<br \/>\n\"minimum\": 0<br \/>\n},<br \/>\n\"pressureTendency\": {<br \/>\n\"oneOf\": [<br \/>\n{<br \/>\n\"type\": \"string\",<br \/>\n\"enum\": [\"raising\", \"falling\", \"steady\"]\n},<br \/>\n{<br \/>\n\"type\": \"number\"<br \/>\n}<br \/>\n]\n},<br \/>\n\"dewPoint\": {<br \/>\n\"type\": \"number\"<br \/>\n},<br \/>\n\"refDevice\": {<br \/>\n\"$ref\": \"https:\/\/smart-data-models.github.io\/data-models\/common-schema.json#\/definitions\/EntityIdentifierType\"<br \/>\n},<br \/>\n\"streamGauge\": {<br \/>\n\"type\": \"number\"<br \/>\n},<br \/>\n\"snowHeight\": {<br \/>\n\"type\": \"number\"<br \/>\n},<br \/>\n\"uVIndexMax\": {<br \/>\n\"type\": \"number\",<br \/>\n\"minimum\": 1<br \/>\n}<br \/>\n}<br \/>\n}<br \/>\n],<br \/>\n\"required\": [\"id\", \"type\", \"dateObserved\", \"location\"]\n}<br \/>\n<\/code><br \/>\n<a href=\"https:\/\/github.com\/smart-data-models\/dataModel.Weather\/blob\/master\/WeatherObserved\/schema.json\">source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Simple user: Use the csv (comma separated values) like this table, a csv is available in every data model and its specification and explanation in the \/doc\/spec.md that explains the meaning of the fields id type address__addressLocality address__addressCountry atmosphericPressure dataProvider dateObserved location__coordinates precipitation pressureTendency relativeHumidity source stationCode stationName temperature windDirection&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/smartdatamodels.org\/index.php\/how-to-use-data-models\/\">More&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-255","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":18619,"url":"https:\/\/smartdatamodels.org\/index.php\/validate-your-payloads-against-smart-data-models-powering-real-world-use-cases\/","url_meta":{"origin":255,"position":0},"title":"Validate Your Payloads Against Smart Data Models \u2013 Powering Real-World Use Cases!","author":"maestro","date":"08\/06\/2025","format":false,"excerpt":"Are you working with data in the realm of IoT, Smart Cities, or other domain-specific applications, and often find yourself grappling with inconsistent data formats or complex ontologies? The Smart Data Models initiative is here to streamline your work, and we're excited to announce a new tool that brings our\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4961,"url":"https:\/\/smartdatamodels.org\/index.php\/create-data-model-from-csv-payload\/","url_meta":{"origin":255,"position":1},"title":"Create data model from csv payload","author":"maestro","date":"21\/05\/2022","format":false,"excerpt":"source code of this service if you want to improve it.","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4963,"url":"https:\/\/smartdatamodels.org\/index.php\/template-of-a-csv-payload-for-creating-a-data-model\/","url_meta":{"origin":255,"position":2},"title":"Template of a csv payload for creating a data model","author":"maestro","date":"21\/05\/2022","format":false,"excerpt":"\"field1\", \"field2\",\"field3\",\"field4\",\"field5\",\"field6\",\"field7\",\"field8\",\"field9\" \"description of the field1\", \"description of the field2\",\"description of the field3\",\"description of the field4\",\"description of the field5\",\"description of the field6\",\"description of the field7\",\"description of the field8\",\"description of the field9\" \"value1\", \"value2\",\"value3\",\"value4\",\"value5\",\"value6\",\"value7\",\"value8\",\"value9\"","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":192,"url":"https:\/\/smartdatamodels.org\/index.php\/use-data-models\/","url_meta":{"origin":255,"position":3},"title":"use Data models","author":"maestro","date":"20\/03\/2020","format":false,"excerpt":"All the data models available in Github under the umbrella repository smart-data-models are free to use and with an open license allowing its modification. You have a list here. There are examples in all of them in several formats, including json, jsonld, dtdl and csv. Additionally, there are schemas that\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4017,"url":"https:\/\/smartdatamodels.org\/index.php\/create-your-json-schema-from-a-csv-payload\/","url_meta":{"origin":255,"position":4},"title":"Create your json schema from a csv payload","author":"maestro","date":"30\/03\/2022","format":false,"excerpt":"","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":126,"url":"https:\/\/smartdatamodels.org\/index.php\/coding-data-models\/","url_meta":{"origin":255,"position":5},"title":"Check the whole data model repository","author":"maestro","date":"17\/03\/2020","format":false,"excerpt":"The data models are composed of: Manually contributed Json schema describing the technical properties of the model and their descriptions Some examples in JSON and JSON-LD (example.json, example.jsonld, example-normalized.json and example-normalized.json) Optional Manually contributed: The authors (CONTRIBUTORS.yaml) Manually contributed: Current adopters of the data model (ADOPTERS.yaml) Manually contributed: Customization of\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/pages\/255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/comments?post=255"}],"version-history":[{"count":17,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/pages\/255\/revisions"}],"predecessor-version":[{"id":3697,"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/pages\/255\/revisions\/3697"}],"wp:attachment":[{"href":"https:\/\/smartdatamodels.org\/index.php\/wp-json\/wp\/v2\/media?parent=255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}