Author Topic: Alt-Dashboard 6.95 Record Highs and Lows  (Read 550 times)

0 Members and 1 Guest are viewing this topic.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Alt-Dashboard 6.95 Record Highs and Lows
« on: March 07, 2019, 11:20:14 AM »
Unfortunately Weather Underground on March 22 is discontinuing access to NWS record highs and lows as optionally displayed by this dashboard
Code: [Select]
$useWU     = true;            // Use Weather Underground Records for a Site Closest to You.
                              // Set to true if you have UNDER 2years of data on your station.
                              // This is based on Weather Underground Records.  (Setup WU under View, Wunderground Almanac)
                              // This no longer has any effect on the New Record HIGH/LOW icon.
in AltAjaxDashboardConfig6.php

The easiest option is to set $useWU = false; although I like having the records for my locale visible.

A more difficult option is to locate a source for these daily records, and scrape it.  I found a University of Nebraska-Lincoln monthly source, and created a scraper to cache the source each day just after midnight and extract the day's data.  (Come to think of it, I may only need to cache the source once a month.)
Code: [Select]
$today: 7, $dayMonth: March
$fileName: https://lincolnweather.unl.edu/records/March-Records.asp
$hopper: 17973, $startgrab: 17972, $finish: 18279
$length: 307
$the_data:
7
80/2016
14/1995,1932
-9/1943
55/2000
0.87/1958


$theHigh: 80, $highDate: 2016, $theLow: -9, $lowDate: 1943

These records are now displayed on my AltAjaxDashboard.

This is strictly a local solution for me.

However there is a more general source, Weather Underground (Reload the page if a backend error occurs and you are a WU member. I don't think it works for non-WU members.) that currently displays some locale's historical extremes.  Whether or not this data will still be available after March 22nd remains a question.  If it's still around it would form the basis for a more general solution to the display of local temperature records in that it could also be scraped of the relevant numbers.  Time will tell.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline kc1fx

  • Member
  • *
  • Posts: 15
    • Local Weather
Re: Alt-Dashboard 6.95 Record Highs and Lows
« Reply #1 on: May 03, 2019, 11:43:37 AM »
So does this mean that we no longer can access weather averages and Daily extremes from a local NOAA/NWS station anymore? I've been searching and not too much luck.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Alt-Dashboard 6.95 Record Highs and Lows
« Reply #2 on: May 03, 2019, 01:57:42 PM »
Here is an entry to the data: https://www.ncdc.noaa.gov/customer-support/partnerships/regional-climate-centers

Extracting and displaying the appropriate information isn't the easiest thing to do.  Once you find an appropriate dataset however, it's entirely possible.  For instance, select a daily almanac appropriate for your location and see how the data is displayed.  Or use NOWDATA.

Because each Regional Climate Center does its own thing data-wise, I don't see any easy way to generalize the process.

I've attached my kludged-together script I use to get my local daily record highs and lows, with dates.  It's not pretty, but you can get the idea.  And, no, I'm not up to guiding anyone through a similar process.  You're on your own.

In context here's the code in my Ajaxdashboard6.php I use to refresh the HiLo script and access its variables:
Code: [Select]
include_once("AltAjaxDashboardConfig6.php"); // for alt Dashboard configuration items
include_once('get-aqi-rss.php');        // get AQI index value for dashboard display
include_once('LincolnHiLo-Update.php'); // Get Today's HiLo Values
global $theHigh,$highDate,$theLow,$lowDate; // Access these values
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline kc1fx

  • Member
  • *
  • Posts: 15
    • Local Weather
Re: Alt-Dashboard 6.95 Record Highs and Lows
« Reply #3 on: May 03, 2019, 04:09:44 PM »
Thanks for the info. I've done alot of Perl scripting to extract data with much success.