This script pulls together other tables created from related scripts for extracting zillow two bedroom home values for May 2020, current July 2020 number of jobs available and hourly and annual average pay per job compared to licensed massage therapists (LMTs) in each of 50 of the US states not including the new District of Columbia state added this year 2020. It also pulls in the top 3 populated city per state that makes those average pay values according to the advertised pay per job and city from Indeed. All files are in the github repository located at https://github.com/JanJanJan2018/LMT-State-Licensing-Database and the census data that we start adding to this table is pulled from 2018 data from Data.census.gov demographics to add per state to state licensing requirements excel file: https://data.census.gov/cedsci/table?q=median%20pay%20by%20region%20and%20race&tid=ACSDP1Y2018.DP05&vintage=2018&cid=DP05_0001E&g=0100000US.04000.001&hidePreview=false
library(ggplot2)
library(grid)
library(gridExtra)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following object is masked from 'package:gridExtra':
##
## combine
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(tidyr)
data <- read.csv('ACSDP1Y2018.DP05_data_with_overlays_2020-07-07T154725.csv',
sep=',',
header=TRUE, na.strings = c('',' ','NA'))
meta <- read.csv('ACSDP1Y2018.DP05_metadata_2020-07-07T154725.csv',header=TRUE,
sep=',',na.strings=c('',' ','NA'))
head(data)
## GEO_ID NAME DP05_0001E
## 1 id Geographic Area Name Estimate!!SEX AND AGE!!Total population
## 2 0400000US17 Illinois 12741080
## 3 0400000US19 Iowa 3156145
## 4 0400000US29 Missouri 6126452
## 5 0400000US32 Nevada 3034392
## 6 0400000US42 Pennsylvania 12807060
## DP05_0001M
## 1 Margin of Error!!SEX AND AGE!!Total population
## 2 *****
## 3 *****
## 4 *****
## 5 *****
## 6 *****
## DP05_0001PE
## 1 Percent Estimate!!SEX AND AGE!!Total population
## 2 12741080
## 3 3156145
## 4 6126452
## 5 3034392
## 6 12807060
## DP05_0001PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0002E
## 1 Estimate!!SEX AND AGE!!Total population!!Male
## 2 6266062
## 3 1564888
## 4 3003165
## 5 1522374
## 6 6271620
## DP05_0002M
## 1 Margin of Error!!SEX AND AGE!!Total population!!Male
## 2 4378
## 3 3527
## 4 4798
## 5 2263
## 6 4457
## DP05_0002PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!Male
## 2 49.2
## 3 49.6
## 4 49.0
## 5 50.2
## 6 49.0
## DP05_0002PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!Male
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0003E
## 1 Estimate!!SEX AND AGE!!Total population!!Female
## 2 6475018
## 3 1591257
## 4 3123287
## 5 1512018
## 6 6535440
## DP05_0003M
## 1 Margin of Error!!SEX AND AGE!!Total population!!Female
## 2 4378
## 3 3527
## 4 4798
## 5 2263
## 6 4457
## DP05_0003PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!Female
## 2 50.8
## 3 50.4
## 4 51.0
## 5 49.8
## 6 51.0
## DP05_0003PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!Female
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0004E
## 1 Estimate!!SEX AND AGE!!Total population!!Sex ratio (males per 100 females)
## 2 96.8
## 3 98.3
## 4 96.2
## 5 100.7
## 6 96.0
## DP05_0004M
## 1 Margin of Error!!SEX AND AGE!!Total population!!Sex ratio (males per 100 females)
## 2 0.1
## 3 0.4
## 4 0.3
## 5 0.3
## 6 0.1
## DP05_0004PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!Sex ratio (males per 100 females)
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0004PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!Sex ratio (males per 100 females)
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0005E
## 1 Estimate!!SEX AND AGE!!Total population!!Under 5 years
## 2 759456
## 3 197883
## 4 370408
## 5 184539
## 6 700416
## DP05_0005M
## 1 Margin of Error!!SEX AND AGE!!Total population!!Under 5 years
## 2 2046
## 3 2271
## 4 2583
## 5 1173
## 6 2083
## DP05_0005PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!Under 5 years
## 2 6.0
## 3 6.3
## 4 6.0
## 5 6.1
## 6 5.5
## DP05_0005PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!Under 5 years
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0006E
## 1 Estimate!!SEX AND AGE!!Total population!!5 to 9 years
## 2 762237
## 3 197454
## 4 373737
## 5 188880
## 6 708163
## DP05_0006M
## 1 Margin of Error!!SEX AND AGE!!Total population!!5 to 9 years
## 2 10975
## 3 4889
## 4 8163
## 5 5734
## 6 9762
## DP05_0006PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!5 to 9 years
## 2 6.0
## 3 6.3
## 4 6.1
## 5 6.2
## 6 5.5
## DP05_0006PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!5 to 9 years
## 2 0.1
## 3 0.2
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0007E
## 1 Estimate!!SEX AND AGE!!Total population!!10 to 14 years
## 2 838140
## 3 215222
## 4 401199
## 5 201625
## 6 775827
## DP05_0007M
## 1 Margin of Error!!SEX AND AGE!!Total population!!10 to 14 years
## 2 10161
## 3 5215
## 4 7657
## 5 5704
## 6 9517
## DP05_0007PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!10 to 14 years
## 2 6.6
## 3 6.8
## 4 6.5
## 5 6.6
## 6 6.1
## DP05_0007PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!10 to 14 years
## 2 0.1
## 3 0.2
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0008E
## 1 Estimate!!SEX AND AGE!!Total population!!15 to 19 years
## 2 835845
## 3 220659
## 4 391923
## 5 182398
## 6 815621
## DP05_0008M
## 1 Margin of Error!!SEX AND AGE!!Total population!!15 to 19 years
## 2 4854
## 3 4122
## 4 4812
## 5 2209
## 6 4096
## DP05_0008PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!15 to 19 years
## 2 6.6
## 3 7.0
## 4 6.4
## 5 6.0
## 6 6.4
## DP05_0008PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!15 to 19 years
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0009E
## 1 Estimate!!SEX AND AGE!!Total population!!20 to 24 years
## 2 839026
## 3 220135
## 4 406398
## 5 180376
## 6 812406
## DP05_0009M
## 1 Margin of Error!!SEX AND AGE!!Total population!!20 to 24 years
## 2 5924
## 3 3995
## 4 5343
## 5 2061
## 6 5651
## DP05_0009PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!20 to 24 years
## 2 6.6
## 3 7.0
## 4 6.6
## 5 5.9
## 6 6.3
## DP05_0009PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!20 to 24 years
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0010E
## 1 Estimate!!SEX AND AGE!!Total population!!25 to 34 years
## 2 1765517
## 3 394507
## 4 819132
## 5 442713
## 6 1695073
## DP05_0010M
## 1 Margin of Error!!SEX AND AGE!!Total population!!25 to 34 years
## 2 5311
## 3 4452
## 4 5822
## 5 2829
## 6 5655
## DP05_0010PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!25 to 34 years
## 2 13.9
## 3 12.5
## 4 13.4
## 5 14.6
## 6 13.2
## DP05_0010PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!25 to 34 years
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0011E
## 1 Estimate!!SEX AND AGE!!Total population!!35 to 44 years
## 2 1644390
## 3 383617
## 4 742343
## 5 405128
## 6 1496113
## DP05_0011M
## 1 Margin of Error!!SEX AND AGE!!Total population!!35 to 44 years
## 2 5142
## 3 3741
## 4 3976
## 5 2750
## 6 4296
## DP05_0011PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!35 to 44 years
## 2 12.9
## 3 12.2
## 4 12.1
## 5 13.4
## 6 11.7
## DP05_0011PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!35 to 44 years
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0012E
## 1 Estimate!!SEX AND AGE!!Total population!!45 to 54 years
## 2 1636054
## 3 369396
## 4 753354
## 5 396167
## 6 1659541
## DP05_0012M
## 1 Margin of Error!!SEX AND AGE!!Total population!!45 to 54 years
## 2 4871
## 3 3161
## 4 3315
## 5 2674
## 6 4842
## DP05_0012PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!45 to 54 years
## 2 12.8
## 3 11.7
## 4 12.3
## 5 13.1
## 6 13.0
## DP05_0012PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!45 to 54 years
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0013E
## 1 Estimate!!SEX AND AGE!!Total population!!55 to 59 years
## 2 855616
## 3 213657
## 4 419591
## 5 191059
## 6 916749
## DP05_0013M
## 1 Margin of Error!!SEX AND AGE!!Total population!!55 to 59 years
## 2 9963
## 3 4454
## 4 7243
## 5 4897
## 6 9701
## DP05_0013PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!55 to 59 years
## 2 6.7
## 3 6.8
## 4 6.8
## 5 6.3
## 6 7.2
## DP05_0013PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!55 to 59 years
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0014E
## 1 Estimate!!SEX AND AGE!!Total population!!60 to 64 years
## 2 814251
## 3 205797
## 4 413293
## 5 186387
## 6 894782
## DP05_0014M
## 1 Margin of Error!!SEX AND AGE!!Total population!!60 to 64 years
## 2 9868
## 3 4119
## 4 7024
## 5 5137
## 6 9663
## DP05_0014PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!60 to 64 years
## 2 6.4
## 3 6.5
## 4 6.7
## 5 6.1
## 6 7.0
## DP05_0014PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!60 to 64 years
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0015E
## 1 Estimate!!SEX AND AGE!!Total population!!65 to 74 years
## 2 1143329
## 3 299333
## 4 596623
## 5 291996
## 6 1311159
## DP05_0015M
## 1 Margin of Error!!SEX AND AGE!!Total population!!65 to 74 years
## 2 2976
## 3 1873
## 4 2812
## 5 1221
## 6 3293
## DP05_0015PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!65 to 74 years
## 2 9.0
## 3 9.5
## 4 9.7
## 5 9.6
## 6 10.2
## DP05_0015PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!65 to 74 years
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0016E
## 1 Estimate!!SEX AND AGE!!Total population!!75 to 84 years
## 2 587651
## 3 162869
## 4 313646
## 5 138844
## 6 707570
## DP05_0016M
## 1 Margin of Error!!SEX AND AGE!!Total population!!75 to 84 years
## 2 6188
## 3 3158
## 4 5352
## 5 3225
## 6 7958
## DP05_0016PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!75 to 84 years
## 2 4.6
## 3 5.2
## 4 5.1
## 5 4.6
## 6 5.5
## DP05_0016PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!75 to 84 years
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0017E
## 1 Estimate!!SEX AND AGE!!Total population!!85 years and over
## 2 259568
## 3 75616
## 4 124805
## 5 44280
## 6 313640
## DP05_0017M
## 1 Margin of Error!!SEX AND AGE!!Total population!!85 years and over
## 2 5554
## 3 3074
## 4 5244
## 5 3193
## 6 7963
## DP05_0017PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!85 years and over
## 2 2.0
## 3 2.4
## 4 2.0
## 5 1.5
## 6 2.4
## DP05_0017PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!85 years and over
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0018E
## 1 Estimate!!SEX AND AGE!!Total population!!Median age (years)
## 2 38.3
## 3 38.1
## 4 38.8
## 5 38.2
## 6 40.8
## DP05_0018M
## 1 Margin of Error!!SEX AND AGE!!Total population!!Median age (years)
## 2 0.1
## 3 0.2
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0018PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!Median age (years)
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0018PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!Median age (years)
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0019E
## 1 Estimate!!SEX AND AGE!!Total population!!Under 18 years
## 2 2855802
## 3 733389
## 4 1377726
## 5 689220
## 6 2647617
## DP05_0019M
## 1 Margin of Error!!SEX AND AGE!!Total population!!Under 18 years
## 2 2274
## 3 2389
## 4 3160
## 5 913
## 6 1899
## DP05_0019PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!Under 18 years
## 2 22.4
## 3 23.2
## 4 22.5
## 5 22.7
## 6 20.7
## DP05_0019PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!Under 18 years
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0020E
## 1 Estimate!!SEX AND AGE!!Total population!!16 years and over
## 2 10216304
## 3 2506580
## 4 4907003
## 5 2420990
## 6 10470798
## DP05_0020M
## 1 Margin of Error!!SEX AND AGE!!Total population!!16 years and over
## 2 5459
## 3 3373
## 4 4497
## 5 3306
## 6 5368
## DP05_0020PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!16 years and over
## 2 80.2
## 3 79.4
## 4 80.1
## 5 79.8
## 6 81.8
## DP05_0020PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!16 years and over
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0021E
## 1 Estimate!!SEX AND AGE!!Total population!!18 years and over
## 2 9885278
## 3 2422756
## 4 4748726
## 5 2345172
## 6 10159443
## DP05_0021M
## 1 Margin of Error!!SEX AND AGE!!Total population!!18 years and over
## 2 2274
## 3 2389
## 4 3160
## 5 913
## 6 1899
## DP05_0021PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!18 years and over
## 2 77.6
## 3 76.8
## 4 77.5
## 5 77.3
## 6 79.3
## DP05_0021PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!18 years and over
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0022E
## 1 Estimate!!SEX AND AGE!!Total population!!21 years and over
## 2 9379230
## 3 2277260
## 4 4505646
## 5 2236266
## 6 9635621
## DP05_0022M
## 1 Margin of Error!!SEX AND AGE!!Total population!!21 years and over
## 2 8440
## 3 5679
## 4 6850
## 5 4122
## 6 7363
## DP05_0022PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!21 years and over
## 2 73.6
## 3 72.2
## 4 73.5
## 5 73.7
## 6 75.2
## DP05_0022PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!21 years and over
## 2 0.1
## 3 0.2
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0023E
## 1 Estimate!!SEX AND AGE!!Total population!!62 years and over
## 2 2459839
## 3 661366
## 4 1284321
## 5 589051
## 6 2861918
## DP05_0023M
## 1 Margin of Error!!SEX AND AGE!!Total population!!62 years and over
## 2 9329
## 3 4411
## 4 6208
## 5 4630
## 6 9666
## DP05_0023PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!62 years and over
## 2 19.3
## 3 21.0
## 4 21.0
## 5 19.4
## 6 22.3
## DP05_0023PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!62 years and over
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0024E
## 1 Estimate!!SEX AND AGE!!Total population!!65 years and over
## 2 1990548
## 3 537818
## 4 1035074
## 5 475120
## 6 2332369
## DP05_0024M
## 1 Margin of Error!!SEX AND AGE!!Total population!!65 years and over
## 2 2970
## 3 2027
## 4 3446
## 5 1480
## 6 2802
## DP05_0024PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!65 years and over
## 2 15.6
## 3 17.0
## 4 16.9
## 5 15.7
## 6 18.2
## DP05_0024PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!65 years and over
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0025E
## 1 Estimate!!SEX AND AGE!!Total population!!18 years and over
## 2 9885278
## 3 2422756
## 4 4748726
## 5 2345172
## 6 10159443
## DP05_0025M
## 1 Margin of Error!!SEX AND AGE!!Total population!!18 years and over
## 2 2274
## 3 2389
## 4 3160
## 5 913
## 6 1899
## DP05_0025PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!18 years and over
## 2 9885278
## 3 2422756
## 4 4748726
## 5 2345172
## 6 10159443
## DP05_0025PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!18 years and over
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0026E
## 1 Estimate!!SEX AND AGE!!Total population!!18 years and over!!Male
## 2 4801941
## 3 1188114
## 4 2298091
## 5 1169070
## 6 4919474
## DP05_0026M
## 1 Margin of Error!!SEX AND AGE!!Total population!!18 years and over!!Male
## 2 3028
## 3 2543
## 4 3571
## 5 1337
## 6 3260
## DP05_0026PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!18 years and over!!Male
## 2 48.6
## 3 49.0
## 4 48.4
## 5 49.9
## 6 48.4
## DP05_0026PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!18 years and over!!Male
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0027E
## 1 Estimate!!SEX AND AGE!!Total population!!18 years and over!!Female
## 2 5083337
## 3 1234642
## 4 2450635
## 5 1176102
## 6 5239969
## DP05_0027M
## 1 Margin of Error!!SEX AND AGE!!Total population!!18 years and over!!Female
## 2 2781
## 3 2254
## 4 3289
## 5 1437
## 6 3023
## DP05_0027PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!18 years and over!!Female
## 2 51.4
## 3 51.0
## 4 51.6
## 5 50.1
## 6 51.6
## DP05_0027PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!18 years and over!!Female
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0028E
## 1 Estimate!!SEX AND AGE!!Total population!!18 years and over!!Sex ratio (males per 100 females)
## 2 94.5
## 3 96.2
## 4 93.8
## 5 99.4
## 6 93.9
## DP05_0028M
## 1 Margin of Error!!SEX AND AGE!!Total population!!18 years and over!!Sex ratio (males per 100 females)
## 2 0.1
## 3 0.3
## 4 0.2
## 5 0.2
## 6 0.1
## DP05_0028PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!18 years and over!!Sex ratio (males per 100 females)
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0028PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!18 years and over!!Sex ratio (males per 100 females)
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0029E
## 1 Estimate!!SEX AND AGE!!Total population!!65 years and over
## 2 1990548
## 3 537818
## 4 1035074
## 5 475120
## 6 2332369
## DP05_0029M
## 1 Margin of Error!!SEX AND AGE!!Total population!!65 years and over
## 2 2970
## 3 2027
## 4 3446
## 5 1480
## 6 2802
## DP05_0029PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!65 years and over
## 2 1990548
## 3 537818
## 4 1035074
## 5 475120
## 6 2332369
## DP05_0029PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!65 years and over
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0030E
## 1 Estimate!!SEX AND AGE!!Total population!!65 years and over!!Male
## 2 869736
## 3 239515
## 4 456820
## 5 223916
## 6 1020825
## DP05_0030M
## 1 Margin of Error!!SEX AND AGE!!Total population!!65 years and over!!Male
## 2 1783
## 3 1176
## 4 2154
## 5 1014
## 6 1549
## DP05_0030PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!65 years and over!!Male
## 2 43.7
## 3 44.5
## 4 44.1
## 5 47.1
## 6 43.8
## DP05_0030PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!65 years and over!!Male
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0031E
## 1 Estimate!!SEX AND AGE!!Total population!!65 years and over!!Female
## 2 1120812
## 3 298303
## 4 578254
## 5 251204
## 6 1311544
## DP05_0031M
## 1 Margin of Error!!SEX AND AGE!!Total population!!65 years and over!!Female
## 2 2090
## 3 1394
## 4 2434
## 5 930
## 6 2017
## DP05_0031PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!65 years and over!!Female
## 2 56.3
## 3 55.5
## 4 55.9
## 5 52.9
## 6 56.2
## DP05_0031PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!65 years and over!!Female
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0032E
## 1 Estimate!!SEX AND AGE!!Total population!!65 years and over!!Sex ratio (males per 100 females)
## 2 77.6
## 3 80.3
## 4 79.0
## 5 89.1
## 6 77.8
## DP05_0032M
## 1 Margin of Error!!SEX AND AGE!!Total population!!65 years and over!!Sex ratio (males per 100 females)
## 2 0.2
## 3 0.5
## 4 0.5
## 5 0.5
## 6 0.1
## DP05_0032PE
## 1 Percent Estimate!!SEX AND AGE!!Total population!!65 years and over!!Sex ratio (males per 100 females)
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0032PM
## 1 Percent Margin of Error!!SEX AND AGE!!Total population!!65 years and over!!Sex ratio (males per 100 females)
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0033E DP05_0033M
## 1 Estimate!!RACE!!Total population Margin of Error!!RACE!!Total population
## 2 12741080 *****
## 3 3156145 *****
## 4 6126452 *****
## 5 3034392 *****
## 6 12807060 *****
## DP05_0033PE
## 1 Percent Estimate!!RACE!!Total population
## 2 12741080
## 3 3156145
## 4 6126452
## 5 3034392
## 6 12807060
## DP05_0033PM
## 1 Percent Margin of Error!!RACE!!Total population
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0034E
## 1 Estimate!!RACE!!Total population!!One race
## 2 12400103
## 3 3086877
## 4 5952588
## 5 2878562
## 6 12473515
## DP05_0034M
## 1 Margin of Error!!RACE!!Total population!!One race
## 2 12577
## 3 5586
## 4 7671
## 5 9895
## 6 13725
## DP05_0034PE
## 1 Percent Estimate!!RACE!!Total population!!One race
## 2 97.3
## 3 97.8
## 4 97.2
## 5 94.9
## 6 97.4
## DP05_0034PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race
## 2 0.1
## 3 0.2
## 4 0.1
## 5 0.3
## 6 0.1
## DP05_0035E
## 1 Estimate!!RACE!!Total population!!Two or more races
## 2 340977
## 3 69268
## 4 173864
## 5 155830
## 6 333545
## DP05_0035M
## 1 Margin of Error!!RACE!!Total population!!Two or more races
## 2 12577
## 3 5586
## 4 7671
## 5 9895
## 6 13725
## DP05_0035PE
## 1 Percent Estimate!!RACE!!Total population!!Two or more races
## 2 2.7
## 3 2.2
## 4 2.8
## 5 5.1
## 6 2.6
## DP05_0035PM
## 1 Percent Margin of Error!!RACE!!Total population!!Two or more races
## 2 0.1
## 3 0.2
## 4 0.1
## 5 0.3
## 6 0.1
## DP05_0036E
## 1 Estimate!!RACE!!Total population!!One race
## 2 12400103
## 3 3086877
## 4 5952588
## 5 2878562
## 6 12473515
## DP05_0036M
## 1 Margin of Error!!RACE!!Total population!!One race
## 2 12577
## 3 5586
## 4 7671
## 5 9895
## 6 13725
## DP05_0036PE
## 1 Percent Estimate!!RACE!!Total population!!One race
## 2 97.3
## 3 97.8
## 4 97.2
## 5 94.9
## 6 97.4
## DP05_0036PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race
## 2 0.1
## 3 0.2
## 4 0.1
## 5 0.3
## 6 0.1
## DP05_0037E
## 1 Estimate!!RACE!!Total population!!One race!!White
## 2 9135145
## 3 2846099
## 4 5035197
## 5 1924976
## 6 10256084
## DP05_0037M
## 1 Margin of Error!!RACE!!Total population!!One race!!White
## 2 26772
## 3 5629
## 4 7994
## 5 16699
## 6 17296
## DP05_0037PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!White
## 2 71.7
## 3 90.2
## 4 82.2
## 5 63.4
## 6 80.1
## DP05_0037PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!White
## 2 0.2
## 3 0.2
## 4 0.1
## 5 0.6
## 6 0.1
## DP05_0038E
## 1 Estimate!!RACE!!Total population!!One race!!Black or African American
## 2 1793079
## 3 115137
## 4 704327
## 5 280385
## 6 1428406
## DP05_0038M
## 1 Margin of Error!!RACE!!Total population!!One race!!Black or African American
## 2 10015
## 3 4782
## 4 6416
## 5 7032
## 6 12545
## DP05_0038PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Black or African American
## 2 14.1
## 3 3.6
## 4 11.5
## 5 9.2
## 6 11.2
## DP05_0038PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Black or African American
## 2 0.1
## 3 0.2
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0039E
## 1 Estimate!!RACE!!Total population!!One race!!American Indian and Alaska Native
## 2 35846
## 3 11494
## 4 27705
## 5 44666
## 6 21418
## DP05_0039M
## 1 Margin of Error!!RACE!!Total population!!One race!!American Indian and Alaska Native
## 2 4591
## 3 1274
## 4 3183
## 5 3794
## 6 2246
## DP05_0039PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!American Indian and Alaska Native
## 2 0.3
## 3 0.4
## 4 0.5
## 5 1.5
## 6 0.2
## DP05_0039PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!American Indian and Alaska Native
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0040E
## 1 Estimate!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Cherokee tribal grouping
## 2 3055
## 3 603
## 4 8373
## 5 2626
## 6 2569
## DP05_0040M
## 1 Margin of Error!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Cherokee tribal grouping
## 2 1023
## 3 412
## 4 1600
## 5 1119
## 6 1058
## DP05_0040PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Cherokee tribal grouping
## 2 0.0
## 3 0.0
## 4 0.1
## 5 0.1
## 6 0.0
## DP05_0040PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Cherokee tribal grouping
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0041E
## 1 Estimate!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Chippewa tribal grouping
## 2 2651
## 3 153
## 4 462
## 5 512
## 6 351
## DP05_0041M
## 1 Margin of Error!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Chippewa tribal grouping
## 2 1224
## 3 142
## 4 359
## 5 505
## 6 267
## DP05_0041PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Chippewa tribal grouping
## 2 0.0
## 3 0.0
## 4 0.0
## 5 0.0
## 6 0.0
## DP05_0041PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Chippewa tribal grouping
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0042E
## 1 Estimate!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Navajo tribal grouping
## 2 135
## 3 264
## 4 1210
## 5 2425
## 6 302
## DP05_0042M
## 1 Margin of Error!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Navajo tribal grouping
## 2 212
## 3 218
## 4 790
## 5 1174
## 6 372
## DP05_0042PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Navajo tribal grouping
## 2 0.0
## 3 0.0
## 4 0.0
## 5 0.1
## 6 0.0
## DP05_0042PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Navajo tribal grouping
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0043E
## 1 Estimate!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Sioux tribal grouping
## 2 222
## 3 1964
## 4 653
## 5 857
## 6 447
## DP05_0043M
## 1 Margin of Error!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Sioux tribal grouping
## 2 174
## 3 681
## 4 330
## 5 451
## 6 425
## DP05_0043PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Sioux tribal grouping
## 2 0.0
## 3 0.1
## 4 0.0
## 5 0.0
## 6 0.0
## DP05_0043PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!American Indian and Alaska Native!!Sioux tribal grouping
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0044E
## 1 Estimate!!RACE!!Total population!!One race!!Asian
## 2 717938
## 3 79971
## 4 121417
## 5 250137
## 6 455027
## DP05_0044M
## 1 Margin of Error!!RACE!!Total population!!One race!!Asian
## 2 6617
## 3 3082
## 4 3689
## 5 5954
## 6 6288
## DP05_0044PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Asian
## 2 5.6
## 3 2.5
## 4 2.0
## 5 8.2
## 6 3.6
## DP05_0044PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Asian
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0045E
## 1 Estimate!!RACE!!Total population!!One race!!Asian!!Asian Indian
## 2 256122
## 3 12415
## 4 30435
## 5 11123
## 6 143539
## DP05_0045M
## 1 Margin of Error!!RACE!!Total population!!One race!!Asian!!Asian Indian
## 2 10098
## 3 2942
## 4 3766
## 5 2466
## 6 8217
## DP05_0045PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Asian!!Asian Indian
## 2 2.0
## 3 0.4
## 4 0.5
## 5 0.4
## 6 1.1
## DP05_0045PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Asian!!Asian Indian
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0046E
## 1 Estimate!!RACE!!Total population!!One race!!Asian!!Chinese
## 2 132447
## 3 13121
## 4 29621
## 5 39196
## 6 119817
## DP05_0046M
## 1 Margin of Error!!RACE!!Total population!!One race!!Asian!!Chinese
## 2 8810
## 3 1977
## 4 3299
## 5 5103
## 6 7260
## DP05_0046PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Asian!!Chinese
## 2 1.0
## 3 0.4
## 4 0.5
## 5 1.3
## 6 0.9
## DP05_0046PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Asian!!Chinese
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0047E
## 1 Estimate!!RACE!!Total population!!One race!!Asian!!Filipino
## 2 124649
## 3 5029
## 4 11302
## 5 129739
## 6 25128
## DP05_0047M
## 1 Margin of Error!!RACE!!Total population!!One race!!Asian!!Filipino
## 2 8120
## 3 1225
## 4 2102
## 5 7539
## 6 3284
## DP05_0047PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Asian!!Filipino
## 2 1.0
## 3 0.2
## 4 0.2
## 5 4.3
## 6 0.2
## DP05_0047PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Asian!!Filipino
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0048E
## 1 Estimate!!RACE!!Total population!!One race!!Asian!!Japanese
## 2 17958
## 3 1494
## 4 2388
## 5 11514
## 6 5056
## DP05_0048M
## 1 Margin of Error!!RACE!!Total population!!One race!!Asian!!Japanese
## 2 2295
## 3 775
## 4 1159
## 5 2257
## 6 1189
## DP05_0048PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Asian!!Japanese
## 2 0.1
## 3 0.0
## 4 0.0
## 5 0.4
## 6 0.0
## DP05_0048PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Asian!!Japanese
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0049E
## 1 Estimate!!RACE!!Total population!!One race!!Asian!!Korean
## 2 56597
## 3 6717
## 4 11526
## 5 11750
## 6 39144
## DP05_0049M
## 1 Margin of Error!!RACE!!Total population!!One race!!Asian!!Korean
## 2 5468
## 3 1890
## 4 1973
## 5 2453
## 6 4971
## DP05_0049PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Asian!!Korean
## 2 0.4
## 3 0.2
## 4 0.2
## 5 0.4
## 6 0.3
## DP05_0049PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Asian!!Korean
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0050E
## 1 Estimate!!RACE!!Total population!!One race!!Asian!!Vietnamese
## 2 35367
## 3 11705
## 4 17208
## 5 17744
## 6 40920
## DP05_0050M
## 1 Margin of Error!!RACE!!Total population!!One race!!Asian!!Vietnamese
## 2 6566
## 3 2817
## 4 4212
## 5 4766
## 6 4670
## DP05_0050PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Asian!!Vietnamese
## 2 0.3
## 3 0.4
## 4 0.3
## 5 0.6
## 6 0.3
## DP05_0050PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Asian!!Vietnamese
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0051E
## 1 Estimate!!RACE!!Total population!!One race!!Asian!!Other Asian
## 2 94798
## 3 29490
## 4 18937
## 5 29071
## 6 81423
## DP05_0051M
## 1 Margin of Error!!RACE!!Total population!!One race!!Asian!!Other Asian
## 2 8476
## 3 3525
## 4 3013
## 5 4901
## 6 6597
## DP05_0051PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Asian!!Other Asian
## 2 0.7
## 3 0.9
## 4 0.3
## 5 1.0
## 6 0.6
## DP05_0051PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Asian!!Other Asian
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0052E
## 1 Estimate!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander
## 2 5317
## 3 3463
## 4 7385
## 5 19612
## 6 5008
## DP05_0052M
## 1 Margin of Error!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander
## 2 1835
## 3 1362
## 4 1417
## 5 1707
## 6 1684
## DP05_0052PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander
## 2 0.0
## 3 0.1
## 4 0.1
## 5 0.6
## 6 0.0
## DP05_0052PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0053E
## 1 Estimate!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Native Hawaiian
## 2 1927
## 3 541
## 4 1844
## 5 6472
## 6 935
## DP05_0053M
## 1 Margin of Error!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Native Hawaiian
## 2 757
## 3 474
## 4 1238
## 5 1757
## 6 498
## DP05_0053PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Native Hawaiian
## 2 0.0
## 3 0.0
## 4 0.0
## 5 0.2
## 6 0.0
## DP05_0053PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Native Hawaiian
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0054E
## 1 Estimate!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Guamanian or Chamorro
## 2 789
## 3 561
## 4 226
## 5 5668
## 6 746
## DP05_0054M
## 1 Margin of Error!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Guamanian or Chamorro
## 2 461
## 3 469
## 4 247
## 5 2108
## 6 528
## DP05_0054PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Guamanian or Chamorro
## 2 0.0
## 3 0.0
## 4 0.0
## 5 0.2
## 6 0.0
## DP05_0054PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Guamanian or Chamorro
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0055E
## 1 Estimate!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Samoan
## 2 710
## 3 348
## 4 2729
## 5 3528
## 6 766
## DP05_0055M
## 1 Margin of Error!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Samoan
## 2 681
## 3 473
## 4 828
## 5 1359
## 6 483
## DP05_0055PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Samoan
## 2 0.0
## 3 0.0
## 4 0.0
## 5 0.1
## 6 0.0
## DP05_0055PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Samoan
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0056E
## 1 Estimate!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Other Pacific Islander
## 2 1891
## 3 2013
## 4 2586
## 5 3944
## 6 2561
## DP05_0056M
## 1 Margin of Error!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Other Pacific Islander
## 2 1640
## 3 1109
## 4 660
## 5 1984
## 6 1515
## DP05_0056PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Other Pacific Islander
## 2 0.0
## 3 0.1
## 4 0.0
## 5 0.1
## 6 0.0
## DP05_0056PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Other Pacific Islander
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0057E
## 1 Estimate!!RACE!!Total population!!One race!!Some other race
## 2 712778
## 3 30713
## 4 56557
## 5 358786
## 6 307572
## DP05_0057M
## 1 Margin of Error!!RACE!!Total population!!One race!!Some other race
## 2 25545
## 3 5286
## 4 6735
## 5 16689
## 6 16186
## DP05_0057PE
## 1 Percent Estimate!!RACE!!Total population!!One race!!Some other race
## 2 5.6
## 3 1.0
## 4 0.9
## 5 11.8
## 6 2.4
## DP05_0057PM
## 1 Percent Margin of Error!!RACE!!Total population!!One race!!Some other race
## 2 0.2
## 3 0.2
## 4 0.1
## 5 0.5
## 6 0.1
## DP05_0058E
## 1 Estimate!!RACE!!Total population!!Two or more races
## 2 340977
## 3 69268
## 4 173864
## 5 155830
## 6 333545
## DP05_0058M
## 1 Margin of Error!!RACE!!Total population!!Two or more races
## 2 12577
## 3 5586
## 4 7671
## 5 9895
## 6 13725
## DP05_0058PE
## 1 Percent Estimate!!RACE!!Total population!!Two or more races
## 2 2.7
## 3 2.2
## 4 2.8
## 5 5.1
## 6 2.6
## DP05_0058PM
## 1 Percent Margin of Error!!RACE!!Total population!!Two or more races
## 2 0.1
## 3 0.2
## 4 0.1
## 5 0.3
## 6 0.1
## DP05_0059E
## 1 Estimate!!RACE!!Total population!!Two or more races!!White and Black or African American
## 2 116872
## 3 30402
## 4 75345
## 5 32463
## 6 148313
## DP05_0059M
## 1 Margin of Error!!RACE!!Total population!!Two or more races!!White and Black or African American
## 2 7015
## 3 3934
## 4 5750
## 5 5046
## 6 9404
## DP05_0059PE
## 1 Percent Estimate!!RACE!!Total population!!Two or more races!!White and Black or African American
## 2 0.9
## 3 1.0
## 4 1.2
## 5 1.1
## 6 1.2
## DP05_0059PM
## 1 Percent Margin of Error!!RACE!!Total population!!Two or more races!!White and Black or African American
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0060E
## 1 Estimate!!RACE!!Total population!!Two or more races!!White and American Indian and Alaska Native
## 2 35817
## 3 9285
## 4 39150
## 5 14754
## 6 32795
## DP05_0060M
## 1 Margin of Error!!RACE!!Total population!!Two or more races!!White and American Indian and Alaska Native
## 2 3506
## 3 1612
## 4 3567
## 5 2162
## 6 2462
## DP05_0060PE
## 1 Percent Estimate!!RACE!!Total population!!Two or more races!!White and American Indian and Alaska Native
## 2 0.3
## 3 0.3
## 4 0.6
## 5 0.5
## 6 0.3
## DP05_0060PM
## 1 Percent Margin of Error!!RACE!!Total population!!Two or more races!!White and American Indian and Alaska Native
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0061E
## 1 Estimate!!RACE!!Total population!!Two or more races!!White and Asian
## 2 82982
## 3 13266
## 4 29126
## 5 38991
## 6 55627
## DP05_0061M
## 1 Margin of Error!!RACE!!Total population!!Two or more races!!White and Asian
## 2 7432
## 3 2302
## 4 3547
## 5 5565
## 6 5231
## DP05_0061PE
## 1 Percent Estimate!!RACE!!Total population!!Two or more races!!White and Asian
## 2 0.7
## 3 0.4
## 4 0.5
## 5 1.3
## 6 0.4
## DP05_0061PM
## 1 Percent Margin of Error!!RACE!!Total population!!Two or more races!!White and Asian
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0062E
## 1 Estimate!!RACE!!Total population!!Two or more races!!Black or African American and American Indian and Alaska Native
## 2 8368
## 3 1951
## 4 4404
## 5 5393
## 6 11223
## DP05_0062M
## 1 Margin of Error!!RACE!!Total population!!Two or more races!!Black or African American and American Indian and Alaska Native
## 2 2255
## 3 1063
## 4 1478
## 5 2120
## 6 2142
## DP05_0062PE
## 1 Percent Estimate!!RACE!!Total population!!Two or more races!!Black or African American and American Indian and Alaska Native
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0062PM
## 1 Percent Margin of Error!!RACE!!Total population!!Two or more races!!Black or African American and American Indian and Alaska Native
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0063E
## 1 Estimate!!Race alone or in combination with one or more other races!!Total population
## 2 12741080
## 3 3156145
## 4 6126452
## 5 3034392
## 6 12807060
## DP05_0063M
## 1 Margin of Error!!Race alone or in combination with one or more other races!!Total population
## 2 *****
## 3 *****
## 4 *****
## 5 *****
## 6 *****
## DP05_0063PE
## 1 Percent Estimate!!Race alone or in combination with one or more other races!!Total population
## 2 12741080
## 3 3156145
## 4 6126452
## 5 3034392
## 6 12807060
## DP05_0063PM
## 1 Percent Margin of Error!!Race alone or in combination with one or more other races!!Total population
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0064E
## 1 Estimate!!Race alone or in combination with one or more other races!!Total population!!White
## 2 9431680
## 3 2909568
## 4 5196815
## 5 2050048
## 6 10543254
## DP05_0064M
## 1 Margin of Error!!Race alone or in combination with one or more other races!!Total population!!White
## 2 27696
## 3 7192
## 4 10284
## 5 19415
## 6 19389
## DP05_0064PE
## 1 Percent Estimate!!Race alone or in combination with one or more other races!!Total population!!White
## 2 74.0
## 3 92.2
## 4 84.8
## 5 67.6
## 6 82.3
## DP05_0064PM
## 1 Percent Margin of Error!!Race alone or in combination with one or more other races!!Total population!!White
## 2 0.2
## 3 0.2
## 4 0.2
## 5 0.6
## 6 0.2
## DP05_0065E
## 1 Estimate!!Race alone or in combination with one or more other races!!Total population!!Black or African American
## 2 1952694
## 3 151562
## 4 794984
## 5 337660
## 6 1632035
## DP05_0065M
## 1 Margin of Error!!Race alone or in combination with one or more other races!!Total population!!Black or African American
## 2 6946
## 3 2986
## 4 4485
## 5 5928
## 6 9570
## DP05_0065PE
## 1 Percent Estimate!!Race alone or in combination with one or more other races!!Total population!!Black or African American
## 2 15.3
## 3 4.8
## 4 13.0
## 5 11.1
## 6 12.7
## DP05_0065PM
## 1 Percent Margin of Error!!Race alone or in combination with one or more other races!!Total population!!Black or African American
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0066E
## 1 Estimate!!Race alone or in combination with one or more other races!!Total population!!American Indian and Alaska Native
## 2 100555
## 3 27116
## 4 79954
## 5 71817
## 6 89728
## DP05_0066M
## 1 Margin of Error!!Race alone or in combination with one or more other races!!Total population!!American Indian and Alaska Native
## 2 6939
## 3 2729
## 4 4579
## 5 4490
## 6 5118
## DP05_0066PE
## 1 Percent Estimate!!Race alone or in combination with one or more other races!!Total population!!American Indian and Alaska Native
## 2 0.8
## 3 0.9
## 4 1.3
## 5 2.4
## 6 0.7
## DP05_0066PM
## 1 Percent Margin of Error!!Race alone or in combination with one or more other races!!Total population!!American Indian and Alaska Native
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0067E
## 1 Estimate!!Race alone or in combination with one or more other races!!Total population!!Asian
## 2 831487
## 3 98900
## 4 159166
## 5 318010
## 6 536235
## DP05_0067M
## 1 Margin of Error!!Race alone or in combination with one or more other races!!Total population!!Asian
## 2 4879
## 3 2688
## 4 2654
## 5 4322
## 6 4513
## DP05_0067PE
## 1 Percent Estimate!!Race alone or in combination with one or more other races!!Total population!!Asian
## 2 6.5
## 3 3.1
## 4 2.6
## 5 10.5
## 6 4.2
## DP05_0067PM
## 1 Percent Margin of Error!!Race alone or in combination with one or more other races!!Total population!!Asian
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0068E
## 1 Estimate!!Race alone or in combination with one or more other races!!Total population!!Native Hawaiian and Other Pacific Islander
## 2 16444
## 3 6579
## 4 13760
## 5 41746
## 6 18764
## DP05_0068M
## 1 Margin of Error!!Race alone or in combination with one or more other races!!Total population!!Native Hawaiian and Other Pacific Islander
## 2 3163
## 3 1746
## 4 2328
## 5 3352
## 6 3667
## DP05_0068PE
## 1 Percent Estimate!!Race alone or in combination with one or more other races!!Total population!!Native Hawaiian and Other Pacific Islander
## 2 0.1
## 3 0.2
## 4 0.2
## 5 1.4
## 6 0.1
## DP05_0068PM
## 1 Percent Margin of Error!!Race alone or in combination with one or more other races!!Total population!!Native Hawaiian and Other Pacific Islander
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0069E
## 1 Estimate!!Race alone or in combination with one or more other races!!Total population!!Some other race
## 2 776129
## 3 37007
## 4 66685
## 5 390057
## 6 355417
## DP05_0069M
## 1 Margin of Error!!Race alone or in combination with one or more other races!!Total population!!Some other race
## 2 26600
## 3 5555
## 4 7078
## 5 15973
## 6 16623
## DP05_0069PE
## 1 Percent Estimate!!Race alone or in combination with one or more other races!!Total population!!Some other race
## 2 6.1
## 3 1.2
## 4 1.1
## 5 12.9
## 6 2.8
## DP05_0069PM
## 1 Percent Margin of Error!!Race alone or in combination with one or more other races!!Total population!!Some other race
## 2 0.2
## 3 0.2
## 4 0.1
## 5 0.5
## 6 0.1
## DP05_0070E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population
## 2 12741080
## 3 3156145
## 4 6126452
## 5 3034392
## 6 12807060
## DP05_0070M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population
## 2 *****
## 3 *****
## 4 *****
## 5 *****
## 6 *****
## DP05_0070PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population
## 2 12741080
## 3 3156145
## 4 6126452
## 5 3034392
## 6 12807060
## DP05_0070PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0071E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)
## 2 2208868
## 3 191473
## 4 253474
## 5 881145
## 6 974763
## DP05_0071M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)
## 2 1158
## 3 901
## 4 2044
## 5 *****
## 6 1237
## DP05_0071PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)
## 2 17.3
## 3 6.1
## 4 4.1
## 5 29.0
## 6 7.6
## DP05_0071PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)
## 2 0.1
## 3 0.1
## 4 0.1
## 5 *****
## 6 0.1
## DP05_0072E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Mexican
## 2 1744028
## 3 155179
## 4 179787
## 5 668365
## 6 158286
## DP05_0072M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Mexican
## 2 18280
## 3 4714
## 4 5745
## 5 11586
## 6 10718
## DP05_0072PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Mexican
## 2 13.7
## 3 4.9
## 4 2.9
## 5 22.0
## 6 1.2
## DP05_0072PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Mexican
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.4
## 6 0.1
## DP05_0073E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Puerto Rican
## 2 206543
## 3 7792
## 4 16816
## 5 25740
## 6 477312
## DP05_0073M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Puerto Rican
## 2 13313
## 3 2075
## 4 3020
## 5 3589
## 6 13697
## DP05_0073PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Puerto Rican
## 2 1.6
## 3 0.2
## 4 0.3
## 5 0.8
## 6 3.7
## DP05_0073PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Puerto Rican
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0074E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Cuban
## 2 27617
## 3 1714
## 4 8220
## 5 35071
## 6 24185
## DP05_0074M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Cuban
## 2 3919
## 3 696
## 4 2577
## 5 5849
## 6 3640
## DP05_0074PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Cuban
## 2 0.2
## 3 0.1
## 4 0.1
## 5 1.2
## 6 0.2
## DP05_0074PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Cuban
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0075E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Other Hispanic or Latino
## 2 230680
## 3 26788
## 4 48651
## 5 151969
## 6 314980
## DP05_0075M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Other Hispanic or Latino
## 2 14103
## 3 4189
## 4 5487
## 5 10271
## 6 15287
## DP05_0075PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Other Hispanic or Latino
## 2 1.8
## 3 0.8
## 4 0.8
## 5 5.0
## 6 2.5
## DP05_0075PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Other Hispanic or Latino
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.3
## 6 0.1
## DP05_0076E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino
## 2 10532212
## 3 2964672
## 4 5872978
## 5 2153247
## 6 11832297
## DP05_0076M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino
## 2 1158
## 3 901
## 4 2044
## 5 *****
## 6 1237
## DP05_0076PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino
## 2 82.7
## 3 93.9
## 4 95.9
## 5 71.0
## 6 92.4
## DP05_0076PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino
## 2 0.1
## 3 0.1
## 4 0.1
## 5 *****
## 6 0.1
## DP05_0077E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!White alone
## 2 7760732
## 3 2695583
## 4 4857174
## 5 1469593
## 6 9723288
## DP05_0077M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!White alone
## 2 3669
## 3 2165
## 4 2076
## 5 1806
## 6 3360
## DP05_0077PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!White alone
## 2 60.9
## 3 85.4
## 4 79.3
## 5 48.4
## 6 75.9
## DP05_0077PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!White alone
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0078E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Black or African American alone
## 2 1759316
## 3 113562
## 4 698641
## 5 266440
## 6 1352804
## DP05_0078M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Black or African American alone
## 2 8262
## 3 4619
## 4 6145
## 5 5865
## 6 9315
## DP05_0078PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Black or African American alone
## 2 13.8
## 3 3.6
## 4 11.4
## 5 8.8
## 6 10.6
## DP05_0078PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Black or African American alone
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0079E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!American Indian and Alaska Native alone
## 2 17215
## 3 9710
## 4 23149
## 5 30185
## 6 14367
## DP05_0079M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!American Indian and Alaska Native alone
## 2 2351
## 3 951
## 4 2507
## 5 2060
## 6 1986
## DP05_0079PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!American Indian and Alaska Native alone
## 2 0.1
## 3 0.3
## 4 0.4
## 5 1.0
## 6 0.1
## DP05_0079PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!American Indian and Alaska Native alone
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0080E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Asian alone
## 2 711970
## 3 79643
## 4 120440
## 5 244471
## 6 450077
## DP05_0080M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Asian alone
## 2 6521
## 3 3042
## 4 3635
## 5 5630
## 6 5816
## DP05_0080PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Asian alone
## 2 5.6
## 3 2.5
## 4 2.0
## 5 8.1
## 6 3.5
## DP05_0080PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Asian alone
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0081E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Native Hawaiian and Other Pacific Islander alone
## 2 2887
## 3 2945
## 4 7095
## 5 18249
## 6 3557
## DP05_0081M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Native Hawaiian and Other Pacific Islander alone
## 2 697
## 3 1388
## 4 1376
## 5 1393
## 6 1479
## DP05_0081PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Native Hawaiian and Other Pacific Islander alone
## 2 0.0
## 3 0.1
## 4 0.1
## 5 0.6
## 6 0.0
## DP05_0081PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Native Hawaiian and Other Pacific Islander alone
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0082E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Some other race alone
## 2 24310
## 3 4000
## 4 9832
## 5 11810
## 6 21357
## DP05_0082M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Some other race alone
## 2 3879
## 3 1973
## 4 2191
## 5 3634
## 6 3645
## DP05_0082PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Some other race alone
## 2 0.2
## 3 0.1
## 4 0.2
## 5 0.4
## 6 0.2
## DP05_0082PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Some other race alone
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0083E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races
## 2 255782
## 3 59229
## 4 156647
## 5 112499
## 6 266847
## DP05_0083M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races
## 2 10111
## 3 4832
## 4 6711
## 5 8253
## 6 11020
## DP05_0083PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races
## 2 2.0
## 3 1.9
## 4 2.6
## 5 3.7
## 6 2.1
## DP05_0083PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races
## 2 0.1
## 3 0.2
## 4 0.1
## 5 0.3
## 6 0.1
## DP05_0084E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races!!Two races including Some other race
## 2 11405
## 3 493
## 4 2330
## 5 3740
## 6 11356
## DP05_0084M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races!!Two races including Some other race
## 2 2606
## 3 321
## 4 1060
## 5 1741
## 6 2873
## DP05_0084PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races!!Two races including Some other race
## 2 0.1
## 3 0.0
## 4 0.0
## 5 0.1
## 6 0.1
## DP05_0084PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races!!Two races including Some other race
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.1
## 6 0.1
## DP05_0085E
## 1 Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races!!Two races excluding Some other race, and Three or more races
## 2 244377
## 3 58736
## 4 154317
## 5 108759
## 6 255491
## DP05_0085M
## 1 Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races!!Two races excluding Some other race, and Three or more races
## 2 10212
## 3 4738
## 4 6664
## 5 8217
## 6 10346
## DP05_0085PE
## 1 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races!!Two races excluding Some other race, and Three or more races
## 2 1.9
## 3 1.9
## 4 2.5
## 5 3.6
## 6 2.0
## DP05_0085PM
## 1 Percent Margin of Error!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races!!Two races excluding Some other race, and Three or more races
## 2 0.1
## 3 0.2
## 4 0.1
## 5 0.3
## 6 0.1
## DP05_0086E DP05_0086M
## 1 Estimate!!Total housing units Margin of Error!!Total housing units
## 2 5376176 518
## 3 1409568 354
## 4 2806296 623
## 5 1268717 151
## 6 5713136 439
## DP05_0086PE
## 1 Percent Estimate!!Total housing units
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0086PM
## 1 Percent Margin of Error!!Total housing units
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0087E
## 1 Estimate!!CITIZEN, VOTING AGE POPULATION!!Citizen, 18 and over population
## 2 9074766
## 3 2327219
## 4 4633370
## 5 2075166
## 6 9781212
## DP05_0087M
## 1 Margin of Error!!CITIZEN, VOTING AGE POPULATION!!Citizen, 18 and over population
## 2 18777
## 3 6259
## 4 7810
## 5 9912
## 6 13540
## DP05_0087PE
## 1 Percent Estimate!!CITIZEN, VOTING AGE POPULATION!!Citizen, 18 and over population
## 2 9074766
## 3 2327219
## 4 4633370
## 5 2075166
## 6 9781212
## DP05_0087PM
## 1 Percent Margin of Error!!CITIZEN, VOTING AGE POPULATION!!Citizen, 18 and over population
## 2 (X)
## 3 (X)
## 4 (X)
## 5 (X)
## 6 (X)
## DP05_0088E
## 1 Estimate!!CITIZEN, VOTING AGE POPULATION!!Citizen, 18 and over population!!Male
## 2 4385340
## 3 1139250
## 4 2240784
## 5 1036350
## 6 4726343
## DP05_0088M
## 1 Margin of Error!!CITIZEN, VOTING AGE POPULATION!!Citizen, 18 and over population!!Male
## 2 12630
## 3 3838
## 4 5295
## 5 6057
## 6 8924
## DP05_0088PE
## 1 Percent Estimate!!CITIZEN, VOTING AGE POPULATION!!Citizen, 18 and over population!!Male
## 2 48.3
## 3 49.0
## 4 48.4
## 5 49.9
## 6 48.3
## DP05_0088PM
## 1 Percent Margin of Error!!CITIZEN, VOTING AGE POPULATION!!Citizen, 18 and over population!!Male
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
## DP05_0089E
## 1 Estimate!!CITIZEN, VOTING AGE POPULATION!!Citizen, 18 and over population!!Female
## 2 4689426
## 3 1187969
## 4 2392586
## 5 1038816
## 6 5054869
## DP05_0089M
## 1 Margin of Error!!CITIZEN, VOTING AGE POPULATION!!Citizen, 18 and over population!!Female
## 2 12019
## 3 4084
## 4 5182
## 5 5752
## 6 8755
## DP05_0089PE
## 1 Percent Estimate!!CITIZEN, VOTING AGE POPULATION!!Citizen, 18 and over population!!Female
## 2 51.7
## 3 51.0
## 4 51.6
## 5 50.1
## 6 51.7
## DP05_0089PM
## 1 Percent Margin of Error!!CITIZEN, VOTING AGE POPULATION!!Citizen, 18 and over population!!Female
## 2 0.1
## 3 0.1
## 4 0.1
## 5 0.2
## 6 0.1
meta <- meta[,-3]
head(meta)
## GEO_ID id
## 1 NAME Geographic Area Name
## 2 DP05_0001E Estimate!!SEX AND AGE!!Total population
## 3 DP05_0001M Margin of Error!!SEX AND AGE!!Total population
## 4 DP05_0001PE Percent Estimate!!SEX AND AGE!!Total population
## 5 DP05_0001PM Percent Margin of Error!!SEX AND AGE!!Total population
## 6 DP05_0002E Estimate!!SEX AND AGE!!Total population!!Male
df <- data[-c(1,21,40),-1]
row.names(df) <- NULL
df$NAME <- as.character(paste(df$NAME))
metanames <- meta$GEO_ID
dfnames <- as.factor(colnames(df))
length(metanames)==length(dfnames)
## [1] TRUE
g <- metanames==dfnames
sum(g==TRUE)
## [1] 357
meta$id <- as.character(paste(meta$id))
err <- grep('Error',meta$id)
DF <- df[,-err]
head(DF)
## NAME DP05_0001E DP05_0001PE DP05_0002E DP05_0002PE DP05_0003E
## 1 Illinois 12741080 12741080 6266062 49.2 6475018
## 2 Iowa 3156145 3156145 1564888 49.6 1591257
## 3 Missouri 6126452 6126452 3003165 49.0 3123287
## 4 Nevada 3034392 3034392 1522374 50.2 1512018
## 5 Pennsylvania 12807060 12807060 6271620 49.0 6535440
## 6 Utah 3161105 3161105 1592457 50.4 1568648
## DP05_0003PE DP05_0004E DP05_0004PE DP05_0005E DP05_0005PE DP05_0006E
## 1 50.8 96.8 (X) 759456 6.0 762237
## 2 50.4 98.3 (X) 197883 6.3 197454
## 3 51.0 96.2 (X) 370408 6.0 373737
## 4 49.8 100.7 (X) 184539 6.1 188880
## 5 51.0 96.0 (X) 700416 5.5 708163
## 6 49.6 101.5 (X) 250194 7.9 257110
## DP05_0006PE DP05_0007E DP05_0007PE DP05_0008E DP05_0008PE DP05_0009E
## 1 6.0 838140 6.6 835845 6.6 839026
## 2 6.3 215222 6.8 220659 7.0 220135
## 3 6.1 401199 6.5 391923 6.4 406398
## 4 6.2 201625 6.6 182398 6.0 180376
## 5 5.5 775827 6.1 815621 6.4 812406
## 6 8.1 270952 8.6 250173 7.9 260774
## DP05_0009PE DP05_0010E DP05_0010PE DP05_0011E DP05_0011PE DP05_0012E
## 1 6.6 1765517 13.9 1644390 12.9 1636054
## 2 7.0 394507 12.5 383617 12.2 369396
## 3 6.6 819132 13.4 742343 12.1 753354
## 4 5.9 442713 14.6 405128 13.4 396167
## 5 6.3 1695073 13.2 1496113 11.7 1659541
## 6 8.2 463344 14.7 437953 13.9 319031
## DP05_0012PE DP05_0013E DP05_0013PE DP05_0014E DP05_0014PE DP05_0015E
## 1 12.8 855616 6.7 814251 6.4 1143329
## 2 11.7 213657 6.8 205797 6.5 299333
## 3 12.3 419591 6.8 413293 6.7 596623
## 4 13.1 191059 6.3 186387 6.1 291996
## 5 13.0 916749 7.2 894782 7.0 1311159
## 6 10.1 152425 4.8 147852 4.7 212206
## DP05_0015PE DP05_0016E DP05_0016PE DP05_0017E DP05_0017PE DP05_0018E
## 1 9.0 587651 4.6 259568 2.0 38.3
## 2 9.5 162869 5.2 75616 2.4 38.1
## 3 9.7 313646 5.1 124805 2.0 38.8
## 4 9.6 138844 4.6 44280 1.5 38.2
## 5 10.2 707570 5.5 313640 2.4 40.8
## 6 6.7 103828 3.3 35263 1.1 31.0
## DP05_0018PE DP05_0019E DP05_0019PE DP05_0020E DP05_0020PE DP05_0021E
## 1 (X) 2855802 22.4 10216304 80.2 9885278
## 2 (X) 733389 23.2 2506580 79.4 2422756
## 3 (X) 1377726 22.5 4907003 80.1 4748726
## 4 (X) 689220 22.7 2420990 79.8 2345172
## 5 (X) 2647617 20.7 10470798 81.8 10159443
## 6 (X) 931831 29.5 2329530 73.7 2229274
## DP05_0021PE DP05_0022E DP05_0022PE DP05_0023E DP05_0023PE DP05_0024E
## 1 77.6 9379230 73.6 2459839 19.3 1990548
## 2 76.8 2277260 72.2 661366 21.0 537818
## 3 77.5 4505646 73.5 1284321 21.0 1035074
## 4 77.3 2236266 73.7 589051 19.4 475120
## 5 79.3 9635621 75.2 2861918 22.3 2332369
## 6 70.5 2087145 66.0 439430 13.9 351297
## DP05_0024PE DP05_0025E DP05_0025PE DP05_0026E DP05_0026PE DP05_0027E
## 1 15.6 9885278 9885278 4801941 48.6 5083337
## 2 17.0 2422756 2422756 1188114 49.0 1234642
## 3 16.9 4748726 4748726 2298091 48.4 2450635
## 4 15.7 2345172 2345172 1169070 49.9 1176102
## 5 18.2 10159443 10159443 4919474 48.4 5239969
## 6 11.1 2229274 2229274 1113904 50.0 1115370
## DP05_0027PE DP05_0028E DP05_0028PE DP05_0029E DP05_0029PE DP05_0030E
## 1 51.4 94.5 (X) 1990548 1990548 869736
## 2 51.0 96.2 (X) 537818 537818 239515
## 3 51.6 93.8 (X) 1035074 1035074 456820
## 4 50.1 99.4 (X) 475120 475120 223916
## 5 51.6 93.9 (X) 2332369 2332369 1020825
## 6 50.0 99.9 (X) 351297 351297 164068
## DP05_0030PE DP05_0031E DP05_0031PE DP05_0032E DP05_0032PE DP05_0033E
## 1 43.7 1120812 56.3 77.6 (X) 12741080
## 2 44.5 298303 55.5 80.3 (X) 3156145
## 3 44.1 578254 55.9 79.0 (X) 6126452
## 4 47.1 251204 52.9 89.1 (X) 3034392
## 5 43.8 1311544 56.2 77.8 (X) 12807060
## 6 46.7 187229 53.3 87.6 (X) 3161105
## DP05_0033PE DP05_0034E DP05_0034PE DP05_0035E DP05_0035PE DP05_0036E
## 1 12741080 12400103 97.3 340977 2.7 12400103
## 2 3156145 3086877 97.8 69268 2.2 3086877
## 3 6126452 5952588 97.2 173864 2.8 5952588
## 4 3034392 2878562 94.9 155830 5.1 2878562
## 5 12807060 12473515 97.4 333545 2.6 12473515
## 6 3161105 3059954 96.8 101151 3.2 3059954
## DP05_0036PE DP05_0037E DP05_0037PE DP05_0038E DP05_0038PE DP05_0039E
## 1 97.3 9135145 71.7 1793079 14.1 35846
## 2 97.8 2846099 90.2 115137 3.6 11494
## 3 97.2 5035197 82.2 704327 11.5 27705
## 4 94.9 1924976 63.4 280385 9.2 44666
## 5 97.4 10256084 80.1 1428406 11.2 21418
## 6 96.8 2708195 85.7 40365 1.3 34678
## DP05_0039PE DP05_0040E DP05_0040PE DP05_0041E DP05_0041PE DP05_0042E
## 1 0.3 3055 0.0 2651 0.0 135
## 2 0.4 603 0.0 153 0.0 264
## 3 0.5 8373 0.1 462 0.0 1210
## 4 1.5 2626 0.1 512 0.0 2425
## 5 0.2 2569 0.0 351 0.0 302
## 6 1.1 709 0.0 0 0.0 15970
## DP05_0042PE DP05_0043E DP05_0043PE DP05_0044E DP05_0044PE DP05_0045E
## 1 0.0 222 0.0 717938 5.6 256122
## 2 0.0 1964 0.1 79971 2.5 12415
## 3 0.0 653 0.0 121417 2.0 30435
## 4 0.1 857 0.0 250137 8.2 11123
## 5 0.0 447 0.0 455027 3.6 143539
## 6 0.5 2265 0.1 75898 2.4 12079
## DP05_0045PE DP05_0046E DP05_0046PE DP05_0047E DP05_0047PE DP05_0048E
## 1 2.0 132447 1.0 124649 1.0 17958
## 2 0.4 13121 0.4 5029 0.2 1494
## 3 0.5 29621 0.5 11302 0.2 2388
## 4 0.4 39196 1.3 129739 4.3 11514
## 5 1.1 119817 0.9 25128 0.2 5056
## 6 0.4 14285 0.5 8034 0.3 6208
## DP05_0048PE DP05_0049E DP05_0049PE DP05_0050E DP05_0050PE DP05_0051E
## 1 0.1 56597 0.4 35367 0.3 94798
## 2 0.0 6717 0.2 11705 0.4 29490
## 3 0.0 11526 0.2 17208 0.3 18937
## 4 0.4 11750 0.4 17744 0.6 29071
## 5 0.0 39144 0.3 40920 0.3 81423
## 6 0.2 6756 0.2 9663 0.3 18873
## DP05_0051PE DP05_0052E DP05_0052PE DP05_0053E DP05_0053PE DP05_0054E
## 1 0.7 5317 0.0 1927 0.0 789
## 2 0.9 3463 0.1 541 0.0 561
## 3 0.3 7385 0.1 1844 0.0 226
## 4 1.0 19612 0.6 6472 0.2 5668
## 5 0.6 5008 0.0 935 0.0 746
## 6 0.6 29362 0.9 2090 0.1 836
## DP05_0054PE DP05_0055E DP05_0055PE DP05_0056E DP05_0056PE DP05_0057E
## 1 0.0 710 0.0 1891 0.0 712778
## 2 0.0 348 0.0 2013 0.1 30713
## 3 0.0 2729 0.0 2586 0.0 56557
## 4 0.2 3528 0.1 3944 0.1 358786
## 5 0.0 766 0.0 2561 0.0 307572
## 6 0.0 8386 0.3 18050 0.6 171456
## DP05_0057PE DP05_0058E DP05_0058PE DP05_0059E DP05_0059PE DP05_0060E
## 1 5.6 340977 2.7 116872 0.9 35817
## 2 1.0 69268 2.2 30402 1.0 9285
## 3 0.9 173864 2.8 75345 1.2 39150
## 4 11.8 155830 5.1 32463 1.1 14754
## 5 2.4 333545 2.6 148313 1.2 32795
## 6 5.4 101151 3.2 12469 0.4 17190
## DP05_0060PE DP05_0061E DP05_0061PE DP05_0062E DP05_0062PE DP05_0063E
## 1 0.3 82982 0.7 8368 0.1 12741080
## 2 0.3 13266 0.4 1951 0.1 3156145
## 3 0.6 29126 0.5 4404 0.1 6126452
## 4 0.5 38991 1.3 5393 0.2 3034392
## 5 0.3 55627 0.4 11223 0.1 12807060
## 6 0.5 29698 0.9 988 0.0 3161105
## DP05_0063PE DP05_0064E DP05_0064PE DP05_0065E DP05_0065PE DP05_0066E
## 1 12741080 9431680 74.0 1952694 15.3 100555
## 2 3156145 2909568 92.2 151562 4.8 27116
## 3 6126452 5196815 84.8 794984 13.0 79954
## 4 3034392 2050048 67.6 337660 11.1 71817
## 5 12807060 10543254 82.3 1632035 12.7 89728
## 6 3161105 2800377 88.6 58241 1.8 56454
## DP05_0066PE DP05_0067E DP05_0067PE DP05_0068E DP05_0068PE DP05_0069E
## 1 0.8 831487 6.5 16444 0.1 776129
## 2 0.9 98900 3.1 6579 0.2 37007
## 3 1.3 159166 2.6 13760 0.2 66685
## 4 2.4 318010 10.5 41746 1.4 390057
## 5 0.7 536235 4.2 18764 0.1 355417
## 6 1.8 115638 3.7 47609 1.5 191869
## DP05_0069PE DP05_0070E DP05_0070PE DP05_0071E DP05_0071PE DP05_0072E
## 1 6.1 12741080 12741080 2208868 17.3 1744028
## 2 1.2 3156145 3156145 191473 6.1 155179
## 3 1.1 6126452 6126452 253474 4.1 179787
## 4 12.9 3034392 3034392 881145 29.0 668365
## 5 2.8 12807060 12807060 974763 7.6 158286
## 6 6.1 3161105 3161105 450220 14.2 313226
## DP05_0072PE DP05_0073E DP05_0073PE DP05_0074E DP05_0074PE DP05_0075E
## 1 13.7 206543 1.6 27617 0.2 230680
## 2 4.9 7792 0.2 1714 0.1 26788
## 3 2.9 16816 0.3 8220 0.1 48651
## 4 22.0 25740 0.8 35071 1.2 151969
## 5 1.2 477312 3.7 24185 0.2 314980
## 6 9.9 12566 0.4 2766 0.1 121662
## DP05_0075PE DP05_0076E DP05_0076PE DP05_0077E DP05_0077PE DP05_0078E
## 1 1.8 10532212 82.7 7760732 60.9 1759316
## 2 0.8 2964672 93.9 2695583 85.4 113562
## 3 0.8 5872978 95.9 4857174 79.3 698641
## 4 5.0 2153247 71.0 1469593 48.4 266440
## 5 2.5 11832297 92.4 9723288 75.9 1352804
## 6 3.8 2710885 85.8 2459891 77.8 37546
## DP05_0078PE DP05_0079E DP05_0079PE DP05_0080E DP05_0080PE DP05_0081E
## 1 13.8 17215 0.1 711970 5.6 2887
## 2 3.6 9710 0.3 79643 2.5 2945
## 3 11.4 23149 0.4 120440 2.0 7095
## 4 8.8 30185 1.0 244471 8.1 18249
## 5 10.6 14367 0.1 450077 3.5 3557
## 6 1.2 27959 0.9 74784 2.4 28810
## DP05_0081PE DP05_0082E DP05_0082PE DP05_0083E DP05_0083PE DP05_0084E
## 1 0.0 24310 0.2 255782 2.0 11405
## 2 0.1 4000 0.1 59229 1.9 493
## 3 0.1 9832 0.2 156647 2.6 2330
## 4 0.6 11810 0.4 112499 3.7 3740
## 5 0.0 21357 0.2 266847 2.1 11356
## 6 0.9 6356 0.2 75539 2.4 2925
## DP05_0084PE DP05_0085E DP05_0085PE DP05_0086E DP05_0086PE DP05_0087E
## 1 0.1 244377 1.9 5376176 (X) 9074766
## 2 0.0 58736 1.9 1409568 (X) 2327219
## 3 0.0 154317 2.5 2806296 (X) 4633370
## 4 0.1 108759 3.6 1268717 (X) 2075166
## 5 0.1 255491 2.0 5713136 (X) 9781212
## 6 0.1 72614 2.3 1108739 (X) 2087341
## DP05_0087PE DP05_0088E DP05_0088PE DP05_0089E DP05_0089PE
## 1 9074766 4385340 48.3 4689426 51.7
## 2 2327219 1139250 49.0 1187969 51.0
## 3 4633370 2240784 48.4 2392586 51.6
## 4 2075166 1036350 49.9 1038816 50.1
## 5 9781212 4726343 48.3 5054869 51.7
## 6 2087341 1041497 49.9 1045844 50.1
estimate <- grep('Estimate',meta$id)
Estimate <- meta[estimate,]
head(Estimate)
## GEO_ID id
## 2 DP05_0001E Estimate!!SEX AND AGE!!Total population
## 4 DP05_0001PE Percent Estimate!!SEX AND AGE!!Total population
## 6 DP05_0002E Estimate!!SEX AND AGE!!Total population!!Male
## 8 DP05_0002PE Percent Estimate!!SEX AND AGE!!Total population!!Male
## 10 DP05_0003E Estimate!!SEX AND AGE!!Total population!!Female
## 12 DP05_0003PE Percent Estimate!!SEX AND AGE!!Total population!!Female
age <- Estimate[grep('AGE',Estimate$id),]
head(age)
## GEO_ID id
## 2 DP05_0001E Estimate!!SEX AND AGE!!Total population
## 4 DP05_0001PE Percent Estimate!!SEX AND AGE!!Total population
## 6 DP05_0002E Estimate!!SEX AND AGE!!Total population!!Male
## 8 DP05_0002PE Percent Estimate!!SEX AND AGE!!Total population!!Male
## 10 DP05_0003E Estimate!!SEX AND AGE!!Total population!!Female
## 12 DP05_0003PE Percent Estimate!!SEX AND AGE!!Total population!!Female
race <- Estimate[grep('RACE',Estimate$id),]
head(race)
## GEO_ID id
## 130 DP05_0033E Estimate!!RACE!!Total population
## 132 DP05_0033PE Percent Estimate!!RACE!!Total population
## 134 DP05_0034E Estimate!!RACE!!Total population!!One race
## 136 DP05_0034PE Percent Estimate!!RACE!!Total population!!One race
## 138 DP05_0035E Estimate!!RACE!!Total population!!Two or more races
## 140 DP05_0035PE Percent Estimate!!RACE!!Total population!!Two or more races
percentRace <- race[grep('Percent',race$id),]
percentRace$id <- gsub('Percent Estimate!!RACE!!','',percentRace$id)
percentRace
## GEO_ID
## 132 DP05_0033PE
## 136 DP05_0034PE
## 140 DP05_0035PE
## 144 DP05_0036PE
## 148 DP05_0037PE
## 152 DP05_0038PE
## 156 DP05_0039PE
## 160 DP05_0040PE
## 164 DP05_0041PE
## 168 DP05_0042PE
## 172 DP05_0043PE
## 176 DP05_0044PE
## 180 DP05_0045PE
## 184 DP05_0046PE
## 188 DP05_0047PE
## 192 DP05_0048PE
## 196 DP05_0049PE
## 200 DP05_0050PE
## 204 DP05_0051PE
## 208 DP05_0052PE
## 212 DP05_0053PE
## 216 DP05_0054PE
## 220 DP05_0055PE
## 224 DP05_0056PE
## 228 DP05_0057PE
## 232 DP05_0058PE
## 236 DP05_0059PE
## 240 DP05_0060PE
## 244 DP05_0061PE
## 248 DP05_0062PE
## 280 DP05_0070PE
## 284 DP05_0071PE
## 288 DP05_0072PE
## 292 DP05_0073PE
## 296 DP05_0074PE
## 300 DP05_0075PE
## 304 DP05_0076PE
## 308 DP05_0077PE
## 312 DP05_0078PE
## 316 DP05_0079PE
## 320 DP05_0080PE
## 324 DP05_0081PE
## 328 DP05_0082PE
## 332 DP05_0083PE
## 336 DP05_0084PE
## 340 DP05_0085PE
## id
## 132 Total population
## 136 Total population!!One race
## 140 Total population!!Two or more races
## 144 Total population!!One race
## 148 Total population!!One race!!White
## 152 Total population!!One race!!Black or African American
## 156 Total population!!One race!!American Indian and Alaska Native
## 160 Total population!!One race!!American Indian and Alaska Native!!Cherokee tribal grouping
## 164 Total population!!One race!!American Indian and Alaska Native!!Chippewa tribal grouping
## 168 Total population!!One race!!American Indian and Alaska Native!!Navajo tribal grouping
## 172 Total population!!One race!!American Indian and Alaska Native!!Sioux tribal grouping
## 176 Total population!!One race!!Asian
## 180 Total population!!One race!!Asian!!Asian Indian
## 184 Total population!!One race!!Asian!!Chinese
## 188 Total population!!One race!!Asian!!Filipino
## 192 Total population!!One race!!Asian!!Japanese
## 196 Total population!!One race!!Asian!!Korean
## 200 Total population!!One race!!Asian!!Vietnamese
## 204 Total population!!One race!!Asian!!Other Asian
## 208 Total population!!One race!!Native Hawaiian and Other Pacific Islander
## 212 Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Native Hawaiian
## 216 Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Guamanian or Chamorro
## 220 Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Samoan
## 224 Total population!!One race!!Native Hawaiian and Other Pacific Islander!!Other Pacific Islander
## 228 Total population!!One race!!Some other race
## 232 Total population!!Two or more races
## 236 Total population!!Two or more races!!White and Black or African American
## 240 Total population!!Two or more races!!White and American Indian and Alaska Native
## 244 Total population!!Two or more races!!White and Asian
## 248 Total population!!Two or more races!!Black or African American and American Indian and Alaska Native
## 280 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population
## 284 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)
## 288 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Mexican
## 292 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Puerto Rican
## 296 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Cuban
## 300 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Hispanic or Latino (of any race)!!Other Hispanic or Latino
## 304 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino
## 308 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!White alone
## 312 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Black or African American alone
## 316 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!American Indian and Alaska Native alone
## 320 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Asian alone
## 324 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Native Hawaiian and Other Pacific Islander alone
## 328 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Some other race alone
## 332 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races
## 336 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races!!Two races including Some other race
## 340 Percent Estimate!!HISPANIC OR LATINO AND RACE!!Total population!!Not Hispanic or Latino!!Two or more races!!Two races excluding Some other race, and Three or more races
Lets get the white, black, asian, native american indian, two or more total, pacific islander, and latino groups.
totalPop <- percentRace[1,]
black <- percentRace[6,]
white <- percentRace[5,]
twoOrMore <- percentRace[3,]
AmericanIndian <- percentRace[7,]
Asian <- percentRace[12,]
pacificIslander <- percentRace[20,]
LatinoHispanic <- percentRace[32,]
totalPop$id <- 'total_state_population'
black$id <- 'percent_black'
white$id <- 'percent_white'
twoOrMore$id <- 'percent_two_or_more'
AmericanIndian$id <- 'percent_Native_American'
Asian$id <- 'percent_Asian'
pacificIslander$id <- 'percent_Pacific_Islander'
LatinoHispanic$id <- 'percent_Latino'
EthnicBackground <- rbind(totalPop,black,white,twoOrMore,AmericanIndian,Asian,pacificIslander,LatinoHispanic)
EthnicBackground
## GEO_ID id
## 132 DP05_0033PE total_state_population
## 152 DP05_0038PE percent_black
## 148 DP05_0037PE percent_white
## 140 DP05_0035PE percent_two_or_more
## 156 DP05_0039PE percent_Native_American
## 176 DP05_0044PE percent_Asian
## 208 DP05_0052PE percent_Pacific_Islander
## 284 DP05_0071PE percent_Latino
IDs <- EthnicBackground$GEO_ID
class(IDs)
## [1] "factor"
IDs <- as.character(paste(IDs))
DF2 <- DF[,c('NAME',IDs)]
DF2
## NAME DP05_0033PE DP05_0038PE DP05_0037PE DP05_0035PE DP05_0039PE
## 1 Illinois 12741080 14.1 71.7 2.7 0.3
## 2 Iowa 3156145 3.6 90.2 2.2 0.4
## 3 Missouri 6126452 11.5 82.2 2.8 0.5
## 4 Nevada 3034392 9.2 63.4 5.1 1.5
## 5 Pennsylvania 12807060 11.2 80.1 2.6 0.2
## 6 Utah 3161105 1.3 85.7 3.2 1.1
## 7 West Virginia 1805832 3.8 93.0 1.9 0.1
## 8 Colorado 5695564 4.2 84.1 4.0 1.0
## 9 Georgia 10519475 31.6 58.3 2.7 0.3
## 10 Idaho 1754208 0.7 89.9 3.0 1.3
## 11 Maryland 6042718 30.0 54.7 3.7 0.2
## 12 New Jersey 8908520 13.6 66.9 2.8 0.2
## 13 New Mexico 2095428 2.2 76.4 3.2 9.6
## 14 Ohio 11689442 12.4 81.0 3.1 0.2
## 15 Alaska 737438 3.4 64.4 8.4 15.1
## 16 Florida 21299325 16.0 74.6 2.9 0.3
## 17 Hawaii 1420491 2.0 24.3 24.3 0.2
## 18 Massachusetts 6902149 7.8 77.3 3.4 0.2
## 19 South Carolina 5084127 26.6 67.0 2.4 0.5
## 20 Maine 1338404 1.4 94.3 2.2 0.6
## 21 North Carolina 10383620 21.4 68.4 2.9 1.2
## 22 South Dakota 882235 2.2 84.0 2.7 8.8
## 23 Alabama 4887871 26.7 67.7 2.1 0.5
## 24 Indiana 6691878 9.5 82.8 2.7 0.2
## 25 Kentucky 4468402 7.9 86.7 2.4 0.2
## 26 Louisiana 4659978 32.4 61.7 2.3 0.6
## 27 Tennessee 6770010 16.8 77.3 2.2 0.3
## 28 Vermont 626299 1.2 94.1 2.0 0.3
## 29 Washington 7535591 3.9 74.8 6.0 1.3
## 30 Michigan 9995915 13.8 78.3 2.9 0.5
## 31 Nebraska 1929268 4.7 86.4 3.1 1.0
## 32 New Hampshire 1356458 1.7 92.4 2.2 0.3
## 33 Oklahoma 3943079 7.3 72.2 7.7 7.8
## 34 Oregon 4190713 2.0 83.9 4.7 1.2
## 35 Rhode Island 1057315 6.7 80.7 3.1 0.4
## 36 Wisconsin 5813568 6.4 85.3 2.5 0.9
## 37 Wyoming 577737 0.6 91.5 2.4 2.8
## 38 Arkansas 3013825 15.2 76.5 2.9 0.7
## 39 California 39557045 5.8 59.5 5.1 0.8
## 40 Delaware 967171 22.5 68.2 2.7 0.5
## 41 Kansas 2911510 5.9 84.0 3.7 0.9
## 42 Minnesota 5611179 6.6 82.5 3.1 1.1
## 43 Mississippi 2986530 38.0 58.1 1.5 0.4
## 44 Montana 1062305 0.5 88.6 3.1 6.4
## 45 Virginia 8517685 19.2 67.4 4.1 0.3
## 46 Arizona 7171646 4.7 78.0 4.0 4.6
## 47 Connecticut 3572665 11.0 75.2 3.4 0.3
## 48 New York 19542209 15.7 63.3 3.3 0.4
## 49 North Dakota 760077 3.4 85.7 2.3 5.4
## 50 Texas 28701845 12.3 73.5 2.7 0.5
## DP05_0044PE DP05_0052PE DP05_0071PE
## 1 5.6 0.0 17.3
## 2 2.5 0.1 6.1
## 3 2.0 0.1 4.1
## 4 8.2 0.6 29.0
## 5 3.6 0.0 7.6
## 6 2.4 0.9 14.2
## 7 0.7 0.0 1.4
## 8 3.2 0.1 21.7
## 9 4.1 0.1 9.7
## 10 1.5 0.2 12.7
## 11 6.3 0.1 10.4
## 12 9.7 0.0 20.6
## 13 1.6 0.1 49.1
## 14 2.3 0.0 3.9
## 15 6.3 1.1 7.2
## 16 2.8 0.1 26.1
## 17 37.6 10.2 10.7
## 18 6.8 0.0 12.3
## 19 1.6 0.1 5.8
## 20 1.2 0.0 1.7
## 21 3.0 0.1 9.6
## 22 1.7 0.0 3.9
## 23 1.3 0.0 4.3
## 24 2.3 0.1 7.1
## 25 1.5 0.1 3.6
## 26 1.6 0.0 5.1
## 27 1.8 0.1 5.5
## 28 1.9 0.0 2.0
## 29 8.8 0.7 12.9
## 30 3.3 0.0 5.2
## 31 2.4 0.1 11.1
## 32 2.7 0.0 3.9
## 33 2.1 0.1 10.9
## 34 4.6 0.4 13.3
## 35 3.4 0.1 15.9
## 36 2.8 0.0 6.9
## 37 1.0 0.2 10.0
## 38 1.6 0.3 7.6
## 39 14.7 0.4 39.3
## 40 4.0 0.1 9.5
## 41 2.8 0.1 12.0
## 42 4.9 0.0 5.5
## 43 0.9 0.0 2.9
## 44 0.8 0.1 3.9
## 45 6.5 0.1 9.5
## 46 3.3 0.2 31.6
## 47 4.6 0.0 16.5
## 48 8.5 0.0 19.2
## 49 1.8 0.0 3.6
## 50 5.0 0.1 39.6
colnames(DF2) <- c('state',EthnicBackground$id)
DF2
## state total_state_population percent_black percent_white
## 1 Illinois 12741080 14.1 71.7
## 2 Iowa 3156145 3.6 90.2
## 3 Missouri 6126452 11.5 82.2
## 4 Nevada 3034392 9.2 63.4
## 5 Pennsylvania 12807060 11.2 80.1
## 6 Utah 3161105 1.3 85.7
## 7 West Virginia 1805832 3.8 93.0
## 8 Colorado 5695564 4.2 84.1
## 9 Georgia 10519475 31.6 58.3
## 10 Idaho 1754208 0.7 89.9
## 11 Maryland 6042718 30.0 54.7
## 12 New Jersey 8908520 13.6 66.9
## 13 New Mexico 2095428 2.2 76.4
## 14 Ohio 11689442 12.4 81.0
## 15 Alaska 737438 3.4 64.4
## 16 Florida 21299325 16.0 74.6
## 17 Hawaii 1420491 2.0 24.3
## 18 Massachusetts 6902149 7.8 77.3
## 19 South Carolina 5084127 26.6 67.0
## 20 Maine 1338404 1.4 94.3
## 21 North Carolina 10383620 21.4 68.4
## 22 South Dakota 882235 2.2 84.0
## 23 Alabama 4887871 26.7 67.7
## 24 Indiana 6691878 9.5 82.8
## 25 Kentucky 4468402 7.9 86.7
## 26 Louisiana 4659978 32.4 61.7
## 27 Tennessee 6770010 16.8 77.3
## 28 Vermont 626299 1.2 94.1
## 29 Washington 7535591 3.9 74.8
## 30 Michigan 9995915 13.8 78.3
## 31 Nebraska 1929268 4.7 86.4
## 32 New Hampshire 1356458 1.7 92.4
## 33 Oklahoma 3943079 7.3 72.2
## 34 Oregon 4190713 2.0 83.9
## 35 Rhode Island 1057315 6.7 80.7
## 36 Wisconsin 5813568 6.4 85.3
## 37 Wyoming 577737 0.6 91.5
## 38 Arkansas 3013825 15.2 76.5
## 39 California 39557045 5.8 59.5
## 40 Delaware 967171 22.5 68.2
## 41 Kansas 2911510 5.9 84.0
## 42 Minnesota 5611179 6.6 82.5
## 43 Mississippi 2986530 38.0 58.1
## 44 Montana 1062305 0.5 88.6
## 45 Virginia 8517685 19.2 67.4
## 46 Arizona 7171646 4.7 78.0
## 47 Connecticut 3572665 11.0 75.2
## 48 New York 19542209 15.7 63.3
## 49 North Dakota 760077 3.4 85.7
## 50 Texas 28701845 12.3 73.5
## percent_two_or_more percent_Native_American percent_Asian
## 1 2.7 0.3 5.6
## 2 2.2 0.4 2.5
## 3 2.8 0.5 2.0
## 4 5.1 1.5 8.2
## 5 2.6 0.2 3.6
## 6 3.2 1.1 2.4
## 7 1.9 0.1 0.7
## 8 4.0 1.0 3.2
## 9 2.7 0.3 4.1
## 10 3.0 1.3 1.5
## 11 3.7 0.2 6.3
## 12 2.8 0.2 9.7
## 13 3.2 9.6 1.6
## 14 3.1 0.2 2.3
## 15 8.4 15.1 6.3
## 16 2.9 0.3 2.8
## 17 24.3 0.2 37.6
## 18 3.4 0.2 6.8
## 19 2.4 0.5 1.6
## 20 2.2 0.6 1.2
## 21 2.9 1.2 3.0
## 22 2.7 8.8 1.7
## 23 2.1 0.5 1.3
## 24 2.7 0.2 2.3
## 25 2.4 0.2 1.5
## 26 2.3 0.6 1.6
## 27 2.2 0.3 1.8
## 28 2.0 0.3 1.9
## 29 6.0 1.3 8.8
## 30 2.9 0.5 3.3
## 31 3.1 1.0 2.4
## 32 2.2 0.3 2.7
## 33 7.7 7.8 2.1
## 34 4.7 1.2 4.6
## 35 3.1 0.4 3.4
## 36 2.5 0.9 2.8
## 37 2.4 2.8 1.0
## 38 2.9 0.7 1.6
## 39 5.1 0.8 14.7
## 40 2.7 0.5 4.0
## 41 3.7 0.9 2.8
## 42 3.1 1.1 4.9
## 43 1.5 0.4 0.9
## 44 3.1 6.4 0.8
## 45 4.1 0.3 6.5
## 46 4.0 4.6 3.3
## 47 3.4 0.3 4.6
## 48 3.3 0.4 8.5
## 49 2.3 5.4 1.8
## 50 2.7 0.5 5.0
## percent_Pacific_Islander percent_Latino
## 1 0.0 17.3
## 2 0.1 6.1
## 3 0.1 4.1
## 4 0.6 29.0
## 5 0.0 7.6
## 6 0.9 14.2
## 7 0.0 1.4
## 8 0.1 21.7
## 9 0.1 9.7
## 10 0.2 12.7
## 11 0.1 10.4
## 12 0.0 20.6
## 13 0.1 49.1
## 14 0.0 3.9
## 15 1.1 7.2
## 16 0.1 26.1
## 17 10.2 10.7
## 18 0.0 12.3
## 19 0.1 5.8
## 20 0.0 1.7
## 21 0.1 9.6
## 22 0.0 3.9
## 23 0.0 4.3
## 24 0.1 7.1
## 25 0.1 3.6
## 26 0.0 5.1
## 27 0.1 5.5
## 28 0.0 2.0
## 29 0.7 12.9
## 30 0.0 5.2
## 31 0.1 11.1
## 32 0.0 3.9
## 33 0.1 10.9
## 34 0.4 13.3
## 35 0.1 15.9
## 36 0.0 6.9
## 37 0.2 10.0
## 38 0.3 7.6
## 39 0.4 39.3
## 40 0.1 9.5
## 41 0.1 12.0
## 42 0.0 5.5
## 43 0.0 2.9
## 44 0.1 3.9
## 45 0.1 9.5
## 46 0.2 31.6
## 47 0.0 16.5
## 48 0.0 19.2
## 49 0.0 3.6
## 50 0.1 39.6
Ethnicities <- DF2[order(DF2$state),]
row.names(Ethnicities) <- NULL
Ethnicities
## state total_state_population percent_black percent_white
## 1 Alabama 4887871 26.7 67.7
## 2 Alaska 737438 3.4 64.4
## 3 Arizona 7171646 4.7 78.0
## 4 Arkansas 3013825 15.2 76.5
## 5 California 39557045 5.8 59.5
## 6 Colorado 5695564 4.2 84.1
## 7 Connecticut 3572665 11.0 75.2
## 8 Delaware 967171 22.5 68.2
## 9 Florida 21299325 16.0 74.6
## 10 Georgia 10519475 31.6 58.3
## 11 Hawaii 1420491 2.0 24.3
## 12 Idaho 1754208 0.7 89.9
## 13 Illinois 12741080 14.1 71.7
## 14 Indiana 6691878 9.5 82.8
## 15 Iowa 3156145 3.6 90.2
## 16 Kansas 2911510 5.9 84.0
## 17 Kentucky 4468402 7.9 86.7
## 18 Louisiana 4659978 32.4 61.7
## 19 Maine 1338404 1.4 94.3
## 20 Maryland 6042718 30.0 54.7
## 21 Massachusetts 6902149 7.8 77.3
## 22 Michigan 9995915 13.8 78.3
## 23 Minnesota 5611179 6.6 82.5
## 24 Mississippi 2986530 38.0 58.1
## 25 Missouri 6126452 11.5 82.2
## 26 Montana 1062305 0.5 88.6
## 27 Nebraska 1929268 4.7 86.4
## 28 Nevada 3034392 9.2 63.4
## 29 New Hampshire 1356458 1.7 92.4
## 30 New Jersey 8908520 13.6 66.9
## 31 New Mexico 2095428 2.2 76.4
## 32 New York 19542209 15.7 63.3
## 33 North Carolina 10383620 21.4 68.4
## 34 North Dakota 760077 3.4 85.7
## 35 Ohio 11689442 12.4 81.0
## 36 Oklahoma 3943079 7.3 72.2
## 37 Oregon 4190713 2.0 83.9
## 38 Pennsylvania 12807060 11.2 80.1
## 39 Rhode Island 1057315 6.7 80.7
## 40 South Carolina 5084127 26.6 67.0
## 41 South Dakota 882235 2.2 84.0
## 42 Tennessee 6770010 16.8 77.3
## 43 Texas 28701845 12.3 73.5
## 44 Utah 3161105 1.3 85.7
## 45 Vermont 626299 1.2 94.1
## 46 Virginia 8517685 19.2 67.4
## 47 Washington 7535591 3.9 74.8
## 48 West Virginia 1805832 3.8 93.0
## 49 Wisconsin 5813568 6.4 85.3
## 50 Wyoming 577737 0.6 91.5
## percent_two_or_more percent_Native_American percent_Asian
## 1 2.1 0.5 1.3
## 2 8.4 15.1 6.3
## 3 4.0 4.6 3.3
## 4 2.9 0.7 1.6
## 5 5.1 0.8 14.7
## 6 4.0 1.0 3.2
## 7 3.4 0.3 4.6
## 8 2.7 0.5 4.0
## 9 2.9 0.3 2.8
## 10 2.7 0.3 4.1
## 11 24.3 0.2 37.6
## 12 3.0 1.3 1.5
## 13 2.7 0.3 5.6
## 14 2.7 0.2 2.3
## 15 2.2 0.4 2.5
## 16 3.7 0.9 2.8
## 17 2.4 0.2 1.5
## 18 2.3 0.6 1.6
## 19 2.2 0.6 1.2
## 20 3.7 0.2 6.3
## 21 3.4 0.2 6.8
## 22 2.9 0.5 3.3
## 23 3.1 1.1 4.9
## 24 1.5 0.4 0.9
## 25 2.8 0.5 2.0
## 26 3.1 6.4 0.8
## 27 3.1 1.0 2.4
## 28 5.1 1.5 8.2
## 29 2.2 0.3 2.7
## 30 2.8 0.2 9.7
## 31 3.2 9.6 1.6
## 32 3.3 0.4 8.5
## 33 2.9 1.2 3.0
## 34 2.3 5.4 1.8
## 35 3.1 0.2 2.3
## 36 7.7 7.8 2.1
## 37 4.7 1.2 4.6
## 38 2.6 0.2 3.6
## 39 3.1 0.4 3.4
## 40 2.4 0.5 1.6
## 41 2.7 8.8 1.7
## 42 2.2 0.3 1.8
## 43 2.7 0.5 5.0
## 44 3.2 1.1 2.4
## 45 2.0 0.3 1.9
## 46 4.1 0.3 6.5
## 47 6.0 1.3 8.8
## 48 1.9 0.1 0.7
## 49 2.5 0.9 2.8
## 50 2.4 2.8 1.0
## percent_Pacific_Islander percent_Latino
## 1 0.0 4.3
## 2 1.1 7.2
## 3 0.2 31.6
## 4 0.3 7.6
## 5 0.4 39.3
## 6 0.1 21.7
## 7 0.0 16.5
## 8 0.1 9.5
## 9 0.1 26.1
## 10 0.1 9.7
## 11 10.2 10.7
## 12 0.2 12.7
## 13 0.0 17.3
## 14 0.1 7.1
## 15 0.1 6.1
## 16 0.1 12.0
## 17 0.1 3.6
## 18 0.0 5.1
## 19 0.0 1.7
## 20 0.1 10.4
## 21 0.0 12.3
## 22 0.0 5.2
## 23 0.0 5.5
## 24 0.0 2.9
## 25 0.1 4.1
## 26 0.1 3.9
## 27 0.1 11.1
## 28 0.6 29.0
## 29 0.0 3.9
## 30 0.0 20.6
## 31 0.1 49.1
## 32 0.0 19.2
## 33 0.1 9.6
## 34 0.0 3.6
## 35 0.0 3.9
## 36 0.1 10.9
## 37 0.4 13.3
## 38 0.0 7.6
## 39 0.1 15.9
## 40 0.1 5.8
## 41 0.0 3.9
## 42 0.1 5.5
## 43 0.1 39.6
## 44 0.9 14.2
## 45 0.0 2.0
## 46 0.1 9.5
## 47 0.7 12.9
## 48 0.0 1.4
## 49 0.0 6.9
## 50 0.2 10.0
write.csv(Ethnicities, 'race_distribution_2018.csv',row.names=FALSE)
Merge the state licensing excel file with this csv file to add in the demographic race data per state.
stateREQs <- read.csv('stateLicensingRequirements.csv', sep=',', header=TRUE, na.strings=c('',' ','NA'))
colnames(stateREQs)
## [1] "state"
## [2] "massageBoard"
## [3] "licenseByReciprocity"
## [4] "proofOtherOrAllStateLicense"
## [5] "stateResidencyProof"
## [6] "passportSizePhoto"
## [7] "driversLicensePhotoCopy"
## [8] "nameChangeProof"
## [9] "socialSecurityCopy"
## [10] "Hours"
## [11] "MBLEX_or_NCBTMB"
## [12] "goodHealthClearance"
## [13] "BoardBackgroundCheckFee"
## [14] "stateApplyingBackgroundCheck"
## [15] "DOJ_backgroundCheck"
## [16] "applicationCost"
## [17] "licensingCost"
## [18] "licenseRenewalFee"
## [19] "CPR_certification"
## [20] "licensingETA"
## [21] "healthReferences"
## [22] "CEU"
## [23] "timeLicenseValidYears"
## [24] "liabilityInsurance"
## [25] "schoolTranscripts"
## [26] "MBLEX_transcript"
## [27] "notes"
## [28] "notes2"
## [29] "notes3"
## [30] "notes4"
## [31] "citiesGreaterThan300k_orTop3"
## [32] "LMT_medianJobsListed_IndeedFirst5pages"
## [33] "LMT_HourlyMedianPayRangeAdvertised_Indeed"
## [34] "LMT_AnualMedianPayAdvertised_Indeed"
## [35] "Zillow_2BR_3cityMedianHomeValue"
## [36] "median2018IncomeByState"
stateREQs <- stateREQs[,1:36]
colnames(stateREQs)
## [1] "state"
## [2] "massageBoard"
## [3] "licenseByReciprocity"
## [4] "proofOtherOrAllStateLicense"
## [5] "stateResidencyProof"
## [6] "passportSizePhoto"
## [7] "driversLicensePhotoCopy"
## [8] "nameChangeProof"
## [9] "socialSecurityCopy"
## [10] "Hours"
## [11] "MBLEX_or_NCBTMB"
## [12] "goodHealthClearance"
## [13] "BoardBackgroundCheckFee"
## [14] "stateApplyingBackgroundCheck"
## [15] "DOJ_backgroundCheck"
## [16] "applicationCost"
## [17] "licensingCost"
## [18] "licenseRenewalFee"
## [19] "CPR_certification"
## [20] "licensingETA"
## [21] "healthReferences"
## [22] "CEU"
## [23] "timeLicenseValidYears"
## [24] "liabilityInsurance"
## [25] "schoolTranscripts"
## [26] "MBLEX_transcript"
## [27] "notes"
## [28] "notes2"
## [29] "notes3"
## [30] "notes4"
## [31] "citiesGreaterThan300k_orTop3"
## [32] "LMT_medianJobsListed_IndeedFirst5pages"
## [33] "LMT_HourlyMedianPayRangeAdvertised_Indeed"
## [34] "LMT_AnualMedianPayAdvertised_Indeed"
## [35] "Zillow_2BR_3cityMedianHomeValue"
## [36] "median2018IncomeByState"
Ethnicities$state <- as.factor(Ethnicities$state)
StateLicensing <- merge(stateREQs,Ethnicities, by.x='state',by.y='state')
dim(StateLicensing)
## [1] 50 44
colnames(StateLicensing)
## [1] "state"
## [2] "massageBoard"
## [3] "licenseByReciprocity"
## [4] "proofOtherOrAllStateLicense"
## [5] "stateResidencyProof"
## [6] "passportSizePhoto"
## [7] "driversLicensePhotoCopy"
## [8] "nameChangeProof"
## [9] "socialSecurityCopy"
## [10] "Hours"
## [11] "MBLEX_or_NCBTMB"
## [12] "goodHealthClearance"
## [13] "BoardBackgroundCheckFee"
## [14] "stateApplyingBackgroundCheck"
## [15] "DOJ_backgroundCheck"
## [16] "applicationCost"
## [17] "licensingCost"
## [18] "licenseRenewalFee"
## [19] "CPR_certification"
## [20] "licensingETA"
## [21] "healthReferences"
## [22] "CEU"
## [23] "timeLicenseValidYears"
## [24] "liabilityInsurance"
## [25] "schoolTranscripts"
## [26] "MBLEX_transcript"
## [27] "notes"
## [28] "notes2"
## [29] "notes3"
## [30] "notes4"
## [31] "citiesGreaterThan300k_orTop3"
## [32] "LMT_medianJobsListed_IndeedFirst5pages"
## [33] "LMT_HourlyMedianPayRangeAdvertised_Indeed"
## [34] "LMT_AnualMedianPayAdvertised_Indeed"
## [35] "Zillow_2BR_3cityMedianHomeValue"
## [36] "median2018IncomeByState"
## [37] "total_state_population"
## [38] "percent_black"
## [39] "percent_white"
## [40] "percent_two_or_more"
## [41] "percent_Native_American"
## [42] "percent_Asian"
## [43] "percent_Pacific_Islander"
## [44] "percent_Latino"
We added the demographics to the state licensing requirements and facts csv version of the excel version.
Now lets add in the fields from our Indeed web scrape to update the columns 32-34 of the StateLicensing table.We added them in manually before, but now that a table was made with the copy of the indeed web scrape script that uses the modified writeIndeedJobData5Pages() using the original getIndeedJobData5Pages(). We can update the table on the fly as needed as long as the Indeed site doesn’t change its layout. This file is the statesRates.csv file made in the ‘copy-indeed-webscrape-function-altered.Rmd’ script.
statesRates <- read.csv('statesRates.csv', sep=',',header=TRUE, na.strings=c('',' ','NA'),
stringsAsFactors = FALSE)
head(statesRates)
## state jobsListed MinHourlySalary MaxHourlySalary MinAnnualSalary
## 1 AK 28 15.00000 15.00000 40000.00
## 2 AL 64 16.13333 43.20000 25000.00
## 3 AR 63 20.00000 23.00000 35000.00
## 4 AZ 225 13.94667 73.64444 34333.33
## 5 CA 206 15.62015 70.82524 43373.93
## 6 CO 237 11.79637 76.87764 25000.00
## MaxAnnualSalary avgHourly avgAnualSalary
## 1 50000.00 15.00000 45000.00
## 2 50000.00 29.66667 37500.00
## 3 50000.00 21.50000 42500.00
## 4 67164.44 43.79556 50748.89
## 5 54267.86 43.22269 48820.89
## 6 62000.00 44.33700 43500.00
statesOrdered <- statesRates[order(statesRates$state),]
head(statesOrdered)
## state jobsListed MinHourlySalary MaxHourlySalary MinAnnualSalary
## 1 AK 28 15.00000 15.00000 40000.00
## 2 AL 64 16.13333 43.20000 25000.00
## 3 AR 63 20.00000 23.00000 35000.00
## 4 AZ 225 13.94667 73.64444 34333.33
## 5 CA 206 15.62015 70.82524 43373.93
## 6 CO 237 11.79637 76.87764 25000.00
## MaxAnnualSalary avgHourly avgAnualSalary
## 1 50000.00 15.00000 45000.00
## 2 50000.00 29.66667 37500.00
## 3 50000.00 21.50000 42500.00
## 4 67164.44 43.79556 50748.89
## 5 54267.86 43.22269 48820.89
## 6 62000.00 44.33700 43500.00
When ordering by the state abbreviations, the order isn’t the same as by the state spelled out. So lets compare the two and adjust changes.
statesOrdered$state
## [1] "AK" "AL" "AR" "AZ" "CA" "CO" "CT" "DE" "FL" "GA" "HI" "IA" "ID" "IL" "IN"
## [16] "KS" "KY" "LA" "MA" "MD" "ME" "MI" "MN" "MO" "MS" "MT" "NC" "ND" "NE" "NH"
## [31] "NJ" "NM" "NV" "NY" "OH" "OK" "OR" "PA" "RI" "SC" "SD" "TN" "TX" "UT" "VA"
## [46] "VT" "WA" "WI" "WV" "WY" NA
The statesOrdered has an NA, lets remove it.
statesOrdered <- statesOrdered[1:50,]
states <- c("Alaska" ,"Alabama" , "Arkansas" , "Arizona" , "California",
"Colorado" , "Connecticut" , "Delaware" , "Florida" , "Georgia" ,
"Hawaii" , "Iowa" , "Idaho" , "Illinois" , "Indiana" ,
"Kansas" , "Kentucky", "Louisiana" , "Massachusetts", "Maryland" , "Maine",
"Michigan" , "Minnesota" , "Missouri" , "Mississippi" ,
"Montana" , "North Carolina","North Dakota" ,"Nebraska" , "New Hampshire" , "New Jersey", "New Mexico" , "Nevada" ,
"New York" , "Ohio" ,
"Oklahoma" , "Oregon" , "Pennsylvania" ,"Rhode Island", "South Carolina",
"South Dakota" , "Tennessee" , "Texas" ,"Utah" , "Virginia", "Vermont",
"Washington" ,"Wisconsin" , "West Virginia" , "Wyoming" )
states
## [1] "Alaska" "Alabama" "Arkansas" "Arizona"
## [5] "California" "Colorado" "Connecticut" "Delaware"
## [9] "Florida" "Georgia" "Hawaii" "Iowa"
## [13] "Idaho" "Illinois" "Indiana" "Kansas"
## [17] "Kentucky" "Louisiana" "Massachusetts" "Maryland"
## [21] "Maine" "Michigan" "Minnesota" "Missouri"
## [25] "Mississippi" "Montana" "North Carolina" "North Dakota"
## [29] "Nebraska" "New Hampshire" "New Jersey" "New Mexico"
## [33] "Nevada" "New York" "Ohio" "Oklahoma"
## [37] "Oregon" "Pennsylvania" "Rhode Island" "South Carolina"
## [41] "South Dakota" "Tennessee" "Texas" "Utah"
## [45] "Virginia" "Vermont" "Washington" "Wisconsin"
## [49] "West Virginia" "Wyoming"
statesOrdered$stateName <- states
statesOrdered <- statesOrdered[,c(1,9,2:8)]
statesOrdered <- statesOrdered[order(statesOrdered$stateName),]
head(statesOrdered)
## state stateName jobsListed MinHourlySalary MaxHourlySalary MinAnnualSalary
## 2 AL Alabama 64 16.13333 43.20000 25000.00
## 1 AK Alaska 28 15.00000 15.00000 40000.00
## 4 AZ Arizona 225 13.94667 73.64444 34333.33
## 3 AR Arkansas 63 20.00000 23.00000 35000.00
## 5 CA California 206 15.62015 70.82524 43373.93
## 6 CO Colorado 237 11.79637 76.87764 25000.00
## MaxAnnualSalary avgHourly avgAnualSalary
## 2 50000.00 29.66667 37500.00
## 1 50000.00 15.00000 45000.00
## 4 67164.44 43.79556 50748.89
## 3 50000.00 21.50000 42500.00
## 5 54267.86 43.22269 48820.89
## 6 62000.00 44.33700 43500.00
Lets make sure the stateName of the statesOrdered and the state of the StateLicensing tables are identical before updating the table with the latest job information from Indeed.
as.factor(statesOrdered$stateName)==StateLicensing$state
## [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [16] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [31] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [46] TRUE TRUE TRUE TRUE TRUE
That checks out, so we can now update the information with the latest data.
StateLicensing$LMT_AnualMedianPayAdvertised_Indeed <- statesOrdered$avgAnualSalary
StateLicensing$LMT_HourlyMedianPayRangeAdvertised_Indeed <- statesOrdered$avgHourly
StateLicensing$LMT_medianJobsListed_IndeedFirst5pages <- statesOrdered$jobsListed
colnames(StateLicensing)
## [1] "state"
## [2] "massageBoard"
## [3] "licenseByReciprocity"
## [4] "proofOtherOrAllStateLicense"
## [5] "stateResidencyProof"
## [6] "passportSizePhoto"
## [7] "driversLicensePhotoCopy"
## [8] "nameChangeProof"
## [9] "socialSecurityCopy"
## [10] "Hours"
## [11] "MBLEX_or_NCBTMB"
## [12] "goodHealthClearance"
## [13] "BoardBackgroundCheckFee"
## [14] "stateApplyingBackgroundCheck"
## [15] "DOJ_backgroundCheck"
## [16] "applicationCost"
## [17] "licensingCost"
## [18] "licenseRenewalFee"
## [19] "CPR_certification"
## [20] "licensingETA"
## [21] "healthReferences"
## [22] "CEU"
## [23] "timeLicenseValidYears"
## [24] "liabilityInsurance"
## [25] "schoolTranscripts"
## [26] "MBLEX_transcript"
## [27] "notes"
## [28] "notes2"
## [29] "notes3"
## [30] "notes4"
## [31] "citiesGreaterThan300k_orTop3"
## [32] "LMT_medianJobsListed_IndeedFirst5pages"
## [33] "LMT_HourlyMedianPayRangeAdvertised_Indeed"
## [34] "LMT_AnualMedianPayAdvertised_Indeed"
## [35] "Zillow_2BR_3cityMedianHomeValue"
## [36] "median2018IncomeByState"
## [37] "total_state_population"
## [38] "percent_black"
## [39] "percent_white"
## [40] "percent_two_or_more"
## [41] "percent_Native_American"
## [42] "percent_Asian"
## [43] "percent_Pacific_Islander"
## [44] "percent_Latino"
We should change the names of those columns to say ‘avg’ instead of ‘median’.
colnames(StateLicensing)[32:34] <- gsub('[mM]edian','Avg',colnames(StateLicensing)[32:34])
colnames(StateLicensing)
## [1] "state"
## [2] "massageBoard"
## [3] "licenseByReciprocity"
## [4] "proofOtherOrAllStateLicense"
## [5] "stateResidencyProof"
## [6] "passportSizePhoto"
## [7] "driversLicensePhotoCopy"
## [8] "nameChangeProof"
## [9] "socialSecurityCopy"
## [10] "Hours"
## [11] "MBLEX_or_NCBTMB"
## [12] "goodHealthClearance"
## [13] "BoardBackgroundCheckFee"
## [14] "stateApplyingBackgroundCheck"
## [15] "DOJ_backgroundCheck"
## [16] "applicationCost"
## [17] "licensingCost"
## [18] "licenseRenewalFee"
## [19] "CPR_certification"
## [20] "licensingETA"
## [21] "healthReferences"
## [22] "CEU"
## [23] "timeLicenseValidYears"
## [24] "liabilityInsurance"
## [25] "schoolTranscripts"
## [26] "MBLEX_transcript"
## [27] "notes"
## [28] "notes2"
## [29] "notes3"
## [30] "notes4"
## [31] "citiesGreaterThan300k_orTop3"
## [32] "LMT_AvgJobsListed_IndeedFirst5pages"
## [33] "LMT_HourlyAvgPayRangeAdvertised_Indeed"
## [34] "LMT_AnualAvgPayAdvertised_Indeed"
## [35] "Zillow_2BR_3cityMedianHomeValue"
## [36] "median2018IncomeByState"
## [37] "total_state_population"
## [38] "percent_black"
## [39] "percent_white"
## [40] "percent_two_or_more"
## [41] "percent_Native_American"
## [42] "percent_Asian"
## [43] "percent_Pacific_Islander"
## [44] "percent_Latino"
The Zillow data was also added manually from the find3zillowCitiesFunctionMedian2BRHomeValues.Rmd file that used a downloaded Zillow dataset on 2 bedroom zillow home value index value per city. The file is ‘updatedZillow2BR.csv’ made from our copy-find3zillowCitiesFunctionMean2BRHomeValues.Rmd script.
zillowData <- read.csv('updatedZillow2BR.csv',sep=',', header=TRUE, na.strings=c('',' ','NA'))
head(zillowData)
## State X2020.05.31
## 1 AK 244762.0
## 2 AL 93323.5
## 3 AR 115130.0
## 4 AZ 200447.0
## 5 CA 627870.5
## 6 CO 266867.0
zillowData$State
## [1] AK AL AR AZ CA CO CT DE FL GA HI IA ID IL IN KS KY LA MA MD ME MI MN MO MS
## [26] MT NC ND NE NH NJ NM NV NY OH OK OR PA RI SC SD TN TX UT VA VT WA WI WV WY
## 50 Levels: AK AL AR AZ CA CO CT DE FL GA HI IA ID IL IN KS KY LA MA MD ... WY
zillowData$stateName <- states
zillowData
## State X2020.05.31 stateName
## 1 AK 244762.0 Alaska
## 2 AL 93323.5 Alabama
## 3 AR 115130.0 Arkansas
## 4 AZ 200447.0 Arizona
## 5 CA 627870.5 California
## 6 CO 266867.0 Colorado
## 7 CT 249270.5 Connecticut
## 8 DE 142480.5 Delaware
## 9 FL 287185.0 Florida
## 10 GA 55150.5 Georgia
## 11 HI 306563.0 Hawaii
## 12 IA 105498.5 Iowa
## 13 ID 236233.0 Idaho
## 14 IL 184647.5 Illinois
## 15 IN 83773.0 Indiana
## 16 KS 129371.5 Kansas
## 17 KY 131360.0 Kentucky
## 18 LA 81342.5 Louisiana
## 19 MA 195805.5 Massachusetts
## 20 MD 225819.5 Maryland
## 21 ME 142633.5 Maine
## 22 MI 118743.0 Michigan
## 23 MN 187554.0 Minnesota
## 24 MO 83029.0 Missouri
## 25 MS 97128.0 Mississippi
## 26 MT 217002.5 Montana
## 27 NC 157095.0 North Carolina
## 28 ND 178108.0 North Dakota
## 29 NE 151995.5 Nebraska
## 30 NH 217130.0 New Hampshire
## 31 NJ 226637.0 New Jersey
## 32 NM 137343.0 New Mexico
## 33 NV 282642.5 Nevada
## 34 NY 95848.0 New York
## 35 OH 101587.0 Ohio
## 36 OK 103543.0 Oklahoma
## 37 OR 253686.5 Oregon
## 38 PA 147670.5 Pennsylvania
## 39 RI 231550.5 Rhode Island
## 40 SC 180467.0 South Carolina
## 41 SD 156400.5 South Dakota
## 42 TN 185365.0 Tennessee
## 43 TX 153400.0 Texas
## 44 UT 262224.0 Utah
## 45 VA 163733.0 Virginia
## 46 VT 187487.5 Vermont
## 47 WA 255647.5 Washington
## 48 WI 172931.5 Wisconsin
## 49 WV 111134.0 West Virginia
## 50 WY 181051.5 Wyoming
zOrdered <- zillowData[order(zillowData$stateName),]
zOrdered
## State X2020.05.31 stateName
## 2 AL 93323.5 Alabama
## 1 AK 244762.0 Alaska
## 4 AZ 200447.0 Arizona
## 3 AR 115130.0 Arkansas
## 5 CA 627870.5 California
## 6 CO 266867.0 Colorado
## 7 CT 249270.5 Connecticut
## 8 DE 142480.5 Delaware
## 9 FL 287185.0 Florida
## 10 GA 55150.5 Georgia
## 11 HI 306563.0 Hawaii
## 13 ID 236233.0 Idaho
## 14 IL 184647.5 Illinois
## 15 IN 83773.0 Indiana
## 12 IA 105498.5 Iowa
## 16 KS 129371.5 Kansas
## 17 KY 131360.0 Kentucky
## 18 LA 81342.5 Louisiana
## 21 ME 142633.5 Maine
## 20 MD 225819.5 Maryland
## 19 MA 195805.5 Massachusetts
## 22 MI 118743.0 Michigan
## 23 MN 187554.0 Minnesota
## 25 MS 97128.0 Mississippi
## 24 MO 83029.0 Missouri
## 26 MT 217002.5 Montana
## 29 NE 151995.5 Nebraska
## 33 NV 282642.5 Nevada
## 30 NH 217130.0 New Hampshire
## 31 NJ 226637.0 New Jersey
## 32 NM 137343.0 New Mexico
## 34 NY 95848.0 New York
## 27 NC 157095.0 North Carolina
## 28 ND 178108.0 North Dakota
## 35 OH 101587.0 Ohio
## 36 OK 103543.0 Oklahoma
## 37 OR 253686.5 Oregon
## 38 PA 147670.5 Pennsylvania
## 39 RI 231550.5 Rhode Island
## 40 SC 180467.0 South Carolina
## 41 SD 156400.5 South Dakota
## 42 TN 185365.0 Tennessee
## 43 TX 153400.0 Texas
## 44 UT 262224.0 Utah
## 46 VT 187487.5 Vermont
## 45 VA 163733.0 Virginia
## 47 WA 255647.5 Washington
## 49 WV 111134.0 West Virginia
## 48 WI 172931.5 Wisconsin
## 50 WY 181051.5 Wyoming
zillowOrdered <- zOrdered[,2:3]
colnames(zillowOrdered)[1] <- 'zillow2BR_2020May'
zillowOrdered
## zillow2BR_2020May stateName
## 2 93323.5 Alabama
## 1 244762.0 Alaska
## 4 200447.0 Arizona
## 3 115130.0 Arkansas
## 5 627870.5 California
## 6 266867.0 Colorado
## 7 249270.5 Connecticut
## 8 142480.5 Delaware
## 9 287185.0 Florida
## 10 55150.5 Georgia
## 11 306563.0 Hawaii
## 13 236233.0 Idaho
## 14 184647.5 Illinois
## 15 83773.0 Indiana
## 12 105498.5 Iowa
## 16 129371.5 Kansas
## 17 131360.0 Kentucky
## 18 81342.5 Louisiana
## 21 142633.5 Maine
## 20 225819.5 Maryland
## 19 195805.5 Massachusetts
## 22 118743.0 Michigan
## 23 187554.0 Minnesota
## 25 97128.0 Mississippi
## 24 83029.0 Missouri
## 26 217002.5 Montana
## 29 151995.5 Nebraska
## 33 282642.5 Nevada
## 30 217130.0 New Hampshire
## 31 226637.0 New Jersey
## 32 137343.0 New Mexico
## 34 95848.0 New York
## 27 157095.0 North Carolina
## 28 178108.0 North Dakota
## 35 101587.0 Ohio
## 36 103543.0 Oklahoma
## 37 253686.5 Oregon
## 38 147670.5 Pennsylvania
## 39 231550.5 Rhode Island
## 40 180467.0 South Carolina
## 41 156400.5 South Dakota
## 42 185365.0 Tennessee
## 43 153400.0 Texas
## 44 262224.0 Utah
## 46 187487.5 Vermont
## 45 163733.0 Virginia
## 47 255647.5 Washington
## 49 111134.0 West Virginia
## 48 172931.5 Wisconsin
## 50 181051.5 Wyoming
StateLicensing$state==zillowOrdered$stateName
## [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [16] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [31] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [46] TRUE TRUE TRUE TRUE TRUE
Everything checks out so we can now update our zillow 2 bedroom median home values per state to the mean values per state instead. Some of the top 3 cities of population weren’t in the Zillow data, such as AL.
StateLicensing$Zillow_2BR_3cityMedianHomeValue <- zillowOrdered$zillow2BR_2020May
colnames(StateLicensing)[35] <- 'Zillow_2BR_3cityAverageHomeValue'
colnames(StateLicensing)
## [1] "state"
## [2] "massageBoard"
## [3] "licenseByReciprocity"
## [4] "proofOtherOrAllStateLicense"
## [5] "stateResidencyProof"
## [6] "passportSizePhoto"
## [7] "driversLicensePhotoCopy"
## [8] "nameChangeProof"
## [9] "socialSecurityCopy"
## [10] "Hours"
## [11] "MBLEX_or_NCBTMB"
## [12] "goodHealthClearance"
## [13] "BoardBackgroundCheckFee"
## [14] "stateApplyingBackgroundCheck"
## [15] "DOJ_backgroundCheck"
## [16] "applicationCost"
## [17] "licensingCost"
## [18] "licenseRenewalFee"
## [19] "CPR_certification"
## [20] "licensingETA"
## [21] "healthReferences"
## [22] "CEU"
## [23] "timeLicenseValidYears"
## [24] "liabilityInsurance"
## [25] "schoolTranscripts"
## [26] "MBLEX_transcript"
## [27] "notes"
## [28] "notes2"
## [29] "notes3"
## [30] "notes4"
## [31] "citiesGreaterThan300k_orTop3"
## [32] "LMT_AvgJobsListed_IndeedFirst5pages"
## [33] "LMT_HourlyAvgPayRangeAdvertised_Indeed"
## [34] "LMT_AnualAvgPayAdvertised_Indeed"
## [35] "Zillow_2BR_3cityAverageHomeValue"
## [36] "median2018IncomeByState"
## [37] "total_state_population"
## [38] "percent_black"
## [39] "percent_white"
## [40] "percent_two_or_more"
## [41] "percent_Native_American"
## [42] "percent_Asian"
## [43] "percent_Pacific_Islander"
## [44] "percent_Latino"
Now, we can write our table out to csv. We manually put in the 2018 median household income per state from data.census.gov, but we can update that later or as needed when more relevant data is available. That was two years ago, and there should be 2020 data soon because of the 2020 census.
Because this will be the same table but with added and updated columns, we should name it something else to keep separate from the original table with fewer columns.
write.csv(StateLicensing,'stateLicensingDemographicsAddedAndUpdated.csv',row.names=FALSE)
Note that the original csv file stateLicensingRequirements.csv has to be manually input for the changes, then use this script to add the demographics, updated Zillow 2BR home values, and update the average Indeed pay rates and job listings. Don’t make changes in the file just written out or else they will be lost if modifying the state by state licensing requirements of the first variables.
Now, lets add in the data on the alternate jobs available for a massage therapist looking to move to another state and work as a massage therapist, but needing alternate work to pay bills while waiting for license approval.
I have gathered the information on job title for the first five web pages of job listings on Indeed for similar jobs to a massage therapist or that might not need any license to work as. These jobs are: nanny, server, personal trainer, security, data science, house cleaner, warehouse worker, and cashier. The data scientist job is more relevant to me specifically, but some people could possibly have experience as a coder or computer programmer and statistical analyst to land a job in data science without the intense and rigorous education required in machine learning that I went through. It is not likely, but some people do make it to similar jobs with just a couple months to years of proving they are qualified as computer programmers and coders. So, we will assume that is the case, and that companies don’t want to pay higher salaries to arrogant top educated and possibly difficult to work with graduates and would rather pay motivated and slightly proven but coachable males and females from team building backgrounds or sports competitive athletes used to the heirarchical structure of ‘yes sir and mam’ to their directors at lower wages than a professional, skilled, and educated in the background theory that could possibly question the director’s motives, authority, and decisions, and possibly leak the lack of sound leadership within the company to something as viral as a social media site.
So, without further a do, lets start, shall we?
We will import the data sets individually for each of the 50 states’ counts, and salaries be it hourly, annual, or both from our top three populated cities of each state.
house cleaner:
houseCleaner <- read.csv('./Alternate Jobs Each State Indeed/statesRates-house cleaner.csv', header=TRUE,
na.strings=c('',' ','NA'), sep=',')
houseCleaner$stateName <- states
houseCleaner <- houseCleaner[,c(1,10,2:9)]
head(houseCleaner)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 4 house cleaner NA NA
## 2 AL Alabama 67 house cleaner 8.777778 9.984127
## 3 AR Arkansas 27 house cleaner 12.000000 12.000000
## 4 AZ Arizona 170 house cleaner 11.080000 22.800000
## 5 CA California 211 house cleaner 12.678910 24.690521
## 6 CO Colorado 211 house cleaner 12.000000 32.332891
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA NA NA NA
## 2 17000 20000 9.380952 18500
## 3 NA NA 12.000000 NA
## 4 NA NA 16.940000 NA
## 5 40600 40600 18.684716 40600
## 6 20000 30000 22.166445 25000
nanny:
nanny <- read.csv('./Alternate Jobs Each State Indeed/statesRates-nanny.csv', header=TRUE,
na.strings=c('',' ','NA'), sep=',')
nanny$stateName <- states
nanny <- nanny[,c(1,10,2:9)]
head(nanny)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 26 nanny 10.434783 15.13043
## 2 AL Alabama 48 nanny 11.166667 17.89583
## 3 AR Arkansas 83 nanny 9.265823 16.69620
## 4 AZ Arizona 182 nanny 10.000000 24.06593
## 5 CA California 206 nanny 10.000000 38.68932
## 6 CO Colorado 183 nanny 12.765027 23.38251
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA NA 12.78261 NA
## 2 NA NA 14.53125 NA
## 3 NA NA 12.98101 NA
## 4 33000.00 74000 17.03297 53500.00
## 5 75285.71 110000 24.34466 92642.86
## 6 NA NA 18.07377 NA
cashier:
cashier <- read.csv('./Alternate Jobs Each State Indeed/statesRates-cashier.csv', header=TRUE,
na.strings=c('',' ','NA'), sep=',')
cashier$stateName <- states
cashier <- cashier[,c(1,10,2:9)]
head(cashier)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 121 cashier 10.336449 14.32710
## 2 AL Alabama 185 cashier 7.614865 13.72432
## 3 AR Arkansas 190 cashier 9.077632 10.70526
## 4 AZ Arizona 223 cashier 9.000000 15.10202
## 5 CA California 225 cashier 13.013333 21.01333
## 6 CO Colorado 214 cashier 10.221963 18.17757
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA NA 12.331776 NA
## 2 NA NA 10.669595 NA
## 3 NA NA 9.891447 NA
## 4 NA NA 12.051009 NA
## 5 NA NA 17.013333 NA
## 6 NA NA 14.199766 NA
personal trainer:
personalTrainer <- read.csv('./Alternate Jobs Each State Indeed/statesRates-personal trainer.csv', header=TRUE,
na.strings=c('',' ','NA'), sep=',')
personalTrainer$stateName <- states
personalTrainer <- personalTrainer[,c(1,10,2:9)]
head(personalTrainer)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 47 personal trainer NA NA
## 2 AL Alabama 87 personal trainer 8.628205 48.14103
## 3 AR Arkansas 57 personal trainer 15.541667 28.66667
## 4 AZ Arizona 153 personal trainer 9.274510 35.45752
## 5 CA California 220 personal trainer 13.181818 61.22727
## 6 CO Colorado 197 personal trainer 12.000000 46.78173
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 35000.00 60000.00 NA 47500.00
## 2 40000.00 50000.00 28.38462 45000.00
## 3 50000.00 50000.00 22.10417 50000.00
## 4 30106.65 82081.72 22.36601 56094.18
## 5 29863.64 96409.09 37.20455 63136.36
## 6 40553.03 66659.62 29.39086 53606.32
security:
security <- read.csv('./Alternate Jobs Each State Indeed/statesRates-security.csv', header=TRUE,
na.strings=c('',' ','NA'), sep=',')
security$stateName <- states
security <- security[,c(1,10,2:9)]
head(security)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 165 security 12.375887 17.09929
## 2 AL Alabama 202 security 7.861386 21.62406
## 3 AR Arkansas 207 security 9.285024 16.14493
## 4 AZ Arizona 227 security 11.339207 27.54075
## 5 CA California 239 security 13.317992 26.04184
## 6 CO Colorado 229 security 12.323144 33.90044
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 54507.89 118837.39 14.73759 86672.64
## 2 43161.32 81731.72 14.74272 62446.52
## 3 25418.47 43191.34 12.71498 34304.90
## 4 27822.25 95855.86 19.43998 61839.06
## 5 45180.27 110648.30 19.67992 77914.28
## 6 36774.32 112976.10 23.11179 74875.21
server <- read.csv('./Alternate Jobs Each State Indeed/statesRates-server.csv', header=TRUE,
na.strings=c('',' ','NA'), sep=',')
server$stateName <- states
server <- server[,c(1,10,2:9)]
head(server)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 73 server 10.005616 10.17000
## 2 AL Alabama 220 server 8.261364 23.11364
## 3 AR Arkansas 201 server 9.751244 17.19900
## 4 AZ Arizona 222 server 9.000000 22.76126
## 5 CA California 230 server 12.334783 25.23478
## 6 CO Colorado 217 server 8.980000 32.23502
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA NA 10.08781 NA
## 2 NA NA 15.68750 NA
## 3 NA NA 13.47512 NA
## 4 NA NA 15.88063 NA
## 5 55000 75000 18.78478 65000
## 6 NA NA 20.60751 NA
warehouse worker:
warehouseWorker <- read.csv('./Alternate Jobs Each State Indeed/statesRates-warehouse worker.csv', header=TRUE,
na.strings=c('',' ','NA'), sep=',')
warehouseWorker$stateName <- states
warehouseWorker <- warehouseWorker[,c(1,10,2:9)]
head(warehouseWorker)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 197 warehouse worker 11.497462 30.84944
## 2 AL Alabama 225 warehouse worker 8.587778 18.31111
## 3 AR Arkansas 223 warehouse worker 9.668161 21.58287
## 4 AZ Arizona 242 warehouse worker 12.000000 23.63587
## 5 CA California 247 warehouse worker 12.165992 29.37652
## 6 CO Colorado 234 warehouse worker 11.995726 21.53744
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 55000.00 80000.00 21.17345 67500.00
## 2 39289.47 43802.63 13.44944 41546.05
## 3 NA NA 15.62552 NA
## 4 36113.55 53455.37 17.81793 44784.46
## 5 51952.24 79188.64 20.77126 65570.44
## 6 33444.44 54901.96 16.76658 44173.20
data scientist:
dataScientist <- read.csv('./Alternate Jobs Each State Indeed/statesRates-data scientist.csv', header=TRUE,
na.strings=c('',' ','NA'), sep=',')
dataScientist$stateName <- states
dataScientist <- dataScientist[,c(1,10,2:9)]
head(dataScientist)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 69 data scientist NA NA
## 2 AL Alabama 136 data scientist NA NA
## 3 AR Arkansas 96 data scientist NA NA
## 4 AZ Arizona 190 data scientist 15.00000 50.00000
## 5 CA California 230 data scientist 35.76316 56.41447
## 6 CO Colorado 215 data scientist NA NA
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 64078.67 162166.7 NA 113122.7
## 2 65000.00 128750.0 NA 96875.0
## 3 58203.44 160000.0 NA 109101.7
## 4 74605.26 136631.6 32.50000 105618.4
## 5 68239.13 132782.6 46.08882 100510.9
## 6 82906.98 139907.0 NA 111407.0
tutor:
tutor <- read.csv('./Alternate Jobs Each State Indeed/statesRates-tutor.csv', header=TRUE,
na.strings=c('',' ','NA'), sep=',')
tutor$stateName <- states
tutor <- tutor[,c(1,10,2:9)]
head(tutor)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 166 tutor 12.08946 28.01786
## 2 AL Alabama 189 tutor 11.39090 24.36508
## 3 AR Arkansas 88 tutor 10.20455 10.62500
## 4 AZ Arizona 208 tutor 11.64423 43.94231
## 5 CA California 206 tutor 12.95340 69.10194
## 6 CO Colorado 202 tutor 12.25842 34.29703
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA NA 20.05366 NA
## 2 21623.00 38100.00 17.87799 29861.50
## 3 NA NA 10.41477 NA
## 4 40937.93 74000.00 27.79327 57468.97
## 5 50000.00 90000.00 41.02767 70000.00
## 6 25000.00 34684.86 23.27772 29842.43
clerical:
clerical <- read.csv('./Alternate Jobs Each State Indeed/statesRates-clerical.csv', header=TRUE,
na.strings=c('',' ','NA'), sep=',')
clerical$stateName <- states
clerical <- clerical[,c(1,10,2:9)]
head(clerical)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 209 clerical 10.400622 30.47067
## 2 AL Alabama 225 clerical 9.346667 31.99511
## 3 AR Arkansas 222 clerical 9.380631 20.26577
## 4 AZ Arizona 224 clerical 11.669643 25.00000
## 5 CA California 230 clerical 13.017391 30.92922
## 6 CO Colorado 228 clerical 11.675439 32.70513
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 33396.37 59372.37 20.43565 46384.37
## 2 22642.12 64029.39 20.67089 43335.75
## 3 24693.51 55706.89 14.82320 40200.20
## 4 29842.89 51741.07 18.33482 40791.98
## 5 35950.50 81459.61 21.97330 58705.06
## 6 27341.20 61607.50 22.19029 44474.35
teacher:
teacher <- read.csv('./Alternate Jobs Each State Indeed/statesRates-teacher.csv', header=TRUE,
na.strings=c('',' ','NA'), sep=',')
teacher$stateName <- states
teacher <- teacher[,c(1,10,2:9)]
head(teacher)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 171 teacher 13.624561 38.27596
## 2 AL Alabama 201 teacher 7.783333 29.59204
## 3 AR Arkansas 166 teacher 11.602410 29.75301
## 4 AZ Arizona 251 teacher 12.322709 53.06773
## 5 CA California 228 teacher 13.688596 69.86842
## 6 CO Colorado 233 teacher 12.334764 56.22318
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 52999.00 78591.51 25.95026 65795.25
## 2 33907.38 75627.14 18.68769 54767.26
## 3 38047.96 68874.55 20.67771 53461.26
## 4 24581.32 94478.09 32.69522 59529.71
## 5 26820.18 80581.14 41.77851 53700.66
## 6 24283.26 85734.71 34.27897 55008.99
Lets get only the columns needed.
dataScientist2 <- dataScientist[,c(2,3,10)]
colnames(dataScientist2)[2:3] <- paste('dataScientist',colnames(dataScientist2)[2:3],sep='_')
dataScientist2$dataScientist_avgHourly <- (dataScientist2$dataScientist_avgAnualSalary/52)/40
dataScientist2 <- dataScientist2[,c(1,2,4,3)]
head(dataScientist2)
## stateName dataScientist_jobsListed dataScientist_avgHourly
## 1 Alaska 69 54.38590
## 2 Alabama 136 46.57452
## 3 Arkansas 96 52.45275
## 4 Arizona 190 50.77809
## 5 California 230 48.32253
## 6 Colorado 215 53.56105
## dataScientist_avgAnualSalary
## 1 113122.7
## 2 96875.0
## 3 109101.7
## 4 105618.4
## 5 100510.9
## 6 111407.0
warehouseWorker2 <- warehouseWorker[,c(2,3,9)]
colnames(warehouseWorker2)[2:3] <- paste('warehouse',colnames(warehouseWorker2)[2:3],
sep='_')
warehouseWorker2$warehouse_avgAnnualSalary <- warehouseWorker2$warehouse_avgHourly*52*40
head(warehouseWorker2)
## stateName warehouse_jobsListed warehouse_avgHourly warehouse_avgAnnualSalary
## 1 Alaska 197 21.17345 44040.78
## 2 Alabama 225 13.44944 27974.84
## 3 Arkansas 223 15.62552 32501.07
## 4 Arizona 242 17.81793 37061.30
## 5 California 247 20.77126 43204.21
## 6 Colorado 234 16.76658 34874.49
nanny2 <- nanny[,c(2,3,9)]
colnames(nanny2)[2:3] <- paste('nanny',colnames(nanny2)[2:3],
sep='_')
nanny2$nanny_avgAnnualSalary <- nanny2$nanny_avgHourly*52*40
head(nanny2)
## stateName nanny_jobsListed nanny_avgHourly nanny_avgAnnualSalary
## 1 Alaska 26 12.78261 26587.83
## 2 Alabama 48 14.53125 30225.00
## 3 Arkansas 83 12.98101 27000.51
## 4 Arizona 182 17.03297 35428.57
## 5 California 206 24.34466 50636.89
## 6 Colorado 183 18.07377 37593.44
personalTrainer2 <- personalTrainer[,c(2,3,9)]
colnames(personalTrainer2)[2:3] <- paste('personalTrainer',colnames(personalTrainer2)[2:3],
sep='_')
personalTrainer2$personalTrainer_avgAnnualSalary <-
personalTrainer2$personalTrainer_avgHourly*52*40
head(personalTrainer2)
## stateName personalTrainer_jobsListed personalTrainer_avgHourly
## 1 Alaska 47 NA
## 2 Alabama 87 28.38462
## 3 Arkansas 57 22.10417
## 4 Arizona 153 22.36601
## 5 California 220 37.20455
## 6 Colorado 197 29.39086
## personalTrainer_avgAnnualSalary
## 1 NA
## 2 59040.00
## 3 45976.67
## 4 46521.31
## 5 77385.45
## 6 61132.99
security2 <- security[,c(2,3,9)]
colnames(security2)[2:3] <- paste('security',colnames(security2)[2:3],
sep='_')
security2$security_avgAnnualSalary <- security2$security_avgHourly*52*40
head(security2)
## stateName security_jobsListed security_avgHourly security_avgAnnualSalary
## 1 Alaska 165 14.73759 30654.18
## 2 Alabama 202 14.74272 30664.86
## 3 Arkansas 207 12.71498 26447.15
## 4 Arizona 227 19.43998 40435.15
## 5 California 239 19.67992 40934.23
## 6 Colorado 229 23.11179 48072.52
houseCleaner2 <- houseCleaner[,c(2,3,9)]
colnames(houseCleaner2)[2:3] <- paste('houseCleaner',colnames(houseCleaner2)[2:3],
sep='_')
houseCleaner2$houseCleaner_avgAnnualSalary <- houseCleaner2$houseCleaner_avgHourly*52*40
head(houseCleaner2)
## stateName houseCleaner_jobsListed houseCleaner_avgHourly
## 1 Alaska 4 NA
## 2 Alabama 67 9.380952
## 3 Arkansas 27 12.000000
## 4 Arizona 170 16.940000
## 5 California 211 18.684716
## 6 Colorado 211 22.166445
## houseCleaner_avgAnnualSalary
## 1 NA
## 2 19512.38
## 3 24960.00
## 4 35235.20
## 5 38864.21
## 6 46106.21
server2 <- server[,c(2,3,9)]
colnames(server2)[2:3] <- paste('server',colnames(server2)[2:3],
sep='_')
server2$server_avgAnnualSalary <- server2$server_avgHourly*52*40
head(server2)
## stateName server_jobsListed server_avgHourly server_avgAnnualSalary
## 1 Alaska 73 10.08781 20982.64
## 2 Alabama 220 15.68750 32630.00
## 3 Arkansas 201 13.47512 28028.26
## 4 Arizona 222 15.88063 33031.71
## 5 California 230 18.78478 39072.35
## 6 Colorado 217 20.60751 42863.62
cashier2 <- cashier[,c(2,3,9)]
colnames(cashier2)[2:3] <- paste('cashier',colnames(cashier2)[2:3],
sep='_')
cashier2$cashier_avgAnnualSalary <- cashier2$cashier_avgHourly*52*40
head(cashier2)
## stateName cashier_jobsListed cashier_avgHourly cashier_avgAnnualSalary
## 1 Alaska 121 12.331776 25650.09
## 2 Alabama 185 10.669595 22192.76
## 3 Arkansas 190 9.891447 20574.21
## 4 Arizona 223 12.051009 25066.10
## 5 California 225 17.013333 35387.73
## 6 Colorado 214 14.199766 29535.51
tutor2 <- tutor[,c(2,3,9)]
colnames(tutor2)[2:3] <- paste('tutor',colnames(tutor2)[2:3],
sep='_')
tutor2$tutor_avgAnnualSalary <- tutor2$tutor_avgHourly*52*40
head(tutor2)
## stateName tutor_jobsListed tutor_avgHourly tutor_avgAnnualSalary
## 1 Alaska 166 20.05366 41711.61
## 2 Alabama 189 17.87799 37186.22
## 3 Arkansas 88 10.41477 21662.73
## 4 Arizona 208 27.79327 57810.00
## 5 California 206 41.02767 85337.55
## 6 Colorado 202 23.27772 48417.66
clerical2 <- clerical[,c(2,3,9)]
colnames(clerical2)[2:3] <- paste('clerical',colnames(clerical2)[2:3],
sep='_')
clerical2$clerical_avgAnnualSalary <- clerical2$clerical_avgHourly*52*40
head(clerical2)
## stateName clerical_jobsListed clerical_avgHourly clerical_avgAnnualSalary
## 1 Alaska 209 20.43565 42506.14
## 2 Alabama 225 20.67089 42995.45
## 3 Arkansas 222 14.82320 30832.25
## 4 Arizona 224 18.33482 38136.43
## 5 California 230 21.97330 45704.47
## 6 Colorado 228 22.19029 46155.79
teacher2 <- teacher[,c(2,3,10)]
colnames(teacher2)[2:3] <- paste('teacher',colnames(teacher2)[2:3],sep='_')
teacher2$teacher_avgHourly <- (teacher2$teacher_avgAnualSalary/52)/40
teacher2 <- teacher2[,c(1,2,4,3)]
head(teacher2)
## stateName teacher_jobsListed teacher_avgHourly teacher_avgAnualSalary
## 1 Alaska 171 31.63233 65795.25
## 2 Alabama 201 26.33041 54767.26
## 3 Arkansas 166 25.70253 53461.26
## 4 Arizona 251 28.62005 59529.71
## 5 California 228 25.81762 53700.66
## 6 Colorado 233 26.44663 55008.99
Lets add these new columns to our data table StateLicensing one at a time.
slr <- merge(StateLicensing,cashier2, by.x='state', by.y='stateName')
slr <- merge(slr, server2, by.x='state', by.y='stateName')
slr <- merge(slr, personalTrainer2, by.x='state', by.y='stateName')
slr <- merge(slr, houseCleaner2, by.x='state', by.y='stateName')
slr <- merge(slr, warehouseWorker2, by.x='state', by.y='stateName')
slr <- merge(slr, security2, by.x='state', by.y='stateName')
slr <- merge(slr, nanny2, by.x='state', by.y='stateName')
slr <- merge(slr, clerical2, by.x='state', by.y='stateName')
slr <- merge(slr, tutor2, by.x='state', by.y='stateName')
slr <- merge(slr, teacher2, by.x='state', by.y='stateName')
slr <- merge(slr, dataScientist2, by.x='state', by.y='stateName')
colnames(slr)
## [1] "state"
## [2] "massageBoard"
## [3] "licenseByReciprocity"
## [4] "proofOtherOrAllStateLicense"
## [5] "stateResidencyProof"
## [6] "passportSizePhoto"
## [7] "driversLicensePhotoCopy"
## [8] "nameChangeProof"
## [9] "socialSecurityCopy"
## [10] "Hours"
## [11] "MBLEX_or_NCBTMB"
## [12] "goodHealthClearance"
## [13] "BoardBackgroundCheckFee"
## [14] "stateApplyingBackgroundCheck"
## [15] "DOJ_backgroundCheck"
## [16] "applicationCost"
## [17] "licensingCost"
## [18] "licenseRenewalFee"
## [19] "CPR_certification"
## [20] "licensingETA"
## [21] "healthReferences"
## [22] "CEU"
## [23] "timeLicenseValidYears"
## [24] "liabilityInsurance"
## [25] "schoolTranscripts"
## [26] "MBLEX_transcript"
## [27] "notes"
## [28] "notes2"
## [29] "notes3"
## [30] "notes4"
## [31] "citiesGreaterThan300k_orTop3"
## [32] "LMT_AvgJobsListed_IndeedFirst5pages"
## [33] "LMT_HourlyAvgPayRangeAdvertised_Indeed"
## [34] "LMT_AnualAvgPayAdvertised_Indeed"
## [35] "Zillow_2BR_3cityAverageHomeValue"
## [36] "median2018IncomeByState"
## [37] "total_state_population"
## [38] "percent_black"
## [39] "percent_white"
## [40] "percent_two_or_more"
## [41] "percent_Native_American"
## [42] "percent_Asian"
## [43] "percent_Pacific_Islander"
## [44] "percent_Latino"
## [45] "cashier_jobsListed"
## [46] "cashier_avgHourly"
## [47] "cashier_avgAnnualSalary"
## [48] "server_jobsListed"
## [49] "server_avgHourly"
## [50] "server_avgAnnualSalary"
## [51] "personalTrainer_jobsListed"
## [52] "personalTrainer_avgHourly"
## [53] "personalTrainer_avgAnnualSalary"
## [54] "houseCleaner_jobsListed"
## [55] "houseCleaner_avgHourly"
## [56] "houseCleaner_avgAnnualSalary"
## [57] "warehouse_jobsListed"
## [58] "warehouse_avgHourly"
## [59] "warehouse_avgAnnualSalary"
## [60] "security_jobsListed"
## [61] "security_avgHourly"
## [62] "security_avgAnnualSalary"
## [63] "nanny_jobsListed"
## [64] "nanny_avgHourly"
## [65] "nanny_avgAnnualSalary"
## [66] "clerical_jobsListed"
## [67] "clerical_avgHourly"
## [68] "clerical_avgAnnualSalary"
## [69] "tutor_jobsListed"
## [70] "tutor_avgHourly"
## [71] "tutor_avgAnnualSalary"
## [72] "teacher_jobsListed"
## [73] "teacher_avgHourly"
## [74] "teacher_avgAnualSalary"
## [75] "dataScientist_jobsListed"
## [76] "dataScientist_avgHourly"
## [77] "dataScientist_avgAnualSalary"
Lets now write this data table out to csv.
write.csv(slr,'stateLicensingDemographicsAddedAndUpdated.csv', row.names=FALSE)
Lets plot some of this data to get a good sense of what the job outlook is like compared to massage therapy for other professions.
numberOfJobs <- slr[,c(1,32,45,48,51,54,57,60,63,66,69,72,75)]
numberOfJobs
## state LMT_AvgJobsListed_IndeedFirst5pages cashier_jobsListed
## 1 Alabama 64 185
## 2 Alaska 28 121
## 3 Arizona 225 223
## 4 Arkansas 63 190
## 5 California 206 225
## 6 Colorado 237 214
## 7 Connecticut 208 201
## 8 Delaware 176 199
## 9 Florida 229 220
## 10 Georgia 92 205
## 11 Hawaii 82 124
## 12 Idaho 162 216
## 13 Illinois 231 223
## 14 Indiana 110 203
## 15 Iowa 125 203
## 16 Kansas 156 211
## 17 Kentucky 133 214
## 18 Louisiana 87 207
## 19 Maine 63 138
## 20 Maryland 219 210
## 21 Massachusetts 227 208
## 22 Michigan 221 228
## 23 Minnesota 176 211
## 24 Mississippi 71 201
## 25 Missouri 170 209
## 26 Montana 32 208
## 27 Nebraska 183 202
## 28 Nevada 203 224
## 29 New Hampshire 134 215
## 30 New Jersey 236 228
## 31 New Mexico 157 200
## 32 New York 196 209
## 33 North Carolina 194 225
## 34 North Dakota 38 195
## 35 Ohio 207 221
## 36 Oklahoma 166 201
## 37 Oregon 142 203
## 38 Pennsylvania 248 222
## 39 Rhode Island 207 211
## 40 South Carolina 177 221
## 41 South Dakota 43 144
## 42 Tennessee 172 226
## 43 Texas 237 217
## 44 Utah 237 227
## 45 Vermont 62 172
## 46 Virginia 233 219
## 47 Washington 224 213
## 48 West Virginia 62 188
## 49 Wisconsin 171 204
## 50 Wyoming 26 179
## server_jobsListed personalTrainer_jobsListed houseCleaner_jobsListed
## 1 220 87 67
## 2 73 47 4
## 3 222 153 170
## 4 201 57 27
## 5 230 220 211
## 6 217 197 211
## 7 206 207 137
## 8 210 158 206
## 9 223 191 206
## 10 204 89 152
## 11 137 38 16
## 12 200 72 202
## 13 227 200 216
## 14 217 95 98
## 15 202 76 92
## 16 223 184 168
## 17 213 86 84
## 18 223 92 92
## 19 124 28 115
## 20 224 222 216
## 21 209 198 160
## 22 248 180 185
## 23 217 161 161
## 24 208 96 86
## 25 238 133 152
## 26 199 18 22
## 27 211 146 136
## 28 220 193 203
## 29 211 180 197
## 30 235 245 214
## 31 198 105 62
## 32 226 134 193
## 33 217 161 196
## 34 214 32 111
## 35 233 217 208
## 36 221 134 100
## 37 210 119 146
## 38 225 219 218
## 39 228 203 197
## 40 244 205 215
## 41 148 42 35
## 42 219 158 200
## 43 228 211 212
## 44 214 158 173
## 45 162 4 105
## 46 241 193 186
## 47 202 142 176
## 48 215 47 27
## 49 223 155 75
## 50 136 17 14
## warehouse_jobsListed security_jobsListed nanny_jobsListed
## 1 225 202 48
## 2 197 165 26
## 3 242 227 182
## 4 223 207 83
## 5 247 239 206
## 6 234 229 183
## 7 228 225 174
## 8 236 225 132
## 9 224 226 186
## 10 221 210 113
## 11 193 210 43
## 12 236 195 100
## 13 252 225 183
## 14 234 213 55
## 15 230 211 37
## 16 238 219 93
## 17 228 209 101
## 18 204 215 33
## 19 155 138 26
## 20 234 227 202
## 21 245 227 167
## 22 233 224 107
## 23 243 219 146
## 24 221 214 58
## 25 232 220 97
## 26 219 171 17
## 27 240 203 58
## 28 222 225 108
## 29 232 223 107
## 30 233 239 221
## 31 230 221 62
## 32 229 211 86
## 33 233 220 159
## 34 196 202 22
## 35 242 234 100
## 36 229 212 81
## 37 216 217 79
## 38 243 232 155
## 39 240 232 159
## 40 225 221 94
## 41 221 148 17
## 42 239 227 108
## 43 222 233 183
## 44 231 214 125
## 45 220 192 25
## 46 233 233 127
## 47 235 217 145
## 48 201 211 23
## 49 229 206 72
## 50 157 147 14
## clerical_jobsListed tutor_jobsListed teacher_jobsListed
## 1 225 189 201
## 2 209 166 171
## 3 224 208 251
## 4 222 88 166
## 5 230 206 228
## 6 228 202 233
## 7 227 214 232
## 8 223 161 223
## 9 224 220 235
## 10 222 152 211
## 11 225 183 194
## 12 232 193 223
## 13 230 224 245
## 14 229 182 230
## 15 230 144 208
## 16 230 194 223
## 17 225 163 220
## 18 223 188 232
## 19 156 92 149
## 20 224 225 239
## 21 232 221 235
## 22 226 205 247
## 23 223 226 230
## 24 214 137 221
## 25 227 208 218
## 26 212 131 188
## 27 227 195 226
## 28 221 203 223
## 29 226 202 227
## 30 223 223 245
## 31 210 163 204
## 32 232 209 234
## 33 221 209 235
## 34 227 162 210
## 35 225 202 239
## 36 228 206 228
## 37 226 173 224
## 38 226 221 234
## 39 230 203 225
## 40 223 213 225
## 41 219 124 170
## 42 221 196 229
## 43 227 210 232
## 44 233 206 205
## 45 217 103 222
## 46 222 176 234
## 47 237 198 240
## 48 228 141 192
## 49 235 210 228
## 50 214 111 155
## dataScientist_jobsListed
## 1 136
## 2 69
## 3 190
## 4 96
## 5 230
## 6 215
## 7 220
## 8 162
## 9 190
## 10 114
## 11 171
## 12 114
## 13 214
## 14 119
## 15 114
## 16 150
## 17 109
## 18 58
## 19 58
## 20 246
## 21 217
## 22 180
## 23 155
## 24 56
## 25 149
## 26 65
## 27 116
## 28 100
## 29 185
## 30 227
## 31 168
## 32 184
## 33 176
## 34 70
## 35 213
## 36 131
## 37 117
## 38 179
## 39 205
## 40 67
## 41 63
## 42 188
## 43 211
## 44 209
## 45 95
## 46 210
## 47 179
## 48 69
## 49 151
## 50 81
gg <- ggplot(numberOfJobs, aes(x=numberOfJobs$LMT_AvgJobsListed_IndeedFirst5pages))
gg <- gg + geom_histogram(binwidth=2, colour="black",
aes(y=..density.., fill=..count..))
gg <- gg + stat_function(fun=dnorm,
color="red",
args=list(mean=mean(numberOfJobs$LMT_AvgJobsListed_IndeedFirst5pages),
sd=sd(numberOfJobs$LMT_AvgJobsListed_IndeedFirst5pages)))
gg
avg <- mean(numberOfJobs$LMT_AvgJobsListed_IndeedFirst5pages)
m <- min(numberOfJobs$LMT_AvgJobsListed_IndeedFirst5pages)
M <- max(numberOfJobs$LMT_AvgJobsListed_IndeedFirst5pages)
ggplot(data = numberOfJobs, aes(y=numberOfJobs$LMT_AvgJobsListed_IndeedFirst5pages, x=numberOfJobs$state)) +
geom_bar(stat='identity', position=position_dodge())+
scale_y_continuous(breaks=c(m,avg,M),labels=c(m,avg,M))+
scale_fill_brewer(palette='Paired') +
geom_hline(yintercept=mean(numberOfJobs$LMT_AvgJobsListed_IndeedFirst5pages), linetype="dashed", color = "red")+
theme_classic()+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('LMT Average Job Listings in the US Top 3 Cities of each State')+
ylab(NULL)+
xlab(NULL)
Lets look at those states whose job listings on Indeed are more than the US average job listings for licensed massage therapists.
moreThanAvgLMT <- subset(numberOfJobs, numberOfJobs$LMT_AvgJobsListed_IndeedFirst5pages>avg)
moreThanAvgLMT$state
## [1] Arizona California Colorado Connecticut Delaware
## [6] Florida Idaho Illinois Kansas Maryland
## [11] Massachusetts Michigan Minnesota Missouri Nebraska
## [16] Nevada New Jersey New Mexico New York North Carolina
## [21] Ohio Oklahoma Pennsylvania Rhode Island South Carolina
## [26] Tennessee Texas Utah Virginia Washington
## [31] Wisconsin
## 50 Levels: Alabama Alaska Arizona Arkansas California Colorado ... Wyoming
The above list of 31 states look like heavily populated states, such as CA, CO, NY, and TX.
Now, lets see which states have fewer than the US average number of job listings for LMT on Indeed.
lessThanAvgLMT <- subset(numberOfJobs, numberOfJobs$LMT_AvgJobsListed_IndeedFirst5pages<avg)
lessThanAvgLMT$state
## [1] Alabama Alaska Arkansas Georgia Hawaii
## [6] Indiana Iowa Kentucky Louisiana Maine
## [11] Mississippi Montana New Hampshire North Dakota Oregon
## [16] South Dakota Vermont West Virginia Wyoming
## 50 Levels: Alabama Alaska Arizona Arkansas California Colorado ... Wyoming
From the above, Alaska and many southern and sierra mountain range north mid-western states as well as Hawaii don’t have as many job listings for massage therapists as the more city or urban states do. Surprising Georgia is on this list, as that state has a large somewhat urban population and high pay for LMTs on average compared to other states. Lets look at the pay visually for the 50 states to see this claim just made as true or false.
payRates <- slr[,c(1,33,46,49,52,55,58,61,64,67,70,73,76)]
payRates
## state LMT_HourlyAvgPayRangeAdvertised_Indeed cashier_avgHourly
## 1 Alabama 29.66667 10.669595
## 2 Alaska 15.00000 12.331776
## 3 Arizona 43.79556 12.051009
## 4 Arkansas 21.50000 9.891447
## 5 California 43.22269 17.013333
## 6 Colorado 44.33700 14.199766
## 7 Connecticut 43.00000 13.604478
## 8 Delaware 33.10828 11.713568
## 9 Florida 41.08952 11.497727
## 10 Georgia 72.50000 10.010366
## 11 Hawaii 38.50000 14.419355
## 12 Idaho 37.50000 11.084491
## 13 Illinois 37.50000 13.250561
## 14 Indiana 33.24545 10.477217
## 15 Iowa 26.85200 11.012586
## 16 Kansas 32.50000 11.113744
## 17 Kentucky 37.99624 13.819743
## 18 Louisiana 38.47701 11.303744
## 19 Maine 38.61111 13.632246
## 20 Maryland 52.63014 14.000000
## 21 Massachusetts 34.45815 15.009615
## 22 Michigan 45.57296 11.337719
## 23 Minnesota 37.14489 12.482820
## 24 Mississippi 56.50000 14.500622
## 25 Missouri 37.07941 11.472368
## 26 Montana 30.00000 10.875000
## 27 Nebraska 43.42077 10.708540
## 28 Nevada 56.34483 14.445312
## 29 New Hampshire 29.07463 12.769767
## 30 New Jersey 70.16525 14.704496
## 31 New Mexico 40.92994 11.428125
## 32 New York 45.44388 14.750718
## 33 North Carolina 47.91237 10.713889
## 34 North Dakota 24.00000 11.130769
## 35 Ohio 49.26812 12.253733
## 36 Oklahoma 44.07530 10.997512
## 37 Oregon 35.38028 14.119951
## 38 Pennsylvania 41.53069 11.372815
## 39 Rhode Island 42.62500 13.816351
## 40 South Carolina 41.90960 10.326357
## 41 South Dakota 26.76744 10.020000
## 42 Tennessee 35.38372 14.397124
## 43 Texas 34.68987 13.161290
## 44 Utah 35.18354 12.598018
## 45 Vermont 20.88710 13.501453
## 46 Virginia 42.83476 10.125000
## 47 Washington 39.73661 14.404930
## 48 West Virginia 22.85484 10.152261
## 49 Wisconsin 35.90543 12.046569
## 50 Wyoming 39.54545 12.015866
## server_avgHourly personalTrainer_avgHourly houseCleaner_avgHourly
## 1 15.687500 28.38462 9.380952
## 2 10.087808 NA NA
## 3 15.880631 22.36601 16.940000
## 4 13.475124 22.10417 12.000000
## 5 18.784783 37.20455 18.684716
## 6 20.607512 29.39086 22.166445
## 7 20.127670 45.88406 23.372263
## 8 13.758278 39.65108 16.135922
## 9 17.008969 36.10348 15.417476
## 10 14.220588 25.33529 16.657895
## 11 18.587226 NA 14.250000
## 12 17.837500 21.50000 15.500000
## 13 22.806167 42.64750 18.805556
## 14 14.833525 36.72093 14.685393
## 15 15.721535 25.15789 12.831522
## 16 21.895964 14.66304 14.427083
## 17 16.707746 29.70779 14.250000
## 18 10.565436 22.75543 13.842466
## 19 15.564516 23.00000 15.786957
## 20 14.825893 40.38739 20.847222
## 21 19.327751 39.04040 16.823438
## 22 19.000000 32.32353 18.448649
## 23 16.685714 32.25776 16.884211
## 24 10.715144 22.06250 11.244186
## 25 14.440126 17.55263 14.320888
## 26 12.448492 NA 12.861111
## 27 23.559242 28.44178 12.013787
## 28 15.586705 45.36010 18.421182
## 29 19.706161 28.65556 16.357868
## 30 20.342553 48.14286 19.483645
## 31 11.483268 22.11429 11.100000
## 32 16.587611 27.00373 17.619171
## 33 13.452189 29.73913 14.897959
## 34 13.133178 NA 12.833333
## 35 15.351931 30.95622 14.882212
## 36 12.540158 17.42910 14.665000
## 37 14.008333 30.05042 18.210959
## 38 18.415000 38.81963 18.866972
## 39 23.960526 18.29433 15.000000
## 40 14.911885 41.82927 16.009302
## 41 9.510719 15.63158 13.885714
## 42 14.114155 20.51424 14.400000
## 43 15.250000 38.77014 17.948113
## 44 18.078855 33.85918 17.910405
## 45 15.000000 20.50000 13.250000
## 46 13.116701 23.34197 14.000000
## 47 17.315545 51.75352 17.719460
## 48 13.206395 12.00000 13.000000
## 49 14.507287 27.03226 13.000000
## 50 12.580000 NA 15.750000
## warehouse_avgHourly security_avgHourly nanny_avgHourly clerical_avgHourly
## 1 13.44944 14.74272 14.53125 20.67089
## 2 21.17345 14.73759 12.78261 20.43565
## 3 17.81793 19.43998 17.03297 18.33482
## 4 15.62552 12.71498 12.98101 14.82320
## 5 20.77126 19.67992 24.34466 21.97330
## 6 16.76658 23.11179 18.07377 22.19029
## 7 21.53000 23.45778 27.87931 25.00696
## 8 17.52966 17.00222 16.70455 28.12332
## 9 16.95815 17.10509 19.12903 18.32714
## 10 15.81493 24.04524 16.58407 17.20833
## 11 22.87184 14.55238 12.00000 19.61333
## 12 15.35701 11.09000 22.25000 17.45905
## 13 20.66667 14.87833 17.89344 20.10326
## 14 18.04427 11.98005 13.40909 14.02183
## 15 16.50370 13.99408 13.72348 18.58935
## 16 16.81092 19.01765 14.69355 19.52165
## 17 18.28947 15.63077 15.61198 17.74722
## 18 15.06556 18.31628 12.06897 15.20740
## 19 18.74839 14.22826 13.61538 20.53205
## 20 18.25137 20.67621 20.47030 27.46429
## 21 21.58053 21.62974 21.05240 21.92571
## 22 23.29614 16.94205 14.59813 17.17845
## 23 18.11677 18.10333 19.52055 19.72296
## 24 15.25281 11.22304 12.11207 18.11040
## 25 17.60345 17.18891 15.40206 18.36617
## 26 15.92728 13.07018 10.00000 19.12679
## 27 17.19792 16.99015 16.33621 17.54396
## 28 16.43806 14.67111 13.43981 18.41629
## 29 14.79849 24.99552 16.92056 17.53670
## 30 18.67597 30.98117 25.00000 31.94843
## 31 16.26691 14.42308 12.33871 16.40000
## 32 21.73952 33.00618 21.60465 30.13955
## 33 18.55313 14.90909 18.29874 16.50000
## 34 17.10459 21.22525 9.00000 18.58150
## 35 21.01240 13.35470 14.42000 19.74167
## 36 18.74655 23.13915 12.59259 22.26279
## 37 18.39988 19.23931 17.98101 18.33982
## 38 20.54224 14.98448 16.90323 18.45905
## 39 22.09062 17.92241 18.50000 19.06207
## 40 15.34889 15.76357 14.71277 19.49327
## 41 17.41176 18.01351 12.50000 21.35639
## 42 16.10033 14.13097 14.93519 16.46502
## 43 15.92550 19.03043 16.22814 19.01101
## 44 17.48431 18.27103 14.88000 18.91326
## 45 20.00909 15.48281 17.12000 16.26498
## 46 17.81974 13.11820 14.56299 15.70833
## 47 21.21064 23.77212 22.48276 35.44565
## 48 17.31592 11.52370 10.65789 28.99342
## 49 28.73799 14.68602 15.01389 20.60366
## 50 18.02459 14.42000 17.50000 14.20266
## tutor_avgHourly teacher_avgHourly dataScientist_avgHourly
## 1 17.87799 26.33041 46.57452
## 2 20.05366 31.63233 54.38590
## 3 27.79327 28.62005 50.77809
## 4 10.41477 25.70253 52.45275
## 5 41.02767 25.81762 48.32253
## 6 23.27772 26.44663 53.56105
## 7 45.08762 32.78831 54.08654
## 8 24.40497 30.63664 47.62435
## 9 23.55600 22.44976 51.42966
## 10 19.36331 30.00453 55.38335
## 11 22.50000 26.75019 54.08654
## 12 21.00000 23.09525 54.08654
## 13 24.50112 24.28327 49.71117
## 14 17.07212 26.74928 54.08654
## 15 22.68939 25.23745 53.36960
## 16 19.82832 27.12709 54.53965
## 17 20.65031 22.23657 47.48542
## 18 21.75000 20.63527 54.26775
## 19 28.47283 26.04121 54.08654
## 20 23.83144 33.29518 65.84041
## 21 39.35747 27.58374 58.98436
## 22 18.07341 23.07400 52.09001
## 23 21.10000 27.84308 35.87159
## 24 18.38686 25.80312 54.08654
## 25 27.13942 21.60048 52.04207
## 26 NA 25.87083 54.08654
## 27 20.00000 18.01104 55.01906
## 28 21.75862 23.06734 54.08654
## 29 23.31683 27.61987 54.08654
## 30 50.33632 29.73824 64.48556
## 31 34.00000 28.78618 54.08654
## 32 42.02344 27.13316 64.49885
## 33 24.66746 21.71370 54.00049
## 34 21.50000 28.18751 54.08654
## 35 21.79084 16.86567 46.79600
## 36 29.56796 18.15075 54.08654
## 37 17.18216 27.24574 54.08654
## 38 25.93665 20.89115 45.68326
## 39 21.88793 37.97486 47.50821
## 40 19.82864 20.33660 50.99349
## 41 NA 27.11851 54.08654
## 42 19.50255 20.15372 54.08654
## 43 24.97857 25.91388 53.44821
## 44 19.74636 20.26853 51.29164
## 45 NA 25.76034 54.08654
## 46 22.34759 16.85300 54.08654
## 47 26.04545 31.91402 56.70171
## 48 NA 28.59943 48.16402
## 49 20.03333 22.38619 53.40996
## 50 10.97000 30.90962 52.68911
avgPay <- mean(payRates$LMT_HourlyAvgPayRangeAdvertised_Indeed)
mPay <- min(payRates$LMT_HourlyAvgPayRangeAdvertised_Indeed)
MPay <- max(payRates$LMT_HourlyAvgPayRangeAdvertised_Indeed)
ggplot(data = numberOfJobs, aes(y=payRates$LMT_HourlyAvgPayRangeAdvertised_Indeed, x=payRates$state)) +
geom_bar(stat='identity', position=position_dodge())+
scale_y_continuous(breaks=c(mPay,avgPay,MPay),labels=c(mPay,avgPay,MPay))+
scale_fill_brewer(palette='Paired') +
geom_hline(yintercept=mean(payRates$LMT_HourlyAvgPayRangeAdvertised_Indeed), linetype="dashed", color = "red")+
theme_classic()+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('LMT Average Hourly Pay in the US Top 3 Cities of each State')+
ylab(NULL)+
xlab(NULL)
Lets see what states are paying their massage therapists more than the US average. Visually, above we can see Georgia does, and that GA is also in the list of the states with less than the average number of LMT job listings in the US per state. This logically indicates there is a demand for massage therapists in these states, and that the businesses offering massage therapy need LMTs and are willing to offer them more pay.
morePayThanAvgLMT <- subset(payRates, payRates$LMT_HourlyAvgPayRangeAdvertised_Indeed>avgPay)
morePayThanAvgLMT$state
## [1] Arizona California Colorado Connecticut Florida
## [6] Georgia Maryland Michigan Mississippi Nebraska
## [11] Nevada New Jersey New Mexico New York North Carolina
## [16] Ohio Oklahoma Pennsylvania Rhode Island South Carolina
## [21] Virginia Washington Wyoming
## 50 Levels: Alabama Alaska Arizona Arkansas California Colorado ... Wyoming
Lets see which states offer more than the national LMT average hourly pay and are also in the list of states with less than the national average number of LMT job listings.
fewListings <- lessThanAvgLMT$state
morePayAdvertised <- morePayThanAvgLMT$state
demandStatesLMT <- fewListings %in% morePayAdvertised
demanded <- fewListings[demandStatesLMT]
demanded
## [1] Georgia Mississippi Wyoming
## 50 Levels: Alabama Alaska Arizona Arkansas California Colorado ... Wyoming
The above states have a demand for massage therapists because they have fewer listings advertised on Indeed, but are willing to pay more than the national average for massage therapists. Those states are Georgia, Mississippi, and Wyoming.
Using this same logic, it is fair to say those states that have a higher than average demand for massage therapists and also more pay than average for massage therapists must also be states where the cost of living is higher than normal. Lets look at those states and compare their home values for a two bedroom Zillow listed price from our larger data table called slr.
moreListings <- moreThanAvgLMT$state
highCostStates <- moreListings %in% morePayAdvertised
highLivingCost <- moreListings[highCostStates]
highLivingCost
## [1] Arizona California Colorado Connecticut Florida
## [6] Maryland Michigan Nebraska Nevada New Jersey
## [11] New Mexico New York North Carolina Ohio Oklahoma
## [16] Pennsylvania Rhode Island South Carolina Virginia Washington
## 50 Levels: Alabama Alaska Arizona Arkansas California Colorado ... Wyoming
There are 20 states that are listed as possible high cost of living states because we are making the assumption that those states with higher than average pay for LMTs and higher than average job listings for LMT are in high cost of living states. We can verify this by looking at the two bedroom homes for sale in all states and get the average to compare to these 20 states.
avgHomePrice <- mean(slr$Zillow_2BR_3cityAverageHomeValue)
mHomePrice <- min(slr$Zillow_2BR_3cityAverageHomeValue)
MHomePrice <- max(slr$Zillow_2BR_3cityAverageHomeValue)
ggplot(data = numberOfJobs, aes(y=slr$Zillow_2BR_3cityAverageHomeValue, x=slr$state)) +
geom_bar(stat='identity', position=position_dodge())+
scale_y_continuous(breaks=c(mHomePrice,avgHomePrice,MHomePrice),
labels=c(mHomePrice,avgHomePrice,MHomePrice))+
scale_fill_brewer(palette='Paired') +
geom_hline(yintercept=avgHomePrice, linetype="dashed", color = "red")+
theme_classic()+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('Zillow 2 Bedroom Home Value in the US Top 3 Cities of each State')+
ylab(NULL)+
xlab(NULL)
Lets see exactly which states have higher priced homes than the national average.
expensiveHomes <- subset(slr,slr$Zillow_2BR_3cityAverageHomeValue>avgHomePrice)
e <- expensiveHomes$state
e
## [1] Alaska Arizona California Colorado Connecticut
## [6] Florida Hawaii Idaho Illinois Maryland
## [11] Massachusetts Minnesota Montana Nevada New Hampshire
## [16] New Jersey Oregon Rhode Island Tennessee Utah
## [21] Vermont Washington
## 50 Levels: Alabama Alaska Arizona Arkansas California Colorado ... Wyoming
There are 22 states with higher priced homes than the national average from the list produced above.
Lets see if those states are also in the list of states with high living costs.
expensive <- expensiveHomes$state %in% highLivingCost
expensiveHomes <- e[expensive]
expensiveHomes
## [1] Arizona California Colorado Connecticut Florida
## [6] Maryland Nevada New Jersey Rhode Island Washington
## 50 Levels: Alabama Alaska Arizona Arkansas California Colorado ... Wyoming
There are 10 states with expensive homes compared to the national average home price, and that also have higher pay advertised for LMTs and more advertised job listings for LMTs in the three most populated cities in each state according to the first five web pages of Indeed.
Lets see which states have lower priced homes than the national average but also have higher pay advertised for LMTs and more job listings advertised for LMTs.
inexpensiveHomes <- subset(slr,slr$Zillow_2BR_3cityAverageHomeValue < avgHomePrice)
inexpensive <- inexpensiveHomes$state
notExpensive <- inexpensive %in% highLivingCost
affordable <- inexpensive[notExpensive]
affordable
## [1] Michigan Nebraska New Mexico New York North Carolina
## [6] Ohio Oklahoma Pennsylvania South Carolina Virginia
## 50 Levels: Alabama Alaska Arizona Arkansas California Colorado ... Wyoming
We have a couple lists we generated, one for the higher priced states that also pay more for LMTs and have more jobs available called ‘expensiveHomes’, and another list that is the list of states that aren’t as expensive but also pay more for LMTs and have more jobs available for LMTs called ‘affordable’ that we can compare other factors in our large dataset called slr. We also have a third list called ‘demanded’ that lists those states that don’t have as many jobs available as the national average for LMTs but pays more than the national average. Lets see if those states are in our list of states with a higher than national average home according to Zillow’s two bedroom home values that was named ‘e’ for expensive homes by state.
demanded
## [1] Georgia Mississippi Wyoming
## 50 Levels: Alabama Alaska Arizona Arkansas California Colorado ... Wyoming
demanded %in% e
## [1] FALSE FALSE FALSE
We can see none of the demand for LMT states are in the list of states with expensive homes or homes with higher than average two bedroom home values.
So, we actually have four lists: e is the list of states with expensive homes, demanded is our list of states with demand has influenced LMT pay to higher for LMTs than the national average, expensiveHomes is our list of states with high cost of living based on higher home values and that also pay more and have more jobs available for LMTs, and our 4th list is the affordable list of lower cost of living by home price less than national average but also that has higher pay and more jobs available for LMTs than the national average.
Lets look at the demographics of the states that are in our affordable list and compare to the demographics or our expensiveHomes list to get an idea of the diversity.
demographics <- subset(slr, slr$state %in% affordable)
demographics2 <- demographics[,c(1,37:44)]
demographics2
## state total_state_population percent_black percent_white
## 22 Michigan 9995915 13.8 78.3
## 27 Nebraska 1929268 4.7 86.4
## 31 New Mexico 2095428 2.2 76.4
## 32 New York 19542209 15.7 63.3
## 33 North Carolina 10383620 21.4 68.4
## 35 Ohio 11689442 12.4 81.0
## 36 Oklahoma 3943079 7.3 72.2
## 38 Pennsylvania 12807060 11.2 80.1
## 40 South Carolina 5084127 26.6 67.0
## 46 Virginia 8517685 19.2 67.4
## percent_two_or_more percent_Native_American percent_Asian
## 22 2.9 0.5 3.3
## 27 3.1 1.0 2.4
## 31 3.2 9.6 1.6
## 32 3.3 0.4 8.5
## 33 2.9 1.2 3.0
## 35 3.1 0.2 2.3
## 36 7.7 7.8 2.1
## 38 2.6 0.2 3.6
## 40 2.4 0.5 1.6
## 46 4.1 0.3 6.5
## percent_Pacific_Islander percent_Latino
## 22 0.0 5.2
## 27 0.1 11.1
## 31 0.1 49.1
## 32 0.0 19.2
## 33 0.1 9.6
## 35 0.0 3.9
## 36 0.1 10.9
## 38 0.0 7.6
## 40 0.1 5.8
## 46 0.1 9.5
Lets look at this above chart of affordable states for LMTs compared to the demographics of CA.
CA_demog <- subset(slr, slr$state=='California')
CA_demog2 <- CA_demog[,c(1,37:44)]
CA_demog2
## state total_state_population percent_black percent_white
## 5 California 39557045 5.8 59.5
## percent_two_or_more percent_Native_American percent_Asian
## 5 5.1 0.8 14.7
## percent_Pacific_Islander percent_Latino
## 5 0.4 39.3
When comparing demographics of percent race to population, it could be similar in fashion to looking for an alternate planet similar to Earth in a vast universe. But we can see the state with a closer distribution of the population by Asian, Latino, Black, and two or more races is New York. The other states that are affordable in our list of 10 when compared to CA, a high cost of living state, don’t really compare similarly as far as race distribution goes. Lets look at how a few of our alternate jobs from these 10 states compare to CA next.
altjobs_aff <- demographics[,c(1,32,45,48,51,54,57,60,63,66,69,72,75)]
CA_altjobs <- CA_demog[,c(1,32,45,48,51,54,57,60,63,66,69,72,75)]
altjobs_aff
## state LMT_AvgJobsListed_IndeedFirst5pages cashier_jobsListed
## 22 Michigan 221 228
## 27 Nebraska 183 202
## 31 New Mexico 157 200
## 32 New York 196 209
## 33 North Carolina 194 225
## 35 Ohio 207 221
## 36 Oklahoma 166 201
## 38 Pennsylvania 248 222
## 40 South Carolina 177 221
## 46 Virginia 233 219
## server_jobsListed personalTrainer_jobsListed houseCleaner_jobsListed
## 22 248 180 185
## 27 211 146 136
## 31 198 105 62
## 32 226 134 193
## 33 217 161 196
## 35 233 217 208
## 36 221 134 100
## 38 225 219 218
## 40 244 205 215
## 46 241 193 186
## warehouse_jobsListed security_jobsListed nanny_jobsListed
## 22 233 224 107
## 27 240 203 58
## 31 230 221 62
## 32 229 211 86
## 33 233 220 159
## 35 242 234 100
## 36 229 212 81
## 38 243 232 155
## 40 225 221 94
## 46 233 233 127
## clerical_jobsListed tutor_jobsListed teacher_jobsListed
## 22 226 205 247
## 27 227 195 226
## 31 210 163 204
## 32 232 209 234
## 33 221 209 235
## 35 225 202 239
## 36 228 206 228
## 38 226 221 234
## 40 223 213 225
## 46 222 176 234
## dataScientist_jobsListed
## 22 180
## 27 116
## 31 168
## 32 184
## 33 176
## 35 213
## 36 131
## 38 179
## 40 67
## 46 210
There are less nanny, personal training, house cleaning, and data science jobs in the affordable states than in CA. While there are more cashier, server, and teaching jobs in the affordable states than in CA. The number of tutoring, clerical, warehouse, and security jobs are similar in available jobs.
CA_altjobs
## state LMT_AvgJobsListed_IndeedFirst5pages cashier_jobsListed
## 5 California 206 225
## server_jobsListed personalTrainer_jobsListed houseCleaner_jobsListed
## 5 230 220 211
## warehouse_jobsListed security_jobsListed nanny_jobsListed clerical_jobsListed
## 5 247 239 206 230
## tutor_jobsListed teacher_jobsListed dataScientist_jobsListed
## 5 206 228 230
Now, lets compare CA to our list of expensive states for demographics and alternate jobs available. CA is in our list of expensive states, so we don’t have to do separate table chart comparisons.
expensiveDemog <- subset(slr, slr$state %in% expensiveHomes)
expensiveDemog2 <- expensiveDemog[,c(1,37:44)]
expensiveDemog2
## state total_state_population percent_black percent_white
## 3 Arizona 7171646 4.7 78.0
## 5 California 39557045 5.8 59.5
## 6 Colorado 5695564 4.2 84.1
## 7 Connecticut 3572665 11.0 75.2
## 9 Florida 21299325 16.0 74.6
## 20 Maryland 6042718 30.0 54.7
## 28 Nevada 3034392 9.2 63.4
## 30 New Jersey 8908520 13.6 66.9
## 39 Rhode Island 1057315 6.7 80.7
## 47 Washington 7535591 3.9 74.8
## percent_two_or_more percent_Native_American percent_Asian
## 3 4.0 4.6 3.3
## 5 5.1 0.8 14.7
## 6 4.0 1.0 3.2
## 7 3.4 0.3 4.6
## 9 2.9 0.3 2.8
## 20 3.7 0.2 6.3
## 28 5.1 1.5 8.2
## 30 2.8 0.2 9.7
## 39 3.1 0.4 3.4
## 47 6.0 1.3 8.8
## percent_Pacific_Islander percent_Latino
## 3 0.2 31.6
## 5 0.4 39.3
## 6 0.1 21.7
## 7 0.0 16.5
## 9 0.1 26.1
## 20 0.1 10.4
## 28 0.6 29.0
## 30 0.0 20.6
## 39 0.1 15.9
## 47 0.7 12.9
From the above data, the closest state in comparison to diversity to CA is NV or Nevada. The next state would be Colorado or Washington.
Now, we will compare the alternate jobs available in our list of expensive states that includes CA.
altJobs_expStates <- expensiveDemog[,c(1,32,45,48,51,54,57,60,63,66,69,72,75)]
altJobs_expStates
## state LMT_AvgJobsListed_IndeedFirst5pages cashier_jobsListed
## 3 Arizona 225 223
## 5 California 206 225
## 6 Colorado 237 214
## 7 Connecticut 208 201
## 9 Florida 229 220
## 20 Maryland 219 210
## 28 Nevada 203 224
## 30 New Jersey 236 228
## 39 Rhode Island 207 211
## 47 Washington 224 213
## server_jobsListed personalTrainer_jobsListed houseCleaner_jobsListed
## 3 222 153 170
## 5 230 220 211
## 6 217 197 211
## 7 206 207 137
## 9 223 191 206
## 20 224 222 216
## 28 220 193 203
## 30 235 245 214
## 39 228 203 197
## 47 202 142 176
## warehouse_jobsListed security_jobsListed nanny_jobsListed
## 3 242 227 182
## 5 247 239 206
## 6 234 229 183
## 7 228 225 174
## 9 224 226 186
## 20 234 227 202
## 28 222 225 108
## 30 233 239 221
## 39 240 232 159
## 47 235 217 145
## clerical_jobsListed tutor_jobsListed teacher_jobsListed
## 3 224 208 251
## 5 230 206 228
## 6 228 202 233
## 7 227 214 232
## 9 224 220 235
## 20 224 225 239
## 28 221 203 223
## 30 223 223 245
## 39 230 203 225
## 47 237 198 240
## dataScientist_jobsListed
## 3 190
## 5 230
## 6 215
## 7 220
## 9 190
## 20 246
## 28 100
## 30 227
## 39 205
## 47 179
For the most part, the expensive states have about the same distribution of available jobs alternative to LMT work, except some states have noticeably less nanny and personal training jobs. Arizona and Washington have less personal training jobs, while Nevada, Rhode Island, and Washington have less nanny jobs. And there are far less house cleaning jobs in Connecticut than any other state that is expensive. Also, there are not as many data science jobs available in Nevada as any other expensive state.
Lets now plot the number of available jobs by category in CA compared to Arizona and New York. Arizona is an expensive state and New York is not so expensive compared to the average home value of the three top populated cities in each state.
NY_altJobs <- subset(altjobs_aff, altjobs_aff$state=='New York')
CA_altJobs <- subset(altJobs_expStates, altJobs_expStates$state=='California')
AZ_altJobs <- subset(altJobs_expStates, altJobs_expStates$state=='Arizona')
NY_tidyJobs <- gather(NY_altJobs,key="jobTitle", value="jobsListed",2:13, na.rm=TRUE)
NY_tidyJobs$jobTitle <- gsub('_.*$','',NY_tidyJobs$jobTitle, perl=TRUE)
CA_tidyJobs <- gather(CA_altJobs,key="jobTitle", value="jobsListed",2:13, na.rm=TRUE)
CA_tidyJobs$jobTitle <- gsub('_.*$','',CA_tidyJobs$jobTitle, perl=TRUE)
AZ_tidyJobs <- gather(AZ_altJobs,key="jobTitle", value="jobsListed",2:13, na.rm=TRUE)
AZ_tidyJobs$jobTitle <- gsub('_.*$','',AZ_tidyJobs$jobTitle, perl=TRUE)
ggplot(data = CA_tidyJobs, aes(y=CA_tidyJobs$jobsListed, x=CA_tidyJobs$jobTitle)) +
geom_bar(stat='identity', position=position_dodge())+
scale_fill_brewer(palette='Paired') +
theme_classic()+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('CA Alternate and LMT Jobs Advertised')+
ylab(NULL)+
xlab(NULL)
There are more warehouse and security jobs available on Indeed than the other listed jobs in CA. In comparison to other job categories available in CA, there are less tutor, nanny, and LMT jobs available than other comparative jobs.
ggplot(data = NY_tidyJobs, aes(y=NY_tidyJobs$jobsListed, x=NY_tidyJobs$jobTitle)) +
geom_bar(stat='identity', position=position_dodge())+
scale_fill_brewer(palette='Paired') +
theme_classic()+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('NY Alternate and LMT Jobs Advertised')+
ylab(NULL)+
xlab(NULL)
New York has more clerical, teaching, and warehouse jobs available than other jobs in NY, but has far less personal training and nanny jobs available than CA did.
ggplot(data = AZ_tidyJobs, aes(y=AZ_tidyJobs$jobsListed, x=AZ_tidyJobs$jobTitle)) +
geom_bar(stat='identity', position=position_dodge())+
scale_fill_brewer(palette='Paired') +
theme_classic()+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('AZ Alternate and LMT Jobs Advertised')+
ylab(NULL)+
xlab(NULL)
AZ has more teacher and warehouse jobs available just like NY than other jobs in the state from our categories of alternate jobs to LMT. There are as many LMT jobs available as there are security, clerical, cashier, and server.
Now, lets compare the pay to each of these states of CA, NY, and NV. To see how LMTs get paid compared to these alternative jobs in those states.
NY_pay <- subset(slr, slr$state=='New York')
NY_pay2 <- NY_pay[,c(1,34,47,50,53,56,59,62,65,68,71,74,77)]
CA_pay <- subset(slr, slr$state=='California')
CA_pay2 <- CA_pay[,c(1,34,47,50,53,56,59,62,65,68,71,74,77)]
AZ_pay <- subset(slr, slr$state=='Arizona')
AZ_pay2 <- AZ_pay[,c(1,34,47,50,53,56,59,62,65,68,71,74,77)]
NY_PAY <- gather(NY_pay2,key='jobTitle',value='AnnualPay',2:13)
NY_PAY$jobTitle <- gsub('_.*$','',NY_PAY$jobTitle)
CA_PAY <- gather(CA_pay2,key='jobTitle',value='AnnualPay',2:13)
CA_PAY$jobTitle <- gsub('_.*$','',CA_PAY$jobTitle)
AZ_PAY <- gather(AZ_pay2, key='jobTitle',value='AnnualPay',2:13)
AZ_PAY$jobTitle <- gsub('_.*$','',AZ_PAY$jobTitle)
ggplot(data = CA_PAY, aes(y=CA_PAY$AnnualPay, x=CA_PAY$jobTitle)) +
geom_bar(stat='identity', position=position_dodge())+
scale_fill_brewer(palette='Paired') +
geom_hline(yintercept=mean(CA_pay$median2018IncomeByState), linetype="dashed", color = "red")+
theme_classic()+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('CA Alternate and LMT Jobs Advertised Annual Pay with Median CA pay')+
ylab(NULL)+
xlab(NULL)
ggplot(data = NY_PAY, aes(y=NY_PAY$AnnualPay, x=NY_PAY$jobTitle)) +
geom_bar(stat='identity', position=position_dodge())+
scale_fill_brewer(palette='Paired') +
geom_hline(yintercept=mean(NY_pay$median2018IncomeByState), linetype="dashed", color = "red")+
theme_classic()+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('NY Alternate and LMT Jobs Advertised Annual Pay')+
ylab(NULL)+
xlab(NULL)
ggplot(data = AZ_PAY, aes(y=AZ_PAY$AnnualPay, x=AZ_PAY$jobTitle)) +
geom_bar(stat='identity', position=position_dodge())+
scale_fill_brewer(palette='Paired') +
geom_hline(yintercept=mean(AZ_pay$median2018IncomeByState), linetype="dashed", color = "red")+
theme_classic()+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('AZ Alternate and LMT Jobs Advertised Annual Pay')+
ylab(NULL)+
xlab(NULL)
Lets summarize the pay for each comparative job to that of the number of jobs available. In each state, there were more warehouse jobs available than most other jobs in our categories selected, but this role is on the low end of the annual pay scale compared to those other jobs available. In all jobs, data scientist pays the most in CA, AZ, and NY. LMT pays more than clerical in AZ or CA but not in NY. In CA, nannys get paid more than LMTs and so do personal trainers. In NY, security pays more than LMTs but not in CA or AZ. Also, tutors get paid more than teachers in NY and CA, but almost the same but less than in AZ.
Those are interesting findings for those three states. Data hasn’t been analyzed on the actual requirements to get licensed as a massage therapist in each state, because the table hasn’t been filled in. Each state has to be handled separately by finding each requirement from their massage board website of each state, and if not available or not intuitively navigated to from their home page, then emailed and asked about each specific requirements on cost, hours required, continuing education, time to process, distribution of hours, license by endorsement or reciprocity available, etc. It is being added to as time and desire permits on a motivational need. I haven’t found a table of these requirements on any internet search, but did find something close with American Massage Therapy Association’s listing of schools and state requirements that lacked a date updated or sources to validate and the other variables sought.
It would now be interesting to separately use our function from another script to pull in the jobs in our same wellness market of licensed massage therapists. Such as chiropractors, physical therapists, keep the personal trainer data, and add estheticians or skin care or medical spa jobs maybe by just searching for those jobs, as well as resort spas. This would add value to how effective our decision would be to move to a state to earn more, live better, or even open up a business in massage therapy that would do well based on evidence gathered from other top cities in each state and home values alongside the diversity indicated by percent race in population of the state. finding and replacing the job search sought in the scripts that are similar in file name to ‘copy-indeed-webscrape-function-Alt-jobs-dataScientist.Rmd’ in the github repository mentioned at the beginning of this script will get you the information you need in about 10-15 minutes. As it goes through the first five web page job listings on Indeed for 150 cities or the three most populated cities in each of the 50 US states.
Lets look at some other salaries from other professions, that reflect the state of our economy. I have ran the function to pull the wage information and number of jobs listed for nurses, medical doctors, chiropractors, physical therapists, estheticians, medical spa technicians, and personal assistants. Lets see what our data tells us in a state by state comparison.
nurses <- read.csv('./Alternate Jobs Each State Indeed/statesRates-nurse.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
personalAssistants <- read.csv('./Alternate Jobs Each State Indeed/statesRates-personal assistant.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
chiropractor <- read.csv('./Alternate Jobs Each State Indeed/statesRates-chiropractor.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
physicalTherapist <- read.csv('./Alternate Jobs Each State Indeed/statesRates-physical therapist.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
esthetician <- read.csv('./Alternate Jobs Each State Indeed/statesRates-esthetician.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
medicalSpaEsthetician <- read.csv('./Alternate Jobs Each State Indeed/statesRates-medical spa technician.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
medicalDoctor <- read.csv('./Alternate Jobs Each State Indeed/statesRates-medical doctor.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
yogaInstructor <- read.csv('./Alternate Jobs Each State Indeed/statesRates-yoga Instructor.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
pilatesInstructor <- read.csv('./Alternate Jobs Each State Indeed/statesRates-pilates Instructor.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
nurses$stateName <- states
nurses <- nurses[,c(1,10,2:9)]
head(nurses)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 218 nurse 27.17431 67.38532
## 2 AL Alabama 247 nurse 15.75709 43.88664
## 3 AR Arkansas 240 nurse 16.72500 45.00000
## 4 AZ Arizona 238 nurse 18.36134 74.68067
## 5 CA California 248 nurse 18.70565 80.84677
## 6 CO Colorado 237 nurse 19.32911 98.49789
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 41630.94 152417.4 47.27982 97024.19
## 2 51433.21 126543.5 29.82186 88988.35
## 3 53303.38 140360.8 30.86250 96832.07
## 4 43014.59 145134.4 46.52101 94074.49
## 5 68310.48 163399.8 49.77621 115855.15
## 6 44579.30 126146.2 58.91350 85362.74
personalAssistants$stateName <- states
personalAssistants <- personalAssistants[,c(1,10,2:9)]
head(personalAssistants)
## state stateName jobsListed jobSearched MinHourlySalary
## 1 AK Alaska 88 personal assistant 11.375000
## 2 AL Alabama 160 personal assistant 7.873437
## 3 AR Arkansas 144 personal assistant 9.138889
## 4 AZ Arizona 219 personal assistant 11.342466
## 5 CA California 222 personal assistant 12.333333
## 6 CO Colorado 221 personal assistant 11.856335
## MaxHourlySalary MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 26.00000 32262.00 71832.50 18.68750 52047.25
## 2 19.23750 29351.96 57523.98 13.55547 43437.97
## 3 15.74097 26652.78 71594.72 12.43993 49123.75
## 4 27.47945 31438.36 111136.38 19.41096 71287.37
## 5 44.66667 32561.33 166766.00 28.50000 99663.67
## 6 24.43439 29957.82 122422.65 18.14536 76190.23
chiropractor$stateName <- states
chiropractor <- chiropractor[,c(1,10,2:9)]
head(chiropractor)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 21 chiropractor NA NA
## 2 AL Alabama 36 chiropractor 15.75000 52.50000
## 3 AR Arkansas 25 chiropractor 12.00000 14.00000
## 4 AZ Arizona 150 chiropractor 12.11765 37.35294
## 5 CA California 216 chiropractor 14.74074 41.82870
## 6 CO Colorado 190 chiropractor 14.76842 68.42105
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 100000.00 175000.0 NA 137500.00
## 2 NA NA 34.12500 NA
## 3 NA NA 13.00000 NA
## 4 60000.00 225000.0 24.73529 142500.00
## 5 46435.19 131851.2 28.28472 89143.17
## 6 31936.84 123789.5 41.59474 77863.16
physicalTherapist$stateName <- states
physicalTherapist <- physicalTherapist[,c(1,10,2:9)]
head(physicalTherapist)
## state stateName jobsListed jobSearched MinHourlySalary
## 1 AK Alaska 112 physical therapist 45.00000
## 2 AL Alabama 215 physical therapist 35.16313
## 3 AR Arkansas 177 physical therapist 41.97260
## 4 AZ Arizona 228 physical therapist 21.69737
## 5 CA California 218 physical therapist 32.88073
## 6 CO Colorado 241 physical therapist 33.02905
## MaxHourlySalary MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 45.00000 45627.00 115000.00 45.00000 80313.50
## 2 47.15027 62941.00 102606.00 41.15670 82773.50
## 3 60.00000 NA NA 50.98630 NA
## 4 66.07408 45403.51 85140.35 43.88572 65271.93
## 5 80.14037 50111.80 131466.14 56.51055 90788.97
## 6 67.21992 48448.13 106493.78 50.12448 77470.95
esthetician$stateName <- states
esthetician <- esthetician[,c(1,10,2:9)]
head(esthetician)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 28 esthetician 20.00000 25.00000
## 2 AL Alabama 67 esthetician 16.00000 48.88679
## 3 AR Arkansas 52 esthetician 15.00000 21.00000
## 4 AZ Arizona 189 esthetician 14.62963 54.81481
## 5 CA California 212 esthetician 13.26415 115.68396
## 6 CO Colorado 160 esthetician 12.09062 56.17500
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA NA 22.50000 NA
## 2 NA NA 32.44340 NA
## 3 30000.0 45000.00 18.00000 37500.00
## 4 17250.0 72750.00 34.72222 45000.00
## 5 21471.7 79316.04 64.47406 50393.87
## 6 35000.0 61029.41 34.13281 48014.71
medicalSpaEsthetician$stateName <- states
medicalSpaEsthetician <- medicalSpaEsthetician[,c(1,10,2:9)]
head(medicalSpaEsthetician)
## state stateName jobsListed jobSearched MinHourlySalary
## 1 AK Alaska 12 medical spa technician 25.00000
## 2 AL Alabama 31 medical spa technician 17.03226
## 3 AR Arkansas 35 medical spa technician 25.00000
## 4 AZ Arizona 168 medical spa technician 14.83333
## 5 CA California 77 medical spa technician 16.68831
## 6 CO Colorado 148 medical spa technician 15.18919
## MaxHourlySalary MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 38.00000 NA NA 31.50000 NA
## 2 38.00000 40914 69430 27.51613 55172
## 3 38.00000 45000 120000 31.50000 82500
## 4 38.00000 NA NA 26.41667 NA
## 5 38.00000 NA NA 27.34416 NA
## 6 36.01351 NA NA 25.60135 NA
medicalDoctor$stateName <- states
medicalDoctor <- medicalDoctor[,c(1,10,2:9)]
head(medicalDoctor)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 199 medical doctor 46.733668 53.26633
## 2 AL Alabama 210 medical doctor 8.985714 64.85714
## 3 AR Arkansas 225 medical doctor 11.000000 30.19556
## 4 AZ Arizona 231 medical doctor 11.675325 31.07792
## 5 CA California 226 medical doctor 13.331858 147.12389
## 6 CO Colorado 229 medical doctor 12.000000 30.00000
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 55239.42 432914.6 50.00000 244077.00
## 2 68067.53 500000.0 36.92143 284033.76
## 3 37955.26 383777.8 20.59778 210866.52
## 4 36984.96 129455.6 21.37662 83220.29
## 5 48407.08 173227.8 80.22788 110817.46
## 6 38220.45 237217.0 21.00000 137718.70
yogaInstructor$stateName <- states
yogaInstructor <- yogaInstructor[,c(1,10,2:9)]
yogaInstructor$avgAnualSalary <- yogaInstructor$avgHourly*40*52
head(yogaInstructor)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 AK Alaska 4 yoga instructor NA NA
## 2 AL Alabama 22 yoga instructor 25.00000 84.44444
## 3 AR Arkansas 26 yoga instructor 10.00000 100.00000
## 4 AZ Arizona 131 yoga instructor 20.53435 93.89313
## 5 CA California 204 yoga instructor 15.00000 100.00000
## 6 CO Colorado 164 yoga instructor 15.09146 100.00000
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA NA NA NA
## 2 NA NA 54.72222 113822.2
## 3 32000 50000 55.00000 114400.0
## 4 NA NA 57.21374 119004.6
## 5 36000 55000 57.50000 119600.0
## 6 NA NA 57.54573 119695.1
pilatesInstructor$stateName <- states[2:50]
pilatesInstructor <- pilatesInstructor[,c(1,10,2:9)]
head(pilatesInstructor)
## state stateName jobsListed jobSearched MinHourlySalary
## 1 AL Alabama 37 pilates instructor 25.00000
## 2 AR Arkansas 9 pilates instructor 25.00000
## 3 AZ Arizona 133 pilates instructor 12.00000
## 4 CA California 177 pilates instructor 15.06780
## 5 CO Colorado 145 pilates instructor 20.53441
## 6 CT Connecticut 135 pilates instructor 21.08889
## MaxHourlySalary MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 100 NA NA 62.50000 NA
## 2 100 NA NA 62.50000 NA
## 3 100 NA NA 56.00000 NA
## 4 100 36000 55000 57.53390 45500
## 5 100 NA NA 60.26721 NA
## 6 100 NA NA 60.54444 NA
Lets combine these jobs to the slr dataset.
nurses2 <- nurses[,c(2,3,9,10)]
personalAssistants2 <- personalAssistants[,c(2,3,9,10)]
chiropractor2 <- chiropractor[,c(2,3,9,10)]
physicalTherapist2 <- physicalTherapist[,c(2,3,9,10)]
esthetician2 <- esthetician[,c(2,3,9,10)]
medicalSpaEsthetician2 <- medicalSpaEsthetician[,c(2,3,9,10)]
medicalDoctor2 <- medicalDoctor[,c(2,3,9,10)]
yogaInstructor2 <- yogaInstructor[,c(2,3,9,10)]
pilatesInstructor2 <- pilatesInstructor[,c(2,3,9,10)]
nurses2$avgAnualSalary <- ifelse(nurses2$avgAnualSalary,nurses2$avgAnualSalary,
nurses2$avgHourly*40*52)
colnames(nurses2)[2:4] <- paste('nurses',colnames(nurses2)[2:4])
personalAssistants2$avgAnualSalary <- ifelse(personalAssistants2$avgAnualSalary,
personalAssistants2$avgAnualSalary,
personalAssistants2$avgHourly*40*52)
colnames(personalAssistants2)[2:4] <- paste('personalAssistant',colnames(personalAssistants2)[2:4])
chiropractor2$avgAnualSalary <- chiropractor2$avgHourly*40*52
colnames(chiropractor2)[2:4] <- paste('chiropractor',colnames(chiropractor2)[2:4])
physicalTherapist2$avgAnualSalary <- physicalTherapist2$avgHourly*40*52
colnames(physicalTherapist2)[2:4] <- paste('physicalTherapist',colnames(physicalTherapist2)[2:4])
esthetician2$avgAnualSalary <- esthetician2$avgHourly*40*52
colnames(esthetician2)[2:4] <- paste('esthetician',colnames(esthetician2)[2:4])
medicalSpaEsthetician2$avgAnualSalary <- medicalSpaEsthetician2$avgHourly*40*52
colnames(medicalSpaEsthetician2)[2:4] <- paste('medicalSpaEsthetician',colnames(medicalSpaEsthetician2)[2:4])
medicalDoctor2$avgAnualSalary <- ifelse(medicalDoctor2$avgAnualSalary,
medicalDoctor2$avgAnualSalary,
medicalDoctor2$avgHourly*40*52)
colnames(medicalDoctor2)[2:4] <- paste('medicalDoctor',colnames(medicalDoctor2)[2:4])
colnames(yogaInstructor2)[2:4] <- paste('yogaInstructor',colnames(yogaInstructor2)[2:4])
pilatesInstructor2$avgAnualSalary <- pilatesInstructor2$avgHourly*40*52
colnames(pilatesInstructor2)[2:4] <- paste('pilatesInstructor',colnames(pilatesInstructor2)[2:4])
Combine these other jobs into a table with the slr data table.
slr2 <- merge(slr, nurses2, by.x='state',by.y='stateName')
slr2 <- merge(slr2,personalAssistants2, by.x='state',by.y='stateName')
slr2 <- merge(slr2, chiropractor2, by.x='state',by.y='stateName')
slr2 <- merge(slr2, physicalTherapist2, by.x='state', by.y='stateName')
slr2 <- merge(slr2, esthetician2, by.x='state', by.y='stateName')
slr2 <- merge(slr2, medicalSpaEsthetician2, by.x='state', by.y='stateName')
slr2 <- merge(slr2, medicalDoctor2, by.x='state',by.y='stateName')
slr2 <- merge(slr2, yogaInstructor2, by.x='state',by.y='stateName')
slr2 <- merge(slr2, pilatesInstructor2, by.x='state', by.y='stateName',all.x=TRUE)
write.csv(slr2,'stateLicensingDemographicsAddedAndUpdated.csv', row.names=FALSE)
Number of jobs listed and average annual salary in each category by state’s top three populated cities:
jbl <- grep('jobsListed',colnames(slr2))
listedJobsAll <- slr2[,c(1,32,jbl)]
ansy <- grep('avgAn',colnames(slr2))
avgSalaryAll <- slr2[,c(1,34,ansy)]
colnames(listedJobsAll) <- gsub('_.*$','',colnames(listedJobsAll),perl=TRUE)
colnames(listedJobsAll) <- gsub(' jobsListed','',colnames(listedJobsAll))
listedJobsAll
## state LMT cashier server personalTrainer houseCleaner warehouse
## 1 Alabama 64 185 220 87 67 225
## 2 Alaska 28 121 73 47 4 197
## 3 Arizona 225 223 222 153 170 242
## 4 Arkansas 63 190 201 57 27 223
## 5 California 206 225 230 220 211 247
## 6 Colorado 237 214 217 197 211 234
## 7 Connecticut 208 201 206 207 137 228
## 8 Delaware 176 199 210 158 206 236
## 9 Florida 229 220 223 191 206 224
## 10 Georgia 92 205 204 89 152 221
## 11 Hawaii 82 124 137 38 16 193
## 12 Idaho 162 216 200 72 202 236
## 13 Illinois 231 223 227 200 216 252
## 14 Indiana 110 203 217 95 98 234
## 15 Iowa 125 203 202 76 92 230
## 16 Kansas 156 211 223 184 168 238
## 17 Kentucky 133 214 213 86 84 228
## 18 Louisiana 87 207 223 92 92 204
## 19 Maine 63 138 124 28 115 155
## 20 Maryland 219 210 224 222 216 234
## 21 Massachusetts 227 208 209 198 160 245
## 22 Michigan 221 228 248 180 185 233
## 23 Minnesota 176 211 217 161 161 243
## 24 Mississippi 71 201 208 96 86 221
## 25 Missouri 170 209 238 133 152 232
## 26 Montana 32 208 199 18 22 219
## 27 Nebraska 183 202 211 146 136 240
## 28 Nevada 203 224 220 193 203 222
## 29 New Hampshire 134 215 211 180 197 232
## 30 New Jersey 236 228 235 245 214 233
## 31 New Mexico 157 200 198 105 62 230
## 32 New York 196 209 226 134 193 229
## 33 North Carolina 194 225 217 161 196 233
## 34 North Dakota 38 195 214 32 111 196
## 35 Ohio 207 221 233 217 208 242
## 36 Oklahoma 166 201 221 134 100 229
## 37 Oregon 142 203 210 119 146 216
## 38 Pennsylvania 248 222 225 219 218 243
## 39 Rhode Island 207 211 228 203 197 240
## 40 South Carolina 177 221 244 205 215 225
## 41 South Dakota 43 144 148 42 35 221
## 42 Tennessee 172 226 219 158 200 239
## 43 Texas 237 217 228 211 212 222
## 44 Utah 237 227 214 158 173 231
## 45 Vermont 62 172 162 4 105 220
## 46 Virginia 233 219 241 193 186 233
## 47 Washington 224 213 202 142 176 235
## 48 West Virginia 62 188 215 47 27 201
## 49 Wisconsin 171 204 223 155 75 229
## 50 Wyoming 26 179 136 17 14 157
## security nanny clerical tutor teacher dataScientist nurses personalAssistant
## 1 202 48 225 189 201 136 247 160
## 2 165 26 209 166 171 69 218 88
## 3 227 182 224 208 251 190 238 219
## 4 207 83 222 88 166 96 240 144
## 5 239 206 230 206 228 230 248 222
## 6 229 183 228 202 233 215 237 221
## 7 225 174 227 214 232 220 249 225
## 8 225 132 223 161 223 162 242 171
## 9 226 186 224 220 235 190 234 215
## 10 210 113 222 152 211 114 247 146
## 11 210 43 225 183 194 171 237 168
## 12 195 100 232 193 223 114 250 182
## 13 225 183 230 224 245 214 247 221
## 14 213 55 229 182 230 119 243 167
## 15 211 37 230 144 208 114 241 141
## 16 219 93 230 194 223 150 238 154
## 17 209 101 225 163 220 109 244 170
## 18 215 33 223 188 232 58 261 133
## 19 138 26 156 92 149 58 159 114
## 20 227 202 224 225 239 246 240 228
## 21 227 167 232 221 235 217 236 220
## 22 224 107 226 205 247 180 233 229
## 23 219 146 223 226 230 155 248 198
## 24 214 58 214 137 221 56 237 150
## 25 220 97 227 208 218 149 252 192
## 26 171 17 212 131 188 65 249 124
## 27 203 58 227 195 226 116 250 187
## 28 225 108 221 203 223 100 248 181
## 29 223 107 226 202 227 185 249 186
## 30 239 221 223 223 245 227 249 230
## 31 221 62 210 163 204 168 240 194
## 32 211 86 232 209 234 184 245 198
## 33 220 159 221 209 235 176 255 216
## 34 202 22 227 162 210 70 235 94
## 35 234 100 225 202 239 213 247 223
## 36 212 81 228 206 228 131 256 216
## 37 217 79 226 173 224 117 255 176
## 38 232 155 226 221 234 179 232 219
## 39 232 159 230 203 225 205 251 201
## 40 221 94 223 213 225 67 242 206
## 41 148 17 219 124 170 63 232 97
## 42 227 108 221 196 229 188 256 221
## 43 233 183 227 210 232 211 233 221
## 44 214 125 233 206 205 209 247 211
## 45 192 25 217 103 222 95 242 135
## 46 233 127 222 176 234 210 254 200
## 47 217 145 237 198 240 179 236 218
## 48 211 23 228 141 192 69 234 127
## 49 206 72 235 210 228 151 242 181
## 50 147 14 214 111 155 81 226 94
## chiropractor physicalTherapist esthetician medicalSpaEsthetician
## 1 36 215 67 31
## 2 21 112 28 12
## 3 150 228 189 168
## 4 25 177 52 35
## 5 216 218 212 77
## 6 190 241 160 148
## 7 119 236 207 40
## 8 97 213 144 31
## 9 169 209 195 125
## 10 90 204 87 73
## 11 18 191 58 20
## 12 132 207 63 47
## 13 199 216 227 150
## 14 73 159 94 46
## 15 67 155 47 17
## 16 82 216 181 112
## 17 61 198 52 19
## 18 22 213 123 27
## 19 18 72 61 7
## 20 208 235 198 173
## 21 82 239 199 61
## 22 202 224 157 115
## 23 151 199 143 123
## 24 13 196 141 39
## 25 135 227 173 83
## 26 8 137 4 28
## 27 27 141 56 28
## 28 107 216 177 135
## 29 47 198 141 50
## 30 212 235 242 163
## 31 38 206 52 53
## 32 33 220 189 69
## 33 131 222 184 63
## 34 9 117 27 12
## 35 142 211 199 44
## 36 82 209 112 75
## 37 134 209 88 48
## 38 156 208 188 56
## 39 27 224 178 40
## 40 42 210 183 92
## 41 4 119 9 47
## 42 107 193 194 124
## 43 196 224 212 179
## 44 126 164 189 75
## 45 18 141 22 29
## 46 112 224 210 154
## 47 166 199 170 110
## 48 4 87 19 26
## 49 88 164 121 48
## 50 8 121 42 26
## medicalDoctor yogaInstructor pilatesInstructor
## 1 210 22 37
## 2 199 4 NA
## 3 231 131 133
## 4 225 26 9
## 5 226 204 177
## 6 229 164 145
## 7 241 158 135
## 8 226 76 38
## 9 234 161 116
## 10 218 84 83
## 11 209 58 38
## 12 219 117 81
## 13 229 195 173
## 14 233 62 56
## 15 230 22 12
## 16 233 147 102
## 17 228 21 33
## 18 213 42 12
## 19 139 18 13
## 20 241 183 163
## 21 235 134 105
## 22 216 144 87
## 23 230 118 111
## 24 219 36 15
## 25 220 132 77
## 26 222 8 7
## 27 229 106 48
## 28 224 47 22
## 29 221 61 52
## 30 242 185 185
## 31 225 83 72
## 32 237 92 91
## 33 225 125 121
## 34 187 13 3
## 35 231 113 139
## 36 229 137 128
## 37 223 82 71
## 38 228 119 127
## 39 230 139 67
## 40 223 112 41
## 41 194 19 4
## 42 227 67 23
## 43 230 188 190
## 44 226 75 62
## 45 188 32 7
## 46 225 97 99
## 47 240 151 117
## 48 198 12 8
## 49 217 41 46
## 50 186 8 7
colnames(avgSalaryAll) <- gsub('_.*$','',colnames(avgSalaryAll))
colnames(avgSalaryAll) <- gsub(' .*$','',colnames(avgSalaryAll))
avgSalaryAll
## state LMT cashier server personalTrainer houseCleaner
## 1 Alabama 37500.00 22192.76 32630.00 59040.00 19512.38
## 2 Alaska 45000.00 25650.09 20982.64 NA NA
## 3 Arizona 50748.89 25066.10 33031.71 46521.31 35235.20
## 4 Arkansas 42500.00 20574.21 28028.26 45976.67 24960.00
## 5 California 48820.89 35387.73 39072.35 77385.45 38864.21
## 6 Colorado 43500.00 29535.51 42863.62 61132.99 46106.21
## 7 Connecticut 46562.50 28297.31 41865.55 95438.84 48614.31
## 8 Delaware 46515.92 24364.22 28617.22 82474.24 33562.72
## 9 Florida 54032.75 23915.27 35378.65 75095.23 32068.35
## 10 Georgia 42500.00 20821.56 29578.82 52697.41 34648.42
## 11 Hawaii NA 29992.26 38661.43 NA 29640.00
## 12 Idaho NA 23055.74 37102.00 44720.00 32240.00
## 13 Illinois 52865.80 27561.17 47436.83 88706.80 39115.56
## 14 Indiana 42473.96 21792.61 30853.73 76379.53 30545.62
## 15 Iowa 42139.53 22906.18 32700.79 52328.42 26689.57
## 16 Kansas 47382.52 23116.59 45543.61 30499.13 30008.33
## 17 Kentucky 53101.50 28745.07 34752.11 61792.21 29640.00
## 18 Louisiana NA 23511.79 21976.11 47331.30 28792.33
## 19 Maine NA 28355.07 32374.19 47840.00 32836.87
## 20 Maryland 62643.84 29120.00 30837.86 84005.77 43362.22
## 21 Massachusetts 43314.98 31220.00 40201.72 81204.04 34992.75
## 22 Michigan 54133.48 23582.46 39520.00 67232.94 38373.19
## 23 Minnesota 49247.55 25964.27 34706.29 67096.15 35119.16
## 24 Mississippi 47651.89 30161.29 22287.50 45890.00 23387.91
## 25 Missouri 45687.94 23862.53 30035.46 36509.47 29787.45
## 26 Montana NA 22620.00 25892.86 NA 26751.11
## 27 Nebraska 46046.15 22273.76 49003.22 59158.90 24988.68
## 28 Nevada 43064.04 30046.25 32420.35 94349.02 38316.06
## 29 New Hampshire 47313.43 26561.12 40988.82 59603.56 34024.37
## 30 New Jersey 66000.00 30585.35 42312.51 100137.14 40525.98
## 31 New Mexico 42542.50 23770.50 23885.20 45997.71 23088.00
## 32 New York 48979.59 30681.49 34502.23 56167.76 36647.88
## 33 North Carolina 41365.98 22284.89 27980.55 61857.39 30987.76
## 34 North Dakota 47000.00 23152.00 27317.01 NA 26693.33
## 35 Ohio 46742.97 25487.76 31932.02 64388.94 30955.00
## 36 Oklahoma 37672.57 22874.83 26083.53 36252.54 30503.20
## 37 Oregon 48000.00 29369.50 29137.33 62504.87 37878.79
## 38 Pennsylvania 41920.48 23655.46 38303.20 80744.84 39243.30
## 39 Rhode Island 43753.50 28738.01 49837.89 38052.22 31200.00
## 40 South Carolina NA 21478.82 31016.72 87004.88 33299.35
## 41 South Dakota NA 20841.60 19782.30 32513.68 28882.29
## 42 Tennessee 45297.97 29946.02 29357.44 42669.62 29952.00
## 43 Texas 52348.10 27375.48 31720.00 80641.90 37332.08
## 44 Utah 38565.40 26203.88 37604.02 70427.09 37253.64
## 45 Vermont NA 28083.02 31200.00 42640.00 27560.00
## 46 Virginia 41524.00 21060.00 27282.74 48551.30 29120.00
## 47 Washington 50000.00 29962.25 36016.33 107647.32 36856.48
## 48 West Virginia NA 21116.70 27469.30 24960.00 27040.00
## 49 Wisconsin 50657.89 25056.86 30175.16 56227.10 27040.00
## 50 Wyoming NA 24993.00 26166.40 NA 32760.00
## warehouse security nanny clerical tutor teacher dataScientist
## 1 27974.84 30664.86 30225.00 42995.45 37186.22 54767.26 96875.00
## 2 44040.78 30654.18 26587.83 42506.14 41711.61 65795.25 113122.67
## 3 37061.30 40435.15 35428.57 38136.43 57810.00 59529.71 105618.42
## 4 32501.07 26447.15 27000.51 30832.25 21662.73 53461.26 109101.72
## 5 43204.21 40934.23 50636.89 45704.47 85337.55 53700.66 100510.87
## 6 34874.49 48072.52 37593.44 46155.79 48417.66 55008.99 111406.98
## 7 44782.40 48792.18 57988.97 52014.48 93782.24 68199.69 112500.00
## 8 36461.69 35364.62 34745.45 58496.50 50762.34 63724.22 99058.64
## 9 35272.95 35578.58 39788.39 38120.46 48996.48 46695.49 106973.68
## 10 32895.06 50014.10 34494.87 35793.33 40275.68 62409.42 115197.37
## 11 47573.43 30268.95 24960.00 40795.73 46800.00 55640.39 112500.00
## 12 31942.59 23067.20 46280.00 36314.83 43680.00 48038.12 112500.00
## 13 42986.67 30946.93 37218.36 41814.78 50962.32 50509.20 103399.24
## 14 37532.09 24918.50 27890.91 29165.41 35510.00 55638.51 112500.00
## 15 34327.69 29107.68 28544.85 38665.84 47193.94 52493.89 111008.77
## 16 34966.72 39556.71 30562.58 40605.04 41242.92 56424.35 113442.47
## 17 38042.11 32511.99 32472.92 36914.22 42952.64 46252.07 98769.67
## 18 31336.37 38097.86 25103.45 31631.39 45240.00 42921.36 112876.91
## 19 38996.65 29594.78 28320.00 42706.67 59223.48 54165.71 112500.00
## 20 37962.84 43006.52 42578.22 57125.71 49569.40 69253.96 136948.06
## 21 44887.50 44989.85 43788.98 45605.48 81863.53 57374.18 122687.46
## 22 48455.97 35239.47 30364.11 35731.18 37592.70 47993.93 108347.22
## 23 37682.88 37654.93 40602.74 41023.76 43888.00 57913.60 74612.90
## 24 31725.84 23343.92 25193.10 37669.63 38244.67 53670.49 112500.00
## 25 36615.17 35752.93 32036.29 38201.63 56450.00 44929.00 108247.50
## 26 33128.75 27185.96 20800.00 39783.73 NA 53811.32 112500.00
## 27 35771.67 35339.51 33979.31 36491.45 41600.00 37462.96 114439.66
## 28 34191.17 30515.91 27954.81 38305.88 45257.93 47980.06 112500.00
## 29 30780.86 51990.67 35194.77 36476.34 48499.01 57449.32 112500.00
## 30 38846.01 64440.84 52000.00 66452.74 104699.55 61855.55 134129.96
## 31 33835.18 30000.00 25664.52 34112.00 70720.00 59875.25 112500.00
## 32 45218.20 68652.86 44937.67 62690.26 87408.77 56436.97 134157.61
## 33 38590.52 31010.91 38061.38 34320.00 51308.33 45164.49 112321.02
## 34 35577.55 44148.51 18720.00 38649.52 44720.00 58630.03 112500.00
## 35 43705.79 27777.78 29993.60 41062.67 45324.95 35080.59 97335.68
## 36 38992.82 48129.43 26192.59 46306.59 61501.36 37753.55 112500.00
## 37 38271.76 40017.76 37400.51 38146.83 35738.89 56671.15 112500.00
## 38 42727.87 31167.72 35158.71 38394.82 53948.24 43453.60 95021.19
## 39 45948.50 37278.62 38480.00 39649.10 45526.90 78987.71 98817.07
## 40 31925.69 32788.24 30602.55 40546.01 41243.57 42300.13 106066.46
## 41 36216.47 37468.11 26000.00 44421.30 NA 56406.50 112500.00
## 42 33488.70 29392.42 31065.19 34247.25 40565.31 41919.73 112500.00
## 43 33125.03 39583.29 33754.54 39542.91 51955.43 53900.86 111172.27
## 44 36367.36 38003.74 30950.40 39339.58 41072.43 42158.54 106686.60
## 45 41618.91 32204.25 35609.60 33831.15 NA 53581.50 112500.00
## 46 37065.06 27285.85 30291.02 32673.33 46482.98 35054.24 112500.00
## 47 44118.13 49446.01 46764.14 73726.96 54174.55 66381.17 117939.56
## 48 36017.11 23969.29 22168.42 60306.32 NA 59486.82 100181.16
## 49 59775.02 30546.92 31228.89 42855.61 41669.33 46563.28 111092.72
## 50 37491.14 29993.60 36400.00 29541.54 22817.60 64292.00 109593.35
## nurses personalAssistant chiropractor physicalTherapist esthetician
## 1 88988.35 43437.97 70980.00 85605.94 67482.26
## 2 97024.19 52047.25 NA 93600.00 46800.00
## 3 94074.49 71287.37 51449.41 91282.31 72222.22
## 4 96832.07 49123.75 27040.00 106051.51 37440.00
## 5 115855.15 99663.67 58832.22 117541.94 134106.04
## 6 85362.74 76190.23 86517.05 104258.92 70996.25
## 7 85913.03 70033.33 89964.37 85509.15 68695.27
## 8 135345.77 93740.81 56277.94 95222.61 74048.00
## 9 93570.12 50702.48 42467.69 121560.57 86813.33
## 10 89813.25 75320.01 63544.00 NA 159997.11
## 11 79599.02 69418.35 67600.00 95680.00 73840.00
## 12 79204.04 48531.01 47840.00 74880.00 34006.35
## 13 85449.30 61605.43 48733.67 124400.37 79360.70
## 14 113251.30 51041.00 40576.25 107968.23 53040.00
## 15 83596.70 67818.60 43990.45 29494.40 38480.00
## 16 74365.19 68886.51 34954.15 98800.00 42036.69
## 17 75581.41 50152.95 84200.00 109200.00 49140.00
## 18 87146.67 89180.88 44960.00 93155.36 37363.90
## 19 78132.79 32500.00 93600.00 NA 43680.00
## 20 100379.20 78496.95 46680.00 64732.26 63700.00
## 21 88965.46 64795.42 70765.88 134764.85 60644.02
## 22 94430.06 69196.03 112367.88 114400.00 68794.59
## 23 93044.52 63722.41 58460.40 82056.00 158872.73
## 24 100447.81 71274.99 NA NA 35640.28
## 25 70808.85 42388.42 168364.44 95008.31 46466.36
## 26 85452.51 40000.00 62400.00 81120.00 NA
## 27 80564.72 120194.43 31200.00 91520.00 37440.00
## 28 93087.17 66939.32 41600.00 91520.00 82524.29
## 29 96590.39 75787.35 29120.00 85434.59 36786.67
## 30 92293.90 76832.57 75920.00 158673.02 91030.08
## 31 76357.83 90825.40 NA 91459.42 31200.00
## 32 81871.06 53035.57 49636.36 104793.05 54261.59
## 33 79281.65 54036.06 51150.53 135200.00 59732.17
## 34 107494.04 45062.50 NA 88786.77 38480.00
## 35 88519.34 47699.55 52124.51 74150.52 44996.98
## 36 83324.61 60940.34 41397.07 92958.09 31200.00
## 37 102196.50 66951.22 63812.54 102960.00 73480.95
## 38 83324.75 62271.17 61286.67 107124.70 125302.02
## 39 55004.76 91970.06 NA 63115.00 89440.00
## 40 85291.16 52213.99 80723.81 19760.00 51113.44
## 41 91151.97 39000.00 NA 91520.00 NA
## 42 88255.52 54095.52 34756.13 NA 42312.99
## 43 90291.58 61665.09 57539.59 96873.21 73261.13
## 44 86013.92 49882.45 53271.11 NA 57365.08
## 45 64653.24 NA 31200.00 NA 130000.00
## 46 100088.76 81252.99 47840.00 NA 69680.00
## 47 89003.48 66949.62 107965.78 95868.14 87916.71
## 48 55659.46 54948.49 NA NA 33280.00
## 49 77554.45 41225.17 31967.62 93600.00 60200.24
## 50 99613.61 42500.00 NA 74457.50 31200.00
## medicalSpaEsthetician medicalDoctor yogaInstructor pilatesInstructor
## 1 57233.55 284033.76 113822.22 130000.00
## 2 65520.00 244077.00 NA NA
## 3 54946.67 83220.29 119004.58 116480.00
## 4 65520.00 210866.52 114400.00 130000.00
## 5 56875.84 110817.46 119600.00 119670.51
## 6 53250.81 137718.70 119695.12 125355.79
## 7 59800.00 142441.04 119356.46 125932.44
## 8 65520.00 193101.73 121622.22 130000.00
## 9 55918.72 98504.68 125542.86 125454.48
## 10 50261.92 189325.69 99455.20 116480.00
## 11 65520.00 211190.10 182000.00 182000.00
## 12 65520.00 253287.67 121648.80 121648.80
## 13 51930.67 64687.32 73706.67 55643.01
## 14 58466.09 198016.38 111296.77 119600.00
## 15 65520.00 200858.70 130000.00 93392.00
## 16 65520.00 96448.35 130000.00 130000.00
## 17 47785.26 201052.28 102160.00 130000.00
## 18 55640.00 284262.91 120640.00 130000.00
## 19 65520.00 159712.23 130000.00 130000.00
## 20 56586.82 149124.12 117383.61 118569.57
## 21 58188.85 96023.74 98000.60 106129.52
## 22 56386.09 177037.04 130000.00 115607.36
## 23 52625.69 128201.03 119600.00 116480.00
## 24 65520.00 220787.67 50844.44 92114.29
## 25 65520.00 125169.52 125206.25 124867.53
## 26 56605.71 196130.63 130000.00 130000.00
## 27 54377.14 176529.69 113360.00 130000.00
## 28 54087.70 163281.25 130000.00 130000.00
## 29 65520.00 135681.04 130000.00 130000.00
## 30 65520.00 78484.70 120640.00 115440.00
## 31 54433.21 164177.78 130000.00 130000.00
## 32 53024.93 199115.89 114996.47 121755.18
## 33 54440.86 212266.65 120604.14 124800.00
## 34 65520.00 189914.92 119600.00 130000.00
## 35 49920.00 163774.89 108976.20 91243.17
## 36 62025.60 151317.26 126070.09 106786.88
## 37 57915.00 169854.71 130000.00 120640.00
## 38 55008.57 167752.41 82291.09 86148.03
## 39 53040.00 98294.77 124800.00 124800.00
## 40 53582.61 246332.77 106228.57 130000.00
## 41 56536.17 255645.67 130000.00 130000.00
## 42 54658.71 135976.46 72800.00 130000.00
## 43 57746.15 151631.95 113691.91 116989.05
## 44 57158.40 136954.42 123760.00 115607.74
## 45 59495.17 269175.53 130000.00 130000.00
## 46 54505.45 214951.79 130000.00 130000.00
## 47 54169.82 161832.27 114716.82 119191.56
## 48 59760.00 257207.53 130000.00 130000.00
## 49 51198.33 155277.42 105461.62 122794.29
## 50 55440.00 236986.88 130000.00 130000.00
Lets take a look at the health and wellness number of jobs available by using the listedJobsAll columns for LMT, personalTrainer, chiropractor, physicalTherapist, esthetician, and medicalSpaEsthetician.
wellnessJobs <- listedJobsAll[,c(1,2,5,16,17,21,22)]
wellnessSalary <- avgSalaryAll[,c(1,2,5,16,17,21,22)]
wellnessJobs
## state LMT personalTrainer chiropractor physicalTherapist
## 1 Alabama 64 87 36 215
## 2 Alaska 28 47 21 112
## 3 Arizona 225 153 150 228
## 4 Arkansas 63 57 25 177
## 5 California 206 220 216 218
## 6 Colorado 237 197 190 241
## 7 Connecticut 208 207 119 236
## 8 Delaware 176 158 97 213
## 9 Florida 229 191 169 209
## 10 Georgia 92 89 90 204
## 11 Hawaii 82 38 18 191
## 12 Idaho 162 72 132 207
## 13 Illinois 231 200 199 216
## 14 Indiana 110 95 73 159
## 15 Iowa 125 76 67 155
## 16 Kansas 156 184 82 216
## 17 Kentucky 133 86 61 198
## 18 Louisiana 87 92 22 213
## 19 Maine 63 28 18 72
## 20 Maryland 219 222 208 235
## 21 Massachusetts 227 198 82 239
## 22 Michigan 221 180 202 224
## 23 Minnesota 176 161 151 199
## 24 Mississippi 71 96 13 196
## 25 Missouri 170 133 135 227
## 26 Montana 32 18 8 137
## 27 Nebraska 183 146 27 141
## 28 Nevada 203 193 107 216
## 29 New Hampshire 134 180 47 198
## 30 New Jersey 236 245 212 235
## 31 New Mexico 157 105 38 206
## 32 New York 196 134 33 220
## 33 North Carolina 194 161 131 222
## 34 North Dakota 38 32 9 117
## 35 Ohio 207 217 142 211
## 36 Oklahoma 166 134 82 209
## 37 Oregon 142 119 134 209
## 38 Pennsylvania 248 219 156 208
## 39 Rhode Island 207 203 27 224
## 40 South Carolina 177 205 42 210
## 41 South Dakota 43 42 4 119
## 42 Tennessee 172 158 107 193
## 43 Texas 237 211 196 224
## 44 Utah 237 158 126 164
## 45 Vermont 62 4 18 141
## 46 Virginia 233 193 112 224
## 47 Washington 224 142 166 199
## 48 West Virginia 62 47 4 87
## 49 Wisconsin 171 155 88 164
## 50 Wyoming 26 17 8 121
## yogaInstructor pilatesInstructor
## 1 22 37
## 2 4 NA
## 3 131 133
## 4 26 9
## 5 204 177
## 6 164 145
## 7 158 135
## 8 76 38
## 9 161 116
## 10 84 83
## 11 58 38
## 12 117 81
## 13 195 173
## 14 62 56
## 15 22 12
## 16 147 102
## 17 21 33
## 18 42 12
## 19 18 13
## 20 183 163
## 21 134 105
## 22 144 87
## 23 118 111
## 24 36 15
## 25 132 77
## 26 8 7
## 27 106 48
## 28 47 22
## 29 61 52
## 30 185 185
## 31 83 72
## 32 92 91
## 33 125 121
## 34 13 3
## 35 113 139
## 36 137 128
## 37 82 71
## 38 119 127
## 39 139 67
## 40 112 41
## 41 19 4
## 42 67 23
## 43 188 190
## 44 75 62
## 45 32 7
## 46 97 99
## 47 151 117
## 48 12 8
## 49 41 46
## 50 8 7
Now look at the LMT with esthetician and medical spa esthetician jobs available.Nurses are needed in medical spas that are also estheticians, so we will add that class of jobs listed to our spaJobs data table.
spaJobs <- listedJobsAll[,c(1,2,14,18,19)]
spaSalary <- avgSalaryAll[,c(1,2,14,18,19)]
spaJobs
## state LMT nurses esthetician medicalSpaEsthetician
## 1 Alabama 64 247 67 31
## 2 Alaska 28 218 28 12
## 3 Arizona 225 238 189 168
## 4 Arkansas 63 240 52 35
## 5 California 206 248 212 77
## 6 Colorado 237 237 160 148
## 7 Connecticut 208 249 207 40
## 8 Delaware 176 242 144 31
## 9 Florida 229 234 195 125
## 10 Georgia 92 247 87 73
## 11 Hawaii 82 237 58 20
## 12 Idaho 162 250 63 47
## 13 Illinois 231 247 227 150
## 14 Indiana 110 243 94 46
## 15 Iowa 125 241 47 17
## 16 Kansas 156 238 181 112
## 17 Kentucky 133 244 52 19
## 18 Louisiana 87 261 123 27
## 19 Maine 63 159 61 7
## 20 Maryland 219 240 198 173
## 21 Massachusetts 227 236 199 61
## 22 Michigan 221 233 157 115
## 23 Minnesota 176 248 143 123
## 24 Mississippi 71 237 141 39
## 25 Missouri 170 252 173 83
## 26 Montana 32 249 4 28
## 27 Nebraska 183 250 56 28
## 28 Nevada 203 248 177 135
## 29 New Hampshire 134 249 141 50
## 30 New Jersey 236 249 242 163
## 31 New Mexico 157 240 52 53
## 32 New York 196 245 189 69
## 33 North Carolina 194 255 184 63
## 34 North Dakota 38 235 27 12
## 35 Ohio 207 247 199 44
## 36 Oklahoma 166 256 112 75
## 37 Oregon 142 255 88 48
## 38 Pennsylvania 248 232 188 56
## 39 Rhode Island 207 251 178 40
## 40 South Carolina 177 242 183 92
## 41 South Dakota 43 232 9 47
## 42 Tennessee 172 256 194 124
## 43 Texas 237 233 212 179
## 44 Utah 237 247 189 75
## 45 Vermont 62 242 22 29
## 46 Virginia 233 254 210 154
## 47 Washington 224 236 170 110
## 48 West Virginia 62 234 19 26
## 49 Wisconsin 171 242 121 48
## 50 Wyoming 26 226 42 26
Lets used our list of demanded LMT states where there weren’t as many jobs available for LMT, but the pay was higher for LMT than the national LMT average pay.
demanded
## [1] Georgia Mississippi Wyoming
## 50 Levels: Alabama Alaska Arizona Arkansas California Colorado ... Wyoming
Lets look at Georgia and see how the jobs available in the wellness and the spa industries compare by plotting the wellness jobs available in GA, then the salary of those jobs in GA against the median income for GA and the median two bedroom home value.
GA <- subset(slr2, slr2=='Georgia')
GA_2BR <- GA$Zillow_2BR_3cityAverageHomeValue
GA_medIncome <- GA$median2018IncomeByState
GA_wellness <- subset(wellnessJobs, wellnessJobs$state=='Georgia')
GA_wellnessSalary <- subset(wellnessSalary,wellnessSalary$state=='Georgia')
GA_wellness2 <- gather(GA_wellness, key='jobTitle',value='jobsListed',2:7)
GA_wellnessSalary2 <- gather(GA_wellnessSalary, key='jobTitle', value='annualSalary',2:7)
ggplot(data = GA_wellness2, aes(y=GA_wellness2$jobsListed, x=GA_wellness2$jobTitle)) +
geom_bar(stat='identity', position=position_dodge())+
scale_fill_brewer(palette='Paired') +
theme_classic()+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('GA Wellness Jobs Available')+
ylab(NULL)+
xlab(NULL)
ggplot(data = GA_wellnessSalary2, aes(y=GA_wellnessSalary2$annualSalary, x=GA_wellnessSalary2$jobTitle)) +
geom_bar(stat='identity', position=position_dodge())+
scale_fill_brewer(palette='Paired') +
theme_classic()+
geom_hline(yintercept=GA_medIncome, linetype="dashed", color = "red")+
geom_hline(yintercept=GA_2BR, linetype='dashed',color='blue')+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('GA Wellness Jobs Annual Salary')+
ylab(NULL)+
xlab(NULL)
## Warning: Removed 1 rows containing missing values (geom_bar).
The blue line is the May 2020 Zillow average home value for the top 3 populated cities in GA for a two bedroom home, and the red line is the 2018 median income in GA, according to the data.census.gov data. There wasn’t any salary data for physical therapists in GA, so it doesn’t have a bar for salary information. But chiropractors’ annual salary is above the GA 2018 median income and the average 2020 two bedroom home value. Also, personal trainers make more than LMTs and have slightly less personal training jobs available than LMTs, but both have pay below the median income of GA. The available jobs for chiropractors, LMTs, and personal trainers is roughly the same in GA, while the demand for physical therapists is high with more than twice as many jobs available for physical therapists as any one other wellness category jobs available.Pilates and Yoga Instuctors get paid more annually than chiropractors, LMTs, or personal trainers. But their salary was approximated as full time at the average hourly rate. Many yoga and Pilates intructors might only work 20-32 hours a week. But then again, a great yoga or pilates instructor brings in clients who pay an average of $20 per class three times a week, with bargains on Groupon. Many physical therapists prescribe or recommend yoga and pilates to athletes or trauma patients with tendon injuries who need structural re-alignment.
Now, lets look at the chart of the medical spas jobs available and annual salary in GA with the same home value and median income values for GA used in the wellness jobs above.
GA_spa <- subset(spaJobs, spaJobs$state=='Georgia')
GA_spaSalary <- subset(spaSalary,spaSalary$state=='Georgia')
GA_spa2 <- gather(GA_spa, key='jobTitle',value='jobsListed',2:5)
GA_spaSalary2 <- gather(GA_spaSalary, key='jobTitle', value='annualSalary',2:5)
ggplot(data = GA_spa2, aes(y=GA_spa2$jobsListed, x=GA_spa2$jobTitle)) +
geom_bar(stat='identity', position=position_dodge())+
scale_fill_brewer(palette='Paired') +
theme_classic()+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('GA Spa and Medical Spa Jobs Available')+
ylab(NULL)+
xlab(NULL)
ggplot(data = GA_spaSalary2, aes(y=GA_spaSalary2$annualSalary,
x=GA_spaSalary2$jobTitle)) +
geom_bar(stat='identity', position=position_dodge())+
scale_fill_brewer(palette='Paired') +
theme_classic()+
geom_hline(yintercept=GA_medIncome, linetype="dashed", color = "red")+
geom_hline(yintercept=GA_2BR, linetype='dashed',color='blue')+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('GA Spa and Medical Spa Jobs Annual Salary')+
ylab(NULL)+
xlab(NULL)
The blue line above is the same two bedroom Zillow average home value for GA and the red line is the 2018 median income for GA from data.census.gov data. The above medical spa information for GA, shows that medical spa estheticians don’t make as much annually as estheticians or nurses. And that estheticians make more than nurses in GA. A medical spa esthetician is supposed to be an esthetician and a nurse to be able to give botox injections. But there could be some differences in state to state requirements and regulations for estheticians. Estheticians call it ‘lancing’ when they can drain a white head with a needle. Logically, on the surface the above doesn’t make sense, but it is possible that estheticians do make 150,000 USD a year. It is not unlikely that nurse make close to 100,000 USD a year either. The demand of nurses in GA is more than double that of the other medical spa jobs available and nearly triple it at around 250 available nursing jobs in GA’s top three populated cities.
There is now a script that did similar to what the indeed function did but for yellowpages.com. This script takes the first five webpages of yellowpages.com for the business searched in the city and state and returns a table of the number of businesses of that type in the same three top populated cities per state used in this program. The script is called ‘yellowPages-number-of-businesses.Rmd’ and it was used to get the number of businesses in those three cities per state for coffee, massage, gym, tanning, hair salon, tanning, yoga, chiropractic, wellness, and health food businesses. Lets add these counts to our table slr2 of all features used so far.
ypChiro <- read.csv('./number of businesses/statesRates- chiropractor .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypWellness <- read.csv('./number of businesses/statesRates- wellness clinic .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypMassage <- read.csv('./number of businesses/statesRates- massage .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypYoga <- read.csv('./number of businesses/statesRates- yoga .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypGym <- read.csv('./number of businesses/statesRates- gym .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypCoffee <- read.csv('./number of businesses/statesRates- coffee .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypHealthFood <- read.csv('./number of businesses/statesRates- health food .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypHairSalon <- read.csv('./number of businesses/statesRates- hair salon .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypTanning <- read.csv('./number of businesses/statesRates- tanning .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypChiro$states <- states
ypWellness$states <- states
ypMassage$states <- states
ypYoga$states <- states
ypGym$states <- states
ypCoffee$states <- states
ypHealthFood$states <- states
ypHairSalon$states <- states
ypTanning$states <- states
ypChiro <- ypChiro[,-1]
ypWellness <- ypWellness[,-1]
ypMassage <- ypMassage[,-1]
ypYoga <- ypYoga[,-1]
ypGym <- ypGym[,-1]
ypCoffee <- ypCoffee[,-1]
ypHealthFood <- ypHealthFood[,-1]
ypHairSalon <- ypHairSalon[,-1]
ypTanning <- ypTanning[,-1]
slr3 <- merge(slr2,ypChiro, by.x='state', by.y='states')
slr3 <- merge(slr3,ypWellness,by.x='state', by.y='states')
slr3 <- merge(slr3,ypMassage,by.x='state', by.y='states')
slr3 <- merge(slr3,ypYoga,by.x='state', by.y='states')
slr3 <- merge(slr3,ypGym,by.x='state', by.y='states')
slr3 <- merge(slr3,ypCoffee,by.x='state', by.y='states')
slr3 <- merge(slr3,ypHealthFood,by.x='state', by.y='states')
slr3 <- merge(slr3,ypHairSalon,by.x='state', by.y='states')
slr3 <- merge(slr3,ypTanning,by.x='state', by.y='states')
colnames(slr3)
## [1] "state"
## [2] "massageBoard"
## [3] "licenseByReciprocity"
## [4] "proofOtherOrAllStateLicense"
## [5] "stateResidencyProof"
## [6] "passportSizePhoto"
## [7] "driversLicensePhotoCopy"
## [8] "nameChangeProof"
## [9] "socialSecurityCopy"
## [10] "Hours"
## [11] "MBLEX_or_NCBTMB"
## [12] "goodHealthClearance"
## [13] "BoardBackgroundCheckFee"
## [14] "stateApplyingBackgroundCheck"
## [15] "DOJ_backgroundCheck"
## [16] "applicationCost"
## [17] "licensingCost"
## [18] "licenseRenewalFee"
## [19] "CPR_certification"
## [20] "licensingETA"
## [21] "healthReferences"
## [22] "CEU"
## [23] "timeLicenseValidYears"
## [24] "liabilityInsurance"
## [25] "schoolTranscripts"
## [26] "MBLEX_transcript"
## [27] "notes"
## [28] "notes2"
## [29] "notes3"
## [30] "notes4"
## [31] "citiesGreaterThan300k_orTop3"
## [32] "LMT_AvgJobsListed_IndeedFirst5pages"
## [33] "LMT_HourlyAvgPayRangeAdvertised_Indeed"
## [34] "LMT_AnualAvgPayAdvertised_Indeed"
## [35] "Zillow_2BR_3cityAverageHomeValue"
## [36] "median2018IncomeByState"
## [37] "total_state_population"
## [38] "percent_black"
## [39] "percent_white"
## [40] "percent_two_or_more"
## [41] "percent_Native_American"
## [42] "percent_Asian"
## [43] "percent_Pacific_Islander"
## [44] "percent_Latino"
## [45] "cashier_jobsListed"
## [46] "cashier_avgHourly"
## [47] "cashier_avgAnnualSalary"
## [48] "server_jobsListed"
## [49] "server_avgHourly"
## [50] "server_avgAnnualSalary"
## [51] "personalTrainer_jobsListed"
## [52] "personalTrainer_avgHourly"
## [53] "personalTrainer_avgAnnualSalary"
## [54] "houseCleaner_jobsListed"
## [55] "houseCleaner_avgHourly"
## [56] "houseCleaner_avgAnnualSalary"
## [57] "warehouse_jobsListed"
## [58] "warehouse_avgHourly"
## [59] "warehouse_avgAnnualSalary"
## [60] "security_jobsListed"
## [61] "security_avgHourly"
## [62] "security_avgAnnualSalary"
## [63] "nanny_jobsListed"
## [64] "nanny_avgHourly"
## [65] "nanny_avgAnnualSalary"
## [66] "clerical_jobsListed"
## [67] "clerical_avgHourly"
## [68] "clerical_avgAnnualSalary"
## [69] "tutor_jobsListed"
## [70] "tutor_avgHourly"
## [71] "tutor_avgAnnualSalary"
## [72] "teacher_jobsListed"
## [73] "teacher_avgHourly"
## [74] "teacher_avgAnualSalary"
## [75] "dataScientist_jobsListed"
## [76] "dataScientist_avgHourly"
## [77] "dataScientist_avgAnualSalary"
## [78] "nurses jobsListed"
## [79] "nurses avgHourly"
## [80] "nurses avgAnualSalary"
## [81] "personalAssistant jobsListed"
## [82] "personalAssistant avgHourly"
## [83] "personalAssistant avgAnualSalary"
## [84] "chiropractor jobsListed"
## [85] "chiropractor avgHourly"
## [86] "chiropractor avgAnualSalary"
## [87] "physicalTherapist jobsListed"
## [88] "physicalTherapist avgHourly"
## [89] "physicalTherapist avgAnualSalary"
## [90] "esthetician jobsListed"
## [91] "esthetician avgHourly"
## [92] "esthetician avgAnualSalary"
## [93] "medicalSpaEsthetician jobsListed"
## [94] "medicalSpaEsthetician avgHourly"
## [95] "medicalSpaEsthetician avgAnualSalary"
## [96] "medicalDoctor jobsListed"
## [97] "medicalDoctor avgHourly"
## [98] "medicalDoctor avgAnualSalary"
## [99] "yogaInstructor jobsListed"
## [100] "yogaInstructor avgHourly"
## [101] "yogaInstructor avgAnualSalary"
## [102] "pilatesInstructor jobsListed"
## [103] "pilatesInstructor avgHourly"
## [104] "pilatesInstructor avgAnualSalary"
## [105] "chiropractor_businessListings"
## [106] "wellness.clinic_businessListings"
## [107] "massage_businessListings"
## [108] "yoga_businessListings"
## [109] "gym_businessListings"
## [110] "coffee_businessListings"
## [111] "health.food_businessListings"
## [112] "hair.salon_businessListings"
## [113] "tanning_businessListings"
write.csv(slr3, 'stateLicensingDemographicsAddedAndUpdated.csv', row.names=FALSE)
We currently have the price of 2 bedroom homes using Zillow data, but now we can add in apartments.com data for rental apartments of 2-3 bedroom, 2 bathroom, dog/cat friendly pricing to our data set to compare rental prices in the three top populated cities in each state. It didn’t happen by magic either, there is a script for it very similar to the indeed and yellowpages web scraping scripts. Originally, I was going to use rent.com, but wouldn’t you know they have a web scraping blocker in place that makes sure their terms of use aren’t violated for ‘not downloading their data.’ I did download apartments.com data, but only to share the aggregate results. Each individual file is downloaded for the date pulled but not added to githu. The script is ‘aps-com-2BR-2BA.Rmd’ in github with all these other shared files. It will produce this table in csv format, ‘apts_2BR2BA_prices.csv’ to add to our updated and added state licensing requirements csv table of data to compare state by state.
apt2and2 <- read.csv('./apartments Dot Com/apts_2BR2BA_prices.csv',sep=',',
header=TRUE, na.strings=c('',' ','NA'))
head(apt2and2,10)
## state TwoBedroomApartment_Listings Rent2BR2BA_MinPrice Rent2BR2BA_MaxPrice
## 1 AK 42 1395.205 1754.000
## 2 AL 214 1066.152 1462.062
## 3 AR 128 918.776 1251.989
## 4 AZ 328 1254.911 1811.504
## 5 CA 355 3032.312 4765.331
## 6 CO 322 1746.339 2774.106
## 7 CT 62 2572.695 3916.827
## 8 DE 75 1374.111 1783.767
## 9 FL 353 1635.474 2303.913
## 10 GA 203 1418.345 2419.888
## Rent2BR2BA_AvgPrice
## 1 1457.013
## 2 1207.891
## 3 1023.376
## 4 1488.532
## 5 3829.224
## 6 2205.166
## 7 3168.025
## 8 1543.938
## 9 1931.713
## 10 1844.138
The above information takes the price of each listing in those 50 states’ three most populated cities, and gets the minimum, maximum, and average prices of a 2 bedroom, 2 bath dog/cat friendly apartment for rent. The average minimum is the average of all minimum price boundaries of all three cities for each state, and the average maximum is the average of all maximum boundaries of the price range in all three cities of each state, and the average is the average price of all prices listed in each state.
Now lets add these new data columns to our table of 50 states.
colnames(apt2and2)[1] <- 'stateAbbreviation'
apt2and2$stateName <- states
slr4 <- merge(slr3,apt2and2, by.x='state',by.y='stateName')
colnames(slr4)
## [1] "state"
## [2] "massageBoard"
## [3] "licenseByReciprocity"
## [4] "proofOtherOrAllStateLicense"
## [5] "stateResidencyProof"
## [6] "passportSizePhoto"
## [7] "driversLicensePhotoCopy"
## [8] "nameChangeProof"
## [9] "socialSecurityCopy"
## [10] "Hours"
## [11] "MBLEX_or_NCBTMB"
## [12] "goodHealthClearance"
## [13] "BoardBackgroundCheckFee"
## [14] "stateApplyingBackgroundCheck"
## [15] "DOJ_backgroundCheck"
## [16] "applicationCost"
## [17] "licensingCost"
## [18] "licenseRenewalFee"
## [19] "CPR_certification"
## [20] "licensingETA"
## [21] "healthReferences"
## [22] "CEU"
## [23] "timeLicenseValidYears"
## [24] "liabilityInsurance"
## [25] "schoolTranscripts"
## [26] "MBLEX_transcript"
## [27] "notes"
## [28] "notes2"
## [29] "notes3"
## [30] "notes4"
## [31] "citiesGreaterThan300k_orTop3"
## [32] "LMT_AvgJobsListed_IndeedFirst5pages"
## [33] "LMT_HourlyAvgPayRangeAdvertised_Indeed"
## [34] "LMT_AnualAvgPayAdvertised_Indeed"
## [35] "Zillow_2BR_3cityAverageHomeValue"
## [36] "median2018IncomeByState"
## [37] "total_state_population"
## [38] "percent_black"
## [39] "percent_white"
## [40] "percent_two_or_more"
## [41] "percent_Native_American"
## [42] "percent_Asian"
## [43] "percent_Pacific_Islander"
## [44] "percent_Latino"
## [45] "cashier_jobsListed"
## [46] "cashier_avgHourly"
## [47] "cashier_avgAnnualSalary"
## [48] "server_jobsListed"
## [49] "server_avgHourly"
## [50] "server_avgAnnualSalary"
## [51] "personalTrainer_jobsListed"
## [52] "personalTrainer_avgHourly"
## [53] "personalTrainer_avgAnnualSalary"
## [54] "houseCleaner_jobsListed"
## [55] "houseCleaner_avgHourly"
## [56] "houseCleaner_avgAnnualSalary"
## [57] "warehouse_jobsListed"
## [58] "warehouse_avgHourly"
## [59] "warehouse_avgAnnualSalary"
## [60] "security_jobsListed"
## [61] "security_avgHourly"
## [62] "security_avgAnnualSalary"
## [63] "nanny_jobsListed"
## [64] "nanny_avgHourly"
## [65] "nanny_avgAnnualSalary"
## [66] "clerical_jobsListed"
## [67] "clerical_avgHourly"
## [68] "clerical_avgAnnualSalary"
## [69] "tutor_jobsListed"
## [70] "tutor_avgHourly"
## [71] "tutor_avgAnnualSalary"
## [72] "teacher_jobsListed"
## [73] "teacher_avgHourly"
## [74] "teacher_avgAnualSalary"
## [75] "dataScientist_jobsListed"
## [76] "dataScientist_avgHourly"
## [77] "dataScientist_avgAnualSalary"
## [78] "nurses jobsListed"
## [79] "nurses avgHourly"
## [80] "nurses avgAnualSalary"
## [81] "personalAssistant jobsListed"
## [82] "personalAssistant avgHourly"
## [83] "personalAssistant avgAnualSalary"
## [84] "chiropractor jobsListed"
## [85] "chiropractor avgHourly"
## [86] "chiropractor avgAnualSalary"
## [87] "physicalTherapist jobsListed"
## [88] "physicalTherapist avgHourly"
## [89] "physicalTherapist avgAnualSalary"
## [90] "esthetician jobsListed"
## [91] "esthetician avgHourly"
## [92] "esthetician avgAnualSalary"
## [93] "medicalSpaEsthetician jobsListed"
## [94] "medicalSpaEsthetician avgHourly"
## [95] "medicalSpaEsthetician avgAnualSalary"
## [96] "medicalDoctor jobsListed"
## [97] "medicalDoctor avgHourly"
## [98] "medicalDoctor avgAnualSalary"
## [99] "yogaInstructor jobsListed"
## [100] "yogaInstructor avgHourly"
## [101] "yogaInstructor avgAnualSalary"
## [102] "pilatesInstructor jobsListed"
## [103] "pilatesInstructor avgHourly"
## [104] "pilatesInstructor avgAnualSalary"
## [105] "chiropractor_businessListings"
## [106] "wellness.clinic_businessListings"
## [107] "massage_businessListings"
## [108] "yoga_businessListings"
## [109] "gym_businessListings"
## [110] "coffee_businessListings"
## [111] "health.food_businessListings"
## [112] "hair.salon_businessListings"
## [113] "tanning_businessListings"
## [114] "stateAbbreviation"
## [115] "TwoBedroomApartment_Listings"
## [116] "Rent2BR2BA_MinPrice"
## [117] "Rent2BR2BA_MaxPrice"
## [118] "Rent2BR2BA_AvgPrice"
slr5 <- slr4[,c(114,1:113,115:118)]
write.csv(slr5,'stateLicensingDemographicsAddedAndUpdated.csv',row.names=FALSE)
Remember to update the stateLicensingRequirements.csv file with the actual massage board licensing requirements of each state, then adding the additional updated and added features with this script, after using those helper script files to update information as needed.
Getting back to the motivation for this project, comparing TN to CA, to satisfy some gamey choices in moving from CA to TN as a massage therapist to make my youngest and greatly adored neice’s life easier and happier, Lets compare TN to CA in demographics, number of data science and massage therapist jobs, annual salary on average for those jobs, and for alternate jobs, how many health food stores, salons, spas, chiropractors, and coffee shops in each state’s top three most populated cities, what the average and average minimum price range for a two bedroom, two bathroom and pet friendly apartment is, the median income from 2018 data for each state, and see how compromisable the effects of moving from CA to TN would be.
Lets first get all the fields used for this comparison.
comparing_TN_CA <- slr5[,c(1,11,12,17,18,19,23,33,35,37:45,55,57,58,60,
64,66,67,69,70,72,76,78,82,84,108:118)]
colnames(comparing_TN_CA)
## [1] "stateAbbreviation" "Hours"
## [3] "MBLEX_or_NCBTMB" "applicationCost"
## [5] "licensingCost" "licenseRenewalFee"
## [7] "CEU" "LMT_AvgJobsListed_IndeedFirst5pages"
## [9] "LMT_AnualAvgPayAdvertised_Indeed" "median2018IncomeByState"
## [11] "total_state_population" "percent_black"
## [13] "percent_white" "percent_two_or_more"
## [15] "percent_Native_American" "percent_Asian"
## [17] "percent_Pacific_Islander" "percent_Latino"
## [19] "houseCleaner_jobsListed" "houseCleaner_avgAnnualSalary"
## [21] "warehouse_jobsListed" "warehouse_avgAnnualSalary"
## [23] "nanny_jobsListed" "nanny_avgAnnualSalary"
## [25] "clerical_jobsListed" "clerical_avgAnnualSalary"
## [27] "tutor_jobsListed" "tutor_avgAnnualSalary"
## [29] "dataScientist_jobsListed" "dataScientist_avgAnualSalary"
## [31] "personalAssistant jobsListed" "personalAssistant avgAnualSalary"
## [33] "massage_businessListings" "yoga_businessListings"
## [35] "gym_businessListings" "coffee_businessListings"
## [37] "health.food_businessListings" "hair.salon_businessListings"
## [39] "tanning_businessListings" "TwoBedroomApartment_Listings"
## [41] "Rent2BR2BA_MinPrice" "Rent2BR2BA_MaxPrice"
## [43] "Rent2BR2BA_AvgPrice"
Lets compare demographics of each state by the states’ three most populated cities. This is important as it skews necessary information if the cities most populated aren’t near the place planning to live. For CA, the cities were San Diego, Los Angeles, and San Jose. The distance between San Diego and Los Angeles is about 120 miles, and from San Jose to Los Angeles it is more than 400 miles. San Jose is also a popularly expensive high rent city due to silicon valley. For TN, the cities most populated are Nashville, Memphis, and knoxville. The idea is that the pricing will be similar as an average across the state’s three most populated cities.
CA <- subset(comparing_TN_CA, comparing_TN_CA$stateAbbreviation=='CA')
TN <- subset(comparing_TN_CA, comparing_TN_CA$stateAbbreviation=='TN')
Lets look at demographics from 2018 state only data using data.census.gov.
CA_demographics <- CA[,c(1,11:18)]
TN_demographics <- TN[,c(1,11:18)]
CA_demoTidy <- gather(CA_demographics, key='race', value='TotalPopulationPercent',
3:9)
## Warning: attributes are not identical across measure variables;
## they will be dropped
CA_demoTidy$TotalPopulationPercent <- as.numeric(CA_demoTidy$TotalPopulationPercent)
CA_pop <- CA_demographics$total_state_population
gg1 <- ggplot(data = CA_demoTidy,
aes(y=CA_demoTidy$TotalPopulationPercent,
x=CA_demoTidy$race)) +
geom_bar(stat='identity', position=position_dodge())+
theme_classic()+
coord_cartesian(ylim = c(0, 100))+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('CA demographics, Percent of: ',CA_pop)+
ylab(NULL)+
xlab(NULL)
gg1
TN_demoTidy <- gather(TN_demographics, key='race', value='TotalPopulationPercent',
3:9)
## Warning: attributes are not identical across measure variables;
## they will be dropped
TN_demoTidy$TotalPopulationPercent <- as.numeric(TN_demoTidy$TotalPopulationPercent)
TN_pop <- TN_demographics$total_state_population
gg2 <- ggplot(data = TN_demoTidy,
aes(y=TN_demoTidy$TotalPopulationPercent,
x=TN_demoTidy$race)) +
geom_bar(stat='identity', position=position_dodge())+
theme_classic()+
coord_cartesian(ylim = c(0, 100))+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('TN demographics, Percent of: ',TN_pop)+
ylab(NULL)+
xlab(NULL)
gg2
CA_TN_demographics <- rbind(CA_demographics,TN_demographics)
CA_TN_demographics
## stateAbbreviation total_state_population percent_black percent_white
## 5 CA 39557045 5.8 59.5
## 42 TN 6770010 16.8 77.3
## percent_two_or_more percent_Native_American percent_Asian
## 5 5.1 0.8 14.7
## 42 2.2 0.3 1.8
## percent_Pacific_Islander percent_Latino
## 5 0.4 39.3
## 42 0.1 5.5
grid.arrange(gg1, gg2, ncol = 2)
Now lets look at the two bedroom, two bath, pet friendly apartments for rent in CA and TN.
CA_2BR <- CA[,c(1,40:43)]
TN_2BR <- TN[,c(1,40:43)]
CA_listings <- CA_2BR$TwoBedroomApartment_Listings
CA_2BR_tidy <- gather(CA_2BR, key='range',value='price',3:5)
CA_2BR_tidy$range <- gsub('Rent2BR2BA_','',CA_2BR_tidy$range)
gg3 <- ggplot(data = CA_2BR_tidy,
aes(y=CA_2BR_tidy$price,
x=CA_2BR_tidy$range)) +
geom_bar(stat='identity', position=position_dodge())+
theme_classic()+
coord_cartesian(ylim = c(500, 5000))+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('CA 2 Bedroom/2 Bath: ',CA_listings)+
ylab(NULL)+
xlab('San Diego, San Jose, and Los Angeles Prices Averaged')
TN_listings <- TN_2BR$TwoBedroomApartment_Listings
TN_2BR_tidy <- gather(TN_2BR, key='range', value='price', 3:5)
TN_2BR_tidy$range <- gsub('Rent2BR2BA_','',TN_2BR_tidy$range)
gg4 <- ggplot(data = TN_2BR_tidy,
aes(y=TN_2BR_tidy$price,
x=TN_2BR_tidy$range)) +
geom_bar(stat='identity', position=position_dodge())+
theme_classic()+
coord_cartesian(ylim = c(500, 5000))+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('TN 2 Bedroom/2 Bath: ',TN_listings)+
ylab(NULL)+
xlab('Nashville,Memphis, and Knoxville Prices Averaged')
CA_TN_2BR <- rbind(CA_2BR,TN_2BR)
CA_TN_2BR
## stateAbbreviation TwoBedroomApartment_Listings Rent2BR2BA_MinPrice
## 5 CA 355 3032.312
## 42 TN 272 1325.305
## Rent2BR2BA_MaxPrice Rent2BR2BA_AvgPrice
## 5 4765.331 3829.224
## 42 2081.261 1607.292
grid.arrange(gg3, gg4, ncol = 2)
Lets now look at the number of massage and alternate jobs in CA and TN to compare their annual salaries against number of jobs available.
CA_jobsAvailable <- CA[,c(1,8,19,21,23,25,27,29,31)]
TN_jobsAvailable <- TN[,c(1,8,19,21,23,25,27,29,31)]
colnames(CA_jobsAvailable) <- gsub('_.*$','',colnames(CA_jobsAvailable))
colnames(TN_jobsAvailable) <- gsub('_.*$','',colnames(TN_jobsAvailable))
colnames(CA_jobsAvailable) <- gsub('jobsListed','',colnames(CA_jobsAvailable))
colnames(TN_jobsAvailable) <- gsub('jobsListed','',colnames(TN_jobsAvailable))
CA_jobsAvailable_tidy <- gather(CA_jobsAvailable, key='job',value='listings', 2:9)
TN_jobsAvailable_tidy <- gather(TN_jobsAvailable, key='job',value='listings', 2:9)
gg5 <- ggplot(data = CA_jobsAvailable_tidy,
aes(y=CA_jobsAvailable_tidy$listings,
x=CA_jobsAvailable_tidy$job)) +
geom_bar(stat='identity', position=position_dodge())+
theme_classic()+
coord_cartesian(ylim = c(0,300))+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('CA Number of Advertised Jobs: ')+
ylab(NULL)+
xlab('San Diego, San Jose, and Los Angeles')
gg6 <- ggplot(data = TN_jobsAvailable_tidy,
aes(y=TN_jobsAvailable_tidy$listings,
x=TN_jobsAvailable_tidy$job)) +
geom_bar(stat='identity', position=position_dodge())+
theme_classic()+
coord_cartesian(ylim = c(0,300))+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('TN Number of Advertised Jobs: ')+
ylab(NULL)+
xlab('Nashville, Memphis, and Knoxville')
CA_TN_jobsAvailable <- rbind(CA_jobsAvailable,TN_jobsAvailable)
CA_TN_jobsAvailable
## stateAbbreviation LMT houseCleaner warehouse nanny clerical tutor
## 5 CA 206 211 247 206 230 206
## 42 TN 172 200 239 108 221 196
## dataScientist personalAssistant
## 5 230 222
## 42 188 221
grid.arrange(gg5,gg6,ncol=2)
Now, lets look at the average annual salary for those jobs available in CA and TN.
CA_salary <- CA[,c(1,9,20,22,24,26,28,30,32)]
TN_salary <- TN[,c(1,9,20,22,24,26,28,30,32)]
colnames(CA_salary) <- gsub('_.*$','',colnames(CA_salary))
colnames(CA_salary) <- gsub(' avgAnualSalary', '',colnames(CA_salary))
colnames(TN_salary) <- gsub('_.*$','',colnames(TN_salary))
colnames(TN_salary) <- gsub(' avgAnualSalary', '',colnames(TN_salary))
CA_salary_tidy <- gather(CA_salary, key='job',value='salary',2:9)
TN_salary_tidy <- gather(TN_salary, key='job', value='salary',2:9)
CA_medianIncome <- CA$median2018IncomeByState
TN_medianIncome <- TN$median2018IncomeByState
gg7 <- ggplot(data = CA_salary_tidy,
aes(y=CA_salary_tidy$salary,
x=CA_salary_tidy$job)) +
geom_bar(stat='identity', position=position_dodge())+
theme_classic()+
geom_hline(yintercept=CA_medianIncome, linetype="dashed", color = "red")+
coord_cartesian(ylim = c(10000, 120000))+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('CA Advertised Salaries: ')+
ylab(NULL)+
xlab('San Diego, San Jose, and Los Angeles')
gg8 <- ggplot(data = TN_salary_tidy,
aes(y=TN_salary_tidy$salary,
x=TN_salary_tidy$job)) +
geom_bar(stat='identity', position=position_dodge())+
theme_classic()+
geom_hline(yintercept=TN_medianIncome, linetype="dashed", color = "red")+
coord_cartesian(ylim = c(10000,120000))+
theme(legend.position="bottom")+
theme(axis.text = element_text(colour = "black", angle=90, size = rel(.75)))+
ggtitle('TN Advertised Salaries: ')+
ylab(NULL)+
xlab('Nashville, Memphis, and Knoxville')
CA_TN_salaries <- rbind(CA_salary,TN_salary)
CA_TN_salaries
## stateAbbreviation LMT houseCleaner warehouse nanny clerical tutor
## 5 CA 48820.89 38864.21 43204.21 50636.89 45704.47 85337.55
## 42 TN 45297.97 29952.00 33488.70 31065.19 34247.25 40565.31
## dataScientist personalAssistant
## 5 100510.9 99663.67
## 42 112500.0 54095.52
The red dashed line across the CA and TN advertised salaries is the state’s respective 2018 median income.
grid.arrange(gg7,gg8, ncol=2)
We notice a larger gap in LMT annual pay in the CA advertised pay ranges for jobs selected when compared to the gap of the TN median income and annual salaries of jobs selected.