Area under a curve

Discussion about generation of graphs and tables
Post Reply
gibsonmb
Posts: 12
Joined: Thu Apr 22, 2010 8:30 pm

Area under a curve

Post by gibsonmb » Thu Sep 23, 2010 9:07 pm

Ok, for the mathmatically clever people. In the following graph https://www.meteoplug.com/cgi-bin/meteo ... 021f09030e I think that the area under the daily curve could provide KwH if only I knew how to do that. Somewhere in the back of my mind words like 'integration' and differentiation lurk. Is there a way I can use my data that is called to draw these daily graphs to give a figure for KWh for the day?

skyewright
Posts: 69
Joined: Tue Mar 16, 2010 12:05 pm
Location: Isle of Skye
Contact:

Re: Area under a curve

Post by skyewright » Sat Sep 25, 2010 5:54 pm

gibsonmb wrote:Is there a way I can use my data that is called to draw these daily graphs to give a figure for KWh for the day?
Is it too simplistic to suggest making use of the day1 value?

The day1 val would give the average value for the day in watts per m2. Multiply that by 24 and you have the Wh for the whole day?

My CC128 measures watts.

I have a chart definition that produces a table giving power daily consumption using the above concept.

The row in the table that relates to "today" is of course wrong and it is only a partial day, but that is easily ignored.

This works for me. Maybe it might work for you too?

Code: Select all

timeframe=7D
res=day1
zoom=7D

gtitle=Electricity        # name of graph
gheight=400       # height in pixels of graph
gwidth=550         # width in pixels of graph
gtype=table                    # type of graph
glunit=Date
#grunit=%F # Equivalent to %Y-%m-%d
grunit=%m-%d
gtrim=0              
gtablestyle=style="border:1px_#000000_solid"
gtdheadstyle=style="border:1px_#000000_solid"
gtdstyle=style="border:1px_#000000_solid"


sid0=data16 sname0=Stg ssel0=val sfactor0=0.024 sprec0=2
sid1=data17 sname1=Water ssel1=val sfactor1=0.024 sprec1=2
sid2=data18 sname2=24Hr ssel2=val sfactor2=0.024 sprec2=2
sid3=data11 sname3=Dom ssel3=val sfactor3=0.024 sprec3=2
David

Post Reply