weather conditions list

Apr 29, 2009 at 5:08 PM
Hi,
I'm looking for the complete weather possible conditions list...
Can you help me?

Thanks
Julien
Coordinator
May 4, 2009 at 11:31 AM
I'm afraid we don't have one, however this piece of code below may help you out.

            List<string> CityNames = new List<string>
            {
                "Oslo",
                "Moscow",
                "Redmond WA",
                "Tucson AZ"
                //Add more city names here
            };

            List<string> Conditions = new List<string>();

            foreach (var city in CityNames)
            {
                GoogleWeatherData CityData = GoogleWeatherAPI.GetWeather(Animaonline.Globals.LanguageCode.en_US, city);

                if (!Conditions.Contains(CityData.CurrentConditions.Condition))
                {
                    Conditions.Add(CityData.CurrentConditions.Condition);
                }

                for (int i = 0; i < CityData.ForecastConditions.Count; i++)
                {
                    if (!Conditions.Contains(CityData.ForecastConditions[i].Condition))
                    {
                        Conditions.Add(CityData.ForecastConditions[i].Condition);
                    }
                }
            }

            foreach (var condition in Conditions)
            {
                Console.WriteLine(condition);
            }
Jan 24, 2010 at 7:42 PM

Here is an unofficial list of icons (which i presume correspond to every possible condition)

images/weather/chance_of_rain.gif
images/weather/sunny.gif
images/weather/mostly_sunny.gif
images/weather/partly_cloudy.gif
images/weather/mostly_cloudy.gif
images/weather/chance_of_storm.gif
images/weather/rain.gif
images/weather/chance_of_rain.gif
images/weather/chance_of_snow.gif
images/weather/cloudy.gif
images/weather/mist.gif
images/weather/storm.gif
images/weather/thunderstorm.gif
images/weather/chance_of_tstorm.gif
images/weather/sleet.gif
images/weather/snow.gif
images/weather/icy.gif
images/weather/dust.gif
images/weather/fog.gif
images/weather/smoke.gif
images/weather/haze.gif
images/weather/flurries.gif

I got it from here http://www.blindmotion.com/?p=73

Coordinator
Jan 24, 2010 at 7:45 PM

Thanks for sharing! :)

Jan 24, 2010 at 9:05 PM
Edited Jan 24, 2010 at 9:36 PM

From what i can tell by looking at a google images result, the list is pretty darn complete.

However my presumption was incorrect, the condition does not translate directly to the name of the image. for example:

<icon data="/ig/images/weather/chance_of_rain.gif"/>
<condition data="Scattered Showers"/>

A fellow programmer did exactly what I was going to do, he ran a script to search for a bunch of countries's weather conditions and listed them.

  1. ninuhadida on June 19th, 2009

    running this api and requesting data on several cities, I got the following list of conditions.. there might be more though.

    | Clear
    | Cloudy
    | Fog
    | Haze
    | Light rain
    | Mostly Cloudy
    | Overcast
    | Partly Cloudy
    | Rain
    | Rain Showers
    | Showers
    | Thunderstorm
    | Chance of Showers
    | Chance of Snow
    | Chance of Storm
    | Mostly Sunny
    | Partly Sunny
    | Scattered Showers
    | Sunny

Now this would be fine and dandy if it was complete, the thing is that those are 19 and there are 22 images. On top of that some images have more then one condition assigned to them. Here is what i gathered:
chance_of_rain.gif = Chance of Rain
sunny.gif = Clear
mostly_sunny.gif = Mostly Sunny
partly_cloudy.gif = Partly Cloudy
mostly_cloudy.gif = Mostly Cloudy
chance_of_storm.gif = Chance of Storm
rain.gif = Rain
chance_of_rain.gif = Chance of Showers,Chance of Rain
chance_of_snow.gif = Chance of Snow
cloudy.gif = Cloudy,Overcast
mist.gif  
storm.gif
thunderstorm.gif
chance_of_tstorm.gif
sleet.gif
snow.gif
icy.gif = Chance of ice
dust.gif
fog.gif
smoke.gif
haze.gif
flurries.gif
I could not verify the correct assignments for mist storm, thunderstorm or haze as they are much rarer then the others. On top of that google searches for code that people have pasted isn't necessarily a reliable method. In the end, its really hard to come up with a full list. Yahoo API has 48 conditions, but they only list the first day in their feed. I would have really liked to use google, but the lack of documentation would make my end result unreliable.
Note: the reason I want to know all the conditions is so that I can make my own graphics for them. Where does google get these conditions in the first place?
Jun 2, 2011 at 4:42 AM

Does anyone have the new list of google file names for weather icons?