Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract wind and humidity values #18

Closed
GoogleCodeExporter opened this issue Apr 5, 2015 · 5 comments
Closed

Extract wind and humidity values #18

GoogleCodeExporter opened this issue Apr 5, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

Extract wind speed and humidity values from the strings, provided by Google.
It's required to:
- display the values in the correct unit (issue 14)
- calculate wind chill and humidex (issue 16)

Original issue reported on code.google.com by DNelubin on 28 Jan 2011 at 4:47

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Original comment by DNelubin on 24 Oct 2011 at 10:02

  • Added labels: Milestone-v0.3

@GoogleCodeExporter
Copy link
Author

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

@GoogleCodeExporter
Copy link
Author

Original comment by DNelubin on 27 Dec 2012 at 4:46

@GoogleCodeExporter
Copy link
Author

Done.

Original comment by DNelubin on 27 Dec 2012 at 4:48

  • Changed state: Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant