Hello,
Please I found the image below from a tweep and was fascinated by it:
.
I thought of replicating the image in RStudio for the daily occurrence of heat stress study am undertaking as that will help to succinctly communicate my message. After combing through the internet and trying some scripts for 3 days, this is the reprex I came out with which is way short of what I am working towards. Your help in pointing me toward the right direction will be greatly appreciated! Please this is the file I used for the reprex (https://drive.google.com/file/d/1pILiVNu_Ujojvkj-sxXCYXbMJLpwtSxv/view?usp=sharing).
Thanks in advance
### Daily Heat stress data
library(ggplot2)
#> Warning: package 'ggplot2' was built under R version 3.5.3
library(dplyr)
#> Warning: package 'dplyr' was built under R version 3.5.3
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(plyr)
#> -------------------------------------------------------------------------
#> You have loaded plyr after dplyr - this is likely to cause problems.
#> If you need functions from both plyr and dplyr, please load plyr first, then dplyr:
#> library(plyr); library(dplyr)
#> -------------------------------------------------------------------------
#>
#> Attaching package: 'plyr'
#> The following objects are masked from 'package:dplyr':
#>
#> arrange, count, desc, failwith, id, mutate, rename, summarise,
#> summarize
library(reprex)
daily <- read.csv("F:/Project work/Publication/Under writing/Heat stress/Data analysis/Histogram/mpiHi.csv", sep = ","
, header = TRUE)
daily %>% ggplot(aes(x=Date))+
geom_bar(aes(y=Safe.category), stat = "identity", col = "yellow")+
geom_bar(aes(y=Caution.category),stat = "identity", col = "orange") +
geom_bar(aes(y=Extreme.caution.category), stat = "identity", col = "dark orange")

Created on 2020-08-18 by the reprex package (v0.2.1)