{"id":46712,"date":"2022-07-09T00:00:00","date_gmt":"2022-07-09T07:00:00","guid":{"rendered":"https:\/\/griddb-linux-hte8hndjf8cka8ht.westus-01.azurewebsites.net\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/"},"modified":"2025-11-13T12:56:06","modified_gmt":"2025-11-13T20:56:06","slug":"visualization-of-weather-data-with-d3-js-and-griddb","status":"publish","type":"post","link":"https:\/\/www.griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/","title":{"rendered":"Visualization of Weather Data with D3.js and GridDB"},"content":{"rendered":"<p>In this article, we will be looking at how to visualize and analyze weather data using GridDB. We will be loading a dataset available as a CSV file into GridDB, then fetching the data from GridDB and performing data analysis on it. We will be using the Weather Dataset.<\/p>\n<p><a href=\"https:\/\/github.com\/griddbnet\/Blogs\/tree\/main\/Visualization%20of%20Weather%20Data%20with%20D3.js%20and%20GridDB\"> Full source code for this article can be found here <\/a><\/p>\n<h2>Loading Data into GridDB and then fetching data from GridDB<\/h2>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">var griddb = require('griddb_node');\n\nconst createCsvWriter = require('csv-writer').createObjectCsvWriter;\nconst csvWriter = createCsvWriter({\n  path: 'out.csv',\n  header: [\n    {id: \"DATE\", title:\"DATE\"}, \n    {id: \"WIND\", title:\"WIND\"}, \n    {id: \"IND\", title:\"IND\"}, \n    {id: \"RAIN\", title:\"RAIN\"}, \n    {id: \"IND.1\", title:\"IND.1\"}, \n    {id: \"T.MAX\", title:\"T.MAX\"}, \n    {id: \"IND.2\" , title:\"IND.2\"}, \n    {id: \"T.MIN\", title:\"T.MIN\"}, \n    {id: \"T.MIN.G\", title:\"T.MIN.G\"}, \n  ]\n});\n\nconst factory = griddb.StoreFactory.getInstance();\nconst store = factory.getStore({\n    \"host\": '239.0.0.1',\n    \"port\": 31999,\n    \"clusterName\": \"defaultCluster\",\n    \"username\": \"admin\",\n    \"password\": \"admin\"\n});\n\/\/ For connecting to the GridDB Server we have to make containers and specify the schema.\nconst conInfo = new griddb.ContainerInfo({\n    'name': \"windspeedanalysis\",\n    'columnInfoList': [\n      [\"name\", griddb.Type.STRING],\n      [\"DATE\", griddb.Type.STRING],\n        [\"WIND\", griddb.Type.STRING],\n        [\"IND\", griddb.Type.STRING],\n        [\"RAIN\", griddb.Type.STRING],\n        [\"IND.1\", griddb.Type.STRING],\n        [\"T.MAX\", griddb.Type.STRING],\n        [\"IND.2\", griddb.Type.STRING],\n        [\"T.MIN\", griddb.Type.STRING],\n        [\"T.MIN.G\", griddb.Type.STRING]\n    ],\n    'type': griddb.ContainerType.COLLECTION, 'rowKey': true\n});\n\nconst csv = require('csv-parser');\n\nconst fs = require('fs');\nvar lst = []\nvar lst2 = []\nvar i =0;\nfs.createReadStream('.\/dataset\/windspeed.csv')\n  .pipe(csv())\n  .on('data', (row) => {\n    lst.push(row);\n    console.log(lst);\n\n  })\n  .on('end', () => {\n\n    var container;\n    var idx = 0;\n    \n    for(let i=0;i&lt;lst.length;i++){\n\n        \/\/ lst[i]['DATE'] = String(lst[i][\"DATE\"])\n        \/\/ lst[i]['WIND'] = parseFloat(lst[i][\"WIND\"])\n        \/\/ lst[i]['IND'] = parseInt(lst[i][\"IND\"])\n        \/\/ lst[i]['RAIN'] = parseFloat(lst[i][\"RAIN\"])\n        \/\/ lst[i]['IND.1'] = parseInt(lst[i][\"IND.1\"])\n        \/\/ lst[i]['T.MAX'] = parseFloat(lst[i][\"T.MAX\"])\n        \/\/ lst[i]['IND.2'] = parseInt(lst[i][\"IND.2\"])\n        \/\/ lst[i]['T.MIN'] = parseFloat(lst[i][\"T.MIN\"])\n        \/\/ lst[i]['T.MIN.G'] = parseFloat(lst[i][\"T.MIN.G\"])\n\n    store.putContainer(conInfo, false)\n        .then(cont => {\n            container = cont;\n            return container.createIndex({ 'columnName': 'name', 'indexType': griddb.IndexType.DEFAULT });\n        })\n        .then(() => {\n            idx++;\n            container.setAutoCommit(false);\n            return container.put([String(idx), lst[i]['DATE'],lst[i][\"WIND\"],lst[i][\"IND\"],lst[i][\"RAIN\"],lst[i][\"IND.1\"],lst[i][\"T.MAX\"],lst[i][\"IND.2\"],lst[i][\"T.MIN\"],lst[i][\"T.MIN.G\"]]);\n        })\n        .then(() => {\n            return container.commit();\n        })\n       \n        .catch(err => {\n            if (err.constructor.name == \"GSException\") {\n                for (var i = 0; i &lt; err.getErrorStackSize(); i++) {\n                    console.log(\"[\", i, \"]\");\n                    console.log(err.getErrorCode(i));\n                    console.log(err.getMessage(i));\n                }\n            } else {\n                console.log(err);\n            }\n        });\n    \n    }\n\n    store.getContainer(\"windspeedanalysis\")\n    .then(ts => {\n        container = ts;\n      query = container.query(\"select *\")\n      return query.fetch();\n  })\n  .then(rs => {\n      while (rs.hasNext()) {\n          let rsNext = rs.next()\n          lst2.push(\n                      \n            {\n                'DATE': rsNext[1],\n                \"WIND\": rsNext[2],\n                \"IND\": rsNext[3],\n                \"RAIN\": rsNext[4],\n                \"IND.1\": rsNext[5],\n                \"T.MAX\": rsNext[6],\n                \"IND.2\": rsNext[7],\n                \"T.MIN\": rsNext[8],\n                \"T.MIN.G\": rsNext[9],\n            }\n          );\n      }\n        csvWriter\n        .writeRecords(lst2)\n        .then(()=> console.log('The CSV file was written successfully'));\n      return \n  }).catch(err => {\n      if (err.constructor.name == \"GSException\") {\n          for (var i = 0; i &lt; err.getErrorStackSize(); i++) {\n              console.log(\"[\", i, \"]\");\n              console.log(err.getErrorCode(i));\n              console.log(err.getMessage(i));\n          }\n      } else {\n          console.log(err);\n      }\n  });   \n});\n <\/code><\/pre>\n<\/div>\n<p>Note: For running the d3.js in the html file an httpserver should be run first to read the output csv file containing the data fetched from GridDB.<\/p>\n<h2>Data Visualization:<\/h2>\n<p>For the purpose of plotting and drawing tables, we will use D3.js, a library that allows manipulation of documents based on data. HTML DOM manipulation and visualization is possible with this library.<\/p>\n<p>We will first start with printing the first few rows of the dataset to get a feel for the data. For this purpose we are going to have to write the code for creating and inserting data into an html table. This is going to be helper code and will be included in the source files, and is beyond the scope of this article.<\/p>\n<p>Once this is done, we can write the code for printing the table.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">let result = data.flatMap(Object.keys);\nresult = [...new Set(result)];\n\ntables(\"data_table\",data,result,true)<\/code><\/pre>\n<\/div>\n<p>In the code above, result is the array of columns of our data, and &#8220;data_table&#8221; is the HTML Element ID for the table we are going to insert data into. The last argument is a flag for showing the top 5 rows, which we set to true.<\/p>\n<p>Here we see the result of our code:<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/05\/Head.png\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/05\/Head.png\" alt=\"\" width=\"486\" height=\"184\" class=\"aligncenter size-full wp-image-28294\" srcset=\"\/wp-content\/uploads\/2022\/05\/Head.png 486w, \/wp-content\/uploads\/2022\/05\/Head-300x114.png 300w\" sizes=\"(max-width: 486px) 100vw, 486px\" \/><\/a><\/p>\n<p>Now that we see the kind of data that we have, we would now want to look at a summary of different statistics related to all the numeric columns of our data. We can use the same helper function for the drawing the table to the HTML document, but we will need to write the code for getting all the summarized quantities. We will get the Minimum, Maximum, Deviation, Mean, Median and a Count of rows that are not null in the data. Fortunately D3.js provides functions for most of these, but we will have to create a helper function for the count of not null rows. We can simply write a for loop and increment a value if the row for that column is not null and return the value at the end.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">const countNotNull = (array) => {\n    let count = 0\n    for(let i = 0; i &lt; array.length; i++){\n        if(isNaN(parseInt(array[i]))==false && array[i]!==null){ count++ }}\n    return count\n};<\/code><\/pre>\n<\/div>\n<p>With that out of the way, we can write the for loop for getting the summary data of our dataset. We are going to use an HTML element with the ID &#8220;data_table2&#8221; to draw this table.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">let obj = {}\n\nlet summary_data = []\nfor(let i = 0; i &lt; result.length; i++){\n    \n    obj[result[i]]  = data.map(function(elem){return elem[result[i]]});\n    let count = 0\n    let summarize = {}\n\n    if(result[i]!='DATE'){\n        obj[result[i]] = obj[result[i]].map(Number)\n    }\n    summarize['Field'] = result[i]\n    summarize['Max'] = d3.max(obj[result[i]])\n    summarize['Min'] = d3.min(obj[result[i]])\n    summarize['Deviation'] = d3.deviation(obj[result[i]])\n    summarize['Mean'] = d3.mean(obj[result[i]])\n    summarize['Median'] = d3.median(obj[result[i]])\n    \n    summarize['Count Not Null'] = countNotNull(obj[result[i]])\n    \n    summary_data.push(summarize)\n}\nlet result2 = summary_data.flatMap(Object.keys)\nresult2 = [...new Set(result2)];\ntables(\"data_table2\",summary_data,result2,false)<\/code><\/pre>\n<\/div>\n<p>The result should be as follows:<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/05\/Summary.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/05\/Summary.png\" alt=\"\" width=\"716\" height=\"306\" class=\"aligncenter size-full wp-image-28290\" srcset=\"\/wp-content\/uploads\/2022\/05\/Summary.png 716w, \/wp-content\/uploads\/2022\/05\/Summary-300x128.png 300w, \/wp-content\/uploads\/2022\/05\/Summary-600x256.png 600w\" sizes=\"(max-width: 716px) 100vw, 716px\" \/><\/a><\/p>\n<p>Now, we would want to see the actual distributions for each of the columns in the data in the form of histogram and a box plot. Again for both plots we will need to write helper functions, which are provided in the source files. After writing those helper functions, we can call them directly in our main javascript file.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">## WindSpeed\nhistogram(\"my_dataviz\",obj['WIND'],'Average Wind Speed')\nboxplot(\"my_dataviz\",obj['WIND'],\"Wind Speed\")\n\n## Precipitation\nhistogram(\"my_dataviz2\",obj['RAIN'],'Precipitation (Rain)',\"orange\")\nboxplot(\"my_dataviz2\",obj['RAIN'],\"Precipitation (Rain)\",'brown')\n\n## Max Temperature\nhistogram(\"my_dataviz3\",obj['T.MAX'],'Max Temperature',\"green\")\nboxplot(\"my_dataviz3\",obj['T.MAX'],\"Max Temperature\",'yellow')\n\n## Min Temperature\nhistogram(\"my_dataviz4\",obj['T.MIN'],'Min Temperature',\"purple\")\nboxplot(\"my_dataviz4\",obj['T.MIN'],\"Min Temperature\",'pink')\n\n## Minimum Grass Temperature\nhistogram(\"my_dataviz5\",obj['T.MIN.G'],'Minimum Grass Temperature',\"cyan\")\nboxplot(\"my_dataviz5\",obj['T.MIN.G'],\"Minimum Grass Temperature\",'orange')\n\n## Indicator Variable\nhistogram(\"my_dataviz6\",obj['IND'],'Indicator')\n\n## Indicator Variable 1\nhistogram(\"my_dataviz7\",obj['IND.1'],'Indicator 1',\"orange\")\n\n## Indicator Variable 2\nhistogram(\"my_dataviz8\",obj['IND.2'],'Indicator 2',\"green\")<\/code><\/pre>\n<\/div>\n<p>In each of these plotting functions, the first argument is the ID of the html element in which we want to draw the plot, then the array of the column of the data we want to plot, then a title and a CSS-compatible color code. We can visualize the results by opening the html file from the web server.<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/05\/Hist1.png\"><img decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/05\/Hist1.png\" alt=\"\" width=\"1552\" height=\"642\" class=\"aligncenter size-full wp-image-28296\" srcset=\"\/wp-content\/uploads\/2022\/05\/Hist1.png 1552w, \/wp-content\/uploads\/2022\/05\/Hist1-300x124.png 300w, \/wp-content\/uploads\/2022\/05\/Hist1-1024x424.png 1024w, \/wp-content\/uploads\/2022\/05\/Hist1-768x318.png 768w, \/wp-content\/uploads\/2022\/05\/Hist1-1536x635.png 1536w, \/wp-content\/uploads\/2022\/05\/Hist1-600x248.png 600w\" sizes=\"(max-width: 1552px) 100vw, 1552px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/05\/Hist2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/05\/Hist2.png\" alt=\"\" width=\"1552\" height=\"642\" class=\"aligncenter size-full wp-image-28296\" \/><\/a><\/p>\n<p>We&#8217;ve had a look at plots for distributions, but since the data is a timeseries, we should also plot its columns against time to visualize the trends and patterns in the data. So now we are going to make a line plot of each of the variables in the dataset. The <code>lineplot()<\/code> function was written by us and is included in the source files.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">lineplot(\"my_dataviz9\",data,obj,'DATE','WIND','#4169e1')\nlineplot(\"my_dataviz9\",data,obj,'DATE','RAIN','#4169e1')\nlineplot(\"my_dataviz9\",data,obj,'DATE','T.MAX','#4169e1')\nlineplot(\"my_dataviz9\",data,obj,'DATE','T.MIN','#4169e1')\nlineplot(\"my_dataviz9\",data,obj,'DATE','T.MIN.G','#4169e1')<\/code><\/pre>\n<\/div>\n<p>And here are the results.<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/05\/LinePlots.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/05\/LinePlots.png\" alt=\"\" width=\"1606\" height=\"523\" class=\"aligncenter size-full wp-image-28288\" srcset=\"\/wp-content\/uploads\/2022\/05\/LinePlots.png 1606w, \/wp-content\/uploads\/2022\/05\/LinePlots-300x98.png 300w, \/wp-content\/uploads\/2022\/05\/LinePlots-1024x333.png 1024w, \/wp-content\/uploads\/2022\/05\/LinePlots-768x250.png 768w, \/wp-content\/uploads\/2022\/05\/LinePlots-1536x500.png 1536w, \/wp-content\/uploads\/2022\/05\/LinePlots-600x195.png 600w\" sizes=\"(max-width: 1606px) 100vw, 1606px\" \/><\/a><\/p>\n<p>We can see from the graphs that all variables have periodic pattern as expected from weather data and have averages just as shown by the histograms.<\/p>\n<p>Lastly, we can plot a correlation matrix to see which columns are correlated with each other, an important thing to look for when making predictions, as we would want to include variables in our model that are correlated with the target variable and exclude variables that are correlated to each other. A simple call to correllogram() function with the data as an argument will give us the correlation matrix. correllogram() comes from correl.js file which is provided in the source file.<\/p>\n<div class=\"clipboard\">\n<pre><code class=\"language-javascript\">correlogram(data)<\/code><\/pre>\n<\/div>\n<p>And here is what the correlation matrix looks like:<\/p>\n<p><a href=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/05\/correl.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/griddb.net\/wp-content\/uploads\/2022\/05\/correl.png\" alt=\"\" width=\"430\" height=\"477\" class=\"aligncenter size-full wp-image-28292\" srcset=\"\/wp-content\/uploads\/2022\/05\/correl.png 430w, \/wp-content\/uploads\/2022\/05\/correl-270x300.png 270w\" sizes=\"(max-width: 430px) 100vw, 430px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/github.com\/griddbnet\/Blogs\/tree\/main\/Visualization%20of%20Weather%20Data%20with%20D3.js%20and%20GridDB\"> Full source code for this article can be found here<\/a><\/p>\n<p>We can see from the correlation matrix that T.MIN and T.MIN.G are highly correlated with each other, while T.MIN and IND2 are the negatively correlated. While other variables mostly have near to zero correlation with each other, which is expected.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will be looking at how to visualize and analyze weather data using GridDB. We will be loading a dataset available as a CSV file into GridDB, then fetching the data from GridDB and performing data analysis on it. We will be using the Weather Dataset. Full source code for this article [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":28570,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[121],"tags":[],"class_list":["post-46712","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Visualization of Weather Data with D3.js and GridDB | GridDB: Open Source Time Series Database for IoT<\/title>\n<meta name=\"description\" content=\"In this article, we will be looking at how to visualize and analyze weather data using GridDB. We will be loading a dataset available as a CSV file into\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Visualization of Weather Data with D3.js and GridDB | GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"og:description\" content=\"In this article, we will be looking at how to visualize and analyze weather data using GridDB. We will be loading a dataset available as a CSV file into\" \/>\n<meta property=\"og:url\" content=\"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/\" \/>\n<meta property=\"og:site_name\" content=\"GridDB: Open Source Time Series Database for IoT\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/griddbcommunity\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-09T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-11-13T20:56:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.griddb.net\/wp-content\/uploads\/2022\/05\/road_1920x1289.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1289\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"griddb-admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:site\" content=\"@GridDBCommunity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"griddb-admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/\"},\"author\":{\"name\":\"griddb-admin\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\"},\"headline\":\"Visualization of Weather Data with D3.js and GridDB\",\"datePublished\":\"2022-07-09T07:00:00+00:00\",\"dateModified\":\"2025-11-13T20:56:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/\"},\"wordCount\":809,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2022\/05\/road_1920x1289.jpg\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/\",\"url\":\"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/\",\"name\":\"Visualization of Weather Data with D3.js and GridDB | GridDB: Open Source Time Series Database for IoT\",\"isPartOf\":{\"@id\":\"https:\/\/griddb.net\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/#primaryimage\"},\"thumbnailUrl\":\"\/wp-content\/uploads\/2022\/05\/road_1920x1289.jpg\",\"datePublished\":\"2022-07-09T07:00:00+00:00\",\"dateModified\":\"2025-11-13T20:56:06+00:00\",\"description\":\"In this article, we will be looking at how to visualize and analyze weather data using GridDB. We will be loading a dataset available as a CSV file into\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/#primaryimage\",\"url\":\"\/wp-content\/uploads\/2022\/05\/road_1920x1289.jpg\",\"contentUrl\":\"\/wp-content\/uploads\/2022\/05\/road_1920x1289.jpg\",\"width\":1920,\"height\":1289},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/griddb.net\/en\/#website\",\"url\":\"https:\/\/griddb.net\/en\/\",\"name\":\"GridDB: Open Source Time Series Database for IoT\",\"description\":\"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL\",\"publisher\":{\"@id\":\"https:\/\/griddb.net\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/griddb.net\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/griddb.net\/en\/#organization\",\"name\":\"Fixstars\",\"url\":\"https:\/\/griddb.net\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"contentUrl\":\"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png\",\"width\":200,\"height\":83,\"caption\":\"Fixstars\"},\"image\":{\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/griddbcommunity\/\",\"https:\/\/x.com\/GridDBCommunity\",\"https:\/\/www.linkedin.com\/company\/griddb-by-toshiba\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233\",\"name\":\"griddb-admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g\",\"caption\":\"griddb-admin\"},\"url\":\"https:\/\/www.griddb.net\/en\/author\/griddb-admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Visualization of Weather Data with D3.js and GridDB | GridDB: Open Source Time Series Database for IoT","description":"In this article, we will be looking at how to visualize and analyze weather data using GridDB. We will be loading a dataset available as a CSV file into","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/","og_locale":"en_US","og_type":"article","og_title":"Visualization of Weather Data with D3.js and GridDB | GridDB: Open Source Time Series Database for IoT","og_description":"In this article, we will be looking at how to visualize and analyze weather data using GridDB. We will be loading a dataset available as a CSV file into","og_url":"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/","og_site_name":"GridDB: Open Source Time Series Database for IoT","article_publisher":"https:\/\/www.facebook.com\/griddbcommunity\/","article_published_time":"2022-07-09T07:00:00+00:00","article_modified_time":"2025-11-13T20:56:06+00:00","og_image":[{"width":1920,"height":1289,"url":"https:\/\/www.griddb.net\/wp-content\/uploads\/2022\/05\/road_1920x1289.jpg","type":"image\/jpeg"}],"author":"griddb-admin","twitter_card":"summary_large_image","twitter_creator":"@GridDBCommunity","twitter_site":"@GridDBCommunity","twitter_misc":{"Written by":"griddb-admin","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/#article","isPartOf":{"@id":"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/"},"author":{"name":"griddb-admin","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233"},"headline":"Visualization of Weather Data with D3.js and GridDB","datePublished":"2022-07-09T07:00:00+00:00","dateModified":"2025-11-13T20:56:06+00:00","mainEntityOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/"},"wordCount":809,"commentCount":0,"publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2022\/05\/road_1920x1289.jpg","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/","url":"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/","name":"Visualization of Weather Data with D3.js and GridDB | GridDB: Open Source Time Series Database for IoT","isPartOf":{"@id":"https:\/\/griddb.net\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/#primaryimage"},"image":{"@id":"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/#primaryimage"},"thumbnailUrl":"\/wp-content\/uploads\/2022\/05\/road_1920x1289.jpg","datePublished":"2022-07-09T07:00:00+00:00","dateModified":"2025-11-13T20:56:06+00:00","description":"In this article, we will be looking at how to visualize and analyze weather data using GridDB. We will be loading a dataset available as a CSV file into","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/blog\/visualization-of-weather-data-with-d3-js-and-griddb\/#primaryimage","url":"\/wp-content\/uploads\/2022\/05\/road_1920x1289.jpg","contentUrl":"\/wp-content\/uploads\/2022\/05\/road_1920x1289.jpg","width":1920,"height":1289},{"@type":"WebSite","@id":"https:\/\/griddb.net\/en\/#website","url":"https:\/\/griddb.net\/en\/","name":"GridDB: Open Source Time Series Database for IoT","description":"GridDB is an open source time-series database with the performance of NoSQL and convenience of SQL","publisher":{"@id":"https:\/\/griddb.net\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/griddb.net\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/griddb.net\/en\/#organization","name":"Fixstars","url":"https:\/\/griddb.net\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/","url":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","contentUrl":"https:\/\/griddb.net\/wp-content\/uploads\/2019\/04\/fixstars_logo_web_tagline.png","width":200,"height":83,"caption":"Fixstars"},"image":{"@id":"https:\/\/griddb.net\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/griddbcommunity\/","https:\/\/x.com\/GridDBCommunity","https:\/\/www.linkedin.com\/company\/griddb-by-toshiba"]},{"@type":"Person","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/4fe914ca9576878e82f5e8dd3ba52233","name":"griddb-admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/griddb.net\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5bceca1cafc06886a7ba873e2f0a28011a1176c4dea59709f735b63ae30d0342?s=96&d=mm&r=g","caption":"griddb-admin"},"url":"https:\/\/www.griddb.net\/en\/author\/griddb-admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46712","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/comments?post=46712"}],"version-history":[{"count":1,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46712\/revisions"}],"predecessor-version":[{"id":51384,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/posts\/46712\/revisions\/51384"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/media\/28570"}],"wp:attachment":[{"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/media?parent=46712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/categories?post=46712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.griddb.net\/en\/wp-json\/wp\/v2\/tags?post=46712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}