Skip to content

kylezeeuwen/weatherman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather App

This repo contains source for a angular based weather website.

You can build and host it yourself, or view it here (note you must allow the page to use your location or all bets are off ) : http://kylezeeuwen.github.io/weatherman/

Install instructions (for OSX or Linux - Windows will be similar but harder):

Prerequisites:

  1. git , node (>= 0.10) and npm (>= 2.0)
  2. Up to date chrome browser (Tested on OSX 10.10.4 with chrome 44.0.2403.155 )

Steps (execute each of these commands from the terminal):

  1. git clone the repo URL : git clone [email protected]:kylezeeuwen/weatherman.git
  2. cd weatherman
  3. npm install
  4. ./node_modules/bower/bin/bower install
  5. ./node_modules/gulp/bin/gulp.js serve

This should cause chrome to open a tab to the URL http://localhost:9000 . The website should be visible!

Site Features

  1. Loads wearher for current location (if allowed)
  2. Can load weather for any city/region that is searched for
  3. Can save cities to build a list of frequently used cities
  4. Uses URL routing so specific app states (i.e., viewing weather for Manly) can be bookmarked.
  5. can switch between Celcius and Fahrenheit, and it will remember your preference

Next Steps

  1. Make site truly responsive to fill out a mobile viewport
  2. Add detailed view for every future day in forecast - the openweathermap API provides very detailed data
  3. Add some weather graphs

OpenWeather API Notes

Issues/Todo:

  • navigator.geolocation should only be called within secure origin (https://). App will eventually break
  • Round celcius to nearest degree
  • Incomplete bower/wiredep mgmt of bootstrap
  • Not handling unexpeced data or API errors. All code expects API to respond correctly
  • The C/F display is handled in a filter which pulls the preference from a service. This means that the final value is a computed value (not directly linked via data binding) and when the user preference is updated angular doesn't detect it needs to redraw the values. So I have to explicitly call a reload().

About

a simple responsive page showing current and forecasted weather

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published