State Marriage Rates

Discussion thread created by : Gabriel Abreu

1. Introduction

These gives state marriage rates breaking down the data into regions and years. We can group the data by census region or census division. Then organize the rates according to year, changing it from wide data to long data.

URL: Dataset link

2.Load library

## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union

3. Data load and cleaning

Data is stored in the Github and loaded data from Github to Rstudio using read.csv() method.

3.1 Gather year from 1990 to 2016

This dataset year has given from 1990 to 2016. Each year mentioned as a column. Using tidyr convert these columns to Year column.

3.2 Rename column name

3.3 Region wise Marriage rate

Apply group by on Region and plot the graph using region wise marriage rate.

## Warning: Removed 186 rows containing non-finite values (stat_boxplot).
## Warning: Removed 186 rows containing non-finite values (stat_summary).

## Warning: Removed 186 rows containing non-finite values (stat_summary).

## [1] "West"      "South"     NA          "Midwest"   "Northeast"

3.4 Division wise Marriage rate

Apply group by on Division and plot the graph using region wise marriage rate.

## Warning: Removed 186 rows containing non-finite values (stat_boxplot).
## Warning: Removed 186 rows containing non-finite values (stat_summary).

## Warning: Removed 186 rows containing non-finite values (stat_summary).

##  [1] "Mountain"           "Pacific"            "South Atlantic"    
##  [4] "East South Central" "West South Central" ""                  
##  [7] "West North Central" "New England"        "East North Central"
## [10] "Middle Atlantic"

4. Analysis

We will analyze, yealy Marriage rate over Division and Region. We will look the trend, how the trend is changing over 26 years.

4.1 Yealy Average Marriage Rate over Division

4.2 Yealy Average Marriage Rate over Region

5. Conclusion

The plot 4.1 and plot 4.2 shows the Average Marriage Rate is decrasing from year 1990 to 2016.

  • Yealy Average Marriage Rate over Division: The Average Marriage Rate in Mountain division has decreased from 21.5 to 10.01 which is a decrease of 11.5%. The Average Marriage Rate in Middle Atlantic division has decreased from 7.7 to 6.29 which is a decrease of 1.4%. So, the Average Marriage Rate in Middle Atlantic division decreased less as compared to Mountain division.

  • Yealy Average Marriage Rate over Region: The Average Marriage Rate in Westregion has decreased from 17.3 to 9.41 which is a decrease of 7.9%. The Average Marriage Rate in Midwest region has decreased from 8.8 to 6.19 which is a decrease of 2.6%. So, the Average Marriage Rate in Midwest region decreased less as comparaed to West region.