TORNADO FREQUENCY

Row

Tornado Frequency by State: 1950-2018

TORNADO INTENSITY

Row

Tornado Intensity in Different Decades

TORNADO TREND

Row

Tornado Trend: 1950-2018

CONCLUSIONS

Key Observations for each visualization:

  1. Tornado often occurs in the Southern territories in the U.S.

  2. F0 scale tornadoes increased from 1990 to 2009. F1 scale tornadoes relatively remained in the same occurrence in the past 5 decades. The higher scale tornadoes, however, occurred less since 1980.

  3. The overall trend suggests that tornado occurrence increased from 1950 to 1982, decreased from 1983 to 1987, then rocketed to the peak in 2004, and fluctuated to date.

---
title: "ANLY 512 - Lab 2"
author: "Yining Wang, Zhenghao Xiao"
date: "April 5 2019"
output:
  flexdashboard::flex_dashboard:
    orientation: rows
    social: menu
    source_code: embed
  html_document:
    df_print: paged
---


```{r setup, include=FALSE}
library(flexdashboard)
library(knitr)
library(ggplot2)
library(ggthemes)
library(quantmod)
library(plyr)
require(dplyr)
library(scales)
library(plotly)
library(rnoaa)
library(maps)
library(usmap)

```

```{r setup-data, cache=F, include=F}
tornado <- read.csv(url("https://www.spc.noaa.gov/wcm/data/1950-2017_actual_tornadoes.csv"))
```

TORNADO FREQUENCY 
============================================================================
Sidebar {.sidebar}
-----------------------------------------------------------------------

### Tornado freqency
Climate change could result in severe natural disasters such as **tornado**, which is is a rapidly rotating column of air that is in contact with both the surface of the Earth and a cumulonimbus cloud.

National Oceanic and Atmospheric Administration (NOAA) keeps recording tornado statistics since 1950. Such statistics include specific time, (E)F-scale, injuries, fatalities, estimated property loss, estimated crop loss, specific coordinates, and so forth.

Tornadoes occur most frequently in North America, particularly in central and southeastern regions of the United States colloquially known as **tornado alley**.

Figure on the right panel shows the tornado frequency count by State from January 3rd, 1950 to August 28, 2018. Dataset contains all the 50 States plus Washington District of Columbia (DC) and Puerto Rico (PR). Not a single U.S. territory has not experienced tornado in the past 70 years. Among all the states, Texas (TX) suffered most.


Row
-----------------------------------------------------------------------

### Tornado Frequency by State: 1950-2018

```{r map}
#create a table of frequency count by State
freq <- as.data.frame(table(tornado$st))
colnames(freq) <- c("state","count")

plot_usmap(data=freq,values="count",lines="black") + 
  scale_fill_continuous(low="blue",high="red",name="Count",label=scales::comma) + 
  theme(legend.position="right",plot.title=element_text(hjust=0.5,size=15,face="bold"))
```



TORNADO INTENSITY
===========================================================================================
Sidebar {.sidebar}
-----------------------------------------------------------------------

### Tornado Intensity

Figure on the right shows the stacked bar plot of the tornado intensity by decade. Tornado intensity is often defined by the Fujita scale (F-scale) as follows.

F0: 40–72mph, light damage;

F1: 73–112mph, moderate damage;

F2: 113–157mph, considerable damage;

F3: 158–206mph, severe damage;

F4: 207–260mph, devastating damage;

F5: 261–318mph, incredible damage.

-9: indicates missing values.

The figure shows that F0 scale tornadoes increased from 1990 to 2009. F1 scale tornadoes relatively remained in the same occurrence in the past 5 decades. The higher scale tornadoes, however, occurred less since 1980.



Row
-----------------------------------------------------------------------
### Tornado Intensity in Different Decades

```{r stacked barplot}
#create a two-dimensional table of frequency count by year and intensity
sta <- as.data.frame(table(tornado$yr,tornado$mag),stringsAsFactors=F)
sta$Var1 <- as.integer(sta$Var1)
sta$Decade <- dplyr::case_when(sta$Var1>=1950&sta$Var1<=1959~"1950-1959",sta$Var1>=1960&sta$Var1<=1969~"1960-1969",sta$Var1>=1970&sta$Var1<=1979~"1970-1979",sta$Var1>=1980&sta$Var1<=1989~"1980-1989",sta$Var1>=1990&sta$Var1<=1999~"1990-1999",sta$Var1>=2000&sta$Var1<=2009~"2000-2009",TRUE~"2010-2018")

p2 <- ggplot(sta,aes(Var2,Freq,fill=Decade)) + 
  geom_bar(stat="identity") + 
  labs(x="F-scale",y="Frequency Count")
plotly::ggplotly(p2)
```



TORNADO TREND
===========================================================================================
Sidebar {.sidebar}
-----------------------------------------------------------------------

### Tornado Trend

The Figure on the right show the tornados occurrence from 1950 to 2018. The overall increasing trend is alarming.
The trend suggests that tornado occurrence increased from 1950 to 1982, decreased from 1983 to 1987, then rocketed to the peak in 2004, and fluctuated to date.

Row
-----------------------------------------------------------------------
### Tornado Trend: 1950-2018

```{r line plot}
#create a table of frequency count by year
trend <- as.data.frame(table(tornado$yr))
trend$Var1 <- as.Date(trend$Var1,format="%Y")

p3 <- ggplot(trend,aes(Var1,Freq))+ 
  geom_line()+ 
  labs(x="Year",y="Tornado Count")
plotly::ggplotly(p3)
```


CONCLUSIONS
===========================================================================================


### Key Observations for each visualization:

1. Tornado often occurs in the Southern territories in the U.S.

2. F0 scale tornadoes increased from 1990 to 2009. F1 scale tornadoes relatively remained in the same occurrence in the past 5 decades. The higher scale tornadoes, however, occurred less since 1980.

3. The overall trend suggests that tornado occurrence increased from 1950 to 1982, decreased from 1983 to 1987, then rocketed to the peak in 2004, and fluctuated to date.