2021-04-28

Plotting daily vaccinations in USA

I"m totally new to programming and I have learned the main functions and ways to analyze and plot data.

I have en excel with the daily vaccinations since 1/14/2021 by states and I want to create a time-series graph with at least 3 of these states.

cov$Code<- NULL

colnames(cov)<- c("state","day","vaccinations")
head(cov)
r3<- cov$state %in% c("Alabama", "Texas","California")
cov2<- cov
cov2<- cov[r3,]

m<- ggplot(data=cov2, aes(x=day, y = vaccinations, color= state))

m + geom_line(show.legend = FALSE) 

I've read in many forums that I can do it with the geom_path() function but I don't know what are arguments I need for this particular case. The code runs something like this:

This is the plot that I get, but I want to see the accumulated amount in each day for each state

empty plot!

And this is my objective: What I want to do in R



from Recent Questions - Stack Overflow https://ift.tt/3eDqDai
https://ift.tt/3nsFLLM

No comments:

Post a Comment