R Language - How to Create Calendar plot in R

in Education3 years ago

In this post, we take a look at How to Create Calendar plot in R using ggplot2. Previously we covered how to create the dendrogram plot. And it was a good tutorial for those who are looking for visualization in that specific dataset which would require the circular dendrogram.

If your data is of that type then definitely both the dendrogram and the circular dendrogram are going to work for you. Some of the really good output using the dendrogram can be drawn. And also you can make use of such visualization for variety of plots which could help you.

If you consider the RStudio program you would realize that it is lot easier to make plots with it. You can also use commercial IDE and the apps which would be good. But overall I'd say that there are some of the apps that would be easier to use but are paid. So stick with the RStudio to develop this visualization or plot.

I have created a video to give you an overview on How to Create Calendar plot in R. You should give this one a try.



Let's start.

You should first consider making use of the package. So we are making use of the calendR package. And that should be installed and then called in library function.

install.packages("calendR")
library(calendR)

After we try this setup we would be having the RStudio view something like below image.

cal1.png

then we make use of the calendr function which would fetch the current year.

calendR()

That should show you this years plot in the output. That looks something like this.

cal2.png

So that is it. You have this small library but it can do a lot of things.You are not limited to just printing the calendar. You can go more in depth with this. Like find out specific weekends. You can even color them. You can choose when the week starts and adjust the calendar accordingly.

So by customizing you are making the calendar lot easier for the data. Like say moon phases and the sun phases of the calendar makes it easier for you. You can also draw specific calendars and the use them for pointing out some other data. So something like that was missing in the overall data specific visualization.

This library is handy in many scenarios like say plotting the moon phases, showing specific dates on the data and also showing the data in terms of the calendar. So kind of shows out the progress. How you choose to show the data and how you choose to manipulate is being in the record here. So you have something to view.

Now you can experiment with some of the properties like - special.col and the low.col you also have the special day etc. You can do the experiment on them and show the data accordingly. That would give you an insight on how the data works. I prefer things that way as it can teach me a lot of stuff when I experiment like that.

I have made the tutorial and trying to grow my channel. So far the revenue has been tanking on the youtube. I need your support on youtube so you sharing my content on the Whatsapp, telegram and also sharing and giving like over there would help me. I feel that it would help me if you interact there with above video for me.

If you happen to like this content, do give me feedback over there and that would help me improve my efforts in near future.

Sort:  

Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support.