Overview

In this dashboard we plan to analyze some of the climate related attributes.

  1. Lowest temperature recorded in all the states of USA.

  2. Highest temperature recorded in all the states of USA.

  3. Highest precipitation in 24 hours recorded in all the states of USA.

  4. Maximum snowfall recorded in all the states of USA.

  5. Maximum snow-depth recorded in all the states of USA.

Highest v/s Lowest Temperature

Row

Highest Recorded Temperature

Row

Lowest Recorded Temperature

Highest Pricipitation

Greatest 24-Hour Precipitation

Maximum Snowfall v/s Snow-Depth

Row

Maximum Recorded 24-Hour Snowfall

Row

All-Time Maximum Recorded Snow Depth

Conclusion/Quesitions Addressed

Observations

  1. The highest temperature recorded and the state in which it is recorded: 134 F, California.

  2. The lowest temperature recorded and the state in which it is recorded: -80 F, Alaska.

  3. The highest precipitation in 24 hours recorded and the state in which it is recorded: 42 Inches, Texas

  4. The highest snowfall in 24 hours recorded and the state in which it is recorded: 78 Inches, Alaska

  5. The highest snow-depth of all time recorded and the state in which it is recorded: 451 Inches, California

---
title: "Data Exploration & Analysis Lab"
author: "Gayathri Mutyala"
output:
  flexdashboard::flex_dashboard:
    orientation: columns
    vertical_layout: fill
    source_code: embed
---

```{r setup, include=FALSE}


knitr::opts_chunk$set(echo = FALSE)
#install.packages("plotly")
library(plotly)
library(flexdashboard)
library(ggplot2)
library(dplyr)

```


```{r,echo = FALSE, message = FALSE}

#dataset has been downlaoded from Climate.gov. Lets load the datainto R in a dataframe
climate<-read.csv("/Users/gmutya048/Downloads/records.csv")

```

Overview
===================================== 


In this dashboard we plan to analyze some of the climate related attributes.

i. Lowest temperature recorded in all the states of USA.

ii. Highest temperature recorded in all the states of USA.

iii. Highest precipitation in 24 hours recorded in all the states of USA.

iv. Maximum snowfall recorded in all the states of USA.

v. Maximum snow-depth recorded in all the states of USA.



Highest v/s Lowest Temperature
=======================================================================

Row {.tabset data-width=600}
----------------------------------------------------------------------
### Highest Recorded Temperature



```{r,echo = FALSE, message = FALSE}

maximum_T <- climate[climate$Element == "All-Time Maximum Temperature" ,c(1,2,4) ]
maximum_T_unique<- unique(maximum_T)

#plotting the data
p1 = ggplot(maximum_T_unique, aes(x = State, y = Value)) + geom_bar(aes(fill=State),stat="identity",width = 0.75, position = position_dodge()) + xlab("State") + ylab("Highest Recorded Temperature in F") +
theme_classic()+
theme(plot.background = element_rect(fill = "grey80"), axis.text.x=element_blank(),
      axis.ticks.x=element_blank()
      ) +  ggtitle("Highest Recorded Temperature by States in the US")

ggplotly(p1)

```



Row {.tabset }
-----------------------------------------------------------------------
### Lowest Recorded Temperature


```{r, echo = FALSE, message = FALSE}


minimum_T <- climate[climate$Element == "All-Time Minimum Temperature" ,c(1,2,4) ]
minimum_T_unique<- unique(minimum_T)

#plotting the data
p2 = ggplot(minimum_T_unique, aes(x = State, y = Value)) + geom_bar(aes(fill=State),stat="identity",width = 0.75, position = position_dodge()) + xlab("State") + ylab("Lowest Recorded Temperature in F") +
theme_classic()+
theme(plot.background = element_rect(fill = "grey80"), axis.text.x=element_blank(),
      axis.ticks.x=element_blank()
      ) +  ggtitle("Lowest Recorded Temperature by States in the US")

ggplotly(p2)


```




Highest Pricipitation
====================================

### Greatest 24-Hour Precipitation 


```{r, echo = FALSE, message = FALSE}



greatest_Preci <- climate[climate$Element == "All-Time Greatest 24-Hour Precipitation" ,c(1,2,4) ]
greatest_Preci_unique<- unique(greatest_Preci)

#removing missing values from the data to avoid blank spances in the chart
greatest_Preci_unique<- na.omit(greatest_Preci_unique)

#plotting the data
p3 = ggplot(greatest_Preci_unique, aes(x = State, y = Value)) + geom_bar(aes(fill=State),stat="identity",width = 0.75, position = position_dodge()) + xlab("State") + ylab("Greatest 24-Hour Precipitation in Inches ") +
theme_classic()+
theme(plot.background = element_rect(fill = "grey80"), axis.text.x=element_blank(),
      axis.ticks.x=element_blank()
      ) +  ggtitle("Greatest Rcorded 24-Hour Precipitation by States in the US")

ggplotly(p3)


```


Maximum Snowfall v/s Snow-Depth
====================================
Row {.tabset data-width=600}
----------------------------------------------------------------------
### Maximum Recorded 24-Hour Snowfall


```{r, echo = FALSE, message = FALSE}



maximum_snow <- climate[climate$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)

#plotting the data
p4 = ggplot(maximum_snow_unique, aes(x = State, y = Value)) + geom_bar(aes(fill=State),stat="identity",width = 0.75, position = position_dodge()) + xlab("State") + ylab("Maximum 24-Hour Snowfall in Inches") +
theme_classic()+
theme(plot.background = element_rect(fill = "grey80"), axis.text.x=element_blank(),
      axis.ticks.x=element_blank()
      ) +  ggtitle("Maximum Recorded 24-Hour Snowfall by States in the US")

ggplotly(p4)

```



Row {.tabset}
-----------------------------------------------------------------------
### All-Time Maximum Recorded Snow Depth


```{r, echo = FALSE, message = FALSE}



maximum_snow_dept <- climate[climate$Element == "All-Time Maximum Snow Depth" ,c(1,2,4) ]
maximum_snow_dept_unique<- unique(maximum_snow_dept)

#removing missing values from the data to avoid blank spances in the chart
maximum_snow_dept_unique<-na.omit(maximum_snow_dept_unique)


#plotting the data
p5 = ggplot(maximum_snow_dept_unique, aes(x = State, y = Value)) + geom_bar(aes(fill=State),stat="identity",width = 0.75, position = position_dodge()) + xlab("State") + ylab("All-Time Maximum Snow Depth in Inches") +
theme_classic()+
theme(plot.background = element_rect(fill = "grey80"), axis.text.x=element_blank(),
      axis.ticks.x=element_blank()
      ) +  ggtitle("All-Time Maximum Recorded Snow Depth by States in the US")

ggplotly(p5)


```






Conclusion/Quesitions Addressed
====================================




Observations

i. The highest temperature recorded and the state in which it is recorded: 134 F, California.

ii. The lowest temperature recorded and the state in which it is recorded: -80 F, Alaska.

iii. The highest precipitation in 24 hours recorded and the state in which it is recorded: 42 Inches, Texas

iv. The highest snowfall in 24 hours recorded and the state in which it is recorded: 78 Inches, Alaska

v. The highest snow-depth of all time recorded and the state in which it is recorded: 451 Inches, California