Site updated at 2016-07-23 19:23:24 UTC

This commit is contained in:
Travis CI 2016-07-23 19:23:24 +00:00
parent 59e495db04
commit b3a5bee15a
125 changed files with 1766 additions and 1218 deletions

View file

@ -4,7 +4,7 @@
<title><![CDATA[Category: IoT-Data | Home Assistant]]></title>
<link href="https://home-assistant.io/blog/categories/iot-data/atom.xml" rel="self"/>
<link href="https://home-assistant.io/"/>
<updated>2016-07-23T16:06:39+00:00</updated>
<updated>2016-07-23T19:22:44+00:00</updated>
<id>https://home-assistant.io/</id>
<author>
<name><![CDATA[Paulus Schoutsen]]></name>
@ -13,6 +13,79 @@
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[IoT Data Exploration with Jupyter Notebooks]]></title>
<link href="https://home-assistant.io/blog/2016/07/23/internet-of-things-data-exploration-with-jupyter-notebooks/"/>
<updated>2016-07-23T18:00:00+00:00</updated>
<id>https://home-assistant.io/blog/2016/07/23/internet-of-things-data-exploration-with-jupyter-notebooks</id>
<content type="html"><![CDATA[<p><em>This is the first blog post by Anton Kireyeu. A new contributor to Home Assistant who will focus on exploring and visualizing Home Assistant data.</em></p>
<p>As we learned in the recent <a href="https://home-assistant.io/blog/2016/07/19/visualizing-your-iot-data/">blog post by Fabian</a>, all operational data of your Home Assistant application is stored locally and is available for exploration. Our first steps were querying data with the <a href="http://sqlitebrowser.org/">DB Browser for SQLite</a>, exporting the data extract as a CSV file and graphing in LibreOffice. But what else can be done with this data and what tools are there available?</p>
<p>This post will help you get set up using a few popular data scientist tools to allow you to locally process your data:</p>
<ul>
<li> <a href="http://pandas.pydata.org/">Pandas</a>: an open source tool for data analysis for Python</li>
<li> <a href="http://matplotlib.org/">matplotlib</a>: a Python plotting library</li>
<li> <a href="https://jupyter.org/">Jupyter notebook</a>: application for creation and sharing of documents containing live code, visualizations and explanatory text</li>
</ul>
<p class="img">
<img src="https://home-assistant.io/images/blog/2016-07-data-exploration/graph.png" />
One of the graphs created with this tutorial.
</p>
<p><em>TL; DR: Use <a href="http://nbviewer.jupyter.org/github/home-assistant/home-assistant-notebooks/blob/master/DataExploration-1/DataExploration-1.ipynb">this Jupyter Notebook</a> to visualize of your data</em></p>
<!--more-->
<h3><a class='title-link' name='dependencies' href='#dependencies'></a> Dependencies </h3>
<p>In order to run the provided Jupyter notebook, please make sure you have the following applications/libraries installed on your computer:</p>
<ul>
<li>Pandas</li>
<li>NumPy</li>
<li>Matplotlib</li>
<li>SQLAlchemy</li>
<li>Jupyter</li>
</ul>
<p>As a Windows user myself, I find the easiest, quickest and most hassle-free way of installing all of these dependencies is to use <a href="https://winpython.github.io/">WinPython</a>. This free open-source portable distribution includes all of the dependencies required for this notebook, as well as a few other essential Python libraries you may require for data exploration in the future.</p>
<h4><a class='title-link' name='why-jupyter' href='#why-jupyter'></a> Why Jupyter? </h4>
<p>While all Home Assistant implementations can have varying setup, components and scripts, the underlying data structure is standardized and well-defined. This allows us to write Python code that is environmentally agnostic. Wrapping it in a Jupyter notebook ensures the code, visualizations and directions/explanations are kept digestible and neatly-packaged. One of the amazing features of Jupyter is the ability to change code as you go along, customizing all outputs and visualizations on the fly!</p>
<h4><a class='title-link' name='where-do-i-start' href='#where-do-i-start'></a> Where do I start? </h4>
<p>This tutorial is based around a heavily commented Jupyter Notebook that we created. So to get started, you will have to open that:</p>
<ul>
<li><a href="http://nbviewer.jupyter.org/github/home-assistant/home-assistant-notebooks/blob/master/DataExploration-1/DataExploration-1.ipynb">download the tutorial Jupyter Notebook</a> (leads to preview page, from there click download top-right)</li>
<li>launch the Jupyter Notebook App</li>
<li>Click the upload button to add the downloaded notebook to Jupyter</li>
<li>Adjust the <code>DB_URL</code> at the beginning of the notebook to point at your Home Assistant database</li>
<li>Select in top menu: Cell -&gt; Run All</li>
</ul>
<p>Thats it! The included code will walk you through importing the required libraries, show running raw SQL against your local database, plotting basic data from the states table, and in the end output a few plots of changes for every entity in your system as well as the mean daily value for the past 20 days.</p>
<p>After just those few steps, you will be greeted with beautiful formatted data like this:</p>
<p class="img">
<img src="https://home-assistant.io/images/blog/2016-07-data-exploration/graph.png" />
One of the graphs created with this tutorial.
</p>
<h4><a class='title-link' name='whats-next' href='#whats-next'></a> Whats next? </h4>
<p>Thanks to the magic of Jupyter, all of the code is customizable: want to selectively display your data, only covering a specific entity? Sure thing! Want to change the properties of the plots? No problem!</p>
<p>While you learn and explore your IoT data, we will be working on providing more ready-to-use Jupyter Notebooks. Feel free to ask questions or provide suggestions. Would you like to see a specific visualization? Is there a particular facet of data youre interested in? Lets talk about it, lets dive into the world of data together!</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[Visualize your IoT data]]></title>
<link href="https://home-assistant.io/blog/2016/07/19/visualizing-your-iot-data/"/>

View file

@ -98,6 +98,40 @@
<h2>2016</h2>
<article>
<div class="grid">
<div class="grid__item one-fifth palm-one-whole">
<time datetime="2016-07-23T18:00:00+00:00" pubdate>
<span class='month'>Jul</span> <span class='day'>23</span>
</time>
</div>
<div class="grid__item four-fifths palm-one-whole">
<h1 class="gamma"><a href="/blog/2016/07/23/internet-of-things-data-exploration-with-jupyter-notebooks/">IoT Data Exploration with Jupyter Notebooks</a></h1>
<footer class="meta">
<span>
<i class="icon-tags"></i>
<ul class="tags unstyled">
<li><a class='category' href='/blog/categories/how-to/'>How-To</a></li>
<li><a class='category' href='/blog/categories/iot-data/'>IoT-Data</a></li>
</ul>
</span>
</footer>
<hr class="divider">
</div>
</div>
</article>
<article>
<div class="grid">
@ -197,6 +231,12 @@
<ul class="divided">
<li class="post">
<a href="/blog/2016/07/23/internet-of-things-data-exploration-with-jupyter-notebooks/">IoT Data Exploration with Jupyter Notebooks</a>
</li>
<li class="post">
<a href="/blog/2016/07/19/visualizing-your-iot-data/">Visualize your IoT data</a>
</li>
@ -220,12 +260,6 @@
</li>
<li class="post">
<a href="/blog/2016/06/23/usb-webcams-and-home-assistant/">Using USB webcams with Home Assistant</a>
</li>
</ul>
</section>