2024-11-24

The state.x77 Dataset

The state.x77 is a dataset consisting of data compiled in the 1970s. The data contained in it consists of the following categories:

[1] "Population" "Income"     "Illiteracy" "Life Exp"   "Murder"    
[6] "HS Grad"    "Frost"      "Area"      

Since the US is so large, it seemed logical to see if there are any differences between regions of the country. So the state.x77 dataset is amended with the state.region file:

[1] "Population" "Income"     "Illiteracy" "Life.Exp"   "Murder"    
[6] "HS.Grad"    "Frost"      "Area"       "Region"    

Number of States per Region

Area per Region

Population per Region

Average Population per State

Population Density

Obtaining Density

Density = withRegions$Population/withRegions$Area
withDensity = mutate(withRegions,
                  Density = withRegions$Population/withRegions$Area*1000
  )
head(withDensity)
           Population Income Illiteracy Life.Exp Murder HS.Grad Frost   Area
Alabama          3615   3624        2.1    69.05   15.1    41.3    20  50708
Alaska            365   6315        1.5    69.31   11.3    66.7   152 566432
Arizona          2212   4530        1.8    70.55    7.8    58.1    15 113417
Arkansas         2110   3378        1.9    70.66   10.1    39.9    65  51945
California      21198   5114        1.1    71.71   10.3    62.6    20 156361
Colorado         2541   4884        0.7    72.06    6.8    63.9   166 103766
           Region     Density
Alabama     South  71.2905261
Alaska       West   0.6443845
Arizona      West  19.5032491
Arkansas    South  40.6198864
California   West 135.5708904
Colorado     West  24.4877898

Sparsest States

        Population Income Illiteracy Life.Exp Murder HS.Grad Frost   Area
Alaska         365   6315        1.5    69.31   11.3    66.7   152 566432
Wyoming        376   4566        0.6    70.29    6.9    62.9   173  97203
Montana        746   4347        0.6    70.56    5.0    59.2   155 145587
Nevada         590   5149        0.5    69.03   11.5    65.2   188 109889
        Region   Density
Alaska    West 0.6443845
Wyoming   West 3.8681934
Montana   West 5.1240839
Nevada    West 5.3690542

Densest States

              Population Income Illiteracy Life.Exp Murder HS.Grad Frost Area
New Jersey          7333   5237        1.1    70.93    5.2    52.5   115 7521
Rhode Island         931   4558        1.3    71.90    2.4    46.4   127 1049
Massachusetts       5814   4755        1.1    71.83    3.3    58.5   103 7826
Connecticut         3100   5348        1.1    72.48    3.1    56.0   139 4862
                 Region  Density
New Jersey    Northeast 975.0033
Rhode Island  Northeast 887.5119
Massachusetts Northeast 742.9083
Connecticut   Northeast 637.5977

Examining Other Data Points

Does cold weather affect population?

Do cold states have more or fewer murders?

Does illiteracy affect life expectancy or murder rates?

Are murder rates and average life expectancy related?

Does income affect life expectancy?

Does higher illiteracy mean lower HS graduation rates?

Does cold weather affect population?

Do cold states have more murders?

Murders and Population Density

Murder Rates by Region

Freezing Days by Region

Does illiteracy affect murder rates?

Does illiteracy affect life expectancy?

Illiteracy Rates by Region

Are murder rates and average life expectancy related?

Life Expectancy by Region

Does income affect life expectancy?

Income by Region

Does higher illiteracy mean lower HS graduation rates?

Does a Higher Graduation Rate Lead to More Money?

Graduation Rate by Region