Skip to content

Instantly share code, notes, and snippets.

View rdmtinez's full-sized avatar

Ricardo Martinez rdmtinez

  • Bonn, Germany
View GitHub Profile
WPA1 = (4.093+(3.2113*(r/1000)))/(1-(0.009733*(r/1000))-(.01205*25))
# WPA2 has 3 equations conditional on risistance and according to
# https://www.kimberly.uidaho.edu/water/swm/Calibration_Watermark2.htm#_ftnref2
if (r >= 0 and r < 1000):
WPA2 = -20*((r/1000)*(1+.018*(25-T))-.55)
elif(r >=1000 and r < 8000):
WPA2 = (-3.213*(r/1000) - 4.093) / (1-.009733*(r/1000)-.01205*T)
// Ricardo Martinez
// Vinduino Sketch Re-write for WaterMark Sensor
#include <math.h>
#include <Time.h>
#include <Time.h>
#include <TimeLib.h>
const int analogInPin1 = A0; // rename Analog Pins
const int analogInPin2 = A1;
# coding: utf-8
# This uses DWD data (Temp, Humidity, Wind, Solar) to Calculate ETo
# Then compares it against the ETo given by DWD. The hope is to check
# whether the OwnData_ETo script is sufficiently good.
# In[122]:
import os
# coding: utf-8
# In[343]:
##the following will combine the datatables from DWD in Stuttgart, as
##it is the only station which collects Solar Radiation data for BW
##for the first iteration only the data from Bosch sensors in BW will
#import os
#import pandas as pd
#import datetime as dt
####you want to optimize the conversion and create a summary report####
def raw_converter_main(raw_dir, wrt_dir, wrt_massisve=False):
"""This function is designed to condense the raw csv files, made by the
'download_csv.py' function held by Christian Glunk and the Deepfiled
Connect team, into a more maneagable form"""
@rdmtinez
rdmtinez / distrib
Last active October 18, 2017 14:57
import os
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt, gridspec
from matplotlib.backends.backend_pdf import PdfPages
from collections import OrderedDict
from datetime import datetime, timedelta
@rdmtinez
rdmtinez / tempy
Last active October 16, 2017 15:01
BW
['1348458', '1351266', '1351816', '1352180',
'1353126', '1353308', '1353330', '1353332',
'1353340', '1353340', '1353346', '1353350',
'1348526', '1351816', '1350718', '1350718',
'1350658', '1406166', '1406166', '1406166',
'1406166', '1410410', '1413900', '1420666',
'1434353', '1351816', '1439896', '1439896',
'1406166']
@rdmtinez
rdmtinez / links
Last active October 20, 2017 06:30
import os
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt, gridspec
from matplotlib.backends.backend_pdf import PdfPages
from collections import OrderedDict
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
import os
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import plotly.plotly as py
import plotly.graph_objs as go
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"