Simple Data visualization
#library_needed
library(ggplot2)
#code
data<- read.csv('Temp_and_rain.csv')
ggplot(data, aes(Month, tem))+
geom_point()
Interpretation: The visualiztion made from the temp_and_rain data shows us the relationship between months and temparature inBD. we can see from the visualization that the temparature in bd during month may to octobar is high where from november to februarary is lover and keeps rising from march to to May again. The data is based on more than 100years of historical dat
Interactive Visualization
#library_needed
library(plotly)
library(ggthemes)
library(tidyverse)
#data_entry
h<-ggplot( data, aes(x= Month, y= rain)) +
geom_point(aes(col=tem), size=3) +
geom_smooth(method="lm",col="red", size=0.6) +
coord_cartesian(xlim=c(0,12), ylim=c(1,1000)) +
labs(title="Raining in BD", subtitle ="From temp and rain")
#plotting
ggplotly(h +theme_tufte())
Interpretation: The visualization came from more than 100 years of historical data of raining and temparature in bd. In gives the detailed view of how raining is a cyclical process during the months. Also another fact that can be ovsered is that the lower the rain the lower the temparature. The doted mark’s colore change due to the temparature.
Animation
#library_needed
library(tidyverse)
library(gganimate)
#data_entry
Rain<- data%>%
ggplot(aes(Month,rain,col=tem)) +
geom_point() +
labs(title = 'BD Raining', x='Month', y='rain (cm^3)') +
transition_time(Year) +
labs(title = "Year: {frame_time}")+
ease_aes('linear') +
theme_tufte()
Rain
Interpretation: The animation shows the clyciclal effect of raining in BD during the months. In different years it rainsin diferent scale which is why the plot are moving at a random distance but the raining is usually a clyclical proces which is why the during the mid year the dots are at a higher scal than other time of the year.