I have the following data, which is just a part of more than 20,000 rows of data (you can import it into r by copying the following data and then run read.delim("clipboard",sep = ",")
):
"datetime","speed","month_name","year"
2011-01-01 01:00:00,10.14,"Jan",2011
2011-01-01 02:00:00,10.12,"Jan",2011
2011-01-01 03:00:00,8.94,"Jan",2011
2011-01-01 04:00:00,9.53,"Jan",2011
2011-01-01 05:00:00,11.68,"Jan",2011
2011-01-01 06:00:00,10.93,"Jan",2011
2011-01-01 07:00:00,11.01,"Jan",2011
2011-01-01 08:00:00,11.56,"Jan",2011
2011-01-01 09:00:00,10.47,"Jan",2011
2011-01-01 10:00:00,11.18,"Jan",2011
2011-01-01 11:00:00,10.82,"Jan",2011
2011-01-01 12:00:00,10.91,"Jan",2011
2011-01-01 13:00:00,11,"Jan",2011
2011-01-01 14:00:00,11.06,"Jan",2011
2011-01-01 15:00:00,11.95,"Jan",2011
2011-01-01 16:00:00,10.85,"Jan",2011
2011-01-01 17:00:00,11.22,"Jan",2011
2011-01-01 18:00:00,10.2,"Jan",2011
2011-01-01 19:00:00,11.43,"Jan",2011
2011-01-01 20:00:00,10.62,"Jan",2011
2011-01-01 21:00:00,10.26,"Jan",2011
2011-01-01 22:00:00,10.11,"Jan",2011
2011-01-01 23:00:00,9.81,"Jan",2011
2011-01-02 00:00:00,9.21,"Jan",2011
2011-01-02 01:00:00,8.7,"Jan",2011
2011-01-02 02:00:00,8.23,"Jan",2011
2011-01-02 03:00:00,8.98,"Jan",2011
2011-01-02 04:00:00,9.34,"Jan",2011
2011-01-02 05:00:00,8.57,"Jan",2011
2011-01-02 06:00:00,9.03,"Jan",2011
I would like to create a clock chart similar to the picture below, which is from
Here is my code and the output, which produces something completely different:
df %>% ggplot(aes(x = month_name, y = speed))
geom_bar(stat="identity", width = 0.5)
coord_polar(start=0)
I want the radius of the circle to be the speed and the colour to be the frequency of that speed. similar to the following figure, but instead of directions, I want to have months around the circle the same as the first figure.
Created on 2022-08-14 by the reprex package (v2.0.1)