Skip to content

Instantly share code, notes, and snippets.

@renexdev
Last active August 29, 2016 14:51
Show Gist options
  • Save renexdev/027993c44bda60ce079594928ef2bee2 to your computer and use it in GitHub Desktop.
Save renexdev/027993c44bda60ce079594928ef2bee2 to your computer and use it in GitHub Desktop.
Os NodeSensor Data Access - DataTime filter added!
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 65,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"08/26/16 12:01 AM\n",
"08/29/16 11:48 AM\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAEkCAYAAADKE0EUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt8XVWd9/HPLyk0YGlDikCLCk2qAuMovcDAC8VIbzh1\nfI30Qh30YUbaUrEtM/MYegGGKnQoZMaxLSg0nUcdZwYphfFxjNK0xRB0qEJaBtHxwSbtIJcOkF6g\nSApJf88fa5/k5PQkTdOcs8/l+369zqtnr7332b9sDr+9zlprr23ujoiIFKaSuAMQEZHMUZIXESlg\nSvIiIgVMSV5EpIApyYuIFDAleRGRAjYk7gCk+JjZPGApMAbYCOwFKoFWYIm7H+jHZ4wBcPddgxDP\neGBVdPwKYAtQ6e5Lj/ezB5OZzQRmE85XBfCku9emrJ8IlEfr5/XnXEphM42TlzhEif4+dy9JKtsA\njHf3sf3Y/0agxd0fGoRYnnL3iUnLDdFnf/F4P3uwRAl8VfK5MbN7gQp3n21mlcCN7r4gaV2lu0+N\nJ2LJFWqukbhYmrIlQKWZzehzR7NyQo32+IMIybEyTRzp4otF9PduAG5MWbUEmGlmk4DxwGwzOyda\n10qo1UuRU3ON5Ax332VmAJOBh6LaegUhCZcn1UpnR2VXmdmFiWYVM5tPSHYVwAOJWr6Z3QfsIzRj\nkKjtRu9bzQwz2wvcAWxx9x1mdmdim6gWPZmkJpLo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IDKYRhEcPVgGT3X2B\nmTUTnjQEMF6310u+U01eitn2KIlbUtmGxBsleCkEuhlKip6ZjQe2uHtFUtl84F53L0m8B9YRHkG3\nJdpsMnCfu9dF+9wH7ASq3H1BNv8Gkd4oyUvRS5fko/K9iTIzO0xo2tlFmOO8kvALYLO7j40uBOOj\nJp9VQEsi+YvESW3yIv3k7k8DmBnuvtvMypNWTwBONbMawnzoqj1JTlCSFzl2+9OUJZppagHMbFx2\nQxJJT0leilqUjJcCI8zsDndfFpVPjsrmEpK6R0MrT4vKLye0z48xs8vdvTYainlvtP0dsfxBIinU\nJi8iUsA0hFJEpIApyYuIFDAleRGRAqYkLyJSwJTkRUQKmJK8iEgBU5IXESlg/x+VT4NnamFgfQAA\nAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x7f5c0c09b750>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f5c0c0e57d0>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#!/usr/bin/env python\n",
"\n",
"##################################################################################\n",
"# Acceder datos nodo\n",
"# rel. date: 08/16\n",
"# Dr. Rene Cejas Bolecek\n",
"# Low Temperatures Laboratory, CAB, Argentina.\n",
"# email: [email protected]\n",
"# licence: MIT. http://opensource.org/licenses/MIT \n",
"##################################################################################\n",
"from __future__ import print_function\n",
"from ipywidgets import interact, interactive, fixed\n",
"from __future__ import print_function\n",
"import ipywidgets as widgets\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib.dates as md\n",
"from datetime import datetime\n",
"import json\n",
"import urllib2\n",
"%matplotlib inline\n",
"hostIP = '10.73.21.101'\n",
"nodeId ='8Nw5Tfx6KK7lBaA'\n",
"sensorId = ['nivelO2','T','estadoAlarma','VAD590','VOut','Vref']\n",
"#response = urllib2.urlopen('http://'+hostIP+':9000/listvals?code='+nodeId+'&type='+sensorId[1])\n",
"#data = json.load(response)\n",
"#print(data)\n",
"def plot(sensor,day,month,year):\n",
" response = urllib2.urlopen('http://'+hostIP+':9000/listvals?code='+nodeId+'&type='+sensorId[sensor])\n",
" data = json.load(response)\n",
" timeStamp = []\n",
" meas = []\n",
" for i in range(len(data)):\n",
" timeStamp.append(data[i]['created_at'])\n",
" meas.append(data[i]['amount'])\n",
" format = '%m/%d/%y %I:%M %p'\n",
" my_date = []\n",
" for i in range(len(timeStamp)):\n",
" my_date.append(datetime.strptime(timeStamp[i], format))\n",
"\n",
"\n",
" plt.subplots_adjust(bottom=0.2)\n",
" plt.xticks( rotation=25 )\n",
" ax=plt.gca()\n",
" xfmt = md.DateFormatter('%m/%d/%y %I:%M %p')\n",
" minDate = str(\"%.2d\"%month)+\"/\"+str(\"%.2d\"%day)+\"/\"+str(\"%.2d\"%year)+\" 12:01 AM\"\n",
" print(minDate)\n",
" #'1/1/16 00:00 AM' does not match format '%m/%d/%y %I:%M %p'\n",
" #8/11/16 12:51 PM\n",
" current_time =datetime.strftime(datetime.now(),'%m/%d/%y %I:%M %p')\n",
" print( current_time)\n",
" xMin = datetime.strptime(minDate, format)\n",
" current_time =datetime.strptime(current_time, format)\n",
" ax.xaxis.set_major_formatter(xfmt)\n",
" fontSize = 10\n",
" plt.rc('text', usetex=True)\n",
" plt.rc('font', family='serif')\n",
"\n",
" titleStr = 'Datos Sensor O2'\n",
" plt.title(titleStr)\n",
" ax.set_ylabel(sensorId[sensor],fontsize=fontSize)\n",
"\n",
" ax.set_xlabel(r'Time',fontsize=fontSize)\n",
" ax.set_xlim([xMin,current_time])\n",
" #ax.set_xlim(xmin=xMin)\n",
" plt.plot(my_date,meas,\"-o\", label = \"Criogenicos\")\n",
" ax.legend( loc=\"best\", numpoints = 1,fontsize=fontSize)\n",
" plt.show()\n",
" return ax\n",
"interact(plot, sensor=widgets.IntSlider(min=0,max=5,step=1,value=1),day=widgets.IntSlider(min=1,max=31,step=1,value=1),month=widgets.IntSlider(min=8,max=12,step=1,value=8),year=fixed(16));\n",
" #sensor=widgets.IntSlider(min=0,max=5,step=1,value=1)\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
},
"widgets": {
"state": {
"6c9a769a0bf64f389ae16d9fef469fe0": {
"views": [
{
"cell_index": 0
}
]
}
},
"version": "1.2.0"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment