Author Topic: Adding stats to website  (Read 6337 times)

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 150
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Adding stats to website
« on: July 28, 2015, 07:52:29 AM »
I know how to get individual files on to my custom website, but is there any script that can load all the daily, monthly and yearly reports to my site and then display them? I have seen others have done this, but I've not found a way, other than loading them all individually and creating a webpage for each month with dropdown menus to select the days, months and years.

Can this be done automatically?

Steve

  • Global Moderator
  • Storm
  • *****
  • Posts: 1555
    • DW8454
    • KOHAVON11
    • Avon Weather
  • Station Details: Davis Wireless VP2 Plus w/24 hr FARS, Leaf & Soil Station, 2023 Mac mini M2 Pro, 32GB RAM, Mac OS 14, WeatherCat 3.2
Re: Adding stats to website
« Reply #1 on: July 28, 2015, 05:37:55 PM »
Alan, are you referring to the statistics as shown HERE on my web page? If so, here are the tags for your template:

Historical Weather for L$
Last update: D$
STRECORDS$
STRECENT$
ST1$

I hope that helps,
Steve
Steve - Avon, Ohio, USA


CWOP: DW8454 - WU: KOHAVON11 - AWEKAS - CoCoRaHS
PWSweather - WeatherCloud - Twitter - Facebook

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 150
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Adding stats to website
« Reply #2 on: July 28, 2015, 05:47:44 PM »
Thanks Steve, I had just seen those tags and I will be using them when I design a stats page. I was thinking more of the daily and monthly reports. Tonight, there will be a report produced for the 28th, and the July monthly report will be updated. It's really the July one, and the 2015 one, which I would like to use on my site.

ALAN.

JosBaz

  • Strong Breeze
  • ***
  • Posts: 232
    • INBRSON2
    • Weatherstation Son en Breugel, The Netherlands
  • Station Details: Davis Vantage Pro2 Wireless, WeatherCat on Mac OS X 10.13.6
Re: Adding stats to website
« Reply #3 on: July 28, 2015, 06:59:47 PM »
Maybe I'm missing the point (happens more often at my age) but the below tags give you this on your site:
STNOAAMO$ gives you this month's NOAA report
STNOAAYR$ gives you this year's NOAA report

In addition you can add:
STNOAAPRMO$ gives you last month's NOAA report
STNOAAPRYR$ gives you last year's NOAA report

Jos

Randall75

  • Storm
  • *****
  • Posts: 1332
  • CWOP-CW6734 WeatherUnderground-KOHNEWAR6
    • CW6734
    • KOHNEWAR6
    • Randy's Weather On The Hill
  • Station Details: Davis Vantage Pro 2 Plus.iMac i5 OS High Sierra 10.13.6 8GB Ram, WeatherCat 3,Logitech 9000 Pro Web Cam
Re: Adding stats to website
« Reply #4 on: July 28, 2015, 10:26:31 PM »
Hi Alan
 
I have daily,yesterday,weekly,monthly, and yearly stats on my web site


Highest temperature today = 89.0?F at 3:54 PM
[/l]

Lowest temperature today = 65.6 ?F at 6:45 AM
Highest dewpoint today = 72.8 ?F at 2:27 PM
Lowest dewpoint today = 61.9 ?F at 6:23 AM
Highest external humidity today = 90 % at 7:01 AM
Lowest external humidity today = 47 % at 3:42 PM
Highest heat index today = 95.6 ?F at 2:27 PM
Lowest wind chill today = 65.6 ?F at 6:45 AM
Highest pressure today = 29.97 inHg at 9:06 AM
Lowest pressure today = 29.91 inHg at 5:17 PM
Highest wind speed today = 11 MPH at 12:34 PM
Wind run today: 11.43 Miles
Average wind direction today = 67 degrees
Highest rain rate today = 0.00 in/h at 5:01 PM
             Rain Total today = 0.00 in         
is this what you are looking for
cheers
[cheers1]

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 150
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Adding stats to website
« Reply #5 on: July 28, 2015, 10:43:21 PM »
I think I'm looking for something that doesn't exist Randy. I'm looking for a script that will upload the daily, monthly and yearly reports and then display them on a page on my site.

This is what I could do on my old Weather Display set-up - http://www.brackenhouse.net/weather/wxclimate.php. Something similar to that would be great, if not, I'll have to do all the coding myself.

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Re: Adding stats to website
« Reply #6 on: July 28, 2015, 11:05:49 PM »
Dear Alan, Jos, Steve, and WeatherCat fans,

I think I'm looking for something that doesn't exist Randy.

I think you are correct.  WeatherCat can now create NOAA styled reports, but they are created as Acrobat PDF files.  You could easily upload them with a little bit of scripting, but that might not be what you are looking for.

