Author Topic: More on almanac tags with sample code and a nifty Java Script snippet  (Read 830 times)

0 Members and 1 Guest are viewing this topic.

Offline twig2963

  • Member
  • *
  • Posts: 13
Thanks to Raycock for solving my problem with the almanac tags

See
http://www.wxforum.net/index.php?topic=24031.0

Answer:
The data is available when you are registered with Wunderground. The trick is do not include your Zip code in the Wunderground Climate Report section and the almanac tags will be available consistently.

Here is how I use the almanac tags on my site. I have included a really nifty little snippet of Java Script that shows Rain Yesterday. I got this snippet off a board like this one many years ago. I have no idea how it works - but it does.

Note: I am posting this message on Nov 24th. There has been no rain in Miami for two days and the rainfall to date is very close to normal. Copy the code to your site for your results. Also my web host (HOSTMETRO) sucks and my site goes off line a lot.  Try again later.

http://www.twigsdigs.com/weather/vwscache/almanac_sample.html

Follow the link to see the code.

You can see how I use this code on my page. Look in the little block with the lighthouse - also scroll down the page to see almanac data for the current day.

http://www.twigsdigs.com/weather/hw3.php?

Sunny skies,

Twig

« Last Edit: November 24, 2014, 08:10:58 PM by twig2963 »

Offline LFWX

  • Forecaster
  • *****
  • Posts: 1089
  • Liberty Township, Butler County, Ohio
    • Liberty Fairfield Weather Center
Re: More on almanac tags with sample code and a nifty Java Script snippet
« Reply #1 on: November 25, 2014, 07:17:37 PM »
Just a quick FYI - The "normal rain to date" shown by VWS (^almmtd1^) is actually the "measured rain to date" for your chosen location...this is an error with the VWS software many are not aware of. Watch the number for a few days and you'll notice that it only changes when it rains near you...it should increase a little each day.

You can obtain the correct data from the NCDC and use it to create an array, as I have done with my site.
http://www.wxforum.net/index.php?topic=23826.msg229564#msg229564
« Last Edit: November 25, 2014, 07:23:20 PM by LFWX »
Station: Davis Vantage Pro2 Fan Aspirated
Software: Virtual Weather Station V14.00p64
www.LFWeatherCenter.com
CWOP: DW1039
CoCoRaHS: OH-BT-1
Weather Underground: KOHHAMIL7
Weather For You: DW1039
Midwestern Weather Network