User Tools

Site Tools


vatt:logging

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
vatt:logging [2018/03/26 15:46]
scott created
vatt:logging [2019/05/28 18:06] (current)
scott
Line 1: Line 1:
 +====== This page has been deprecated and is no longer accurate  ======
 +
 ====== VATT Logging  ====== ====== VATT Logging  ======
  
Line 9: Line 11:
 Through the previously mentioned web app there is a url API of sorts that can be used to access data programmatically.  Through the previously mentioned web app there is a url API of sorts that can be used to access data programmatically. 
  
 +The program below will retrieve data from each currently available table for the last 1200 minutes. 
 +
 +<code python>
 +#!/usr/bin/python
 +
 +
 +import pandas as pd
 +
 +minsago = 1200
 +
 +datafames = dict()
 +
 +for table in ['temps', 'telem', 'ngtelem', 'ivps' ]:
 +    url = "http://vatt.as.arizona.edu:42180/recent/data/{}.csv?minsago={}".format( table, minsago )
 +    print("retreiving data from: \n\t\t{}".format(url))
 +    dataframe[table].plot(subplots=True)
 +    try:
 +        dataframe[table]=pd.read_csv(url)
 +        print(dataframe[table])
 +        #uncomment the below line if you have matplotlib or pylab. 
 +        #dataframe[table].plot(subplots=True)
 +    except Exception as err:
 +        print err
  
 +    print()
 +    print()
  
 +</code>
vatt/logging.1522104382.txt.gz · Last modified: 2018/03/26 15:46 by scott