You might consider asking for Stu to support something like this as a feature request, but I'm not sure that will fit the bill either.  It would be hard to create HTML that would look as nice as your old site in some sort of generic way.  I suppose another way to get what you want is to ask one of the web template developers if they could add that feature.  I would expect this will become more sought-after as questions about climate change continue swirl around scientific and political circles . . .

Cheers, Edouard . . .  [cheers1]

P.S. . . .  [wink] . . .  It just dawned on me!  I've discovered the true cause of global warming!

It must be all that hot air coming from all those politicians talking about it!!
. . . . .  [rolleyes2]

 [lol2]

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 150
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Adding stats to website
« Reply #7 on: July 29, 2015, 06:53:29 AM »
What I would really like Edouard, is some way of incorporating the six years of data that I accumulated with Weather Display. Now that would really please me. I can but dream. I would love to see pages like all-time records pick up the data since I started monitoring the weather. This page (http://www.brackenhouse.net/weather/wxnoaarecords.php) was also a page I viewed regularly. It can tell you the records for any day in your history, and would be a great addition to any template set.

ALAN.

wurzelmac

  • Storm
  • *****
  • Posts: 1361
    • ITIROLPR2
    • Wetterstation Pr?graten am Gro?venediger
  • Station Details: Davis Vantage PRO2 Plus (24h fan aspirated, wireless) with UV/Solar | Weather Envoy Data Logger | Mac mini 2023 M2 8/256 | 1x Canon EOS 1300D | macOS Sonoma 14.2
Re: Adding stats to website
« Reply #8 on: July 29, 2015, 08:04:12 AM »
WeatherCat can now create NOAA styled reports, but they are created as Acrobat PDF files.  You could easily upload them with a little bit of scripting, but that might not be what you are looking for.

Hello Edouard & Alan,
there are web tags available for NOAA this month/last month and NOAA this year/last year. For all other NOAA reports you are right, Edouard, only available as PDF.
(Look at WeatherCat Tags Reference)

Cheers,
Reinhard
Reinhard


Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 150
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Adding stats to website
« Reply #9 on: July 29, 2015, 10:18:27 AM »
Thanks Wurzel, adding a stats page is now high on my list of jobs to do, now that I know what to do.

ALAN.

Blicj11

  • Storm
  • *****
  • Posts: 3941
    • EW3808
    • KUTHEBER6
    • Timber Lakes Weather
  • Station Details: Davis Vantage Pro2 Plus | WeatherLinkIP Data Logger | iMac (2019), 3.6 GHz Intel Core i9, 40 GB RAM, macOS Ventura 13.6 | Sharx SCNC2900 Webcam | WeatherCat 3.3 | Supportive Wife
Re: Adding stats to website
« Reply #10 on: July 29, 2015, 04:03:38 PM »
Alan:

When you build your stats page, you can copy the NOAA pdf for any previous year and past it on your statistics page. Since this is a one-time copy and paste, it is not too burdensome to get previous years' data onto a page. It's how I built mine. Of course, this assumes you have the data in the database, but I am talking about going forward with your WeatherCat data.
Blick


Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 150
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Adding stats to website
« Reply #11 on: July 29, 2015, 04:21:16 PM »
I have data going back six years captured by Weather Display. It produced files which I can use on my new site, once I have designed a page. I twon't be too much of a burden.

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 150
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Adding stats to website
« Reply #12 on: August 03, 2015, 06:16:49 PM »
I'm using WDTEXT$ to produce the current wind direction in text, but I want to produce the similar for 24HRSAGO, LASTWEEK, LASTMONTH etc, but nothing seems to work. Anyone any ideas? What am I missing?

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: Adding stats to website
« Reply #13 on: August 04, 2015, 01:19:21 AM »
I'm assuming you've checked the <WC tags> list and something following the example: STAT$ITEM:TYPE:PERIOD$ doesn't work? As in: ( the "|" means "or" [computer])
Quote
STAT$WINDSPEED|AVERAGEWINDSPEED|WINDGUST:(line-break)
24HRSGO|MIN|MAX|AVERAGE:(line-break)
YESTERDAY$|THISWEEK$|LASTWEEK$|THISMONTH$|(line-break)
LASTMONTH$|THISYEAR$|LASTYEAR$|THISSEASON$|ALLTIME$
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system


Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 150
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: Adding stats to website
« Reply #14 on: August 04, 2015, 06:34:32 AM »
I'm using the following to create the current wind direction
Quote
STAT$WINDDIRECTION:CURRENT$? (WDTEXT$)

This gives me
Quote
206? (SW)

To get the direction at the same time yesterday, I'm using
Quote
STAT$WINDDIRECTION:24HRSAGO$? (WDTEXT$)

The wind direction is correct in degrees, but in text, I get the wind direction now, not yesterday. Obviously I need to add something to the (WDTEXT$) tag, but nothing seems to work.

This is the offending page - http://www.brackenhouse.net/weather27/index.php?p=35&lang=en

ALAN.