I've been working on a model to show the number (of people) in groups who walk by a certain point, and from which direction they come from. I have data from 1994 up until 2020, with a time step of 10 minutes (a lot of data!)
After getting all the data, I used np.histogram2D
to plot in a polar plot the distribution and got something like this:
For this I used plt.pcolormesh
(not relevant, but that's how I got this).
The data I have is all stored in an np.array
and the values are the ones obtained when the np.histogram2D
was used:
count, xedges, yedges = np.histogram2d(Umag, phi,bins=(xedges,yedges))
Where count
is the data stored in the np.array
mentioned before, Umag
is the data used and phi
is the direction from where the people come from.
I have now been asked to calculate the Probability Density Function of this set of data, meaning that what I want to show is the probability of a group of 3 people come from 45º (as an example). I really dont know how to do this so maybe if someone has any suggestion, it would be greatly appreciated!
I have thought about using script.stats.norm.pdf
but I can't seem to figure out how to do it!
Thank you for any help you can give!