Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Yearly Data Summary--Adding new fields

Discussion and support for 3rd-party (non-Sandaysoft) tools for Cumulus
hdmax
Posts: 38
Joined: Fri 15 Jul 2011 5:15 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows Vista
Location: Ohio

Re: Yearly Data Summary--Adding new fields

Post by hdmax »

Thank you Ray;
I am using godaddy, and e-rice for my website. Not sure what I have as far as PHP, or Java. I do know that I need/want help in making my weather site look good.

On a side note, my home page I have a link to radar, and forecast, (At least they were links) For some reason the forecast link quit working with a mouse click, but still works on my droid phone touch screen. I just added my web address to my sig, but just in case it doen't work, here it is. http://www.sixmileturn-weather.com/
gemini06720 wrote:Mike, my version of the 'Annual Weather Data Summary' page, although based on David's PHP code, is now a 'highly modified' version of the original PHP script - I did not and will not adapted (update) David's JavaScript, not only because I am not as familiar with JavaScript as I am with PHP, but because I do not believe that JavaScript (code running on a user's computer) should be used for a script that should be run directly from the host server through the use of a PHP scripts... :roll:

With that said/written, I would be interested in helping you getting the data summary page installed and running ... as long as your host server makes PHP available - I could not check as you do not provide a link to your web pages in your profile... :evil:
User avatar
MackerelSky
Posts: 141
Joined: Fri 01 Apr 2011 8:14 pm
Weather Station: Davis VP2 w/FARS
Operating System: Toshiba Laptop Windows 7 x64
Location: Smethport, Pa.
Contact:

Re: Yearly Data Summary--Adding new fields

Post by MackerelSky »

hdmax wrote: On a side note, my home page I have a link to radar, and forecast, (At least they were links) For some reason the forecast link quit working with a mouse click, but still works on my droid phone touch screen. I just added my web address to my sig, but just in case it doen't work, here it is. http://www.sixmileturn-weather.com/
Looks like your call to *style="#temp* is broken at the end of the image, after the closing href tag...happens to me too many times...

Code: Select all

<p style="#temp {
	float: left;
	width: 100px;
}"><a href="http://www.wunderground.com/radar/mixedcomposite.asp?region=b4&size=2x&type=loop">
              <img src="http://maps.wunderground.com/data/640x480/mw_sf_anim.gif" alt="" border="0"/></a></p#temp {
	float: right;
	width: 400px;
}
A fix would look like

Code: Select all

</a></p>
<p style="#temp {
	float: right;
	width: 400px;
}
Your link should work fine after fixing that. If not, we'll try again...

Brad
Davis VP2/FARS
Cumulus 1.9.4(1092)

McKean Weather
'cause not everyone lives at the airport

Image
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Yearly Data Summary--Adding new fields

Post by gemini06720 »

hdmax wrote:I am using godaddy, and e-rice for my website. Not sure what I have as far as PHP, or Java.
Mike, I am attaching (download) a small PHP script that you can upload to your host server and test through your browser - the script will let you know if, indeed, PHP is available on your host server.
hdmax wrote:I do know that I need/want help in making my weather site look good.
Then, you could start by correcting some the coding errors you have made to your main 'index.htm' page... 8-)

Looking at the source code for your main page, I see this:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head><link href="weatherstyle.css" rel="stylesheet" type="text/css" />

<style type="text/css" media="all">
 body	{ color: blue;
 	  font-family: "arial","times new roman","courier";
 			}
 h1	{ color: crimson;
          font-weight: bold; }
 </style>


<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
<meta name="description" content="My backyard weather data" />
<meta name="keywords" content="Cumulus, My backyard weather data, weather, data, weather station" />
<title>My backyard weather</title>
<link href="weatherstyle.css" rel="stylesheet" type="text/css" />
</head>
The code at the top of the page should be rewritten to look like this:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
<meta name="description" content="My backyard weather data" />
<meta name="keywords" content="Cumulus, My backyard weather data, weather, data, weather station" />
<title>My backyard weather</title>
<link href="weatherstyle.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body  {
  color: blue;
  font-family: arial, times new roman , courier";
}
h1  {
  color: crimson;
  font-weight: bold;
}
</style>
</head>
And that is just the start... About a dozen more lines need some corrections, such as the one proposed by Brad... :twisted:

Mike you have to understand that cleanly written code (be it HTML, PHP, JavaScript, C++, Perl, etc.) make it easier to follow and understand what the code does - it also allows for the code to run better.

I am quite picky about the way code is written - this date back to my years in college and an excellent (and very demanding) teacher I had then... :)

It might be time to start a new message thread where code modifications and proper code writing is being demonstrated (taught) and practiced... :geek:
philcdav
Posts: 244
Joined: Tue 24 Jun 2008 9:43 pm
Weather Station: MyDEL WX2008 Mk2 Fine Offset
Operating System: XP and W7
Location: Maghull, nr Liverpool, UK
Contact:

Re: Yearly Data Summary--Adding new fields

Post by philcdav »

Hi David. sorry mate, been away.

I would have liked both max/min pressure and actually managed it using another helper but thanks anyway.

One thing i am having problems with is the auto upload of dayfile.txt.

i cant get it to work. Am home now so will have another go.

thanks for all your input.
Phil - G0DOR
User avatar
mcrossley
Posts: 12690
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yearly Data Summary--Adding new fields

