-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.Rmd
76 lines (50 loc) · 4.14 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
title: "Final Project Exploratory Data Analysis"
author: "Em Tallman, Jirat Rymparsurat, Martin Truong, Tyler Takeuchi"
output: html_document
date: "5/22/22"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library("knitr")
source("summary.r")
source("scatter and lines for final project2.0.R")
source("State Rate Chart.R")
source("Table.r")
source("map.r")
```
extrafont::loadfonts()
## Introduction
Our exploratory analysis will try to answer these questions:
* "How much has suicide changed through the years?"
* "What is the amount of suicide percent to actual deaths?"
* "What states have the highest rates of suicide?"
We are focusing mostly on suicides in relation to other data.
## Summary Information
```{r summary, include=FALSE}
#print(summary)
# select which values we want to show since showing the entire table takes up
# a lot of space
```
Looking through our data, we found that the most common age group to commit suicide was `r summary$most_common_age` and the most common sex was `r summary$most_common_sex`. Looking at all suicide minimums per state (grouped by year), we found that the absolute lowest minimum came from `r summary$lowest_min_deaths_state` (Vermont), in the year `r summary$lowest_min_deaths_year`. Likewise, looking at maximums per state, we found that the absolute highest maximum came from `r summary$highest_max_deaths_state` (Rhode Island) in the year `r summary$highest_max_deaths_year`. In the case of human resource workers, in the year 2016 we found that there were (per 100k individuals): `r summary$psychiatrists_per_100k` psychiatrists, `r summary$psychologists_per_100k` psychologists, `r summary$soc_workers_per_100k` social workers, and `r summary$nurses_per_100k` nurses.
## Table of Aggregated Data - Table of minimum and maximum deaths by state/year
This table takes the summary information of grouped states. This table shows trends based on time while also listing the states which demosntrates the state trends and if those have any correlation with the years. Grouping by state normalizes the data because one state's extreme will vary greatly from another state's but maybe not as much as its own extreme. This table provides insight for each state and shows how and if the context of time played a role in the severity of the extreme value.
```{r}
State_Table
```
### Chart 1 - Death rate per 100,000 by state (Circular barplot)
The purpose of this chart is to visualize the death rate by state. This allows the reader to compare the rates between states through comparing the length of each bar. Along with the bars are rates of the respective states to accurately convey the length of the bar rather than purely relying on visual comparison. The circular barplot made the most sense in this scenario because a normal barplot would have 50 variables on a single axis which would not allow for a reader to see the whole chart.
```{r echo=FALSE}
p
```
### Chart 2 - Number of Suicides Per year (2000-2015)
The purpose of including this scatter plot with lines is to show the change over years. The data shows an increase as the years go on. This could be due to the increase in data collection capabilities, or just a changing social world with more internet access as well. Also with the increase in internet access it also means increase in information.
```{r echo=FALSE, warning=FALSE}
scatterline
```
### Chart 3 - US Map of Suicide Death Rates and Total Deaths
The purpose of including the 2 maps is to compare the average death rate by state per year to the average total deaths per year. This shows how a higher average death rate from suicide does not correlate to a higher average total death rate. The reason for this is that states with a lower population will have a higher average suicide death rate compared to states with a higher population because if they have the same amount of total deaths from suicide, then the state with the lower population will have a higher death rate. For example, California has the highest average total death, but has one of the lowest average death rates by suicide since it has one of the highest state population in the country.
```{r echo=FALSE}
avg_rate_map
avg_death_map
```