Define Chart

From meteoplug
Revision as of 16:38, 9 February 2020 by Admin (Talk | contribs) (Created page with "Generating graphs and displays in Meteoplug is probably one of the most exciting things as it gives you a lot of freedom to present your weather data. Meteoplug makes use of [...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Generating graphs and displays in Meteoplug is probably one of the most exciting things as it gives you a lot of freedom to present your weather data. Meteoplug makes use of amcharts for interactive graphing and fusionwidgets for live displays with meters and gauges. Both are based on recent Flash technology. In addition to that a classical graphing based on gnuplot can also be used for line graphs. This section explains what kind of charts you can make use of an how to configure these. We differentate between graphs, which show the development of weather condition over a choosen period of time, and displays, which show near real-time weather conditions. As these two types do have different requirements, they are handled in separate sections.

Definition of a Graph or Display

When you enter Meteoplug's "Define Chart" page you see an empty page you can put your graphing or display commands into.

Mp-define-chart.png

When you want to edit an existing chart or display, you can select one from the drop-down menu at the top. There are a couple of predefined charts. These are listed beginning with an underscore "_".

When you want to store a chart definition you have to enter a name for your chart next to "Save as" button. When you press "Save as" chart definition will be stored. If a chart definition with this name already exists it will be overwritten without warning. Saved charts will be added to the ones in the drop-down list. This allows you to build your personal library of definitions over time. Chart names should not include spaces or special characters and they cannot start with an underscore "_", because chart names starting with underscores are reserved for predefined charts. Predefined charts cannot be deleted or altered.

When you want to test a loaded chart definition, simply press "Display" button. A separate Window will pop-up and will show your chart. If the chart definition is wrong, an error message will appear instead. Please make sure that your browser doesn't block pop-ups from "www.meteoplug.com". JavaScript and FLASH also need to be enabled in your browser.

To delete a saved chart definition select the cart in the drop-down list and press "Delete". A warning will appear asking you if you really want to delete. Press "OK" to make the delete happen. When you abort, nothing will be deleted.

Graphing Language

Graphing language used in Meteoplug is derived from a subset of amcharts options. It can be easily used and provides quite some capabilities to adapt graphs to your needs. Chart commands are represented as name-value pairs separated by "=". No spaces are allowed between name, "=" and value. Name-value pairs are separated by white space characters (blanks and/or new lines). As a result you can place each name value pair into a new line or you can define multiple name-value pairs in one line separated by white spaces.

When value should include a space character (might be useful for sensor names), you have to use underscore "_" instead of space. Underscores will be converted back to spaces when being displayed. When you need a underscore "_" not to be converted into space, type two underscores "__", which will be converted to one underscore "_". If you need a line feed character in the string, use vertical bar character "|" instead.

You can add comments to the chart definition. When Meteoplug hits a "#" when it expects a new name value pair, then rest of current line will be skipped and not evaluated. This allows you to type any text you like after comment character "#". As you can see, example below makes heavy use of commenting.

When you specify numbers the decimal separator is "." regardless what language you might have selected.

Graphing Example

Before graphing language is explained in detail, you might have a look at chart definition below as an example. This chart defines a graph that displays monthly rainfall and number of days with rain per month for the last 3 years (including actual year). Rainfall is displayed as blue bars, number of days with rain is displayed as a smoothed red line.

Mp-chartxxx-rain1year.png

Applied to my rain data the result looks like displayed above. It is a snapshot where the interactive cursor points to November 2009. To give a idea how graphing in Meteoplug does work, I will try to explain this graph definition, line by line.

Chart commands:

  • timeframe=3Y tells Meteoplug that time frame to use is last threes years (including actual year)
  • zoom=1Y sets display mode when initially showing the graph to 1 year. By pressing another zoom button or moving the scroller this can be changed interactively when graph is displayed.
  • res=month1 sets resolution of data to one month. Meteoplug provides data at various time resolutions you can choose from.

Graph commands:

  • gtitle=Rain sets the title "Rain" to the top left of the graph.
  • gheight=400 defines height of graph to be 400 pixel.
  • gwidth=550 defines width of graph to be 550 pixel.
  • glunit=mm defines unit for left y-axis to be "mm".
  • grunit=days defines unit of right y-axis to be "days".
  • gtype=step defines standard display type of graph to be a stepped line.
  • gtrim=1 defines that left and right end of time frame to be adapted to existing data. As data for 2010 is just covering January and February, graph does strip empty months of 2010 from graph.

Sensor commands:

  • sid0=rain0 scolor0=AADDFF sfill0=50 sline0=100 sname0=rain_fall ssel0=total selects sensor "rain0" for display. Data field to be displayed is "total", which represents total rain fall. color of graph is "AADDFF" (light blue), line has 100% color coverage, fill area has just 50% color coverage, name of sensor is "rain fall".
  • sid1=rain0 ssmooth1=1 stype1=line syaxis1=r sname1=days_with_rain ssel1=days selects sensor "rain0" for display. Data field to be displayed is "days", which represents number of days with rain fall, graph type is "line" with attribute "smoothed", sensor is measured on right y-axis, name of sensor is "days with rain".

Chart Settings

A chart definition should start with settings that are valid for all graphs in the chart and all sensors in the chart's graphs. Meteoplug provides these name-value pairs to define chart settings

Name Mandatory [Applicable] Value Default Explanation Example
timeframe yes [LJRTCGED] see section "time ranges" none defines start and end time to be considered. This parameter can be overwritten by an URL parameter in same notation to allow change of time frame when displaying the graph. timeframe=1Y (actual year)
timeframe=-1D (yesterday)
timeframe=20091201000000
-20091231235959 (December 2009)
res no [LJRTCGED] see section "time resolution" depends on timeframe defines resolution of data to be taken for graphing. This can be overwritten by an URL parameter called "resolution". res=month1 (monthly data)
res=min5 (data from 5 minute buckets)
res=hour1 (hourly data)
zoom no [LJM] see section "chart zoom" or "maps" depends on timeframe defines initial subset of data (or map) to be displayed. zoom=1D (current day)
zoom=YTD (data since beginning of year until now)
zoom=MAX (all data of selected time range)
zoom=4 (show about one continent on map)
monlist, monlistlong no [LJ] list of 12 month names separated by ",". monlistlong can provide full month names instead of abbreviations (JS only) jan,feb,mar, apr,may,jun, jul,aug,sep, oct,nov,dec defines strings to be taken for display of months monlist=jan,feb,mar,api,jun, jul,aug,sep,okt,nov,dez
daylist, daylistlong no [LJ] list of 7 day names separated by ",". daylistlong can provide full day names instead of abbreviations (JS only) sun,mon,tue, wed,thu,fri,sat defines strings to be taken for display of day names daylist=so,mo,di,mi,do,fr,sa
dirlist no [TRX] list of 16 compass direction names separated by "," N,NNE,NE,ENE, E,ESE,SE,SSE, S,SSW,SW,WSW, W,WNW,W,NNW defines strings to be taken for display of compass directions dirlist=N,NNO,NO,ONO,
O,OSO,SO,SSW,S,SSW,
SW,WSW,W,WNW,W,NNW
phasetextlist no [TX] list names of 8 lunar phases separated by "," New_Moon, Waxing_Crescent, First_Quarter, Waxing_Gibbous, Full_Moon, Waning_Gibbous, Last_Quarter, Waning_Cresent defines strings to be taken for display of lunar phases phasetextlist=1/8,2/8,3/8,4/8,
5/8,6/8,7/8,8/8
phaseiconlist no [TX] list URLs for display of lunar phases separated by "," mp0.png, mp1.txt, ... defines URLs to be taken for display of lunar phase icons phaseiconlist=
http://www.meteoplug.com/mp0.png,...
fctextlist no [TX] list names of 9 forecast situations, separated by "," Rainy, Cloudy, Half Cloudy, Sunny, Snowy, Half-Cloudy Night, Clear Night, Light Rainy, Light Snowy defines strings to be taken for display of forecast values fctextlist=Regen, Bewölkung, leichte_Bewölkung, Sonne,Schnee, leicht_bewölkte_Nacht, klare_Nacht,l eichter_Regen, leichter_Schneefall
fciconlist no [TX] list URLs for display of 9 forecast situations, separated by "," fc0.png, fc1.txt, ... defines URLs to be taken for display of forecast icons fciconlist=
http://www.meteoplug.com/fc0.png,...
periodm, periodh, periodD, periodM, periodY no [LJ] date format string for x-axis depending on time scale see examples provides a format template for time scales: minutes (m), hours (h), days (D), months (M), years (Y) as outlined here (flash) and here (JS) periodm=J:NN\nEEE_DD.MM. (standard for JS), periodm=hh:mm\nWW_DD.MM. (standard for flash)
legendm, legendh, legendD, legendW, legendM, legendY no [L] date format string for legend depending on time scale see examples provides a format template for time scales: minutes (m), hours (h), days (D), weeks (W), months (M), years (Y) as outlined here (flash) and here (JS) legendh=YYYY-MM-DD_hh:mm (standard for flash)
legendpos no [LJ] top, left, right top defines position of legend relative to graphs legendpos=left (legend is positioned at left side of graph and organized vertically)
legendwidth no [LJ] positive number of pixels unknown defines width of legend in pixels. Needed when legendpos is left or right. Specifies size of value display in legend when used with JS legendwidth=100
decimalsep no [LJ] character used for separating decimals "." (point) Defines character to be used to separate decimals decimalsep=, (comma)
thousandsep no [LJ] character used for separating thousands " " (blank) Defines character to be used to separate thousands thousandsep=_ (blank)
xymode no [D] specifies distribution chart 0 (no distribution chart) Sets chart mode to type "distribution" where x-axis is not time axis but shows distribution of weather data. Number specifies how many buckets should be used. xymode=20 (sets distribution chart, 20 buckets to use)
xstart no [D] specifies first value to start with 0.0 Sets starting point for value iteration of distribution chart. xstart=0.0 (sets lower bound of first buckets to 0.0, xfactor and xoffset are not applied here)
xinc no [D] specifies increment value to separate buckets 1.0 Increment value used for computation of lower bound of next bucket. Upper bound is lower bound of next bucket. xinc=1.0 (sets bucket size and increment between buckets to 1.0, xoffset and xfactor are not applied here)
xoffset no [D] specifies offset to be applied to bucket value. 0.0 Offset value used when displaying bucket ranges. This can be used to make a distribution graph that lists temperature durations segmented by °F instead of °C. xoffset=0.0 (sets bucket value offset to zero)
xfactor no [D] specifies factor to be applied to bucket value. 1.0 Factor used when displaying bucket ranges. This can be used to make a Weibull wind speed distribution graph that lists wind speed durations segmented by mp/h instead of m/s. xfactor=3.6 (Converts bucket values on x-axis from m/s to km/h)
restrictip no [LJRTCGEXD] WAN IP of requesting computer none restricts access to the chart to a certain requesting IP. When requesting IP does not match an error is displayed. restrictip=81.123.23.77 (restricts access to given IP)
periodselector no [LJM] defines if period selector below scroll bar should be displayed 1 (yes) This allows to make interactive chart a less bit high, by stripping off the period selector at the bottom. periodselector=0 (don't use period selector)
scrollerselector no [LJM] defines if scroller below graphs should be displayed 1 (yes) This allows to make interactive chart a less bit high, by stripping off the acroller at the bottom. In JavaScript charts this also controls if chart can be panned (scrollerselector=0) or zoomed (scrollerselector=1) with the cursor. scrollerselector=0 (don't use scroller)
textcolor no
[LJRCD]
string black Specifies text color in RGB style textcolor=#0000FF (blue)
gridcolor no
[LJRCD]
string black Defines color of grid lines in a chart's graph in RGB style ggridcolor=#FF0000 (red)
gridalpha no
[LJRCD]
0-100 15 (dark gray) Defines intensity of grid lines in a chart's graphs ggridalpha=100 (no transparency)
bgcolor no
[LJRCD]
string white Specifies background color in RGB style bgcolor=#0000FF (blue)
bgalpha no
[LJRCD]
0-100 100 Specifies intensity (alpha) of background color in percent bgalpha=50 (50% intensity)
title no
[LJTRCD]
string (blank chars replaced with "_") "Meteoplug_Chart" Defines HTML title of the chart title=temp_of_today
engine no
[LJGT]
"flash", "javascript", "gnuplot" "flash" Selects which charting engine to be used. Default is flash, but you can also use javascript and gnuplot engine=javascript

Letter in brackets indicate applicability: [L] = flash line or bar graphs; [J] = JavaSrcipt line or bar graphs; [T] = HTML tables; [R] = radar charts; [C] = color maps; [G] = GPline/step/bar/needle/point; [E] = csv export; [X] = template replacement; [D] = distribution chart; [M] = map

Time Ranges

Meteoplug supports absolute and relative time ranges. Notations are as follows:

  • "YYYYMMDDhhmmss-YYYYMMDDhhmmss" defines a absolute range in time defined by a starting point and a end point, which are in a notation where year is given by 4 digits (YYYY), followed by a 2-digit month (MM), a 2-digit day (DD), a 2-digit hour (hh), a 2-digit minute (mm) and a 2-digit second (ss). Timestamps that exactly match a starting or end point are part of the time range.
  • An integer number followed by a alpha character defines a relative range in time. Examples assume that current time is 20100130175213 (2010-01-30 17:52:13).
    • "xs" sets starting point x seconds in the past and end point to actual time (example: "60s" is mapped to 20100130175113-20100130175213).
    • "xm" sets starting point x minutes in the past. End point is set to actual time (example: "5m" is mapped to 20100130174713-20100130175213).
    • "xh" sets starting point x hours in the past. End point is set to actual time (example: "3h" is mapped to 20100130145213-20100130175213).
    • "xH" sets starting point to the beginning of the hour, x-1 hours ago. End point is set to end of current hour (example: "3H" is mapped to 20100130150000-20100130175959).
    • "xd" sets starting point x days in the past. End point is set to actual time (example: "3d" is mapped to 20100127175213-20100130175213).
    • "xD" sets starting point to the beginning of the day, x-1 days ago. End point is set to end of current day (example: "3D" is mapped to 20100128000000-20100130235959).
    • "xWy" sets starting point to the beginning of the week, x-1 weeks ago. y controls what days is first day of week (0=Sun, 1=Mon, 2=Tue, 3=Wed, 4=Thu, 5=Fri, 6=Sat). End point is set to end of current week (example: "3W1" is mapped to 20100111000000-20100131235959).
    • "xM" sets starting point to the beginning of the month, x-1 months ago. End point is set to end of current month (example: "3M" is mapped to 20091101000000-20100131235959).
    • "xY" sets starting point to the beginning of the year, x-1 years ago. End point is set to end of current year (example: "1Y" is mapped to 20100101000000-20101231235959).
  • When relative time ranges are preceded by a minus sign ("-"), end point for capital letter operations (H, D, M, Y) is set to end of previous hour, day, month or year (depending on choosen operation).

Time Resolution

Meteoplug supports good details for graphing. If no resolution is specified Meteoplug will compute a suitable resolution for given time frame without grabbing too much data which will overcrowd graphs and will explode loading times. While Meteoplug's computation of resolution is probably fine for many graphing purposes, there are situations where you want control level of detail. When you are planing to make a graph that displays rain fall per day, time resolution should be a day, as you are looking for exactly that data. In situations like this, a explicit resolution definition will be necessary. Meteoplug will not allow to select a resolution that forces a too big amount of data and will automatically switch to be lower resolution for sake of load time.

Defined resolutions are:

  • min5 (data assigned to 5 minute buckets)
  • min10 (data assigned to 10 minute buckets)
  • min30 (data assigned to 30 minute buckets)
  • hour1 (data assigned to hourly buckets)
  • hour6 (data assigned to 6 hour buckets)
  • day1 (data assigned to days)
  • month1 (data assigned to months)
  • year1 (data assigned to years)
  • alltime (all data assigned to just one bucket, useful to select all time min/max/average values)

Chart Zoom

When chart is displayed it starts with an initial zoom setting you can control. Available zoom settings are:

  • 1D (last day of selected time range)
  • 10D (last 10 days of selected time range)
  • 1M (last month of selected time range)
  • 3M (last 3 months of selected time range)
  • 1Y (last 12 months of selected time range)
  • YTD (last year of selected time range)
  • MAX (complete time range)

Graph Settings

A Meteoplug chart can be made out of several graphs. At the moment Meteoplug just supports one graph per chart. Graph settings are always starting with a "g". These settings are valid for graphs:

Name Mandatory [Applicable] Value Default Explanation Example
gtitle yes
[LJTRCGEM]
string (blank chars replaced with "_") none Defines title to be displayed in graph's legend. gtitle=Todays_Outdoor_Temperature
gtype yes
[LJTRCGEDM]
see section "graph types" none Defines overall type of graph. Setting can be overwritten by a sensor definition. Once a charting engine is selected (by graph type name or engine tag) only graph types of that charting engine can be used. gtype=line (line chart)
gtype=bar (chart with bars)
gfont no
[LJRCG]
string arial (gnuplot), Tahoma (flash), Verdana (javascript) Defines font to use for display of numbers and text gfont=cour (select Courier as font, valid for gpline)
gfontsize no
[LJRCG]
number 9 (gpline), 11 (other) Defines font size to use for display of numbers and text gfontsize=12 (selects 12pt font)
ggridcolor no
[LJRCD]
string black Defines color of grid lines in graph in RGB style, overrides gridcolor defined on chart level ggridcolor=#FF0000 (red)
ggridalpha no
[LJRCD]
0-100 15 (dark gray) Defines intensity of grid lines in graph, overrides gridalpha defined on chart level ggridalpha=100 (no transparency)
glunit no
[LJTRCGED]
string empty string Defines what physical unit should be added to the right of numbers of left y-axis. When set to "none", left y-axis is not displayed. Has special meaning as header of first column in table mode and as delimiter string in export mode. Is added to values when displayed as balloon in color map mode. glunit=°C (unit is defined as degrees Celsius)
glmin no
[LJRCGD]
number none Defines minimum value to be displayed on left y-axis. Specifies minimum value to be expected in chart and maps this value (and values below) to color defined in "grmin" when used in color map mode. glmin=-0.5
glmax no
[LJRCGD]
number none Defines maximum value to be displayed on left y-axis. Specifies maximum value to be expected in chart and maps this value (and values above) to color defined in "grmax" when used in color map mode. glmax=40
grunit no
[LJTCGED]
string empty string Defines what physical unit should be added to the right of numbers of right y-axis. When set to "none", righty-axis is not displayed. Has special meaning (format string for time stamps) in table and export mode. In color map mode it specifies a color (in 6-digit hex RGB) used for map positions where no data is present. Defines format string for x-value in distribution charts. grunit=hPa (unit is defined as hecto pascal)
grunit=#EEEEEE (defines a light grey for missing data in color map mode)
grmin no
[LJCG]
number none Defines minimum value to be displayed on right y-axis. Defines color for minimum value (as defined in "glmin") in 6-digit hex RGB. grmin=-0.5
gr=#0022FF (defines a strong blue as color for minimum values in color map mode)
grmax no
[LJCGD]
number none Defines maximum value to be displayed on right y-axis. Defines color for minimum value (as defined in "glmin") in 6-digit hex RGB. grmax=40
gr=#FF0000 (defines red as color for maximum values in color map mode)
gtrim no
[LJTRCGE]
number 1 Specifies if time range should be trimmed to available data in the time range. In distribution mode setting trim will purge all buckets with zero count. gtrim=1 (trimming is on)
gbgcolor no
[LJRCD]
string white Specifies background color in RGB style, overrides background color defined on chart level gbgcolor=#0000FF (blue)
gbgalpha no
[LJRCD]
0-100 100 Specifies intensity (alpha) of background color in percent, overrides background color intensity defined on chart level gbgalpha=50 (50% intensity)
gnightcolor no
[J]
string values defined for "gbgcolor" Specifies background color of chart between sunset and sunrise in RGB style. gnightcolor=#000077 (dark blue)
gnightalpha no
[J]
0-100 100 (when gnightcolor defined, else 0 Specifies intensity (alpha) of nightcolor overlay in percent. gnightalpha=10 (10% intensity)
gscroller no
[LJ]
number 0 Specifies sensor to be used for display as timeline scroller. gscroller=1 (takes data from sensor 1 for display of scroller)
gcolwidth no
[LD]
number 0-100 depends on graph type Specifies width of bars and needles in percent. gcolwidth=50 (bars and spaces between bars are of equal size)
gheight no
[LJTRCGDM]
number 400 Specifies height of graph. gheight=450 (graph is 450 pixel high)
gwidth no
[LJTRCGDM]
number 600 Specifies width of graph. In color map mode width will be adapted to graph size. gwidth=550 (graph is 550 pixel wide)
gtablestyle no
[TD]
string empty string Specifies style information for HTML tables. gtablestyle=style="background-color:#fafafa;" (sets table background color to a light grey)
gtrheadstyle no
[TD]
string empty string Specifies style information for HTML table head rows. gtrheadstyle=style="font-family:Verdana;font-weight:bold;" (sets font for table head line row as Verdana bold)
gtdheadstyle no
[TD]
string empty string Specifies style information for HTML table heads cells. gtdheadstyle=style="font-size:12px;" (sets font size for table head line cells to 12px)
gtrstyle n
[TD]o
string empty string Specifies style information for HTML table rows. gtrstyle=style="font-family:Verdana;font-weight:bold;" (sets font for table rows as Verdana bold)
gtdstyle no
[TD]
string empty string Specifies style information for HTML table cells. gtdstyle=style="font-size:12px;" (sets font size for table cells to 12px)
ggpformat no
[G]
string empty string Specifies additional format information for "gpline" graphs. Linefeed is represented as "|", "_" stands for blank character and "__" is converted to a single "_". ggpformat=set_locale_"de__DE" (sets date format to German)

Use with: [L] = line/step/bar graphs; [J] = javascript graphs; [T] = HTML tables; [R] = radar charts; [C] = color maps; [G] = GPline/GPstep/GPbar/GPneedle/GPpoint; [E] = cvs export; [D] = distribution chart; [M] = map

Graph Types

Meteoplug supports different types of graphs. Letters in brackets do indicate which charting engine does support this type of graph: [F] = flash, [J] = javascript, [G] = gnuplot

Interactive Graphs
  • Line [FJG]: Interactive line graph where all data point are connected by a straight line. Gaps in data ore omitted, no lines are drawn to fill gaps.
  • Minmax [FJ]: Interactive bar graph where top and bottom of bar represent a minimum and maximum value.
  • Step [FJG]: Interactive line graph were connection of data points is done by vertical steps. Gaps in data are omitted, no lines are drawn to fill gaps.
  • Bar [FJG]: Interactive bar graph
  • Needle [FJG]: Interactive needle graph, width of needles is controlled by "swidth" setting.
  • Radar [F]: Interactive radar chart
  • Radar% [F]: Interactive radar chart that shows percentual distribution of values
  • Colormap [FJ]: Interactive two dimensional representation, where columns represent days, rows represent hour of day and color represents values of sensor. In color map mode these settings have a special meaning:
    • glmin defines lower boundary of values expected. Values less or equal "glmin" will be displayed with color defined by "grmin".
    • glmax defines upper boundary of values expected. Values greater or equal "glmax" will be displayed with color defined by "grmax".
    • glmin defines lower boundary color as 6-digit hex RGB value.
    • glmax defines upper boundary color as 6-digit hex RGB value. Depending on distance of a value to "glim" and "glmax" a color will be picked from line in HSV color space between colors "glmin" and "glmax".
    • grunit defines 6-digit hex RGB value for points in time where no data available.
    • res can be any valid specifier between "min5" and "day1". In most cases "hour1" will be suitable as it decomposes values of a day into a column with 24 stacked colors, each color representing value for that particular hour of the day. According to selected time frame, a number of additional columns is added to the right for following days.
    • balloon must be set to 1 when using JavaScript to make mouse-over balloons appear.

When choosing distribution mode for charts with "xymode" setting, only these charts can be used: Line, Bar, Needle. All other interactive graphs cannot be used in distribution mode.

Non-Interactive Graphs
  • GPline [G]: Non-interactive line graph which is generated by Gnuplot and delivered as ".png" image.
  • GPstep [G]: Non-interactive line step graph which is generated by Gnuplot and delivered as ".png" image.
  • GPbar [G]: Non-interactive bar graph which is generated by Gnuplot and delivered as ".png" image.
  • GPneedle [G]: Non-interactive needle graph which is generated by Gnuplot and delivered as ".png" image.
  • GPpoint [G]: Non-interactive point graph which is generated by Gnuplot and delivered as ".png" image.

Following fonts can be selected for GP graph types listed above. These fonts are provided by Meteoplug server to render a graph as ".png" picture:

  • andalemo
  • arial, arialbd, arialbi, ariali, ariblk
  • comic, comicbd
  • cour, courbd, courbi, couri,
  • georgia, georgiab, georgiai, georgiaz,
  • impact
  • luximb, luximbi, luximr, luximri, luxirb, luxirbi, luxirr, luxirri, luxisb, luxisbi, luxisr, luxisri
  • times, timesbd, timesbi, timesi
  • trebuc, trebucbd, trebucbi, trebucit
  • verdana, verdanab, verdanai, verdanaz
  • webdings

Non-interactive graphs cannot be used in distribution mode (xymode setting).

HTML Tables
  • Table: HTML table, where each sensor is represented as a column and time stamped data sets are represented as rows. There are a couple of special settings for tables:
    • gtablestyle defines table style.
    • gtrheadstyle defines style of head line row.
    • gtdheadstyle defines style of head line cells.
    • gtrstyle defines style of rows.
    • gtdstyle defines style of cells.
    • glunit defines text to be displayed on time stamp column.
    • grunit defines time stamp format in a notation used with gnu c function "strftime" (see manual). Is used as format string for "x-value" in distribution mode charts.

HTML-Tables can be used in distribution mode (xymode set to a non-null value). As distribution charts are not showing data in respect to a time line, grunit has a slightly different meaning. grunit is used as a format string (linke in printf statements in language c). Format string can contain information how to format the floating point number that defines the buckets which show distribution of values in the chart. Example: "%.1fm/s" will show wind speeds for buckets as a floating point number with one decimal digit followed by "m/s". Having set "xstart" to 0.0 and "xinc" to 0.5 the buckets/rows will be named in the first column of the table like "0.0m/s", "0.5m/s", "1.0m/s" and so on.

CSV Exports
  • Export: CSV export, where each sensor is represented as a column and time stamped data sets are represented as rows. There are a couple of special settings for exports:
    • glunit defines text to be used as separator between columns.
    • grunit defines time stamp format in a notation used with gnu c function "strftime" (see manual). Is used as format string for "x-value" in distribution chart mode.
    • sname defines value to be taken for export if no value found for that specific sensor in database.
    • sunit define additional characters to follow current value. This can be used to fill in some static text columns following actual sensor value. It is a useful feature to give columns default values where no data can be delivered from Meteoplug.

CSV exports can be used in distribution mode (xymode set to a non-null value). As distribution charts are not showing data in respect to a time line, grunit has a slightly different meaning. grunit is used as a format string (linke in printf statements in language c). Format string can contain information how to format the floating point number that defines the buckets which show distribution of values in the chart. Example: "%.1fm/s" will show wind speeds for buckets as a floating point number with one decimal digit followed by "m/s". Having set "xstart" to 0.0 and "xinc" to 0.5 the buckets/rows will be named in the first column of the csv export like "0.0m/s", "0.5m/s", "1.0m/s" and so on.

Maps
  • Map: defines a Google map with weather stations of your group as markers. On the right is an info window that displays weather data of weather station touched by the cursor on the map. Registered stations do also provide an interactive weather graph when clicked.
    • zoom defines zoom factor of the map. default for start is "4".
    • ssel specifies a sensor value in form of a variable enclosed in square brackets. See #Numeric Variables and #Text Variables for details.

Sensor Settings

A Meteoplug graph can display data for a couple of sensors. As most sensors do present more than one type of data you have to define the sensor and what type of data to use from a sensor. All sensor definitions as preceded with a "s". To identify which settings are valid for which sensor, sensors are enumerated. Enumeration of sensors must start at 0 and must not have a gap in enumeration. Each sensor setting ends with an number that defines for which sensor these settings should apply. This number is represented by a "#" in the list of valid for sensor settings below:

Name Mandatory
[applicable]
Value Default Explanation Example
sid# yes
[LJTRCGEDM]
see section "sensor IDs" none Defines the sensor to take data from. sid0=wind0 (wind sensor)
sid1=th* (primary outdoor temp/hum sensor)
ssel# yes, if not a "minmax" graph or "daycount" graph
[LJTRCGEDM]
see section "sensor IDs" none Defines the sensor's value to be used for graphing. Has special meaning when doing maps, when this holds a text variable. ssel0=gustmax (maximum gust speed of wind sensor)
ssel0=[actual_min5_th0_temp] (actual temp for display on map)
sclient# no
[LJTRCGEDM]
name of the client that provides data none When using Meteoplug groups, you can use data from various clients of that group in one chart. Client parameter specifies what client to take the data from. sclient0=citygroup-hamburg
sselmin# yes, in case of a minmax graph
[LJG]
see section "sensor IDs" none Defines the sensor's value to be used for graphing as minimum value. sselmin0=tempmin (minimum temperature of a temp sensor)
sselmax# yes, if a minmax graph
[LJG]
see section "sensor IDs" none Defines the sensor's value to be used for graphing as maximum value. sselmax0=tempmax (maximum temperature of a temp sensor)
sdaycount# yes, if a "daycount" graph
[LJ]
SQL conditional clauses mapped to predefined variable "day", see section "sensor IDs" for possible qualifiers none Defines the sensor's value to be used for graphing as daycount. This setting is defined for time resolution "month1" only. sdaycount0=day.tempmax>=0.0&&day.tempmax<5.0 (counts number of days that meet condition: tempmax >= 0.0 and tempmax <5.0)
sname# yes
[LJTRCGEDM]
string none Defines the name of the sensor as displayed in the graph. Has special meaning in export mode as definition of value that should be written when no value available in database. sname0=Outdoor_Temperature
stype# no
[LJGD]
see section "graph types" as defined by "gtype" Defines type of graph for this particular sensor. stype0=line
swidth# no
[LJRGD]
number 0 Defines line thickness for graph types: line, step, needle swidth0=4 (line is 4 pixels wide)
syaxis# no
[LJRG]
left, right left Defines which y-axis to by used for current sensor. syaxis0=r (right y-axis to be used)
scolor# no
[LJRGD]
hex number taken from internal table Defines color of sensor in the graph. scolor0=AADDFF (sensor is displayed in a light blue)
scursorcolor# no
[LJR]
hex number same color as used for display of sensor data Defines color of interactive cursor in the graph. scursorcolor0=000000 (cursor is displayed in black)
sunit# no
[TEDM]
string empty string Defines unit text to be displayed as unit for sensor data in table columns. Defines Text to be added to current column in export mode. This allows to add static output on columns where Meteoplug can't deliver useful data. sunit0=°C (numbers are displayed as temperatures)
slabel# no
[J]
string no label used Defines label to be displayed on top of each data item in the chart. Label can contain "value" for current data value or in min/max charts "low" and "high" for min resp. max values. slabel0=°C (each data item of this sensor has the value added with "°C" on its top)
ssmooth# no
[LJG]
number 0 Defines if lines should be smoothed. ssmooth0=1 (smoothing enabled)
ssmooth0=2 (defines bezier smoothing, available with graph type "gpline" only)
sstack# no
[LJ]
number none Defines a sensor this sensor's data should be stacked on when displayed. Just works for "line" graphs without "smooth" option. sstack1=0 (data for sensor 1 is stacked on data for sensor 0)
sline# no
[LJRGD]
number 0-100 100 Defines color intensity of line to be drawn. sline0=100 (color of line for data of sensor 0 has full intensity)
sfill# no
[LJRGD]
number 0-100 100 Defines color intensity of area below line. sfill0=50 (color of area for data of sensor 0 has 50% intensity)
sconnect# no
[LJRGD]
number 0,1 0 If set, missing data does not result in holes in the graph. Neighbouring points are always connected. sconnect0=1 (graph for sensor 0 shows a perfectly connected line, even when some data is missing)
scursoralpha# no
[LJR]
number 0-100 100 Defines color intensity of cursor. scursoralpha0=0 (cursor is invisible)
slowbound# no
[LJG]
number undefined Defines a lower bound. Values below that are mapped to 0.0, values above or equal become 1.0. Offset and factor are applied after this operation. slowbound0=100.0 (maps values below 100.0 to 0.0 and values of 100.0 and above to 1.0)
supbound# no
[LJG]
number undefined Defines an upper bound. Values below that are mapped to 1.0, values above or equal become 0.0. Offset and factor are applied after this operation. supbound0=200.0 (maps values below 200.0 to 1.0 and values of 200.0 and above to 0.0)
slegend# no
[LJG]
number 0,1 1 Defines if a sensor's values do appear in the legend: 0=no, 1=yes slegend0=0 (no data in legend for sensor 0)
soffset# no
[LJTRCGED]
number 0.0 Defines offset to be applied to sensor data. soffset0=32 (adds 32 to data)
sfactor# no
[LJTRCGED]
number 1.0 Defines factor to be applied to sensor data. sfactor0=1.8 (multiplies with 1.8)
scumul# no
[LJTRCGED]
0 or 1 0 Defines if data should be used as is or being added up to display cumulative development. This can be used to generate stairway charts for rainfall over a time period. scumul0=1 (use cumulative display for sensor 0)
sprec# no
[LJTRCGED]
number depends on type of data Defines number of decimals that should be used when printing values in graphs. When applied to timestamps it defines number of characters (from left when positive number, from right when negative number) to be displayed. sprec0=1 (display data with 1 decimal)
sprec# no
[LJTRCGED]
number depends on type of data Defines number of decimals that should be used when printing values in graphs. When applied to timestamps it defines number of characters (from left when positive number, from right when negative number) to be displayed. sprec0=1 (display data with 1 decimal)
sminmarker# no
[J]
string none Determines if lowest sensor value of selected time range should be marked with a star in the graph. Specified text is used as prefix for the value displayed inside the balloon connected to the star sminmarker0=MIN (inserts a star on minimum value in the graph and sets balloon text to "MIN: 12.5°C", when lowest value was "12.5°C")
smaxmarker# no
[J]
string none Determines if highest sensor value of selected time range should be marked with a star in the graph. Specified text is used as prefix for the value displayed inside the balloon connected to the star smaxmarker0=MAX (inserts a star on maximum value in the graph and sets balloon text to "MAX: 32.5°C", when highest value was "32.5°C")
smarker# no
[J]
string star Determines marker type to be used for this sensor. Defined types are "square", "circle". "diamond" and "star" smarker0=circle (marks min/max vaules with a ircle in the chart)
smarkeralpha# no
[J]
number 0-100 100 Determines intensity used for display of marker symbol (in oercent) smarkeralpha0=50 (marker displayed with 50% intensity)

Use with: [L] = line/step/bar graphs; [J] = javascript line/step/bar graphs; [T] = HTML tables; [R] = radar charts; [C] = color maps; [G] = GPline/GPstep/GPbar/GPneedle/GPpoint; [E] = csv export; [D] = distribution chart

Sensor IDs and Values

Meteoplug supports different types of sensors. When you configure sensors on "Sensors" page you define IDs for these sensors. The same IDs are used as "sid" in graphing. Each of the sensor types present a different set of properties as listed below. Data for sensors of type "text" and "number" are not taken from the database but computed on request. While "number" sensors might be useful for graphing, "text" are limited to be used for HTML-tables, csv exports and template replacements. When you use a fixed number like "th0" exactly that sensor is used. When you make use of wild-card notation "th*" the "th" sensor that has been specified on weather network page as your outdoor temp sensor will be used. This allows to write chart definitions that make use of your primary sensors, regardless which number you have given them on your "sensors" page. If no definition can be found on "weather network" page, the sensor with ID zero will be used as a default.

Sensor Type Sensor IDs Properties Comment
Temp t0, t1,
...,
t39
temp, tempmin, tempmax, tempmintime, tempmaxtime sensor reports temperature (°C) only
Temp/Hygro th*, th0, th1,
...,
th39
temp, tempmin, tempmax, hum, hummin, hummax, dew, dewmin, dewmax, humi, humimin, humimax, heat, heatmin, heatmax, tempmintime, tempmaxtime, hummintime, hummaxtine, dewmintime, dewmaxtime sensor reports temperature (°C)and humidity (%)
Temp/Hygro/Baro thb*, thb0, thb1,
...,
thb39
temp, tempmin, tempmax, hum, hummin, hummax, dew, dewmin, dewmax, humi, humimin, humimax, heat, heatmin, heatmax, press, pressmin, pressmax, seapress, seapressmin, seapressmax, tempmintime, tempmaxtime, hummintime, hummaxtine, dewmintime, dewmaxtime, pressmintime, pressmaxtime, forecast, forecasttext, forecasticon sensor reports temperature (°C), humidity (%) and air pressure (hPa), forecast information
Wind wind*, wind0, wind1,
...,
wind9
gust, gustmin, gustmax, wind, windmax, windmin, chill, chillmin, chillmax, maindir, highdir, gustmaxtime, windmaxtime, chillmintime, chillmaxtime
maindirtext, highdirtext (for chart types "table" and "template" only)
sensor reports wind (m/s) and windchill data (°C)
Rain rain*, rain0, rain1,
...,
rain9
rate, ratemin, ratemax, total, days, ratemaxtime sensor reports rain (mm)
UV uv*, uv0, uv1,
...,
uv9
uvi, uvimin, uvimax, uvimaxtime sensor reports UV data (uvi)
Solar sol*, sol0, sol1,
...,
sol9
rad, radmin, radmax, radmaxtime sensor reports solar data (W/qm)
Data data0, data1,
...,
data39
val, valmin, valmax, sum, summin, suminc, rise, fall, valmintime, valmaxtime sensor reports numerical data, sum is sum of data, suminc is sum of increments, summin is sum of increments per minute, rise is number of events where data changes from falling to rise, fall is number of events where data changes from rising to fall.
text misc longitude, latitude report longitude or latitude as a decimal number. Does ignore given time stamps and time resolutions.
text misc localtime, utctime report recent time in format "YYYY-MM-DD hh:mm:ss". Does ignore given time stamps and time resolutions.
text misc uploadlocaltime, uploadutctime report time of last data upload in format "YYYY-MM-DD hh:mm:ss". Does ignore given time stamps and time resolutions.
text misc timestamp reports time stamp used for request in format "YYYY-MM-DD hh:mm". This can be used to find out an absolute point in time that corrsponds to a given relative time description.
number misc lunarphasepercentage reports of visibility of moon as percentage (100% = full moon, 0% = new moon).
number misc lunarphasesegment reports a number of 0 to 7 which represents lunar phase (0 = new moon, 4 = full moon).
number misc lunaragedays reports a number of days since last new moon.
text misc lunarphasetext reports a test string that represents a lunarpahase. 8 Lunar phases are defined. Strings can be adapted to specific needs by "phasetextlist" definition.
text misc lunarphaseicon reports a HTML image tag that links to an image to be used for representation of lunarpahases. URLs can be adapted to specific needs by "phaseiconlist" definition.
number misc daylengthstandardhours, daylengthcivilhours, daylengthnauticalhours reports number of hours a day has. hours come with decimals. Computation is available in standard, civil or nautical mode.
text misc daylengthstandardtime, daylengthciviltime, daylengthnauticaltime reports number of hours and minutes a day has in "hh:mm" notation. Computation is available in standard, civil or nautical mode.
text misc sunrisestandardutctime, sunsetstandardutctime, sunrisestandardlocaltime, sunsetstandardlocaltime, sunriseciviltwilightutctime, sunsetciviltwilightutctime, sunriseciviltwilightlocaltime, sunsetciviltwilightlocaltime, sunrisenauticaltwilightutctime, sunsetnauticaltwilightutctime, sunrisenauticaltwilightlocaltime, sunsetnauticaltwilightlocaltime reports time of sunrise and sunset in "hh:mm" notation. Computation is available in standard, civil or nautical mode and in UTC and local time.
text misc moonriseutctime, moonsetutctime, moonriselocaltime, moonsetlocaltime reports time of moon rise and moon set in "hh:mm" notation. Computation is available in UTC and local time.
text misc mac reports MAC of the sending client.

Template Settings

Beside generation of graphs and tables it might also be useful to allow for handling of templates. Template mechanism works like this:

  • Meteoplug loads a textfile somewhere located on the Internet (will mostly be HTML content) or inside the chart definition following the "template=inline" statement
  • Meteoplug scans the file or data for existence of specific Meteoplug weather variables.
  • Meteoplug replaces these variables by corresponding weather data
  • Meteoplug returns the file or data (filled with data) to the requester

Template handling is realized in Meteoplug by a chart definition that makes use of the following name-value pairs.

Name Mandatory Value Default Explanation Example
template yes URL in complete syntax including "http://" or "inline" none URL of template to be used or "inline" tag, which indicates that template data follows after template statement template=http://www.meteoplug.com/xyz.html
content no http content type description text/html defines what type of content is delivered content=text/plain (content=raw will supress content header information to be sent out)
picture no type of picture no picture template, html template is default defines if URL given as template is a picture definition to be handled by ImageMagick's convert program and defines type of picture picture=png
dirlist
phasetextlist
phaseiconlist
no lists as defined in #Chart Settings see #Chart Settings define text values or URLs to be taken instead of default settings dirlist=N,NNO,NO,ONO,O,OSO,SO,SSW, S,SSW,SW,WSW,W,WNW,W,NNW
debug no 0 = normal operation
1 = show replacement of variables and corresponding errors
0 allows for debugging of variable replacement debug=1 (enables debug mode)

Variables that Meteoplug replaces in templates are starting with "[" and end with "]". There are two types of variables, text and numbers which are handled slightly different. Any "[...]" enclosed strings that do not syntactically match a Meteoplug variable definition will not be touched.

Special Variables

Beside the regular weather data values of numerical or textual type there are a couple of special variables returning usefull information:

  • drawtoken_<chartname> returns the encoded draw token for the current user and the chart defined as <chartname>.
  • engine returns the display engine currently used by the chart (can be "flash", "javascript" or "gnuplot").

Numeric Variables

Numeric variables are composed of the following fields, separated by an underscore "_":

  • time stamp: This can be any point in time given in "YYYYMMDDhhmmss" notation. When the last recorded data is meant, the string "actual" has to be used instead of a time stamp. Instead of absolute time stamps you can also use relative timestamps as explained in paragraph #Time Ranges. Please notice, that in this context relative timestamps are not interpreted as ranges up to the current date/time, but as a range where the relative timestamp gives the starting point. Endpoint is determined by start point plus the resolution specification. Assume your time is 13:17, then relative time stamp "3H_hour1_..." will select timeframe "11:00 - 11:59" as "3H" points to 3 hours in the past ("3H" is taking actual hour as an already started hour additional into consideration, "-3H" will select "10:00 - 10:59" omitting the actual hour). Following that rule, "3H_min10_..." will select "11:00 - 11:09" as time frame and "-1D_day1_.." will select yesterday's data. As a side effect not all relative timeframe definitions make sense here. Lower letter definitions can't be used and a given resolution has to be smaller or equal than the startpoint definition, i.e. "3D_month1_..." is not making sense, as the "month1" resolution is not alligned to the beginning of a day, selected by "3D". Using inappropriate timeframe defintions will lead to empty results.
  • resolution: Meteoplug uses raw logged data to generate a hierarchy of various time buckets. Below you find time buckets available in Meteoplug. These are the same resolution settings as can be used for graphing. "Time stamp" and "resolution" strongly interact. As not all combination do make sense, it is important to understand how it works together. Assume that you are looking for some daily data (like daily max temperature or rainfall) for x-mas 2009, then "time stamp" will be "20091225000000" and "resolution" will be "day1". To get data about actual month "time stamp" will be "actual" and resolution will be "month1".
    • min5 (5 minutes time frame)
    • min10 (10 minutes time frame)
    • min15 (15 minutes time frame)
    • min30 (30 minutes time frame)
    • hour1 (hourly time frame)
    • hour6 (6 hour time frame)
    • day1 (daily time frame)
    • month1 (monthly time frame)
    • year1 (yearly time frame)
    • alltime (time frame covering all ever logged data)
  • sensor id: This determines the sensor to take data from. It is in the usual format as used in graphing specification, like "th0", "wind0", etc. You can also make use of default primary sensor names like "th*", "wind*", etc. When your station is part of a Meteoplug group, you can reference data from any client in the group by a "@<clientname>" suffix. Example: [actual_min5_th0@citygroup-hamburg_temp_1]
  • selector: Which selectors are available depends on selected type of sensor. List of defined selectors per sensor is lined out in #Sensor IDs and Values. If you are selecting a text variable or a numeric variable is determined by the selector you are using. When the selector is named "time" or "text" at the end it is a time stamp or other string and therefore a text variable. All other variables are of numeric type. There is one additional selector named "ts" (means time stamp) that reports time stamp of data, which also is regarded as a text variable.
  • precision: This defines how many decimal digits should be displayed. Decimals are just cut off, no rounding rules are applied. Default is one digit.
  • factor: Defines a factor to be applied to the value. Default factor is 1.0.
  • offset: Defines an offset to be applied to values. Default offset is 0.0.

An example for a numeric variable constructed according rules above is [actual_day1_th0_tempmax_1_1.8_32], which will be replaced by max temperature of current day in degree Fahrenheit (Celsius value * 1.8 + 32) with one decimal digit precision.

Text Variables

Fields used for definition of text variable are mainly the same as with numerical variables. Fields "time stamp", "resolution", "sensor id", "selector" are exactly the same. "selector" just needs to be "ts" or something ending with "time" to select a text variable. Fields "precision", "factor" and "offset" are not defined with text variables, but new fields "index" and "length" are added instead.

  • index: Index defines a position in the text where to start with reading. Default is 0 which is equivalent to start of text.
  • length: This defines how many character to take from the text. Default is to take the complete string.

An example for a text variable is [actual_day1_th0_tempmaxtime_11_5] which cuts off the "hh:mm" portion of the time stamp of highest temperature reading of recent day. Time stamps do have format "YYYY-MM-DD hh:mm:ss" when reading them from Meteoplug's database.

Additional Features

A ":" followed by a string can be added at the end of every variable. The string is used as a default replacement, when no value can be derived from Meteoplug's database for a given variable.

Example: [20100101000000_day1_th0_tempmax_1_1.8_32:no data] does result in "no data" when there is no maximum temperature available for new year's day 2010 in Meteoplug's database. Default setting for missing variable data is "--".

A "#" followed by a number indicates the maximum age of sensor data allowed to regard this sensor data as still being valid. This is very usefull in combination with "actual" timeframes.

Example: [actual_min5_uv*_uvi_1:outdated#3600] reports the average uv index of last 5 minute bucket available, as long as it is not older than 3600 seconds, otherwise "outdated" is returned.

Maps

When using Meteoplug's map feature some additional parameters can be used.

Name Mandatory Value Default Explanation Example
outdate no seconds since last data from stations 15 days (15*86400 seconds) This defines maximum age a connect from the Meteoplug client is allowed to have in order to be still displayed on the map outdate=2592000 (defines a clip level of 30 days)
latitude no decimal latitude your stations latitude defines the center of the map latitude=59.234
longitude no decimal longitude your stations longitude defines the center of the map longitude=10.456
mapchart no name of a defined map (should be defined for all users of the group) "_mapaio" you can direct the weather data graph when clicking onto a marker in the map to an alternative chart definition. Might only be useful in dedicated groups, where your own chart definitions are valid for the whole group per default. mapchart=mychart (defines mychart to be used on maps)

URL Parameters

To allow a more flexible use of defined charts, some of the chart parameters can be provided when calling a chart definition. Usually you receive a chart you defined by calling "http://www.meteoplug.com/cgi-gin/meteochart.cgi?drawtoken=...". Meteoplug derives user and name of the requested chart from the encrypted draw token and returns the chart. You can also a these additional URL parameters behind the drawtoken.

Name Applicable Value Default Explanation Example
timeframe [INCH] timefame definition as described #Time Ranges as given in the chart definition selects th time frame the cahrt definition gets applied to. timeframe=1M (current month)
resolution [INCH] time resolution as defineded #Time Resolution as given in the chart definition defines granularity of data used for the chart. Only distinct values are allow. resolution=10min (chart shows data in 10 minute buckets)
engine [IND] one of "javascript", "flash, "gnuplot" flash meteoplug provides flash and javascript engines for drawing interactive charts and live data. As long as the cart definition use generic types (like line, bar, needle, step, ...) the engine setting does determine which engine to use. If engine specific types (like gpline, ...) are used, calling the chart with a different engime definition will trhow an error. engine=javascript (use javascript variants of interactive charts)
latitude [M] decimal latitude your stations latitude defines the center of the map latitude=59.234
longitude [M] decimal longitude your stations longitude defines the center of the map longitude=10.456
all [M] 0 or 1 0 defines if map of a group does include public stations (all=1) or does show group only stations (all=0) all=1
latitudemin [M] decimal latitude minimal latitude of stations to be shown on map can be used to restrict geografical range of stations to be shown latitudemin=58.0
latitudemax [M] decimal latitude maximal latitude of stations to be shown on map can be used to restrict geografical range of stations to be shown latitudemin=60.0
longitudemin [M] decimal longitude minimal longitude of stations to be shown on map can be used to restrict geografical range of stations to be shown longitudemin=8.0
longitudemax [M] decimal longitude maximal longitude of stations to be shown on map can be used to restrict geografical range of stations to be shown longitudemax=10.0
client [INCHMD] a meteoplug client name client as specified in draw token allows selecting a different client of the same meteoplug group. This is only applicable for clients of the same group client=beach1
zoom [IM] number between 1 and 15 on maps or fraction of time frame to be initially displayed on interactive charts 4 (maps), MAX (interactive charts) defines how close to zoom in on maps and what fraction of the time frame to display on interactive charts zoom=1D (start displaying actual day on interactive chart)

Use with: [I] = any interactive chart; [N] = non-interactive chart; [C] = CSV exports; [H] = HTML tables; [M] = Maps; [D] = Live display


Values for "latitude", "longitude" (in degrees with decimals) and "zoom" (as integer from 1 to 15) can also be given as URL parameters when calling the chart generator.

Display Language

Display language used in Meteoplug is derived from a subset of fusionwidget options. It can be used very similar as if you would define widgets directly in funsionwidgets. This is especially true for the options that control the look and feel of the meters and gauges. Secification of values to be selected for display is similar to how Meteoplug does handle graphs. So it might be a good idea, to get familar with Meteoplug graphing first, before stepping into details with displays.

Display commands are represented as name-value pairs separated by "=". No spaces are allowed between name, "=" and value. Name-value pairs are separated by white space characters (blanks and/or new lines). As a result you can place each name value pair into a new line or you can define multiple name-value pairs in one line separated by white spaces.

When value should include a space character (might be useful for sensor names), you have to use underscore "_" instead of space. Underscores will be converted back to spaces when being displayed. When you need a underscore "_" not to be converted into space, type two underscores "__", which will be converted to one underscore "_". If you need a line feed character in the string, use vertical bar character "|" instead.

You can add comments to a display definition. When Meteoplug hits a "#" when it expects a new name value pair, then rest of current line will be skipped and not evaluated. This allows you to type any text you like after comment character "#". As you can see, the coming up examples make heavy use of commenting.

When you specify numbers the decimal separator is "." regardless what language you might have selected.

There is one important difference compared to graph definitions. When you define a widget, you specify the type of widget (i.e. Thermometer) in the usual name-value pair mimic. The lines following that special name-vaue pair are not handled as name-value pairs anymore but the entire followon text is taken as is and interpreted as XML data for description of the widget options. This XML is directly handed over to the corresponding fusionwidget flash widget. Meteoplug does no further processing on that. The end of XML data in the display definition is marked by an empty line. After that Meteoplug is in name-values piar mode again and operation continues in normal parsing mode until next widget name-value pair. Breaking the name-value pair logic by that might be seen as not very elegant, but it allows easy adaption of examples from fusionwidgets repository, which might be regarded as a major advantage. What options the choose for in context of each of the widgets is defined here.

As with graph definitions, the definition of displays is done on three levels

  • on display settings are valid for all widgets in the display.
  • on widget settings define characteristics of a single widget.
  • on sensor settings give paramters for use of sensors for a specific widget.


Display Settings

A display definition should start with settings that are valid for all widgets in the display and all sensors used in the widgets. Meteoplug provides these name-value pairs to define display settings

Name Mandatory [Applicable] Value Default Explanation Example
restrictip no [TCAHS] WAN IP of requesting computer none restricts access to the chart to a certain requesting IP. When requesting IP does not match an error is displayed. restrictip=81.123.23.77 (restricts access to given IP)
bgcolor no
[TCAHS]
string white Specifies background color in RGB style bgcolor=#0000FF (blue)
title no
[TCAHS]
string (blank chars replaced with "_") "Meteoplug_Chart" Defines HTML title of the chart title=temp_of_today
height no
[TCAHS]
number 400 Defines height of display in pixels height=200
width no
[TCAHS]
number 600 Defines width of display in pixels width=400

Letter in brackets indicate applicability: [T] = thermometer; [C] = cylinder; [A] = angular gauge; [H] = horizontal gauge; [S] = status pad

Widget Settings

Widget settings have a meaning to an overall display comparable to graph settings for a chart. That means, each single display element (thermometer, gauge, etc.) is defined by a stack of widget definitions. These definitions can be used with widgets, each of them needs the widget number as a suffix. A missing widget number suffix is interpreted as suffix "0". As a lot of the definitions are borrowed from graph definitions, we kept the prefix "g" for all widget commands.

Name Mandatory [Applicable] Value Default Explanation Example
gtitle no
[TCAHS]
string (blank chars replaced with "_") none reserved for future use gtitle=Outdoor_Temp
gheight no
[TCAHS]
number 400 specifies height of widget gheight=450 (widget is 450 pixel high)
gwidth no
[TCAHS]
number 600 specifies width of widget gwidth=550 (widget is 550 pixel wide)
gtimeout no
[TCAHS]
number 1800 specifies update age in seconds to determine a widget being outdated and not showing data anymore gtimeout=900 (timeout after 15 mins)
gcss no
[TCAHS]
string (blank chars replaced with "_") none gives css information used for widget placement and style gcss=position:absolute;_top:0;_left:0 (position widget in upper left corner)
gwidget yes
[TCAHS]
Thermometer, Cylinder, AngularGauge, HLinearGauge, Status none defines which widget to use, followon lines define widget options in XML style as described by fusionwidget documentation gwidget=AngularGauge (select angular gauge type from fusionwidgets selection)

Letter in brackets indicate applicability: [T] = thermometer; [C] = cylinder; [A] = angular gauge; [H] = horizontal gauge; [S] = status pad

The example below illustrates how the different kinds of widgets can be used to setup a live data dashboard.

Live-board.png

Thermometer Widget

This widget can handle just one value to display. Example above uses this widget for display of temperature, chill and dew point. Description of options to control look of the widget can be directly taken from corresponding fusionwidget documentation named "Thermometer Gauge" (link)

Cylinder Widget

Like the thermometer widget this widget also can handle just one value but brings a different look and can be displayed in a pseudo 3D style from various angles of view. Example above does use this widget type for display of daily rainfall. Description of options to control look of the widget can be directly taken from corresponding fusionwidget documentation named "Cylinder Gauge" (link)

Angular Gauge

This widget is usefull to display values in a tachometer like style. Example above makes use of this widget for wind direction and barometric pressure. The widget supports multiple dials and various design and annotation options. Description of options to control look of the widget can be directly taken from corresponding fusionwidget documentation named "Angular Gauge" (link)

Linear Gauge

This widget is similar to the angular gauge - but without curves. Example above uses this for wind speed, humidity, solar radiation and UV index. It also supports display of multiple values and various design and annotation options. Description of options to control look of the widget can be directly taken from corresponding fusionwidget documentation named "Linear Gauge" (link)

Status Pad

This is not something from fusionwidgets, but a very simple widget that can bring additional text on the display. It is particular useful to show some info like date and time of last display update. Example above does use this widget in the upper left corner. These patterns can be used as text variables:

  • %Y represents the year, in 4 digit representation.
  • %M represents the month (01-12).
  • %D represents day of month (01-31).
  • %h represents hours (00-23).
  • %m represents minutes (00-59).
  • %s represents seconds (00-59).
  • %I represents the computed update interval. This can be less frequent than the regular 10 second interval when multiple Users are polling data for a specific station. Update rate adapts to intensity of usage to keep overall server performance in line. Example above specifies output message with string "last update %h:%m:%s (%I secs)".

Sensor Settings

Depending on the choosen widget, a Meteoplug widget can display data for a couple of sensors. As most sensors do present more than one type of data you have to define the sensor and what type of data to use from a sensor. All sensor definitions as preceded with a "s". To identify which settings are valid for which sensor, sensors are enumerated. Enumeration of sensors must start at 0 and must not have a gap in enumeration. Each sensor setting ends with an number that defines for which sensor these settings should apply. This number is represented by a "#" in the list of valid for sensor settings below:

Name Mandatory Value Default Explanation Example
sid# yes
[TCAH]
see section "sensor IDs" none defines the sensor to take data from sid0=wind0 (wind sensor)
sid1=th* (primary outdoor temp/hum sensor)
ssel# yes
[TCAH]
see section "sensor IDs" none defines the sensor's value to be used for widget display ssel0=gust (gust speed of wind sensor)
sclient# no
[TCAH]
name of the client that provides data none When using Meteoplug groups, you can use data from various clients of that group in one widget. Client parameter specifies what client to take the data from. sclient0=citygroup-hamburg
soffset# no
[TCAH]
number 0.0 Defines offset to be applied to sensor data. soffset0=32 (adds 32 to data)
sfactor# no
[TCAH]
number 1.0 Defines factor to be applied to sensor data. sfactor0=1.8 (multiplies with 1.8)
sprec# no
[TCAH]
number depends on type of data Defines number of decimals that should be used when printing values in widgets. sprec0=1 (display data with 1 decimal)

Letter in brackets indicate applicability: [T] = thermometer; [C] = cylinder; [A] = angular gauge; [H] = horizontal gauge; [S] = status pad

Sensor IDs and Values

Meteoplug supports different types of sensors. When you configure sensors on "Sensors" page you define IDs for these sensors. The same IDs are used as "sid" for display in widgets. Each of the sensor types present a different set of properties as listed below. When you use a fixed number like "th0" exactly that sensor is used. When you make use of wild-card notation "th*" the "th" sensor that has been specified on weather network page as your outdoor temp sensor will be used. This allows to write chart definitions that make use of your primary sensors, regardless which number you have given them on your "sensors" page. If no definition can be found on "weather network" page, the sensor with ID zero will be used as a default.

Sensor Type Sensor IDs Properties Comment
Temp t0, t1,
...,
t39
temp, tempmin, tempmax sensor reports temperature (°C) and daily min/max values only
Temp/Hygro th*, th0, th1,
...,
th39
temp, tempmin, tempmax, hum, hummin, hummax, dew, dewmin, dewmax sensor reports temperature (°C) and humidity (%) and dewpoint (°C) and daily min/max values for these
Temp/Hygro/Baro thb*, thb0, thb1,
...,
thb39
temp, tempmin, tempmax, hum, hummin, hummax, dew, dewmin, dewmax, seapress, seapressmin, seapressmax sensor reports temperature, dew point (°C), humidity (%) and air pressure (in hPa) with daily min and max)
Wind wind*, wind0, wind1,
...,
wind9
dir, wind, gust, gust10min, gustday, chill, chillmin, chillmax sensor reports wind dir, average wind sped (wind), current wind (gust), highest gust last 10 minutes (gust10min), highest gust of day (gustday) and wind chill (°C) inclusing min/max, all speeds in m/s
Rain rain*, rain0, rain1,
...,
rain9
rate, total, day, month, year sensor reports rain rate (mm/h), total counter value (total), sum of day, month, year in mm.
UV uv*, uv0, uv1,
...,
uv9
uvi, uvimax sensor reports current UV data (uvi) and maximum of day (uvimax)
Solar sol*, sol0, sol1,
...,
sol9
rad, radmax sensor reports current solar data (rad) in W/qm and maximum of day (radmax)
Data data0, data1,
...,
data39
val, valmin, valmax sensor reports numerical data inclunding min/max of day

Examples

You will find examples for all graph and display types in the gallery of this wiki. You can see the graphs and you can inspect definition that created the graph or display. Definitions are commented, which should allow to get a better understanding how graphing works.