Closed GoogleCodeExporter closed 8 years ago
The problem:
Google Weather API doesn't provide the numeric wind and humidity values. All
that we have is the following:
<humidity data="Humidity: 48%"/>
<wind_condition data="Wind: NE at 9 mph"/>
The text differs for different languages. We need to parse it to numeric values.
Workflow:
- Add methods to interface:
http://code.google.com/p/weather-notification-android/source/browse/src/ru/gelin
/android/weather/WeatherCondition.java - to get wind speed and direction, and
humidity value. The backward compatibility with existed clients shouldn't be
broken. The wind speed should be returned in three units: mph, km/h, m/s.
- Add implementation to
http://code.google.com/p/weather-notification-android/source/browse/src/ru/gelin
/android/weather/google/GoogleWeather.java. Need to ask weather for English and
system locale (better to use single HTTP connection for both).
- Add unit tests to:
http://code.google.com/p/weather-notification-android/source/browse/test/ru/geli
n/android/weather/google/GoogleWeatherTest.java - to be sure that everything
works.
You can download weather information in all available languages by running this
script:
http://code.google.com/p/weather-notification-android/source/browse/misc/fetch_s
amples.py. And see all the wind and humidity values by running this:
http://code.google.com/p/weather-notification-android/source/browse/misc/analyze
_samples.py
Original comment by DNelubin
on 2 Aug 2011 at 5:30
Original comment by DNelubin
on 24 Oct 2011 at 10:02
Wojciech Zygmunt Porczyk:
there is simple method to get SI unit (km/h): just add &hl=en-gb to
google api query:
http://www.google.com/ig/api?weather=warsaw&hl=en-gb
http://www.google.com/ig/api?weather=warsaw&hl=en
Aallows to display more correct values because of avoiding of conversion
Original comment by DNelubin
on 5 May 2012 at 8:22
Original comment by DNelubin
on 27 Dec 2012 at 4:46
Done.
Original comment by DNelubin
on 27 Dec 2012 at 4:48
Original issue reported on code.google.com by
DNelubin
on 28 Jan 2011 at 4:47