mscross / pysplit

A package for HYSPLIT air parcel trajectory analysis.
BSD 3-Clause "New" or "Revised" License
152 stars 81 forks source link

Cluster Analysis- Mean meteorology #91

Open Saranya-puthalath opened 2 years ago

Saranya-puthalath commented 2 years ago

Is it possible to plot mean meteorology values over the respective cluster means with pysplit cluster analysis?

mscross commented 2 years ago

It should be possible to plot either the mean at each timestep (so the color changes along the path of the cluster mean), or the overall mean value (so the path of the cluster mean is a solid color).

In the first case, for each cluster, for each timestep, collect the value of interest from the member trajectories (into say, a list), find the mean, then assemble the along path means in a list, array, standalone Series, as a new Series in the Cluster.data GeoDataFrame,, etc. Then plot, generally following the basic scatterplotting example.

In the second case, for each cluster, collect the value of interest from the member trajectories all together, and find the mean. Then plot, generally following the hysplit clustering example.

Saranya-puthalath commented 2 years ago

Thank you Mellissa. As said, I prepared individual lists for the mean met variable of each cluster and assigned them to different lists. However, now I am stuck on how to plot them over the corresponding latitude and longitude. For the first case, I can see that clus. path.xy includes the array for latitude and longitude. Are they arranged in any particular order that cluster 1 path followed by cluster 2 or so? I am a newbie to python, please help me in sorting the above-mentioned problem.