Skip to content

simoncoggins/Realtime-Weather

Repository files navigation

Project to produce live weather data for kiting

The main elements are:
- PHP script (collect.php) to scrape data from weather sources and present as single JSON source file
- PHP script (data-sources.php) containing a list of sources to collect. See file for format documentation.
- The output from collect.php (currently called data.json). Generated by collect.php
- JavaScript page to collect latest data and display (currently kiting.html)
- A small PHP script to return the time until next update from the server

The collect.php script must be run regularly to get new data. This can be done from the crontab using
either curl:

*/15 * * * * curl --silent --compressed [url] > /dev/null

or wget:

*/15 * * * * wget -qO /dev/null [url]

I'm currently running every 15 minutes to avoid excessive load on the data sources, while still providing 
reasonably up to date data.

It should also be possible to run the script from the command line but that caused some problems for me as 
it doesn't seem to load the xpath module in CL mode.

I'm using a .htaccess file to prevent caching of data.json.

== Feature Requests from kiters ==

D = Done

D Include map showing where spots are
D Mobile version of page (w/o javascript)
D Add more feeds including multiple at same site?
- Time to update for individual feeds
- Tide info? More info from private sources?
- Trends

== Bugs ==

- Time ago still using client time (unavoidable?)

== To Do and potential ideas for futher development ==

- Let people choose to see limited range of spots
- Map version
- Let users pick units (e.g. kts/mph/ms^-1/kph)
- Add trend graphs showing change over last few hours
- Add forecasts if possible
- Recommendations/star ratings of how good each site in is real-time?
- or just colours to indicate good/bad conditions (right wind speed range, right wind dir for site?)
- Make a mini pop-up version that people can leave open

About

Obtains real-time weather data from multiple public feeds and displays on a single page

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published