# How can I use several data fields drawn from curated data at once?

How can I use "MinTemperature", "MaxTemperature", and "Temperature" properties of WeatherData for one or more cities in one line of code?

• What's the point of one line of code? Do you intend anything more complex than, say, this variant of an example from the help page? DateListPlot[WeatherData["KABQ", #, {2008, 3}], Joined -> True] & /@ {"Pressure", "Temperature", "WindSpeed"} // TableForm Nov 15, 2012 at 6:00
• "one line of code" is overrated.
– rm -rf
Nov 15, 2012 at 6:08
• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2)Read the FAQs! 3) When you see good Q&A, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. ALSO, remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign Nov 15, 2012 at 8:04
• @Soum: take a look at Map[] in the help files. Nov 15, 2012 at 11:22

Here's something you could build on. It only shows min and max temperatures. The DateListPlot function layout is fairly simple for easy editing.

londoncoordinates = CityData["London", "Coordinates"];
londonweatherstation = WeatherData[londoncoordinates, "NearestStation"];
sydneycoordinates = CityData["Sydney", "Coordinates"];
sydneyweatherstation = WeatherData[sydneycoordinates, "NearestStation"];

DateListPlot[{
WeatherData[londonweatherstation,
"MaxTemperature", {{2011, 1, 2}, {2012, 1, 2}, "Day"}],
WeatherData[londonweatherstation,
"MinTemperature", {{2011, 1, 2}, {2012, 1, 2}, "Day"}],
WeatherData[sydneyweatherstation,
"MaxTemperature", {{2011, 1, 2}, {2012, 1, 2}, "Day"}],
WeatherData[sydneyweatherstation,
"MinTemperature", {{2011, 1, 2}, {2012, 1, 2}, "Day"}]},
Joined -> True,
PlotStyle -> {Hue[0.9, 0.6, 0.6], Hue[0.67, 0.6, 0.6],
Hue[0.9, 0.6, 0.6], Hue[0.67, 0.6, 0.6]},
Filling -> {{1 -> {{2}, Lighter[Pink]}}, {3 -> {{4}, Green}}},
AspectRatio -> 0.5, ImageSize -> 600,
FrameTicks -> {{Automatic, Automatic},
{{"Jan 2011", "Mar 2011", "May 2011", "Jul 2011", "Sep 2011",
"Nov 2011", "Jan 2012"}, Automatic}},
DateTicksFormat -> {"MonthNameShort"},
FrameLabel -> {{Style["\[Degree]C", Bold, Medium], Null}, {Null,
Null}}, RotateLabel -> False,
PlotLabel -> Row[{Style["Sydney", 22, Bold, Green]
, "                   ",
Style["London", 22, Bold, Lighter[Pink]]}]]
`