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/
Prerequisites:
- git , node (>= 0.10) and npm (>= 2.0)
- 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):
- git clone the repo URL : git clone [email protected]:kylezeeuwen/weatherman.git
- cd weatherman
- npm install
- ./node_modules/bower/bin/bower install
- ./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!
- Loads wearher for current location (if allowed)
- Can load weather for any city/region that is searched for
- Can save cities to build a list of frequently used cities
- Uses URL routing so specific app states (i.e., viewing weather for Manly) can be bookmarked.
- can switch between Celcius and Fahrenheit, and it will remember your preference
- Make site truly responsive to fill out a mobile viewport
- Add detailed view for every future day in forecast - the openweathermap API provides very detailed data
- Add some weather graphs
- Current Weather Endpoint : http://api.openweathermap.org/data/2.5/weather
- Forecast Endpoint : http://api.openweathermap.org/data/2.5/forecast
- Icon List : http://openweathermap.org/weather-conditions
- Query Params :
- City ID : id=
- City Name : q=
- Lat/Lon : lat=&lon=
- City ID List : http://openweathermap.org/help/city_list.txt
- 0 Celcius : 273.15
- 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().