
Local From
www.TNETWeather.com






Local From
www.TNETWeather.com






Remote From
www.silkeborg-vejret.dk







WDS - WD Sparkline Graphics Utility
Introduction
The WDSParkline Graphics Utility (WDS) is a consolidation of a number of
scripts that were originally posted by "Pinto" on the
Weather-Watch Forum
.
These scripts use the Sparkline PHP Graphics Library
to generate Sparkline graphs of data contained inside of
Weather-Display's
clientrawhour.txt
raw data files. These raw data files
contain the last 60 minutes of a number of weather instruments monitored
by a weather station using Weather-Display software.
Key Features
- Same script can be called mutiple ways to obtain 6 different charts (Temp, Hum, Baro, Winds, Windg and Rain), most with 2 or more unit displays amount
- Temperature in °F and °C formats
- Barometer in Millibar, Inches of Mercury, Kilopascals
- Wind Speed and Gust in Knots, MPH, Km/h and m/s
- Rain in both Millimeter and Inches
- Humidity in Percentage
- Can specify which predefined language to output the charts banner text as. Currently supported: English Danish Swedish Italian and Spanish.
- Configurable Remote data mode to allow the script to fetch data from remote sites and output graphs based on that data. Can be configured for All access, CLI only access or none.
- Debug mode to help determine why a chart is not working.
- Graphical error box to provide notice that a selection or data is missing
- PHP code so that it can be modified by those who want it to do something different/else...
- Distributed as FREEware under BSD License
Sample Graphs
To the right are a set of both English and Spanish sample WDS Sparkline graphs. These were generated from live data off the TNETWeather weather station. The images used by this page are actually statically generated by the WDS script using a Crontab entry on the server using the CLI mode of the script to fetch and save the images once every 5 minutes. This is just one of the ways that the scripts can be used.
Tips and Tricks
Frames And Borders
So just how did you get frames and a border to show up on the WDSprarkline Graphs... Mine don't have a frame and I see no option for it...
CSS was used to generate the frame around the Sparkline graphs. The code located in the external style sheet looks like:
.sparkline {
border: 1px solid #008000;
border-right: 3px solid #008000;
border-bottom: 3px solid #008000;
}With that type CSS, you can then code your Sparkline Graphs like as follows:
<img src="WDS/wdsparkline.php?chart=temp&unit=fdeg" class="sparkline" />
Salt and Pepper to fit your own tastes, colors and whatnot and you have frames around your charts
Heavy Traffic Sites Use CLI Mode
You could be adding quite a load to your server serving dynamically generated images if you have a lot of visitors. In these cases, you might be better off having a script run via Crontab, that uses the WDS script in CLI mode to generate images at say, once every 1-5 minutes. Then have your pages point to those generated images instead of pointing at the WDS script itself. You serve a lot of static images then and you keep your server load down. Look in the WDS manual under Using Crontab
Unix: Use Symbolic Links to Shorten script names
Make your scripts and web pages paths loos smaller by using Symbolic links to the scripts.
ln -s wdsparkline.php wds.php
Now you can use WDS/wds.php to the script instead of WDS/wdsparkline.php. The symbolic link points to the same (longer) script name
Download:
Below is download information for the WDS scripts and documentation.
| Current Version | Release Date | Download | Documentation | License | Dontate |
|---|---|---|---|---|---|
| WDS v1.0.5 | 2007-11-22 15:28 US/Arizona |
ZIP [313] EXE [120] TAR GZip [117] |
Users Guide PDF [429] | FreeWare Distributed under BSD License |
Banners:
In case you want to have a banner showing what you are using...
200x40 Banner

<a href="http://www.TNETWeather.com/scripts.php"
title="TNETWeather Scripts">
<img scr="/www.TNETWeather.com/images/wds-banner-200x40.png"/>
</a>350x71 Banner

<a href="http://www.TNETWeather.com/scripts.php"
title="TNETWeather Scripts">
<img scr="/www.TNETWeather.com/images/wds-banner-350x71.png"/>
</a>
NEXRAD Radar & Satellite Maps




© 1992-2009 Copyright TNET Services, Inc.