From this Data Exploration and analysis dashboard we are going to analyse the climate data collected for areas all over the world. The scope of analysis will be -US geographical boundaries and we will see the data has been presented for all the states of the US .
The list of visualizations in the dashboard:
1.All-Time Highest temperatures recorded in the USA by states.
2.All-Time Maximum 24-Hour Snowfall recorded in all the states of USA.
3.All-Time Greatest 24-Hour Precipitation recorded in all the states of USA.
4.All-Time Maximum Snow Depth recorded in all the states of USA.
5.All-Time Lowest temperatures recorded in the USA by states.
By the end of visualization I am going to the answer the above questions.
Dataset refrence link:
1.-All-Time Highest and lowest temperatures recorded in the USA by states. The highest and lowest temperatures recorded in the states are : Highest -California 134 degress F and the lowest is -Alaska -80 degrees F.
2.-All-Time Maximum 24-Hour Snowfall recorded in all the states of USA. The maximum 24 Hour snowfall is recorded in -Alaska state of USA 78 Inches.
3.-All-Time Greatest 24-Hour Precipitation in all the states of USA. The greatest 24 Hour precipitation is recorded in -Texas state of USA 42 Inches.
4.-All-Time Maximum Snow Depth recorded in all the states of USA. The maximum snow depth is recorded in -California state of USA 451 Inches.
---
title: "Lab2 - Data Exploration and Analysis Laboratory"
author: "Chandi Prasanna Malepu "
date: "`r Sys.Date()`"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
source_code: embed
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
library(ggplot2)
library(dplyr)
library(plotly)
library(flexdashboard)
```
```{r,echo = FALSE, message = FALSE}
#Loading the climate data from excel file to R studio.
climateData <- read.csv("D:/Tues day 512/climate.csv")
#View(climateData)
```
-**Summary** {data-width=550}
=====================================
### Summary
From this Data Exploration and analysis dashboard we are going to analyse the climate data collected for areas all over the world. The scope of analysis will be -**US geographical boundaries and we will see the data has been presented for all the states of the US** .
The list of visualizations in the dashboard:
1.All-Time Highest temperatures recorded in the USA by states.
2.All-Time Maximum 24-Hour Snowfall recorded in all the states of USA.
3.All-Time Greatest 24-Hour Precipitation recorded in all the states of USA.
4.All-Time Maximum Snow Depth recorded in all the states of USA.
5.All-Time Lowest temperatures recorded in the USA by states.
By the end of visualization I am going to the answer the above questions.
Dataset refrence link:
https://www.ncdc.noaa.gov/extremes/scec/records
https://www.climate.gov/
-**Maximum Temperature** {data-width=550}
=====================================
### -**Highest temperatures recorded**
```{r,echo = FALSE, message = FALSE}
max_Temp <- climateData[climateData$Element == "All-Time Maximum Temperature" ,c(1,2,4) ]
max_Temp_unique<- unique(max_Temp)
MaxTemp <-ggplot(max_Temp_unique, aes(x = State, y = Value)) + geom_bar(aes(fill=State),stat="identity",width = 0.80, position = position_dodge()) + xlab("State") + ylab("Highest Recorded Temperature in F") +
theme_classic()+
theme(plot.background = element_rect(fill = "yellow"), axis.text.x=element_blank(),
axis.ticks.x=element_blank()
) + ggtitle("Maximum Temperature Recorded by All States in the USA")
ggplotly(MaxTemp)
```
-**SnowFall** {.tabset data-width=550}
=====================================
### -**Maximum 24-Hour Snowfall recorded**
```{r, echo = FALSE, message = FALSE}
maximum_snow <- climateData[climateData$Element == "All-Time Maximum 24-Hour Snowfall" ,c(1,2,4) ]
maximum_snow_unique<- unique(maximum_snow)
#removing missing values from the data to avoid blank spances in the chart
maximum_snow_unique<- na.omit(maximum_snow_unique)
plot_ly(maximum_snow_unique, x = ~State, y = ~Value, type="scatter", mode="lines") %>%
layout(
title = 'Maximum Recorded 24 Hour Snow fall in the USA by States',
xaxis = list(
title = 'States'
),
yaxis = list(
title = 'Maximum 24-Hour Snowfall in Inches'
)
)
```
-**Precipitation** {.tabset data-width=550}
=====================================
### -**Greatest 24-Hour Precipitation recorded**
```{r, echo = FALSE, message = FALSE}
Highest_Precipitation <- climateData[climateData$Element == "All-Time Greatest 24-Hour Precipitation" ,c(1,2,4) ]
Highest_Precipitation_unique<- unique(Highest_Precipitation)
#removing missing values from the data
Highest_Precipitation_unique<- na.omit(Highest_Precipitation_unique)
pres <- ggplot(Highest_Precipitation_unique, aes(x = State, y = Value)) + geom_bar(aes(fill=State),stat="identity",width = 0.90, position = position_dodge()) + xlab("State") + ylab("All-Time Greatest 24-Hour Precipitation in all the states of USA ") +
theme_bw()+coord_flip()+
theme(plot.background = element_rect(fill = "green"), axis.text.x=element_blank(),
axis.ticks.x=element_blank()
) + ggtitle("Greatest Rcorded 24-Hour Precipitation in all States of the USA")
ggplotly(pres)
```
-**Snow Depth** {.tabset data-width=550}
=====================================
### -**Maximum Snow Depth recorded**
```{r, echo = FALSE, message = FALSE}
max_snow_depth <- climateData[climateData$Element == "All-Time Maximum Snow Depth" ,c(1,2,4) ]
max_snow_depth_unique<- unique(max_snow_depth)
#removing missing values from the data
max_snow_depth_unique<-na.omit(max_snow_depth_unique)
plot_ly(max_snow_depth_unique, x = ~State, y = ~Value, type="scatter", mode="lines") %>%
layout(
title = 'Maximum Recorded Snow Depth in the USA by States',
xaxis = list(
title = 'States'
),
yaxis = list(
title = 'All-Time Maximum Snow Depth in Inches'
)
)
```
-**Minimum Temperature** {.tabset data-width=550}
=====================================
### -**Minimum Temperature Recorded**
```{r,echo = FALSE, message = FALSE}
min_Temp <- climateData[climateData$Element == "All-Time Minimum Temperature" ,c(1,2,4) ]
min_Temp_unique<- unique(min_Temp)
MinTemp <- ggplot(min_Temp_unique, aes(x = State, y = Value)) + geom_bar(aes(fill=State),stat="identity",width = 0.80, position = position_dodge()) + xlab("State") + ylab("Lowest Recorded Temperature in F") +
theme_classic()+
theme(plot.background = element_rect(fill = "yellow"), axis.text.x=element_blank(),
axis.ticks.x=element_blank()
) + ggtitle("Minimum Temperature Recorded by All States in the USA")
ggplotly(MinTemp)
```
-**Conclusion** {.tabset data-width=550}
=====================================
### -**Conclusion**
1.-**All-Time Highest and lowest temperatures recorded in the USA by states**.
The highest and lowest temperatures recorded in the states are :
Highest -**California** 134 degress F and the lowest is -**Alaska** -80 degrees F.
2.-**All-Time Maximum 24-Hour Snowfall recorded in all the states of USA**.
The maximum 24 Hour snowfall is recorded in -**Alaska state of USA** 78 Inches.
3.-**All-Time Greatest 24-Hour Precipitation in all the states of USA**.
The greatest 24 Hour precipitation is recorded in -**Texas state of USA** 42 Inches.
4.-**All-Time Maximum Snow Depth recorded in all the states of USA**.
The maximum snow depth is recorded in -**California state of USA** 451 Inches.