0
$\begingroup$

I am trying to plot lat, lon, and maximum rainfall of hurricane Harvey on a Map of texas. I have gathered all the data inside Mathematica using station names and the WeatherData function. This is the code I have so far:

coordinates = CityData[{"Dallas", "Texas", "UnitedStates"}, "Coordinates"];
weatherstations = WeatherData[{coordinates, 400}];
Lat = Table[WeatherData[weatherstations[[i]], "Latitude"], {i, 400}];
Lon = Table[WeatherData[weatherstations[[j]], "Longitude"], {j, 400}];
dRain = 
Table[WeatherData[weatherstations[[k]], "TotalPrecipitation",{{2017, 8, 17}, {2017, 9, 3}, "Day"}], {k, 400}];
MaxRain = Table[DeleteCases[Max[dRain[[k]]], _Missing], {k, 400}];
Rdata = DeleteCases[Transpose[{Lat, Lon, MaxRain}], {_, _, _Missing}];

The bounds on the latitude and longitude are visualized in the graph below. enter image description here

Does anyone know how to plot this data on the map above and color code the points based on rainfall height. Also how to add a color code scale (red for higher rainfall values, blue for lower rainfall values)? I am guessing you use ColorFunction but I am new to Mathematica and I am not entire sure how to go about this. Thank you to anyone who could edit or help me out this this problem.

$\endgroup$
1
$\begingroup$

Something like this?

pts = {PointSize[Large], Blend[{Yellow, Red}, Rescale[#[[3]], {0, 1}]],
Point@(GeoPosition[#])} & /@ Rdata;
GeoGraphics[AppendTo[pts,GeoBoundsRegion[{{Min[Lat], Max[Lat]}, {Min[Lon], Max[Lon]}}]]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.