I am trying to create a map that plots the intensity of wind speed from satellite data. The data consists of longitude, latitude, and the wind speed intensity. The longitude/latitude plots the locations (done), while the speed gives each point a color based on the value of the wind data.
As of now, all points are colored blue (look at script).
The data frame looks like this:
lon lat wind_speed
1 13.0 75.3 23.5
2 12.9 25.2 23.7
3 12.7 75.2 24.2
4 12.6 75.1 24.6
...
The result should look something like this: https://gyazo.com/118d4785b49c861096f93799f60a0622
here is my current code:
import os
import numpy as np
from netCDF4 import Dataset
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
... #ncdump, this is from a file in my computer
#variables for map in array form
wind_speed_array =nc_fid.variables['wind_speed_alt']
lats=nc_fid.variables['lat'][:]
lons =nc_fid.variables['lon'][:]
fig = plt.figure()
fig.autofmt_xdate()
m = Basemap(projection='mill',resolution='l')
m.drawcoastlines()
m.drawcountries()
plt.title("time series plot: wind speed")
x,y=m(lons,lats)
cs=m.scatter(x,y,wind_speed_array,color='blue')
plt.show()
Currently, I have a map with all the points, but they are all colored blue. How would I make the points colored based on their value like in the example picture?