In this dashboard we plan to analyse some of the climate related attributes. 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. We will present the following visuals in the dashboard:
Lowest temperature recorded in all the staes of USA
highest temerature recorded in all the staes of USA
Highest precipitation in 24 hoirs recorded in all the staes of USA
Maximum snowfall recorded in all the staes of USA
Maximum snow-depth recorded in all the staes of USA
In the last section of this dashboard we will describe few important observations from the visuals and address a few important questions.
Sources: The Following two sources were used for obtaining and understanding the data used in this dashboard:
Data Description: https://www.climate.gov/maps-data/dataset/extreme-weather-records-state-data-table
Now lets look at the visuals for the climate related attributes.
The few important observations which also address questions related to climate: i. The highest temerature recorded and the state in which it is recorded: 134 F, California
The lowest temerature recorded and the state in which it is recorded: -80 F, Alaska
The highest precipitation in 24 hours recorded and the state in which it is recorded: 42 Inches, Texas
The highest snowfall in 24 hours recorded and the state in which it is recorded: 78 Inches, Alaska
The highest snow-depth of all time recorded and the state in which it is recorded: 451 Inches, California
Apart from this direct observations there are some interesting observations/trend that can be noted by a careful look at the visualz.
---
title: "Data Exploration & Analysis Lab"
author: "Anil Jhanwar "
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("records.csv")
#as a next step lets start creating our dashboard
```
Overview
=====================================
In this dashboard we plan to analyse some of the climate related attributes.
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.
We will present the following visuals in the dashboard:
i. Lowest temperature recorded in all the staes of USA
ii. highest temerature recorded in all the staes of USA
iii. Highest precipitation in 24 hoirs recorded in all the staes of USA
iv. Maximum snowfall recorded in all the staes of USA
v. Maximum snow-depth recorded in all the staes of USA
In the last section of this dashboard we will describe few important observations from the visuals and address a few important questions.
Sources:
The Following two sources were used for obtaining and understanding the data used in this dashboard:
i. Datset: https://www.ncdc.noaa.gov/extremes/scec/records
ii. Data Description: https://www.climate.gov/maps-data/dataset/extreme-weather-records-state-data-table
Now lets look at the visuals for the climate related attributes.
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
====================================
The few important observations which also address questions related to climate:
i. The highest temerature recorded and the state in which it is recorded: 134 F, California
ii. The lowest temerature 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
Apart from this direct observations there are some interesting observations/trend that can be noted by a careful look at the visualz.
vi. Does the highest snowfall and highest snowdepth are positively coorelated with highest snow-depth?
Yes, by observing their respective bar chars simulteneously , we can see thatfor most of the states higher the highest snowdepth, higher the snowfall so there seems a strong positive correlation.