So the following code uses WeatherData
to get a list of longitude, latitude and maximum wind-speed from 400 weather stations around Dallas and plots the data.
dallas = CityData[{"Dallas", "Texas", "UnitedStates"}, "Coordinates"];
With[{n = 400}, weatherStations = WeatherData[{dallas, n}]];
coordinates = Through[weatherStations["Coordinates"]];
dailyMaxWinds =
WeatherData[#,"MaxWindSpeed", {{2017, 8, 17}, {2017, 9, 3}, "Day"}] & /@
weatherStations;
maxWinds =
(Max /@ DeleteCases[Through[dailyMaxWinds["Values"]],
Missing[_], {-2}, Heads -> True]) /. {"Values" ->
0., -\[Infinity] -> 0.};
windData = MapThread[{Sequence @@ #1, #2} &, {coordinates, maxWinds}];
ListPlot3D[windData]
What I want to do is "smooth" this graph out using Interpolation. I want to interpolate wind speed at specific coordinates using 'cubic' interpolation. I am able to "quietly" interpolate the data by doing
windData = MapThread[{#1, #2} &, {coordinates, maxWinds}];
windC=Quiet@Interpolation[windData];
But I am getting an input value
error lies outside the range of data interpolation function. Extrapolation will be used
if I try to plot it.
Plot3D[windC[lat, lon], {lat, Min[windData[[All, 1]]],
Max[windData[[All, 1]]]}, {lon, Min[windData[[All, 2]]],
Max[windData[[All, 2]]]}]
Can anyone please help me with the code to smooth this graph?