static L openWeatherMap_simpleCelsiusForecast(S cityName) { S url = "http://api.openweathermap.org/data/2.5/forecast"; S xml = loadPageWithParams(url, APPID := openWeatherMapAPIKey(), q := cityName, mode := "xml"); new TreeMap maxPerDay; for (L tTime : findContainerOrEmptyTag(xml, "time")) { S from = tagParam(tTime, "from"); S day = takeFirst(from, lastIndexOf(from, "T")); L tTemperature = first(findContainerOrEmptyTag(tTime, "temperature")); double maxTemp = kelvinToCelsius(parseDouble(tagParam(tTemperature, "max"))); maxPerDay.put(day, max(maxTemp, toDouble(maxPerDay.get(day)))); } ret valuesAsList(maxPerDay); }