How to make a histogram of wind directions

I get wind directions every 12 seconds from my weather station. I would like to have a histogram (regular with e.g. mini graph card or a radial/rose one would be even nicer).

Has anyone played around with this before?
Would be great to have this on a day/week/month/year scale

I can’t think of a way to do this.

Even (messily) creating history stats sensors for each direction wouldn’t allow graphing.