- Posts: 28
- Thank you received: 0
New NWAC pages
- tomq
-
- User
-
Please Log in or Create an account to join the conversation.
- RonL
-
- User
-
- Posts: 259
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Amar Andalkar
-
- User
-
- Posts: 635
- Thank you received: 0
But as several others have said, I too would like to have a way to access the data in textual form, without graphics, etc. Most of all, I miss the files which used to have the data from all telemetry sites in a single file ( www.nwac.us/products/ALL and www.nwac.us/products/archive/ALL.1 , 2, 3, etc for 10 days).
So several days ago, I wrote a PHP script to grab the data from the new website and concatenate it for all telemetry sites. This script can also display the data for any one site. I wasn't sure whether I should post a link to it online, but I guess I will since there seems to be some demand for just such a thing:
www.skimountaineer.com/CascadeSki/CascadeSnowNWAC-New2009.php
Any bug reports or suggestions for improvements to the script are welcome. By the way, the options which concatenate all sites for 10 days ( www.skimountaineer.com/CascadeSki/Cascad...?site=all&days=10day ) produce a very large HTML file of nearly 500 kB in size.
And I think I'll eventually fix my old Ten-Day Concatenated NWAC Telemetry page ( www.skimountaineer.com/CascadeSki/CascadeSnowNWAC-TenDay.html ) so that it works again, even though it's really not needed anymore.
Please Log in or Create an account to join the conversation.
- Jon Garrison
-
- User
-
- Posts: 74
- Thank you received: 0
On yours the font size is still fixed, it seems, and the tab offsets make the page too wide and the columns get messed up. But you have given me hope, and an excuse to figure out PHP.
Thanks again!
Please Log in or Create an account to join the conversation.
- Charles
-
- User
-
- Posts: 388
- Thank you received: 0
Weather Links (button) => NWAC Telemetry (sub-menu)
Please Log in or Create an account to join the conversation.
- Amar Andalkar
-
- User
-
- Posts: 635
- Thank you received: 0
Thank you Amar, for this and your whole website. On my blackberry the official NWAC telemetry sites are long and large to load.
On yours the font size is still fixed, it seems, and the tab offsets make the page too wide and the columns get messed up. But you have given me hope, and an excuse to figure out PHP.
The font size is not fixed or set anywhere in my script, you can reduce it in a web browser (not sure about Blackberry, I've never used one). My script does keep the <pre></pre> tags from the NWAC source, which forces a fixed-width font to make sure the columns stay aligned.
About half of the NWAC data sites have a left margin of whitespace, which is either 4 spaces or 10 spaces wide (I'm not sure why they can't all just be left-justified with no left margin, that would be nicer). I figured that it would be easy to narrow those NWAC files, since stripping leading whitespace is very simple in PHP using ltrim, so it should only take a couple minutes to add that to the code. WRONG! Unfortunately ltrim strips ALL the leading whitespace and mangles the column alignment. It took an hour to figure things out and write reliable code to strip only the left margin from data sites which have it, while leaving those leading spaces which are necessary. It appears to be working now, and as a bonus the "concatenate ALL" display looks much nicer now with all the left margins stripped off and date/time columns aligned for all sites.
Making the data for widest NWAC sites (e.g. Snoqualmie is 98 chars wide, several others are 84) any narrower might be possible, by carefully stripping certain characters without ruining the column alignment. I'll try this afternoon . . .
Edited to add: Well, it was pretty easy to shrink the Snoqualmie data from 98 to 82 chars wide. Does anyone really want an even narrower version of that, or narrow versions of other wide sites? The narrow version has to be manually figured out and coded for each individual site, since they all have different columns and widths.
TAY weather links section also now has the 10 day text-only telemetry data available. There doesn't seem to be any need for the individual 24 hour pages any more.
The "now" data is often needed, because the 10-day files are not always generated correctly. The code which generates the 10-day files has a few bugs. For example: as of this morning, the "mtsthelens" 10-day file does not exist, even though there is several hours of data in the "now" file. And the "campmuir" 10-day file is always missing 4am every day.
And on some days, the underlying NWAC archive files (e.g OSOMTB.1, OSOMTB.2, ..., OSOMTB.10) from which the 10-day files are generated are not properly updated, so that the OSOMTB.1 actually has 2 day old data, OSOMTB.2 has 3 day old, etc., and yesterday is completely missing. In this case, the "now" is the only place to find the last 24 hours of data, since the 10-day file will have a gap from 4am this morning to 4am yesterday when such problems occur.
Please Log in or Create an account to join the conversation.