# WeatherData acquirement in ListStreamPlot

I am trying to show the wind streams in a geographic area as following code for a range of time.Even if it works for realtime data but it doesn't work for range of time.I am filtering and also taking mean and it has no problem there.Could somebody help me please?

 ListStreamPlot[Table[{{x, y},Through[{Cos, Sin}[Mean[DeleteCases[WeatherData[{y, x},
"WindDirection", {{2013, 5, 28}, {2013, 5, 29}}][[All, 2]],
Missing["NotAvailable"]]] \[Degree]]]}, {x, 20, 56, 4}, {y, 32,57, 4}]]

-
What do you want to happen if WeatherData[{y, x}, "WindDirection", {{2013, 5, 28}, {2013, 5, 29}}] returns Missing["NotApplicable"]? –  Ｊ. Ｍ. Jun 5 '13 at 18:46
Do you want to make a movie or all data in one plot? –  Sjoerd C. de Vries Jun 5 '13 at 18:48
@0x4A4D I am filtering that .am I? –  Alex Jun 5 '13 at 18:49
@SjoerdC.deVries no just taking the mean of wind direction and plot it in stream –  Alex Jun 5 '13 at 18:49
Nope, you're removing Missing[] items from a list. You forgot to handle the case where the result is not a list, but a Missing[] object. –  Ｊ. Ｍ. Jun 5 '13 at 18:56

This works, but you have to take care of situations where the only result is a single Missing[].

Remarks:

• It's better not to average angles, but to take the mean of the resulting vectors
• you needed a Transpose
• Don't forget that the weather for a coordinate you specify is taken from the nearest weather station, which may be some distance from that location. Better to use the coordinates of that station.

.

ListStreamPlot[
Table[{{x, y},
Mean@Transpose@
Through[{Cos, Sin}[
N@DeleteCases[
WeatherData[{y, x},
"WindDirection", {{2013, 5, 28}, {2013, 5, 29}}][[All,
2]], Missing["NotAvailable"]] \[Degree]]]}, {x, 20, 56,
4}, {y, 32, 57, 4}]]


-
About that moving issue in a period of time do you think it is very difficult to do that? –  Alex Jun 5 '13 at 19:14