Post by mcrossley »

An old thread but I just played around with this again. I've added the following to David's original PHP script...
  • Added low/high value highlighting like lots of other people - mine is transparent
  • Added row/column hover highlighting to both cells on the min/max table, in the original version it only works on the low value
  • Added extra data sets, and in particular handled Dominant Wind Direction in a summary manner rather than raw numbers
http://weather.wilmslowastro.com/datasummary.php
bnwrx
Posts: 464
Joined: Wed 25 Feb 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Yearly Data Summary--Adding new fields

Post by bnwrx »

mcrossley wrote:An old thread but I just played around with this again. I've added the following to David's original PHP script...

.....
[*]Added extra data sets, and in particular handled Dominant Wind Direction in a summary manner rather than raw numbers[/list]

http://weather.wilmslowastro.com/datasummary.php
Looks nice. How did you convert the dayfile text from #s?
User avatar
mcrossley
Posts: 12690
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yearly Data Summary--Adding new fields

Post by mcrossley »

Hi Bob
My PHP code is below (bear in mind I'm no PHP expert!)...

Code: Select all

//add winddir to $label_items
...
//define a global array of compass headings and arrow characters
$compass_headings = array('N&nbsp;↓','NE&nbsp;↙','E&nbsp;←','SE&nbsp;↖','S&nbsp;↑','SW&nbsp;↗','W&nbsp;→','NW&nbsp;↘','N&nbsp;↓');

//define a function to decode a 0-360 value to a heading
function getHeading($deg) {
	global $compass_headings;
	return $compass_headings[round($deg / 45)];;
}

//in the main 'drawCalendar()' for loop substitute the heading string for the value
...
				if (array_key_exists($id, $data)) {
					$data_arr = explode('|', $data[$id]);
...
					if ($whatdata == 'winddir' && intval($data_arr[0]) > 0) {
						$data_arr[0] = getHeading(intval($data_arr[0]));
					}
... 
bnwrx
Posts: 464
Joined: Wed 25 Feb 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Yearly Data Summary--Adding new fields

Post by bnwrx »

Thanks, but.... I use htm. don't know if it would work?
User avatar
mcrossley
Posts: 12690
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Yearly Data Summary--Adding new fields

Post by mcrossley »

I haven't looked at the JavaScript version, but the PHP code will only need minor tweaking to convert to JavaScript
bnwrx
Posts: 464
Joined: Wed 25 Feb 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Yearly Data Summary--Adding new fields

Post by bnwrx »

mcrossley wrote:I haven't looked at the JavaScript version, but the PHP code will only need minor tweaking to convert to JavaScript
Maybe, but still a bit beyond my capabilities I'm afraid... ;)
captzero
Posts: 363
Joined: Wed 03 Mar 2010 10:20 am
Weather Station: Vantage Pro2 w/ daytime FARS
Operating System: Windows 10
Location: Brisbane, Australia
Contact:

Re: Yearly Data Summary--Adding new fields

Post by captzero »

It would be even easier if today's dominant/average wind direction in the dayfile.txt file was included as a compass point as well as degrees. I'll submit an enhancement request (providing Steve can get the Rover back from Glasgow in one piece).
Dan

http://www.brisbaneliveweather.com




A man with a thermometer always knows the temperature. A man with two thermometers, not so sure.
bnwrx
Posts: 464
Joined: Wed 25 Feb 2009 12:01 am
Weather Station: Ambient WS2095 (Fine/Offset)
Operating System: Windows 10 64bit
Location: Woodland Park, Colorado USA
Contact:

Re: Yearly Data Summary--Adding new fields

Post by bnwrx »

I've played with my javascript and can get the page to display, but there is no data:
http://woodlandweather.org/datasummary.html

I am using dayfile col #39 for the dominate wind direction but it does not display any data. When I insert another data field # in the javascript it will show that data. Is field #39 the correct one for dominate wind bearing?

Thanks...
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: Yearly Data Summary--Adding new fields

Post by beteljuice »

... It would be even easier if today's dominant/average wind direction in the dayfile.txt file was included as a compass point as well as degrees...
Non-English users would still need a routine to translate.
I am using dayfile col #39 for the dominate wind direction but it does not display any data. When I insert another data field # in the javascript it will show that data. Is field #39 the correct one for dominate wind bearing?
I'm not sure, but I think it's complaining because at the start of the year that (and several other) values did not exist.
Image
......................Imagine, what you will KNOW tomorrow !
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Yearly Data Summary--Adding new fields

Post by steve »

beteljuice wrote:
... It would be even easier if today's dominant/average wind direction in the dayfile.txt file was included as a compass point as well as degrees...
Non-English users would still need a routine to translate.
It's a possibility for a future version of Cumulus. It could perhaps use strings.ini so that the translated equivalent was always logged.
Steve
gemini06720
Posts: 1700
Joined: Mon 10 Aug 2009 10:16 pm
Weather Station: No weather station
Operating System: No operating system
Location: World...

Re: Yearly Data Summary--Adding new fields

Post by gemini06720 »

mcrossley wrote:Added low/high value highlighting like lots of other people - mine is transparent
Mark, a while back, I also added transparency to the hi/lo temperature colours but used a different coding:

Code: Select all

  background-color: #000000;
  background: transparent;
Produces similar results but more inline with the W3C standards...
Post Reply