This script is exactly, more or less, like the same file that used 3 most populated state cities, but this time we use the 10 most populated cities in each states. We gathered race demographics and median pay from data.census.gov for 2018 data that was the closest to this year’s date of 2020, yellowpages.com, Indeed.com, apartments.com data using webscrape scripts and Zillows’s research data for friendly sharing without webscraping. The two bedroom and two bath apartments were from aparments.com and we used multifamily home median values per city from Zillow data.
All webscrapes took only the first five pages of those listings. Later scripts had each iteration stop by uploading and writing the data after each of 500 iterations done in batches of 10-25 so that we could ethically grab the online data without tying up their servers. Because apartments.com (also rent.com) and yellowpages.com didn’t like that at all. Sometimes Indeed would boot the script off too. I even used a VPN to mix the IP shelling out $13/month but they knew the pattern of cities, and it got ugly when I tried to rearrange the batches. This could have gotten completed in less than a day, but because of the constant restarting of the computer or VPN and waiting to grab each of 500 city data on 20 Indeed jobs and 9 yellowpages businesses and 500 city’s first five pages of apartment listings, this took about two days.
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('./Indeed 10/jobListings_licensed massage therapist.csv', sep=',',header=TRUE, na.strings=c('',' ','NA'),
stringsAsFactors = FALSE)
head(statesRates)
## state jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 ak 85 licensed massage therapist 30.00000 72.50000
## 2 al 110 licensed massage therapist 10.53333 40.13333
## 3 ar 195 licensed massage therapist NA NA
## 4 az 751 licensed massage therapist 13.14115 74.56724
## 5 ca 647 licensed massage therapist 14.66745 66.32399
## 6 co 708 licensed massage therapist 13.19844 64.06117
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 75000.00 120000.00 51.25000 97500.00
## 2 27614.67 51420.67 25.33333 39517.67
## 3 35305.43 49264.86 NA 42285.14
## 4 37214.18 111078.15 43.85419 74146.16
## 5 36218.37 120000.00 40.49572 78109.19
## 6 25868.75 60135.94 38.62980 43002.34
statesOrdered <- statesRates[order(statesRates$state),]
head(statesOrdered)
## state jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 ak 85 licensed massage therapist 30.00000 72.50000
## 2 al 110 licensed massage therapist 10.53333 40.13333
## 3 ar 195 licensed massage therapist NA NA
## 4 az 751 licensed massage therapist 13.14115 74.56724
## 5 ca 647 licensed massage therapist 14.66745 66.32399
## 6 co 708 licensed massage therapist 13.19844 64.06117
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 75000.00 120000.00 51.25000 97500.00
## 2 27614.67 51420.67 25.33333 39517.67
## 3 35305.43 49264.86 NA 42285.14
## 4 37214.18 111078.15 43.85419 74146.16
## 5 36218.37 120000.00 40.49572 78109.19
## 6 25868.75 60135.94 38.62980 43002.34
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"
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$state <- toupper(statesOrdered$state)
statesOrdered <- statesOrdered[,c(1,10,2:9)]
statesOrdered <- statesOrdered[order(statesOrdered$stateName),]
head(statesOrdered)
## state stateName jobsListed jobSearched MinHourlySalary
## 2 AL Alabama 110 licensed massage therapist 10.53333
## 1 AK Alaska 85 licensed massage therapist 30.00000
## 4 AZ Arizona 751 licensed massage therapist 13.14115
## 3 AR Arkansas 195 licensed massage therapist NA
## 5 CA California 647 licensed massage therapist 14.66745
## 6 CO Colorado 708 licensed massage therapist 13.19844
## MaxHourlySalary MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 2 40.13333 27614.67 51420.67 25.33333 39517.67
## 1 72.50000 75000.00 120000.00 51.25000 97500.00
## 4 74.56724 37214.18 111078.15 43.85419 74146.16
## 3 NA 35305.43 49264.86 NA 42285.14
## 5 66.32399 36218.37 120000.00 40.49572 78109.19
## 6 64.06117 25868.75 60135.94 38.62980 43002.34
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-find10zillowCitiesFunctionMean2BRHomeValues.Rmd script.
zillowData <- read.csv('updatedZillow2BR-10.csv',sep=',', header=TRUE, na.strings=c('',' ','NA'))
head(zillowData)
## State X6.30.2020
## 1 AK 244501.7
## 2 AL 104537.1
## 3 AR 114929.8
## 4 AZ 240336.3
## 5 CA 669171.6
## 6 CO 327365.4
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 X6.30.2020 stateName
## 1 AK 244501.67 Alaska
## 2 AL 104537.10 Alabama
## 3 AR 114929.76 Arkansas
## 4 AZ 240336.29 Arizona
## 5 CA 669171.59 California
## 6 CO 327365.43 Colorado
## 7 CT 212252.40 Connecticut
## 8 DE 215976.06 Delaware
## 9 FL 215245.23 Florida
## 10 GA 192060.49 Georgia
## 11 HI 574836.56 Hawaii
## 12 IA 129324.62 Iowa
## 13 ID 238004.33 Idaho
## 14 IL 202689.33 Illinois
## 15 IN 125366.69 Indiana
## 16 KS 152226.63 Kansas
## 17 KY 193124.32 Kentucky
## 18 LA 141609.86 Louisiana
## 19 MA 537437.75 Massachusetts
## 20 MD 207428.66 Maryland
## 21 ME 301941.27 Maine
## 22 MI 107764.58 Michigan
## 23 MN 252568.04 Minnesota
## 24 MO 143279.22 Missouri
## 25 MS 81255.42 Mississippi
## 26 MT 240545.87 Montana
## 27 NC 166565.93 North Carolina
## 28 ND 160193.50 North Dakota
## 29 NE 192748.95 Nebraska
## 30 NH 227562.85 New Hampshire
## 31 NJ 259979.79 New Jersey
## 32 NM 180789.56 New Mexico
## 33 NV 264014.69 Nevada
## 34 NY 637718.65 New York
## 35 OH 102083.29 Ohio
## 36 OK 109105.35 Oklahoma
## 37 OR 364129.81 Oregon
## 38 PA 172920.62 Pennsylvania
## 39 RI 252537.90 Rhode Island
## 40 SC 181933.17 South Carolina
## 41 SD 164059.75 South Dakota
## 42 TN 177130.29 Tennessee
## 43 TX 195904.48 Texas
## 44 UT 319213.45 Utah
## 45 VA 252271.37 Virginia
## 46 VT 193815.55 Vermont
## 47 WA 417702.86 Washington
## 48 WI 170618.96 Wisconsin
## 49 WV 82370.00 West Virginia
## 50 WY 240742.71 Wyoming
zOrdered <- zillowData[order(zillowData$stateName),]
zOrdered
## State X6.30.2020 stateName
## 2 AL 104537.10 Alabama
## 1 AK 244501.67 Alaska
## 4 AZ 240336.29 Arizona
## 3 AR 114929.76 Arkansas
## 5 CA 669171.59 California
## 6 CO 327365.43 Colorado
## 7 CT 212252.40 Connecticut
## 8 DE 215976.06 Delaware
## 9 FL 215245.23 Florida
## 10 GA 192060.49 Georgia
## 11 HI 574836.56 Hawaii
## 13 ID 238004.33 Idaho
## 14 IL 202689.33 Illinois
## 15 IN 125366.69 Indiana
## 12 IA 129324.62 Iowa
## 16 KS 152226.63 Kansas
## 17 KY 193124.32 Kentucky
## 18 LA 141609.86 Louisiana
## 21 ME 301941.27 Maine
## 20 MD 207428.66 Maryland
## 19 MA 537437.75 Massachusetts
## 22 MI 107764.58 Michigan
## 23 MN 252568.04 Minnesota
## 25 MS 81255.42 Mississippi
## 24 MO 143279.22 Missouri
## 26 MT 240545.87 Montana
## 29 NE 192748.95 Nebraska
## 33 NV 264014.69 Nevada
## 30 NH 227562.85 New Hampshire
## 31 NJ 259979.79 New Jersey
## 32 NM 180789.56 New Mexico
## 34 NY 637718.65 New York
## 27 NC 166565.93 North Carolina
## 28 ND 160193.50 North Dakota
## 35 OH 102083.29 Ohio
## 36 OK 109105.35 Oklahoma
## 37 OR 364129.81 Oregon
## 38 PA 172920.62 Pennsylvania
## 39 RI 252537.90 Rhode Island
## 40 SC 181933.17 South Carolina
## 41 SD 164059.75 South Dakota
## 42 TN 177130.29 Tennessee
## 43 TX 195904.48 Texas
## 44 UT 319213.45 Utah
## 46 VT 193815.55 Vermont
## 45 VA 252271.37 Virginia
## 47 WA 417702.86 Washington
## 49 WV 82370.00 West Virginia
## 48 WI 170618.96 Wisconsin
## 50 WY 240742.71 Wyoming
zillowOrdered <- zOrdered[,2:3]
colnames(zillowOrdered)[1] <- 'zillow2BR_2020June_10cities'
zillowOrdered
## zillow2BR_2020June_10cities stateName
## 2 104537.10 Alabama
## 1 244501.67 Alaska
## 4 240336.29 Arizona
## 3 114929.76 Arkansas
## 5 669171.59 California
## 6 327365.43 Colorado
## 7 212252.40 Connecticut
## 8 215976.06 Delaware
## 9 215245.23 Florida
## 10 192060.49 Georgia
## 11 574836.56 Hawaii
## 13 238004.33 Idaho
## 14 202689.33 Illinois
## 15 125366.69 Indiana
## 12 129324.62 Iowa
## 16 152226.63 Kansas
## 17 193124.32 Kentucky
## 18 141609.86 Louisiana
## 21 301941.27 Maine
## 20 207428.66 Maryland
## 19 537437.75 Massachusetts
## 22 107764.58 Michigan
## 23 252568.04 Minnesota
## 25 81255.42 Mississippi
## 24 143279.22 Missouri
## 26 240545.87 Montana
## 29 192748.95 Nebraska
## 33 264014.69 Nevada
## 30 227562.85 New Hampshire
## 31 259979.79 New Jersey
## 32 180789.56 New Mexico
## 34 637718.65 New York
## 27 166565.93 North Carolina
## 28 160193.50 North Dakota
## 35 102083.29 Ohio
## 36 109105.35 Oklahoma
## 37 364129.81 Oregon
## 38 172920.62 Pennsylvania
## 39 252537.90 Rhode Island
## 40 181933.17 South Carolina
## 41 164059.75 South Dakota
## 42 177130.29 Tennessee
## 43 195904.48 Texas
## 44 319213.45 Utah
## 46 193815.55 Vermont
## 45 252271.37 Virginia
## 47 417702.86 Washington
## 49 82370.00 West Virginia
## 48 170618.96 Wisconsin
## 50 240742.71 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_2020June_10cities
colnames(StateLicensing)[35] <- 'Zillow_2BR_10cityAverageHomeValue'
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_10cityAverageHomeValue"
## [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('./Indeed 10/jobListings_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 25 house cleaner 10.800000 12.40000
## 2 al Alabama 250 house cleaner 9.520652 17.33043
## 3 ar Arkansas 135 house cleaner 12.669231 14.74615
## 4 az Arizona 677 house cleaner 10.044313 24.71196
## 5 ca California 581 house cleaner 11.935886 25.45009
## 6 co Colorado 679 house cleaner 12.000000 23.93225
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA NA 11.60000 NA
## 2 17990.65 20000.00 13.42554 18995.33
## 3 NA NA 13.70769 NA
## 4 NA NA 17.37814 NA
## 5 33478.26 37130.43 18.69299 35304.35
## 6 NA NA 17.96613 NA
nanny:
nanny <- read.csv('./Indeed 10/jobListings_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 95 nanny 10.947368 14.73684
## 2 al Alabama 150 nanny 9.857143 16.00000
## 3 ar Arkansas 288 nanny 9.823322 16.59011
## 4 az Arizona 577 nanny 10.000000 24.39688
## 5 ca California 553 nanny 13.027125 43.99638
## 6 co Colorado 521 nanny 11.896353 24.24184
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA NA 12.84211 NA
## 2 NA NA 12.92857 NA
## 3 NA NA 13.20671 NA
## 4 33000.0 60000.0 17.19844 46500.00
## 5 74682.2 109915.3 28.51175 92298.73
## 6 NA NA 18.06910 NA
cashier:
cashier <- read.csv('./Indeed 10/jobListings_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 307 cashier 10.991438 12.71747
## 2 al Alabama 677 cashier 7.749261 13.27400
## 3 ar Arkansas 594 cashier 9.076599 12.33249
## 4 az Arizona 748 cashier 9.401070 15.83155
## 5 ca California 735 cashier 12.039456 17.71611
## 6 co Colorado 717 cashier 10.192120 18.74756
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA NA 11.85445 NA
## 2 NA NA 10.51163 NA
## 3 NA NA 10.70455 NA
## 4 31200 31200 12.61631 31200
## 5 NA NA 14.87778 NA
## 6 NA NA 14.46984 NA
personal trainer:
personalTrainer <- read.csv('./Indeed 10/jobListings_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 120 personal trainer NA NA
## 2 al Alabama 295 personal trainer 9.461538 48.03846
## 3 ar Arkansas 275 personal trainer 15.461538 28.92308
## 4 az Arizona 652 personal trainer 9.138037 50.56748
## 5 ca California 598 personal trainer 13.001672 65.78595
## 6 co Colorado 576 personal trainer 12.000000 48.29947
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 35000.00 60000.00 NA 47500.00
## 2 40000.00 50000.00 28.75000 45000.00
## 3 50000.00 50000.00 22.19231 50000.00
## 4 29110.53 81184.50 29.85276 55147.52
## 5 41046.98 79374.78 39.39381 60210.88
## 6 51628.78 68861.71 30.14974 60245.25
security:
security <- read.csv('./Indeed 10/jobListings_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 447 security 12.460850 16.86353
## 2 al Alabama 613 security 7.880098 19.69005
## 3 ar Arkansas 555 security 10.268468 13.44730
## 4 az Arizona 660 security 12.934621 17.28432
## 5 ca California 656 security 14.369817 29.57553
## 6 co Colorado 640 security 13.143359 42.11703
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 56171.68 116325.26 14.66219 86248.47
## 2 36977.98 76599.80 13.78507 56788.89
## 3 37857.54 87508.37 11.85788 62682.96
## 4 47058.42 78717.17 15.10947 62887.80
## 5 54392.37 115540.57 21.97268 84966.47
## 6 38239.93 113368.40 27.63020 75804.16
server <- read.csv('./Indeed 10/jobListings_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 110 server 10.281765 11.69353
## 2 al Alabama 719 server 7.543880 20.43811
## 3 ar Arkansas 663 server 8.528025 18.44840
## 4 az Arizona 750 server 9.000000 23.64400
## 5 ca California 724 server 12.205801 26.68612
## 6 co Colorado 748 server 9.010132 32.61968
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA NA 10.98765 NA
## 2 NA NA 13.99099 NA
## 3 NA NA 13.48821 NA
## 4 43884.50 150000 16.32200 96942.25
## 5 NA NA 19.44596 NA
## 6 56205.13 102000 20.81490 79102.56
warehouse worker:
warehouseWorker <- read.csv('./Indeed 10/jobListings_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 628 warehouse worker 13.156847 21.13390
## 2 al Alabama 734 warehouse worker 8.982970 19.18200
## 3 ar Arkansas 693 warehouse worker 9.933622 18.30980
## 4 az Arizona 779 warehouse worker 11.092426 22.51829
## 5 ca California 797 warehouse worker 12.748432 28.50040
## 6 co Colorado 797 warehouse worker 12.000000 22.32227
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 52697.00 61420.00 17.14537 57058.50
## 2 31992.82 37607.59 14.08249 34800.21
## 3 NA NA 14.12171 NA
## 4 35757.32 39125.52 16.80536 37441.42
## 5 30596.58 70272.95 20.62442 50434.77
## 6 27026.64 36896.71 17.16114 31961.68
data scientist:
dataScientist <- read.csv('./Indeed 10/jobListings_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 113 data scientist 22.6300 22.63000
## 2 al Alabama 350 data scientist NA NA
## 3 ar Arkansas 231 data scientist NA NA
## 4 az Arizona 702 data scientist NA NA
## 5 ca California 616 data scientist 23.8948 71.09955
## 6 co Colorado 604 data scientist 16.0000 18.00000
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 63899.52 111430.56 22.63000 87665.04
## 2 65000.00 96164.38 NA 80582.19
## 3 59915.82 80445.94 NA 70180.88
## 4 64008.57 109240.91 NA 86624.74
## 5 75244.55 238089.89 47.49717 156667.22
## 6 65643.34 99476.32 17.00000 82559.83
tutor:
tutor <- read.csv('./Indeed 10/jobListings_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 479 tutor 14.08207 28.24250
## 2 al Alabama 536 tutor 12.29443 26.26042
## 3 ar Arkansas 367 tutor 10.61468 14.76147
## 4 az Arizona 714 tutor 11.79272 48.01120
## 5 ca California 715 tutor 12.24559 68.45175
## 6 co Colorado 697 tutor 11.75337 34.98996
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA NA 21.16229 NA
## 2 21623.00 38100.00 19.27743 29861.50
## 3 NA NA 12.68807 NA
## 4 41446.35 56452.57 29.90196 48949.46
## 5 39428.92 46878.07 40.34867 43153.49
## 6 27538.33 41416.86 23.37166 34477.59
clerical:
clerical <- read.csv('./Indeed 10/jobListings_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 700 clerical 12.143571 30.60069
## 2 al Alabama 750 clerical 8.251000 23.70667
## 3 ar Arkansas 736 clerical 9.517323 19.03125
## 4 az Arizona 788 clerical 11.701777 39.34822
## 5 ca California 795 clerical 12.505660 37.42408
## 6 co Colorado 800 clerical 11.352500 28.75525
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 39538.02 82243.42 21.37213 60890.72
## 2 24886.80 72923.56 15.97883 48905.18
## 3 26819.00 63703.86 14.27429 45261.43
## 4 31224.94 66406.71 25.52500 48815.83
## 5 35536.35 78898.69 24.96487 57217.52
## 6 27401.44 66650.78 20.05388 47026.11
teacher:
teacher <- read.csv('./Indeed 10/jobListings_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 652 teacher 12.476074 34.01506
## 2 al Alabama 680 teacher 8.852279 30.48419
## 3 ar Arkansas 710 teacher 10.407042 26.00000
## 4 az Arizona 822 teacher 12.928224 52.02555
## 5 ca California 779 teacher 13.010552 59.55071
## 6 co Colorado 794 teacher 12.738665 44.90806
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 40532.12 80259.20 23.24557 60395.66
## 2 34623.22 63647.46 19.66824 49135.34
## 3 33331.01 67995.02 18.20352 50663.02
## 4 23869.83 65322.71 32.47689 44596.27
## 5 30486.81 92173.60 36.28063 61330.20
## 6 26993.64 84405.27 28.82336 55699.46
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 113 42.14665
## 2 Alabama 350 38.74144
## 3 Arkansas 231 33.74081
## 4 Arizona 702 41.64651
## 5 California 616 75.32078
## 6 Colorado 604 39.69223
## dataScientist_avgAnualSalary
## 1 87665.04
## 2 80582.19
## 3 70180.88
## 4 86624.74
## 5 156667.22
## 6 82559.83
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 628 17.14537 35662.38
## 2 Alabama 734 14.08249 29291.57
## 3 Arkansas 693 14.12171 29373.16
## 4 Arizona 779 16.80536 34955.15
## 5 California 797 20.62442 42898.79
## 6 Colorado 797 17.16114 35695.16
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 95 12.84211 26711.58
## 2 Alabama 150 12.92857 26891.43
## 3 Arkansas 288 13.20671 27469.96
## 4 Arizona 577 17.19844 35772.76
## 5 California 553 28.51175 59304.45
## 6 Colorado 521 18.06910 37583.72
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 120 NA
## 2 Alabama 295 28.75000
## 3 Arkansas 275 22.19231
## 4 Arizona 652 29.85276
## 5 California 598 39.39381
## 6 Colorado 576 30.14974
## personalTrainer_avgAnnualSalary
## 1 NA
## 2 59800.00
## 3 46160.00
## 4 62093.74
## 5 81939.13
## 6 62711.45
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 447 14.66219 30497.36
## 2 Alabama 613 13.78507 28672.95
## 3 Arkansas 555 11.85788 24664.40
## 4 Arizona 660 15.10947 31427.70
## 5 California 656 21.97268 45703.16
## 6 Colorado 640 27.63020 57470.81
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 25 11.60000
## 2 Alabama 250 13.42554
## 3 Arkansas 135 13.70769
## 4 Arizona 677 17.37814
## 5 California 581 18.69299
## 6 Colorado 679 17.96613
## houseCleaner_avgAnnualSalary
## 1 24128.00
## 2 27925.13
## 3 28512.00
## 4 36146.53
## 5 38881.41
## 6 37369.54
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 110 10.98765 22854.31
## 2 Alabama 719 13.99099 29101.27
## 3 Arkansas 663 13.48821 28055.48
## 4 Arizona 750 16.32200 33949.76
## 5 California 724 19.44596 40447.60
## 6 Colorado 748 20.81490 43295.00
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 307 11.85445 24657.26
## 2 Alabama 677 10.51163 21864.19
## 3 Arkansas 594 10.70455 22265.45
## 4 Arizona 748 12.61631 26241.93
## 5 California 735 14.87778 30945.79
## 6 Colorado 717 14.46984 30097.27
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 479 21.16229 44017.56
## 2 Alabama 536 19.27743 40097.05
## 3 Arkansas 367 12.68807 26391.19
## 4 Arizona 714 29.90196 62196.08
## 5 California 715 40.34867 83925.24
## 6 Colorado 697 23.37166 48613.06
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 700 21.37213 44454.03
## 2 Alabama 750 15.97883 33235.97
## 3 Arkansas 736 14.27429 29690.52
## 4 Arizona 788 25.52500 53092.00
## 5 California 795 24.96487 51926.93
## 6 Colorado 800 20.05388 41712.06
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 652 29.03638 60395.66
## 2 Alabama 680 23.62276 49135.34
## 3 Arkansas 710 24.35722 50663.02
## 4 Arizona 822 21.44051 44596.27
## 5 California 779 29.48567 61330.20
## 6 Colorado 794 26.77858 55699.46
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_10cityAverageHomeValue"
## [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 110 677
## 2 Alaska 85 307
## 3 Arizona 751 748
## 4 Arkansas 195 594
## 5 California 647 735
## 6 Colorado 708 717
## 7 Connecticut 737 701
## 8 Delaware 530 684
## 9 Florida 649 713
## 10 Georgia 354 631
## 11 Hawaii 280 587
## 12 Idaho 368 663
## 13 Illinois 512 718
## 14 Indiana 394 719
## 15 Iowa 357 708
## 16 Kansas 433 707
## 17 Kentucky 481 715
## 18 Louisiana 160 697
## 19 Maine 225 682
## 20 Maryland 781 714
## 21 Massachusetts 768 725
## 22 Michigan 689 763
## 23 Minnesota 604 751
## 24 Mississippi 123 616
## 25 Missouri 591 719
## 26 Montana 40 515
## 27 Nebraska 160 498
## 28 Nevada 713 749
## 29 New Hampshire 458 696
## 30 New Jersey 783 735
## 31 New Mexico 150 589
## 32 New York 595 713
## 33 North Carolina 627 712
## 34 North Dakota 60 485
## 35 Ohio 575 715
## 36 Oklahoma 348 616
## 37 Oregon 468 705
## 38 Pennsylvania 554 729
## 39 Rhode Island 626 719
## 40 South Carolina 496 687
## 41 South Dakota 35 257
## 42 Tennessee 383 657
## 43 Texas 555 720
## 44 Utah 617 748
## 45 Vermont 160 583
## 46 Virginia 609 653
## 47 Washington 715 723
## 48 West Virginia 120 648
## 49 Wisconsin 400 701
## 50 Wyoming 55 417
## server_jobsListed personalTrainer_jobsListed houseCleaner_jobsListed
## 1 719 295 250
## 2 110 120 25
## 3 750 652 677
## 4 663 275 135
## 5 724 598 581
## 6 748 576 679
## 7 711 649 561
## 8 709 478 699
## 9 750 588 608
## 10 660 418 460
## 11 626 165 112
## 12 686 185 391
## 13 718 462 490
## 14 740 413 390
## 15 708 287 378
## 16 730 467 450
## 17 726 288 371
## 18 713 235 225
## 19 639 135 486
## 20 758 690 685
## 21 766 684 652
## 22 792 563 645
## 23 745 539 613
## 24 647 230 216
## 25 753 482 526
## 26 450 85 48
## 27 521 237 186
## 28 721 570 644
## 29 704 399 538
## 30 789 753 715
## 31 600 135 100
## 32 773 468 641
## 33 760 521 677
## 34 483 75 323
## 35 716 491 558
## 36 666 339 275
## 37 702 396 421
## 38 726 519 501
## 39 765 673 616
## 40 719 514 636
## 41 295 75 136
## 42 729 436 527
## 43 747 586 506
## 44 729 481 538
## 45 463 30 217
## 46 703 602 614
## 47 715 554 678
## 48 687 120 185
## 49 738 509 295
## 50 245 25 53
## warehouse_jobsListed security_jobsListed nanny_jobsListed
## 1 734 613 150
## 2 628 447 95
## 3 779 660 577
## 4 693 555 288
## 5 797 656 553
## 6 797 640 521
## 7 798 640 446
## 8 763 630 398
## 9 740 629 491
## 10 685 557 375
## 11 767 627 235
## 12 760 518 195
## 13 785 651 398
## 14 768 647 344
## 15 773 592 145
## 16 759 584 232
## 17 784 600 300
## 18 732 624 70
## 19 773 623 125
## 20 778 600 668
## 21 825 635 550
## 22 772 621 420
## 23 802 630 537
## 24 706 560 185
## 25 770 607 403
## 26 564 402 50
## 27 731 448 125
## 28 767 667 410
## 29 780 639 217
## 30 812 650 684
## 31 517 493 110
## 32 796 733 422
## 33 761 737 475
## 34 584 562 45
## 35 779 776 280
## 36 687 714 275
## 37 763 747 245
## 38 787 771 408
## 39 839 735 564
## 40 766 713 267
## 41 500 319 25
## 42 775 729 321
## 43 763 739 470
## 44 786 761 315
## 45 703 701 100
## 46 686 682 456
## 47 797 773 471
## 48 700 666 90
## 49 787 725 256
## 50 327 466 60
## clerical_jobsListed tutor_jobsListed teacher_jobsListed
## 1 750 536 680
## 2 700 479 652
## 3 788 714 822
## 4 736 367 710
## 5 795 715 779
## 6 800 697 794
## 7 781 711 794
## 8 757 685 802
## 9 768 722 820
## 10 668 528 662
## 11 792 661 722
## 12 752 530 694
## 13 771 736 788
## 14 777 648 766
## 15 768 653 710
## 16 762 611 766
## 17 767 615 694
## 18 767 552 722
## 19 780 590 755
## 20 782 745 808
## 21 786 743 808
## 22 776 658 773
## 23 783 757 788
## 24 722 535 676
## 25 764 646 762
## 26 718 408 596
## 27 747 573 619
## 28 767 701 731
## 29 782 617 755
## 30 800 739 795
## 31 713 533 647
## 32 776 702 783
## 33 766 662 799
## 34 687 505 584
## 35 779 688 791
## 36 737 564 673
## 37 786 529 694
## 38 786 534 766
## 39 784 707 785
## 40 763 675 756
## 41 660 383 512
## 42 753 614 767
## 43 756 670 740
## 44 782 636 730
## 45 743 424 717
## 46 689 615 705
## 47 788 675 765
## 48 761 490 626
## 49 777 626 762
## 50 662 381 487
## dataScientist_jobsListed
## 1 350
## 2 113
## 3 702
## 4 231
## 5 616
## 6 604
## 7 718
## 8 518
## 9 468
## 10 374
## 11 433
## 12 189
## 13 509
## 14 428
## 15 280
## 16 428
## 17 285
## 18 125
## 19 161
## 20 782
## 21 703
## 22 551
## 23 559
## 24 98
## 25 547
## 26 71
## 27 122
## 28 177
## 29 413
## 30 704
## 31 302
## 32 525
## 33 588
## 34 86
## 35 399
## 36 236
## 37 295
## 38 389
## 39 571
## 40 274
## 41 95
## 42 282
## 43 547
## 44 598
## 45 119
## 46 607
## 47 611
## 48 172
## 49 451
## 50 145
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 Illinois Kentucky Maryland Massachusetts
## [11] Michigan Minnesota Missouri Nevada New Hampshire
## [16] New Jersey New York North Carolina Ohio Oregon
## [21] Pennsylvania Rhode Island South Carolina Texas Utah
## [26] Virginia Washington
## 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] Idaho Indiana Iowa Kansas Louisiana
## [11] Maine Mississippi Montana Nebraska New Mexico
## [16] North Dakota Oklahoma South Dakota Tennessee Vermont
## [21] West Virginia Wisconsin 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 25.33333 10.511632
## 2 Alaska 51.25000 11.854452
## 3 Arizona 43.85419 12.616310
## 4 Arkansas NA 10.704545
## 5 California 40.49572 14.877782
## 6 Colorado 38.62980 14.469840
## 7 Connecticut 37.14722 12.796362
## 8 Delaware 27.00000 11.781615
## 9 Florida 37.87288 11.270337
## 10 Georgia 40.98837 15.004358
## 11 Hawaii 31.00000 12.827300
## 12 Idaho 37.25895 10.053356
## 13 Illinois 37.82349 12.008705
## 14 Indiana 33.28053 10.755042
## 15 Iowa 32.18976 10.709583
## 16 Kansas 32.20238 11.311528
## 17 Kentucky 40.79202 10.878671
## 18 Louisiana 38.00000 9.916786
## 19 Maine 39.35227 13.225073
## 20 Maryland 49.68886 13.902661
## 21 Massachusetts 38.01172 15.783448
## 22 Michigan 45.44481 12.859010
## 23 Minnesota 34.00250 13.172623
## 24 Mississippi 33.50000 10.254667
## 25 Missouri 33.59983 12.379882
## 26 Montana 28.31250 12.061337
## 27 Nebraska 28.67188 10.797942
## 28 Nevada 70.49456 14.074599
## 29 New Hampshire 25.24781 11.545438
## 30 New Jersey 55.25607 13.187075
## 31 New Mexico 27.05769 11.893131
## 32 New York 55.42593 14.276858
## 33 North Carolina 41.96411 11.070822
## 34 North Dakota 24.00000 11.698563
## 35 Ohio 43.25913 11.479161
## 36 Oklahoma 39.78305 9.736201
## 37 Oregon 37.07051 14.278716
## 38 Pennsylvania 33.25338 11.567833
## 39 Rhode Island 40.97544 13.535118
## 40 South Carolina 35.32258 11.808406
## 41 South Dakota 28.53333 10.734795
## 42 Tennessee 32.18391 11.758752
## 43 Texas 34.09091 11.863168
## 44 Utah 37.71880 12.613636
## 45 Vermont 28.48387 12.309695
## 46 Virginia 38.11412 11.590926
## 47 Washington 50.56993 14.402939
## 48 West Virginia 28.18421 10.243857
## 49 Wisconsin 39.93038 10.666441
## 50 Wyoming 25.00000 11.207749
## server_avgHourly personalTrainer_avgHourly houseCleaner_avgHourly
## 1 13.990994 28.75000 13.42554
## 2 10.987647 NA 11.60000
## 3 16.322000 29.85276 17.37814
## 4 13.488212 22.19231 13.70769
## 5 19.445960 39.39381 18.69299
## 6 20.814905 30.14974 17.96613
## 7 17.351899 37.18105 16.19385
## 8 12.399330 24.90396 16.61838
## 9 17.404000 30.38818 15.78207
## 10 13.279194 34.83333 16.68736
## 11 16.284185 NA 14.04464
## 12 15.044471 21.77273 14.67520
## 13 15.747214 38.88729 17.92347
## 14 16.770101 31.99152 15.44667
## 15 15.134004 28.36643 12.33929
## 16 21.249622 25.86991 14.67222
## 17 14.323175 25.48592 14.43299
## 18 11.312668 16.15278 11.44651
## 19 15.793427 NA 15.24571
## 20 17.255112 42.65290 19.77336
## 21 17.421018 44.27632 19.09260
## 22 17.004703 32.87598 18.08217
## 23 14.362483 37.14745 15.76053
## 24 9.684686 22.36364 11.28125
## 25 17.069118 29.39725 14.79777
## 26 9.828182 14.83333 14.38372
## 27 17.699597 29.36047 11.44767
## 28 14.385888 46.61491 16.06134
## 29 11.901366 29.08055 16.07684
## 30 17.292300 66.67663 19.25594
## 31 11.654255 19.33333 13.76316
## 32 15.235802 38.48107 20.47738
## 33 14.856414 24.83696 13.78360
## 34 12.551843 NA 12.91870
## 35 22.554993 29.09448 14.73960
## 36 14.152847 19.25167 13.71818
## 37 15.395655 31.98737 17.36639
## 38 22.485882 33.59144 17.34431
## 39 24.040196 23.62184 17.97159
## 40 14.320584 22.98152 14.76847
## 41 10.489792 17.50000 12.66250
## 42 12.610983 21.10867 13.35958
## 43 18.299941 38.53442 16.84239
## 44 15.514232 33.48415 15.67937
## 45 14.062937 17.50000 13.14907
## 46 15.068812 27.81146 17.37826
## 47 17.431643 48.11507 18.27212
## 48 14.062003 14.38235 12.48901
## 49 14.818564 28.11467 14.33393
## 50 10.820833 NA 16.91981
## warehouse_avgHourly security_avgHourly nanny_avgHourly clerical_avgHourly
## 1 14.08249 13.78507 12.92857 15.97883
## 2 17.14537 14.66219 12.84211 21.37213
## 3 16.80536 15.10947 17.19844 25.52500
## 4 14.12171 11.85788 13.20671 14.27429
## 5 20.62442 21.97268 28.51175 24.96487
## 6 17.16114 27.63020 18.06910 20.05388
## 7 18.78133 16.30922 25.31951 21.07763
## 8 15.40842 13.72024 17.34296 23.65357
## 9 14.97247 15.27830 20.48065 18.75921
## 10 15.01146 11.42012 16.28667 18.53031
## 11 20.06820 15.19191 12.65957 23.75316
## 12 14.84408 13.99492 19.48077 15.72739
## 13 17.54641 13.63495 19.76979 18.01069
## 14 16.96693 13.47141 16.97674 17.22410
## 15 17.03305 13.52374 14.60345 17.01667
## 16 15.97440 16.05736 13.96121 17.45651
## 17 15.99680 13.72588 14.66250 15.91102
## 18 13.78825 12.27244 12.67857 14.79759
## 19 15.67335 17.91541 13.40000 20.11771
## 20 17.99155 16.02662 19.77470 25.48343
## 21 18.05924 16.30610 22.49727 22.15602
## 22 19.72642 15.06476 15.17262 18.20009
## 23 17.13105 16.47802 20.59311 20.34583
## 24 12.92926 11.07125 11.27027 15.13019
## 25 16.79016 14.69378 15.01861 18.12241
## 26 14.68759 14.05627 15.05000 18.15018
## 27 15.99555 15.05145 16.66000 17.72224
## 28 15.89081 14.70506 17.15244 18.35033
## 29 16.08449 15.87402 16.26959 18.85770
## 30 16.28137 14.73738 23.10307 20.86736
## 31 14.27079 12.97166 14.11364 17.01222
## 32 20.38226 18.26734 22.22749 20.12165
## 33 15.98633 30.80427 18.34737 17.95219
## 34 16.91738 15.07269 11.00000 20.22525
## 35 16.79581 13.66740 16.12500 17.75507
## 36 14.58560 19.36975 13.15094 18.30229
## 37 19.69189 17.78129 19.62245 20.58175
## 38 18.03867 16.81041 15.83333 19.50662
## 39 17.19100 18.50442 18.73316 23.91706
## 40 14.82864 13.28226 14.89513 16.00459
## 41 16.42423 16.72596 12.30000 17.21602
## 42 14.51629 13.07925 15.37025 16.39509
## 43 15.84938 16.77097 18.14839 17.97607
## 44 16.10654 20.18886 14.04762 19.86436
## 45 16.46977 16.11677 15.30000 18.72005
## 46 18.75071 15.12061 18.22902 18.12114
## 47 18.19436 22.09121 28.72558 22.86590
## 48 14.21068 12.58686 12.30556 24.50983
## 49 16.46395 15.22090 18.25586 18.16828
## 50 15.06765 13.71693 17.77273 16.96878
## tutor_avgHourly teacher_avgHourly dataScientist_avgHourly
## 1 19.27743 23.62276 38.74144
## 2 21.16229 29.03638 42.14665
## 3 29.90196 21.44051 41.64651
## 4 12.68807 24.35722 33.74081
## 5 40.34867 29.48567 75.32078
## 6 23.37166 26.77858 39.69223
## 7 38.07595 33.16796 38.42097
## 8 22.51820 28.49842 34.73975
## 9 25.71538 23.69203 37.08241
## 10 19.85204 25.43320 52.80749
## 11 21.00000 22.38526 49.74555
## 12 18.52459 24.54064 33.65385
## 13 25.42266 25.11259 34.32223
## 14 18.18917 24.30296 38.14867
## 15 23.54058 19.16443 33.65385
## 16 18.01988 24.44520 40.07053
## 17 19.79532 21.99335 32.76947
## 18 23.07674 24.81727 36.61299
## 19 22.87475 24.64157 38.05736
## 20 36.20997 33.01847 54.91881
## 21 42.11406 20.69420 58.89998
## 22 21.16890 22.13037 33.65385
## 23 28.78467 28.25028 33.65385
## 24 19.25167 24.36818 34.36885
## 25 22.28859 21.44619 38.52938
## 26 30.00000 24.75109 33.65385
## 27 25.70270 25.50001 33.57744
## 28 19.56348 26.78194 33.65385
## 29 21.56189 23.48265 45.21448
## 30 48.41035 28.29462 72.89220
## 31 20.69742 27.82348 45.95748
## 32 46.49569 26.94398 63.65385
## 33 22.09026 21.43598 43.28068
## 34 18.00000 26.59282 33.65385
## 35 19.49193 21.14921 37.73014
## 36 27.48538 18.48044 33.65385
## 37 24.03842 27.32085 33.65385
## 38 24.44101 17.98488 38.22672
## 39 24.50106 22.01886 48.51202
## 40 23.74685 21.53165 33.59257
## 41 NA 28.71833 33.65385
## 42 18.03253 23.19477 35.53512
## 43 22.38843 25.82280 59.63494
## 44 19.52730 22.35048 40.48294
## 45 18.57339 21.58420 33.65385
## 46 26.06260 22.33419 46.84460
## 47 34.10938 31.98828 64.05636
## 48 19.20899 23.45591 33.65385
## 49 25.18877 22.89298 43.14762
## 50 13.97484 27.14263 53.65778
avgPay <- round(mean(payRates$LMT_HourlyAvgPayRangeAdvertised_Indeed,na.rm=TRUE),2)
mPay <- min(payRates$LMT_HourlyAvgPayRangeAdvertised_Indeed,na.rm=TRUE)
MPay <- max(payRates$LMT_HourlyAvgPayRangeAdvertised_Indeed,na.rm=TRUE)
ggplot(data = numberOfJobs, aes(y=payRates$LMT_HourlyAvgPayRangeAdvertised_Indeed, x=payRates$state)) +
geom_bar(stat='identity', position=position_dodge(), na.rm=TRUE)+
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, na.rm=TRUE), 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] Alaska Arizona California Colorado Florida
## [6] Georgia Illinois Kentucky Louisiana Maine
## [11] Maryland Massachusetts Michigan Nevada New Jersey
## [16] New York North Carolina Ohio Oklahoma Rhode Island
## [21] Utah Virginia Washington Wisconsin
## 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] Alaska Georgia Louisiana Maine Oklahoma Wisconsin
## 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, Indiana, 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 Florida Illinois
## [6] Kentucky Maryland Massachusetts Michigan Nevada
## [11] New Jersey New York North Carolina Ohio Rhode Island
## [16] Utah 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 <- round(mean(slr$Zillow_2BR_10cityAverageHomeValue,na.rm=T),2)
mHomePrice <- round(min(slr$Zillow_2BR_3cityAverageHomeValue),2)
## Warning in min(slr$Zillow_2BR_3cityAverageHomeValue): no non-missing arguments
## to min; returning Inf
MHomePrice <- round(max(slr$Zillow_2BR_3cityAverageHomeValue),2)
## Warning in max(slr$Zillow_2BR_3cityAverageHomeValue): no non-missing arguments
## to max; returning -Inf
ggplot(data = slr$Zillow_2BR_3cityAverageHomeValue,
aes(y=slr$Zillow_2BR_3cityAverageHomeValue, x=slr$state)) +
geom_col(aes(y=slr$Zillow_2BR_10cityAverageHomeValue,x=slr$state)) +
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_10cityAverageHomeValue > avgHomePrice)
e <- expensiveHomes$state
e
## [1] Alaska Arizona California Colorado Hawaii
## [6] Idaho Maine Massachusetts Minnesota Montana
## [11] Nevada New Jersey New York Oregon Rhode Island
## [16] Utah Virginia Washington Wyoming
## 50 Levels: Alabama Alaska Arizona Arkansas California Colorado ... Wyoming
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 Massachusetts Nevada
## [6] New Jersey New York Rhode Island Utah Virginia
## [11] 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_10cityAverageHomeValue < avgHomePrice)
inexpensive <- inexpensiveHomes$state
notExpensive <- inexpensive %in% highLivingCost
affordable <- inexpensive[notExpensive]
affordable
## [1] Florida Illinois Kentucky Maryland Michigan
## [6] North Carolina Ohio
## 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] Alaska Georgia Louisiana Maine Oklahoma Wisconsin
## 50 Levels: Alabama Alaska Arizona Arkansas California Colorado ... Wyoming
demanded %in% e
## [1] TRUE FALSE FALSE TRUE FALSE FALSE
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
## 9 Florida 21299325 16.0 74.6
## 13 Illinois 12741080 14.1 71.7
## 17 Kentucky 4468402 7.9 86.7
## 20 Maryland 6042718 30.0 54.7
## 22 Michigan 9995915 13.8 78.3
## 33 North Carolina 10383620 21.4 68.4
## 35 Ohio 11689442 12.4 81.0
## percent_two_or_more percent_Native_American percent_Asian
## 9 2.9 0.3 2.8
## 13 2.7 0.3 5.6
## 17 2.4 0.2 1.5
## 20 3.7 0.2 6.3
## 22 2.9 0.5 3.3
## 33 2.9 1.2 3.0
## 35 3.1 0.2 2.3
## percent_Pacific_Islander percent_Latino
## 9 0.1 26.1
## 13 0.0 17.3
## 17 0.1 3.6
## 20 0.1 10.4
## 22 0.0 5.2
## 33 0.1 9.6
## 35 0.0 3.9
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 to compare as elements of a planet in analogy to that similar comparison.
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
## 9 Florida 649 713
## 13 Illinois 512 718
## 17 Kentucky 481 715
## 20 Maryland 781 714
## 22 Michigan 689 763
## 33 North Carolina 627 712
## 35 Ohio 575 715
## server_jobsListed personalTrainer_jobsListed houseCleaner_jobsListed
## 9 750 588 608
## 13 718 462 490
## 17 726 288 371
## 20 758 690 685
## 22 792 563 645
## 33 760 521 677
## 35 716 491 558
## warehouse_jobsListed security_jobsListed nanny_jobsListed
## 9 740 629 491
## 13 785 651 398
## 17 784 600 300
## 20 778 600 668
## 22 772 621 420
## 33 761 737 475
## 35 779 776 280
## clerical_jobsListed tutor_jobsListed teacher_jobsListed
## 9 768 722 820
## 13 771 736 788
## 17 767 615 694
## 20 782 745 808
## 22 776 658 773
## 33 766 662 799
## 35 779 688 791
## dataScientist_jobsListed
## 9 468
## 13 509
## 17 285
## 20 782
## 22 551
## 33 588
## 35 399
CA_altjobs
## state LMT_AvgJobsListed_IndeedFirst5pages cashier_jobsListed
## 5 California 647 735
## server_jobsListed personalTrainer_jobsListed houseCleaner_jobsListed
## 5 724 598 581
## warehouse_jobsListed security_jobsListed nanny_jobsListed clerical_jobsListed
## 5 797 656 553 795
## tutor_jobsListed teacher_jobsListed dataScientist_jobsListed
## 5 715 779 616
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
## 21 Massachusetts 6902149 7.8 77.3
## 28 Nevada 3034392 9.2 63.4
## 30 New Jersey 8908520 13.6 66.9
## 32 New York 19542209 15.7 63.3
## 39 Rhode Island 1057315 6.7 80.7
## 44 Utah 3161105 1.3 85.7
## 46 Virginia 8517685 19.2 67.4
## 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
## 21 3.4 0.2 6.8
## 28 5.1 1.5 8.2
## 30 2.8 0.2 9.7
## 32 3.3 0.4 8.5
## 39 3.1 0.4 3.4
## 44 3.2 1.1 2.4
## 46 4.1 0.3 6.5
## 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
## 21 0.0 12.3
## 28 0.6 29.0
## 30 0.0 20.6
## 32 0.0 19.2
## 39 0.1 15.9
## 44 0.9 14.2
## 46 0.1 9.5
## 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 751 748
## 5 California 647 735
## 6 Colorado 708 717
## 21 Massachusetts 768 725
## 28 Nevada 713 749
## 30 New Jersey 783 735
## 32 New York 595 713
## 39 Rhode Island 626 719
## 44 Utah 617 748
## 46 Virginia 609 653
## 47 Washington 715 723
## server_jobsListed personalTrainer_jobsListed houseCleaner_jobsListed
## 3 750 652 677
## 5 724 598 581
## 6 748 576 679
## 21 766 684 652
## 28 721 570 644
## 30 789 753 715
## 32 773 468 641
## 39 765 673 616
## 44 729 481 538
## 46 703 602 614
## 47 715 554 678
## warehouse_jobsListed security_jobsListed nanny_jobsListed
## 3 779 660 577
## 5 797 656 553
## 6 797 640 521
## 21 825 635 550
## 28 767 667 410
## 30 812 650 684
## 32 796 733 422
## 39 839 735 564
## 44 786 761 315
## 46 686 682 456
## 47 797 773 471
## clerical_jobsListed tutor_jobsListed teacher_jobsListed
## 3 788 714 822
## 5 795 715 779
## 6 800 697 794
## 21 786 743 808
## 28 767 701 731
## 30 800 739 795
## 32 776 702 783
## 39 784 707 785
## 44 782 636 730
## 46 689 615 705
## 47 788 675 765
## dataScientist_jobsListed
## 3 702
## 5 616
## 6 604
## 21 703
## 28 177
## 30 704
## 32 525
## 39 571
## 44 598
## 46 607
## 47 611
Lets now plot the number of available jobs by category in CA compared to New Jersey and New York.
NY_altJobs <- subset(altJobs_expStates, altJobs_expStates$state=='New York')
CA_altJobs <- subset(altJobs_expStates, altJobs_expStates$state=='California')
NJ_altJobs <- subset(altJobs_expStates, altJobs_expStates$state=='New Jersey')
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)
NJ_tidyJobs <- gather(NJ_altJobs,key="jobTitle", value="jobsListed",2:13, na.rm=TRUE)
NJ_tidyJobs$jobTitle <- gsub('_.*$','',NJ_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 and nanny 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 = NJ_tidyJobs, aes(y=NJ_tidyJobs$jobsListed, x=NJ_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('NJ Alternate and LMT Jobs Advertised')+
ylab(NULL)+
xlab(NULL)
Now, lets compare the pay to each of these states of CA, NY, and AZ. 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 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('./Indeed 10/jobListings_nurse.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
personalAssistants <- read.csv('./Indeed 10/jobListings_personal assistant.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
chiropractor <- read.csv('./Indeed 10/jobListings_chiropractor.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
physicalTherapist <- read.csv('./Indeed 10/jobListings_physical therapist.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
esthetician <- read.csv('./Indeed 10/jobListings_esthetician.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
medicalSpaEsthetician <- read.csv('./Indeed 10/jobListings_medical spa technician.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
medicalDoctor <- read.csv('./Indeed 10/jobListings_medical doctor.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
yogaInstructor <- read.csv('./Indeed 10/jobListings_yoga Instructor.csv', sep=',',
header=TRUE, na.strings=c('',' ','NA'))
pilatesInstructor <- read.csv('./Indeed 10/jobListings_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 782 nurse 28.00418 80.62660
## 2 al Alabama 795 nurse 15.47170 37.76063
## 3 ar Arkansas 812 nurse 16.99766 44.64234
## 4 az Arizona 839 nurse 20.21097 67.32777
## 5 ca California 828 nurse 22.78140 94.43040
## 6 co Colorado 814 nurse 19.61038 68.28624
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 42989.23 143585.1 54.31539 93287.17
## 2 39088.99 115196.9 26.61616 77142.93
## 3 44212.96 144098.8 30.82000 94155.88
## 4 39921.61 153687.3 43.76937 96804.47
## 5 59726.21 159600.2 58.60590 109663.21
## 6 43899.75 117721.0 43.94831 80810.39
personalAssistants$stateName <- states
personalAssistants <- personalAssistants[,c(1,10,2:9)]
head(personalAssistants)
## state stateName jobsListed jobSearched MinHourlySalary
## 1 ak Alaska 235 personal assistant 13.895455
## 2 al Alabama 408 personal assistant 8.821038
## 3 ar Arkansas 341 personal assistant 9.719207
## 4 az Arizona 647 personal assistant 11.319552
## 5 ca California 660 personal assistant 12.021672
## 6 co Colorado 630 personal assistant 12.229365
## MaxHourlySalary MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 25.31818 50988.21 92591.33 19.60682 71789.77
## 2 11.24044 24594.28 49782.62 10.03074 37188.45
## 3 16.58811 40268.37 76244.49 13.15366 58256.43
## 4 24.82224 33170.77 93157.51 18.07090 63164.14
## 5 40.08511 39847.50 123385.42 26.05339 81616.46
## 6 23.41879 32429.64 161689.09 17.82408 97059.37
chiropractor$stateName <- states
chiropractor <- chiropractor[,c(1,10,2:9)]
head(chiropractor)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 ak Alaska 106 chiropractor NA NA
## 2 al Alabama 116 chiropractor 11.32967 38.90110
## 3 ar Arkansas 100 chiropractor 12.00000 14.00000
## 4 az Arizona 656 chiropractor 12.00000 35.08580
## 5 ca California 540 chiropractor 15.96571 47.60571
## 6 co Colorado 607 chiropractor 12.36683 72.96482
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 50000.00 119670.3 NA 84835.16
## 2 50000.00 80000.0 25.11538 65000.00
## 3 50000.00 80000.0 13.00000 65000.00
## 4 37899.39 206455.8 23.54290 122177.59
## 5 44685.19 138213.0 31.78571 91449.07
## 6 46029.65 132405.3 42.66583 89217.46
physicalTherapist$stateName <- states
physicalTherapist <- physicalTherapist[,c(1,10,2:9)]
head(physicalTherapist)
## state stateName jobsListed jobSearched MinHourlySalary
## 1 ak Alaska 276 physical therapist NA
## 2 al Alabama 667 physical therapist 33.59812
## 3 ar Arkansas 579 physical therapist 41.62376
## 4 az Arizona 805 physical therapist 11.86087
## 5 ca California 755 physical therapist 36.85481
## 6 co Colorado 768 physical therapist 36.29688
## MaxHourlySalary MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA 64818.87 109833.95 NA 87326.41
## 2 47.84601 80369.93 96596.46 40.72207 88483.19
## 3 59.42574 85000.00 95000.00 50.52475 90000.00
## 4 57.82595 44304.35 99521.74 34.84341 71913.04
## 5 78.20861 60112.34 127241.54 57.53171 93676.94
## 6 85.47917 51764.35 103165.95 60.88802 77465.15
esthetician$stateName <- states
esthetician <- esthetician[,c(1,10,2:9)]
head(esthetician)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 ak Alaska 125 esthetician 20.00000 25.00000
## 2 al Alabama 218 esthetician 13.13955 54.68500
## 3 ar Arkansas 165 esthetician 15.00000 15.00000
## 4 az Arizona 737 esthetician 11.37042 43.76526
## 5 ca California 604 esthetician 12.39389 86.90153
## 6 co Colorado 572 esthetician 11.52910 58.79365
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA NA 22.50000 NA
## 2 30045.45 35852.27 33.91227 32948.86
## 3 30000.00 45000.00 15.00000 37500.00
## 4 17800.59 71480.94 27.56784 44640.76
## 5 21180.36 98126.25 49.64771 59653.31
## 6 33137.80 65148.98 35.16138 49143.39
medicalSpaEsthetician$stateName <- states
medicalSpaEsthetician <- medicalSpaEsthetician[,c(1,10,2:9)]
head(medicalSpaEsthetician)
## state stateName jobsListed jobSearched MinHourlySalary
## 1 ak Alaska 72 medical spa technician 20.95056
## 2 al Alabama 81 medical spa technician 20.06173
## 3 ar Arkansas 167 medical spa technician 21.54216
## 4 az Arizona 641 medical spa technician 13.65055
## 5 ca California 275 medical spa technician 15.32407
## 6 co Colorado 529 medical spa technician 14.89130
## MaxHourlySalary MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 40.22222 48368.00 84702.00 30.58639 66535.00
## 2 35.16049 32000.00 70000.00 27.61111 51000.00
## 3 38.00000 41959.15 66214.47 29.77108 54086.81
## 4 38.00000 NA NA 25.82527 NA
## 5 39.71111 NA NA 27.51759 NA
## 6 38.00000 56292.88 66818.81 26.44565 61555.85
medicalDoctor$stateName <- states
medicalDoctor <- medicalDoctor[,c(1,10,2:9)]
head(medicalDoctor)
## state stateName jobsListed jobSearched MinHourlySalary MaxHourlySalary
## 1 ak Alaska 672 medical doctor 31.90565 57.32262
## 2 al Alabama 731 medical doctor 9.00000 41.59644
## 3 ar Arkansas 710 medical doctor 13.59789 200.00000
## 4 az Arizona 780 medical doctor 11.78974 36.13462
## 5 ca California 774 medical doctor 13.07752 119.10935
## 6 co Colorado 751 medical doctor 12.09987 50.58822
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 57739.89 392700.9 44.61414 225220.4
## 2 59639.09 396086.2 25.29822 227862.6
## 3 47885.27 303014.1 106.79894 175449.7
## 4 29640.94 173205.1 23.96218 101423.0
## 5 42211.18 246867.5 66.09344 144539.3
## 6 43577.77 172516.6 31.34404 108047.2
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 24 yoga instructor NA NA
## 2 al Alabama 83 yoga instructor 25.00000 72.00000
## 3 ar Arkansas 98 yoga instructor 10.00000 84.06250
## 4 az Arizona 602 yoga instructor 17.80239 100.00000
## 5 ca California 484 yoga instructor 16.43966 99.19181
## 6 co Colorado 534 yoga instructor 14.13424 115.25292
## MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 NA NA NA NA
## 2 NA NA 48.50000 100880.0
## 3 NA NA 47.03125 97825.0
## 4 NA NA 58.90119 122514.5
## 5 38260.87 99898.26 57.81573 120256.7
## 6 NA NA 64.69358 134562.6
pilatesInstructor$stateName <- states[2:50]
pilatesInstructor <- pilatesInstructor[,c(1,10,2:9)]
head(pilatesInstructor)
## state stateName jobsListed jobSearched MinHourlySalary
## 1 al Alabama 95 pilates instructor 25.00000
## 2 ar Arkansas 45 pilates instructor 25.00000
## 3 az Arizona 569 pilates instructor 13.72695
## 4 ca California 508 pilates instructor 15.62156
## 5 co Colorado 513 pilates instructor 19.62661
## 6 ct Connecticut 284 pilates instructor 19.78261
## MaxHourlySalary MinAnnualSalary MaxAnnualSalary avgHourly avgAnualSalary
## 1 100.0000 NA NA 62.50000 NA
## 2 100.0000 NA NA 62.50000 NA
## 3 100.0000 NA NA 56.86348 NA
## 4 100.0000 40500 92500 57.81078 66500
## 5 113.4503 NA NA 66.53845 NA
## 6 100.0000 NA NA 59.89130 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 110 677 719 295 250 734
## 2 Alaska 85 307 110 120 25 628
## 3 Arizona 751 748 750 652 677 779
## 4 Arkansas 195 594 663 275 135 693
## 5 California 647 735 724 598 581 797
## 6 Colorado 708 717 748 576 679 797
## 7 Connecticut 737 701 711 649 561 798
## 8 Delaware 530 684 709 478 699 763
## 9 Florida 649 713 750 588 608 740
## 10 Georgia 354 631 660 418 460 685
## 11 Hawaii 280 587 626 165 112 767
## 12 Idaho 368 663 686 185 391 760
## 13 Illinois 512 718 718 462 490 785
## 14 Indiana 394 719 740 413 390 768
## 15 Iowa 357 708 708 287 378 773
## 16 Kansas 433 707 730 467 450 759
## 17 Kentucky 481 715 726 288 371 784
## 18 Louisiana 160 697 713 235 225 732
## 19 Maine 225 682 639 135 486 773
## 20 Maryland 781 714 758 690 685 778
## 21 Massachusetts 768 725 766 684 652 825
## 22 Michigan 689 763 792 563 645 772
## 23 Minnesota 604 751 745 539 613 802
## 24 Mississippi 123 616 647 230 216 706
## 25 Missouri 591 719 753 482 526 770
## 26 Montana 40 515 450 85 48 564
## 27 Nebraska 160 498 521 237 186 731
## 28 Nevada 713 749 721 570 644 767
## 29 New Hampshire 458 696 704 399 538 780
## 30 New Jersey 783 735 789 753 715 812
## 31 New Mexico 150 589 600 135 100 517
## 32 New York 595 713 773 468 641 796
## 33 North Carolina 627 712 760 521 677 761
## 34 North Dakota 60 485 483 75 323 584
## 35 Ohio 575 715 716 491 558 779
## 36 Oklahoma 348 616 666 339 275 687
## 37 Oregon 468 705 702 396 421 763
## 38 Pennsylvania 554 729 726 519 501 787
## 39 Rhode Island 626 719 765 673 616 839
## 40 South Carolina 496 687 719 514 636 766
## 41 South Dakota 35 257 295 75 136 500
## 42 Tennessee 383 657 729 436 527 775
## 43 Texas 555 720 747 586 506 763
## 44 Utah 617 748 729 481 538 786
## 45 Vermont 160 583 463 30 217 703
## 46 Virginia 609 653 703 602 614 686
## 47 Washington 715 723 715 554 678 797
## 48 West Virginia 120 648 687 120 185 700
## 49 Wisconsin 400 701 738 509 295 787
## 50 Wyoming 55 417 245 25 53 327
## security nanny clerical tutor teacher dataScientist nurses personalAssistant
## 1 613 150 750 536 680 350 795 408
## 2 447 95 700 479 652 113 782 235
## 3 660 577 788 714 822 702 839 647
## 4 555 288 736 367 710 231 812 341
## 5 656 553 795 715 779 616 828 660
## 6 640 521 800 697 794 604 814 630
## 7 640 446 781 711 794 718 803 700
## 8 630 398 757 685 802 518 812 511
## 9 629 491 768 722 820 468 820 558
## 10 557 375 668 528 662 374 729 397
## 11 627 235 792 661 722 433 797 621
## 12 518 195 752 530 694 189 809 449
## 13 651 398 771 736 788 509 832 516
## 14 647 344 777 648 766 428 815 463
## 15 592 145 768 653 710 280 805 256
## 16 584 232 762 611 766 428 803 455
## 17 600 300 767 615 694 285 812 467
## 18 624 70 767 552 722 125 827 339
## 19 623 125 780 590 755 161 822 255
## 20 600 668 782 745 808 782 849 732
## 21 635 550 786 743 808 703 827 722
## 22 621 420 776 658 773 551 826 598
## 23 630 537 783 757 788 559 833 563
## 24 560 185 722 535 676 98 814 279
## 25 607 403 764 646 762 547 806 546
## 26 402 50 718 408 596 71 787 124
## 27 448 125 747 573 619 122 813 183
## 28 667 410 767 701 731 177 826 576
## 29 639 217 782 617 755 413 828 411
## 30 650 684 800 739 795 704 823 736
## 31 493 110 713 533 647 302 783 271
## 32 733 422 776 702 783 525 815 706
## 33 737 475 766 662 799 588 807 544
## 34 562 45 687 505 584 86 811 83
## 35 776 280 779 688 791 399 817 510
## 36 714 275 737 564 673 236 828 458
## 37 747 245 786 529 694 295 817 485
## 38 771 408 786 534 766 389 834 606
## 39 735 564 784 707 785 571 820 554
## 40 713 267 763 675 756 274 830 535
## 41 319 25 660 383 512 95 799 95
## 42 729 321 753 614 767 282 808 491
## 43 739 470 756 670 740 547 816 569
## 44 761 315 782 636 730 598 789 613
## 45 701 100 743 424 717 119 808 186
## 46 682 456 689 615 705 607 742 597
## 47 773 471 788 675 765 611 828 668
## 48 666 90 761 490 626 172 825 196
## 49 725 256 777 626 762 451 806 448
## 50 466 60 662 381 487 145 744 46
## chiropractor physicalTherapist esthetician medicalSpaEsthetician
## 1 116 667 218 81
## 2 106 276 125 72
## 3 656 805 737 641
## 4 100 579 165 167
## 5 540 755 604 275
## 6 607 768 572 529
## 7 355 775 635 122
## 8 311 723 476 106
## 9 540 714 622 360
## 10 337 613 376 289
## 11 123 646 285 96
## 12 215 533 225 116
## 13 521 635 487 297
## 14 362 602 398 216
## 15 186 437 135 91
## 16 192 656 436 286
## 17 260 651 298 123
## 18 85 517 351 60
## 19 186 529 217 73
## 20 713 774 696 566
## 21 385 778 660 307
## 22 570 711 581 372
## 23 608 670 607 443
## 24 71 593 318 137
## 25 384 714 579 381
## 26 101 302 30 88
## 27 80 303 65 80
## 28 409 662 641 376
## 29 109 688 374 154
## 30 671 792 770 451
## 31 107 418 90 122
## 32 328 751 559 284
## 33 387 713 587 191
## 34 49 250 70 60
## 35 355 693 492 175
## 36 251 621 275 184
## 37 456 604 347 281
## 38 386 652 400 176
## 39 186 770 610 170
## 40 233 701 541 219
## 41 46 218 20 84
## 42 222 639 470 244
## 43 498 682 565 433
## 44 417 568 598 231
## 45 104 463 65 72
## 46 325 617 568 412
## 47 613 652 689 407
## 48 67 451 90 85
## 49 300 603 251 90
## 50 49 249 45 82
## medicalDoctor yogaInstructor pilatesInstructor
## 1 731 83 95
## 2 672 24 NA
## 3 780 602 569
## 4 710 98 45
## 5 774 484 508
## 6 751 534 513
## 7 772 376 284
## 8 750 186 135
## 9 772 431 341
## 10 680 308 305
## 11 735 186 111
## 12 671 190 120
## 13 744 454 435
## 14 778 341 330
## 15 732 133 93
## 16 685 364 262
## 17 747 130 229
## 18 716 119 45
## 19 720 71 85
## 20 768 605 554
## 21 788 448 493
## 22 761 455 365
## 23 773 519 485
## 24 701 120 53
## 25 740 369 245
## 26 655 45 32
## 27 589 144 70
## 28 758 153 63
## 29 722 115 194
## 30 787 586 568
## 31 707 164 103
## 32 770 321 302
## 33 749 345 321
## 34 591 34 15
## 35 699 261 289
## 36 715 341 301
## 37 748 322 264
## 38 793 264 264
## 39 763 524 261
## 40 763 335 210
## 41 526 15 5
## 42 752 154 44
## 43 680 480 445
## 44 754 240 126
## 45 714 119 46
## 46 673 294 330
## 47 810 493 480
## 48 680 109 67
## 49 756 134 130
## 50 479 10 10
colnames(avgSalaryAll) <- gsub('_.*$','',colnames(avgSalaryAll))
colnames(avgSalaryAll) <- gsub(' .*$','',colnames(avgSalaryAll))
avgSalaryAll
## state LMT cashier server personalTrainer houseCleaner
## 1 Alabama 39517.67 21864.19 29101.27 59800.00 27925.13
## 2 Alaska 97500.00 24657.26 22854.31 NA 24128.00
## 3 Arizona 74146.16 26241.93 33949.76 62093.74 36146.53
## 4 Arkansas 42285.14 22265.45 28055.48 46160.00 28512.00
## 5 California 78109.19 30945.79 40447.60 81939.13 38881.41
## 6 Colorado 43002.34 30097.27 43295.00 62711.45 37369.54
## 7 Connecticut 51306.29 26616.43 36091.95 77336.58 33683.21
## 8 Delaware 48523.81 24505.76 25790.61 51800.24 34566.24
## 9 Florida 57879.11 23442.30 36200.32 63207.41 32826.71
## 10 Georgia 40157.23 31209.06 27620.72 72453.33 34709.71
## 11 Hawaii 97500.00 26680.78 33871.11 NA 29212.86
## 12 Idaho 30000.00 20910.98 31292.50 45287.27 30524.41
## 13 Illinois 51341.99 24978.11 32754.21 80885.56 37280.82
## 14 Indiana 70337.14 22370.49 34881.81 66542.36 32129.07
## 15 Iowa 43706.71 22275.93 31478.73 59002.17 25665.71
## 16 Kansas 54344.35 23527.98 44199.21 53809.42 30518.22
## 17 Kentucky 79538.04 22627.64 29792.20 53010.70 30020.62
## 18 Louisiana 76900.00 20626.92 23530.35 33597.78 23808.74
## 19 Maine NA 27508.15 32850.33 NA 31711.07
## 20 Maryland 65785.08 28917.54 35890.63 88718.03 41128.58
## 21 Massachusetts 50915.04 32829.57 36235.72 92094.74 39712.61
## 22 Michigan 54245.44 26746.74 35369.78 68382.05 37610.91
## 23 Minnesota 76209.60 27399.06 29873.97 77266.69 32781.90
## 24 Mississippi 48508.52 21329.71 20144.15 46516.36 23465.00
## 25 Missouri 42328.58 25750.15 35503.76 61146.27 30779.35
## 26 Montana NA 25087.58 20442.62 30853.33 29918.14
## 27 Nebraska 45500.00 22459.72 36815.16 61069.77 23811.16
## 28 Nevada 85635.34 29275.17 29922.65 96959.02 33407.58
## 29 New Hampshire 51085.01 24014.51 24754.84 60487.54 33439.84
## 30 New Jersey 61327.10 27429.12 35967.98 138687.38 40052.36
## 31 New Mexico 45685.43 24737.71 24240.85 40213.33 28627.37
## 32 New York 66536.08 29695.87 31690.47 80040.63 42592.95
## 33 North Carolina 78046.45 23027.31 30901.34 51660.87 28669.90
## 34 North Dakota 45569.00 24333.01 26107.83 NA 26870.89
## 35 Ohio 44948.78 23876.65 46914.39 60516.52 30658.37
## 36 Oklahoma 45000.00 20251.30 29437.92 40043.48 28533.82
## 37 Oregon 68436.14 29699.73 32022.96 66533.74 36122.09
## 38 Pennsylvania 43905.93 24061.09 46770.63 69870.19 36076.17
## 39 Rhode Island 44566.61 28153.05 50003.61 49133.43 37380.91
## 40 South Carolina 81450.00 24561.48 29786.82 47801.56 30718.43
## 41 South Dakota NA 22328.37 21818.77 36400.00 26338.00
## 42 Tennessee 56340.78 24458.20 26230.84 43906.03 27787.93
## 43 Texas 59757.33 24675.39 38063.88 80151.60 35032.17
## 44 Utah 42672.96 26236.36 32269.60 69647.03 32613.09
## 45 Vermont 40000.00 25604.17 29250.91 36400.00 27350.06
## 46 Virginia 73639.82 24109.13 31343.13 57847.84 36146.78
## 47 Washington 75429.56 29958.11 36257.82 100079.35 38006.02
## 48 West Virginia 46428.57 21307.22 29248.97 29915.29 25977.14
## 49 Wisconsin 44366.42 22186.20 30822.61 58478.51 29814.57
## 50 Wyoming NA 23312.12 22507.33 NA 35193.21
## warehouse security nanny clerical tutor teacher dataScientist
## 1 29291.57 28672.95 26891.43 33235.97 40097.05 49135.34 80582.19
## 2 35662.38 30497.36 26711.58 44454.03 44017.56 60395.66 87665.04
## 3 34955.15 31427.70 35772.76 53092.00 62196.08 44596.27 86624.74
## 4 29373.16 24664.40 27469.96 29690.52 26391.19 50663.02 70180.88
## 5 42898.79 45703.16 59304.45 51926.93 83925.24 61330.20 156667.22
## 6 35695.16 57470.81 37583.72 41712.06 48613.06 55699.46 82559.83
## 7 39065.16 33923.18 52664.57 43841.47 79197.97 68989.36 79915.62
## 8 32049.52 28538.10 36073.37 49199.42 46837.87 59276.72 72258.69
## 9 31142.73 31778.86 42599.76 39019.16 53487.99 49279.43 77131.41
## 10 31223.84 23753.85 33876.27 38543.05 41292.23 52901.06 109839.57
## 11 41741.86 31599.16 26331.91 49406.57 43680.00 46561.34 103470.75
## 12 30875.68 29109.43 40520.00 32712.98 38531.15 51044.53 70000.00
## 13 36496.53 28360.69 41121.16 37462.24 52879.12 52234.19 71390.24
## 14 35291.22 28020.53 35311.63 35826.13 37833.48 50550.15 79349.23
## 15 35428.75 28129.39 30375.17 35394.67 48964.41 39862.01 70000.00
## 16 33226.75 33399.32 29039.31 36309.54 37481.34 50846.02 83346.71
## 17 33273.35 28549.82 30498.00 33094.92 41174.27 45746.17 68160.50
## 18 28679.56 25526.67 26371.43 30778.98 47999.63 51619.92 76155.02
## 19 32600.57 37264.05 27872.00 41844.84 47579.47 51254.46 79159.32
## 20 37422.42 33335.38 41131.38 53005.54 75316.73 68678.42 114231.13
## 21 37563.21 33916.69 46794.33 46084.52 87597.25 43043.94 122511.95
## 22 41030.96 31334.70 31559.05 37856.19 44031.31 46031.16 70000.00
## 23 35632.59 34274.27 42833.67 42319.33 59872.11 58760.58 70000.00
## 24 26892.87 23028.20 23442.16 31470.80 40043.48 50685.82 71487.20
## 25 34923.54 30563.06 31238.71 37694.61 46360.27 44608.07 80141.11
## 26 30550.18 29237.04 31304.00 37752.38 62400.00 51482.28 70000.00
## 27 33270.75 31307.02 34652.80 36862.25 53461.62 53040.02 69841.07
## 28 33052.88 30586.52 35677.07 38168.68 40692.04 55706.44 70000.00
## 29 33455.73 33017.97 33840.74 39224.01 44848.72 48843.91 94046.13
## 30 33865.26 30653.76 48054.39 43404.10 100693.53 58852.81 151615.77
## 31 29683.25 26981.05 29356.36 35385.42 43050.63 57872.84 95591.55
## 32 42395.09 37996.07 46233.18 41853.03 96711.04 56043.48 132400.00
## 33 33251.57 64072.89 38162.53 37340.55 45947.73 44586.85 90023.81
## 34 35188.15 31351.19 22880.00 42068.53 37440.00 55313.07 70000.00
## 35 34935.28 28428.19 33540.00 36930.55 40543.22 43990.36 78478.70
## 36 30338.06 40289.08 27353.96 38068.76 57169.60 38439.32 70000.00
## 37 40959.13 36985.09 40814.69 42810.04 49999.91 56827.36 70000.00
## 38 37520.44 34965.65 32933.33 40573.77 50837.30 37408.55 79511.57
## 39 35757.28 38489.20 38964.96 49747.48 50962.21 45799.24 100904.99
## 40 30843.56 27627.10 30981.87 33289.54 49393.44 44785.83 69872.55
## 41 34162.40 34789.99 25584.00 35809.33 NA 59734.12 70000.00
## 42 30193.88 27204.84 31970.13 34101.78 37507.67 48245.12 73913.04
## 43 32966.72 34883.63 37748.65 37390.23 46567.94 53711.43 124040.68
## 44 33501.60 41992.84 29219.05 41317.87 40616.79 46489.00 84204.51
## 45 34257.13 33522.88 31824.00 38937.71 38632.66 44895.14 70000.00
## 46 39001.49 31450.87 37916.37 37691.97 54210.21 46455.11 97436.77
## 47 37844.27 45949.72 59749.21 47561.07 70947.51 66535.61 133237.22
## 48 29558.21 26180.67 25595.56 50980.44 39954.71 48788.30 70000.00
## 49 34245.01 31659.46 37972.19 37790.01 52392.63 47617.39 89747.04
## 50 31340.70 28531.22 36967.27 35295.05 29067.66 56456.66 111608.19
## nurses personalAssistant chiropractor physicalTherapist esthetician
## 1 77142.93 37188.45 52240.00 84701.90 70537.53
## 2 93287.17 71789.77 NA NA 46800.00
## 3 96804.47 63164.14 48969.24 72474.29 57341.11
## 4 94155.88 58256.43 27040.00 105091.49 31200.00
## 5 109663.21 81616.46 66114.29 119665.95 103267.23
## 6 80810.39 97059.37 88744.92 126647.08 73135.66
## 7 93541.25 72387.16 110800.00 94746.09 56806.93
## 8 140125.12 81009.05 77448.23 108218.35 59921.24
## 9 70882.47 63021.28 43714.67 121895.57 108863.92
## 10 86414.61 74680.26 73235.27 83653.12 130011.69
## 11 104022.25 80288.89 67600.00 93395.02 73329.12
## 12 87226.04 64921.25 57303.48 61957.53 39288.89
## 13 77275.47 60879.48 48276.06 81405.82 66162.15
## 14 67591.01 65131.82 54500.61 97900.98 70491.09
## 15 86950.27 57223.65 33410.78 NA 38763.64
## 16 80862.74 58658.78 35079.55 64148.98 42120.00
## 17 88171.80 71674.06 50667.34 102032.10 53391.68
## 18 101493.18 90495.41 32362.35 88661.31 36045.25
## 19 75599.48 75691.75 83228.11 79945.24 NA
## 20 102442.33 79972.02 55433.60 79068.23 73366.32
## 21 104496.51 69084.84 41066.36 124717.12 76594.42
## 22 83130.99 71654.30 95584.95 74306.54 67984.31
## 23 102836.31 82245.04 58628.06 111030.33 170101.84
## 24 98049.88 82156.66 57200.00 NA 35728.05
## 25 111130.44 62226.22 177267.19 79730.62 51708.12
## 26 87594.57 56010.64 46549.87 78815.73 18720.00
## 27 95854.09 53356.10 30550.00 91520.00 37440.00
## 28 106707.34 87334.98 91520.00 114400.00 82831.70
## 29 85161.59 72534.98 29120.00 100300.00 45965.35
## 30 89810.71 100145.46 72074.63 106217.88 176516.36
## 31 89638.92 78231.28 NA 94182.67 29120.00
## 32 94254.47 72670.69 88272.45 91762.34 142602.70
## 33 79943.38 63021.67 52370.85 73840.00 74554.00
## 34 98751.08 68103.53 130000.00 92330.54 38480.00
## 35 85240.61 59661.44 47801.72 83470.16 42333.61
## 36 74226.67 49121.13 40890.30 93487.00 91410.53
## 37 91822.88 49555.59 66786.27 98156.58 186735.66
## 38 83994.74 63545.17 58175.00 107360.58 82195.70
## 39 53302.31 84187.05 67032.73 90396.08 47226.23
## 40 82484.32 57387.44 67148.86 48561.73 64068.88
## 41 100370.21 83883.14 NA 92154.15 NA
## 42 77264.29 67789.67 39864.87 228800.00 39093.98
## 43 85120.18 62276.59 64992.46 92017.92 65039.00
## 44 91325.86 72161.99 52779.35 NA 54721.15
## 45 77217.10 97500.00 31200.00 89264.12 36400.00
## 46 100890.53 94765.28 60870.19 129903.61 75984.08
## 47 99337.10 85679.29 102289.85 94191.33 93151.70
## 48 69089.81 62952.33 68037.89 76854.29 41600.00
## 49 90267.31 61284.74 80015.22 93171.76 53854.13
## 50 98225.75 90506.65 98800.00 88390.28 31200.00
## medicalSpaEsthetician medicalDoctor yogaInstructor pilatesInstructor
## 1 57431.11 227862.64 100880.00 130000.00
## 2 63619.69 225220.39 NA NA
## 3 53716.57 101423.03 122514.48 118276.03
## 4 61923.84 175449.68 97825.00 130000.00
## 5 57236.59 144539.33 120256.72 120246.43
## 6 55006.96 108047.21 134562.65 138399.98
## 7 62195.41 135894.56 92761.91 124573.91
## 8 65520.00 186740.39 123857.31 128483.33
## 9 56701.67 144164.21 126579.42 121131.89
## 10 52272.60 178224.71 109324.41 116480.00
## 11 64935.00 216923.66 156000.00 156000.00
## 12 61823.78 200629.66 112293.73 121648.80
## 13 58897.12 111769.71 63254.65 45717.44
## 14 56208.15 156892.45 111308.28 123528.89
## 15 63577.14 161998.54 130000.00 125276.39
## 16 65520.00 111750.87 127120.74 130000.00
## 17 50886.37 195264.95 128800.00 120438.71
## 18 65520.00 221589.00 120640.00 130000.00
## 19 61758.90 274041.15 130000.00 130000.00
## 20 55889.89 122230.39 117420.41 114400.00
## 21 55448.60 97209.15 123490.37 125074.84
## 22 56327.19 175202.94 123003.18 111522.19
## 23 54482.62 77902.44 117880.16 119685.77
## 24 65520.00 169494.48 34862.61 47794.78
## 25 61945.88 112166.46 114846.57 127810.53
## 26 55953.88 173506.72 130000.00 130000.00
## 27 58622.20 149644.66 125467.89 130000.00
## 28 57753.19 168100.69 130000.00 130000.00
## 29 63772.60 142127.59 130000.00 130000.00
## 30 55782.24 95376.98 114444.49 110008.89
## 31 56739.67 157393.48 130000.00 130000.00
## 32 54139.64 132144.39 109810.91 116349.01
## 33 54199.08 116568.70 122103.70 122165.10
## 34 58500.00 186231.29 102544.00 130000.00
## 35 62601.29 169884.22 99703.93 77024.53
## 36 57397.83 139626.90 124093.10 110247.15
## 37 55216.23 204506.51 130000.00 130000.00
## 38 53329.55 171114.50 93704.52 84395.59
## 39 53712.94 116587.46 127012.98 125110.76
## 40 54673.61 200707.62 114016.84 130000.00
## 41 60320.00 204111.70 130000.00 130000.00
## 42 55925.02 196623.18 64979.84 130000.00
## 43 72470.95 174545.23 101293.81 99373.21
## 44 57308.24 168789.26 124518.92 122641.51
## 45 65520.00 211482.38 125484.21 130000.00
## 46 56788.54 171530.47 113862.27 119395.47
## 47 56480.69 135183.56 112315.78 117007.58
## 48 60160.94 203682.13 50831.46 58417.02
## 49 57581.33 164547.33 125054.90 125196.19
## 50 56984.39 217525.76 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 110 295 116 667
## 2 Alaska 85 120 106 276
## 3 Arizona 751 652 656 805
## 4 Arkansas 195 275 100 579
## 5 California 647 598 540 755
## 6 Colorado 708 576 607 768
## 7 Connecticut 737 649 355 775
## 8 Delaware 530 478 311 723
## 9 Florida 649 588 540 714
## 10 Georgia 354 418 337 613
## 11 Hawaii 280 165 123 646
## 12 Idaho 368 185 215 533
## 13 Illinois 512 462 521 635
## 14 Indiana 394 413 362 602
## 15 Iowa 357 287 186 437
## 16 Kansas 433 467 192 656
## 17 Kentucky 481 288 260 651
## 18 Louisiana 160 235 85 517
## 19 Maine 225 135 186 529
## 20 Maryland 781 690 713 774
## 21 Massachusetts 768 684 385 778
## 22 Michigan 689 563 570 711
## 23 Minnesota 604 539 608 670
## 24 Mississippi 123 230 71 593
## 25 Missouri 591 482 384 714
## 26 Montana 40 85 101 302
## 27 Nebraska 160 237 80 303
## 28 Nevada 713 570 409 662
## 29 New Hampshire 458 399 109 688
## 30 New Jersey 783 753 671 792
## 31 New Mexico 150 135 107 418
## 32 New York 595 468 328 751
## 33 North Carolina 627 521 387 713
## 34 North Dakota 60 75 49 250
## 35 Ohio 575 491 355 693
## 36 Oklahoma 348 339 251 621
## 37 Oregon 468 396 456 604
## 38 Pennsylvania 554 519 386 652
## 39 Rhode Island 626 673 186 770
## 40 South Carolina 496 514 233 701
## 41 South Dakota 35 75 46 218
## 42 Tennessee 383 436 222 639
## 43 Texas 555 586 498 682
## 44 Utah 617 481 417 568
## 45 Vermont 160 30 104 463
## 46 Virginia 609 602 325 617
## 47 Washington 715 554 613 652
## 48 West Virginia 120 120 67 451
## 49 Wisconsin 400 509 300 603
## 50 Wyoming 55 25 49 249
## yogaInstructor pilatesInstructor
## 1 83 95
## 2 24 NA
## 3 602 569
## 4 98 45
## 5 484 508
## 6 534 513
## 7 376 284
## 8 186 135
## 9 431 341
## 10 308 305
## 11 186 111
## 12 190 120
## 13 454 435
## 14 341 330
## 15 133 93
## 16 364 262
## 17 130 229
## 18 119 45
## 19 71 85
## 20 605 554
## 21 448 493
## 22 455 365
## 23 519 485
## 24 120 53
## 25 369 245
## 26 45 32
## 27 144 70
## 28 153 63
## 29 115 194
## 30 586 568
## 31 164 103
## 32 321 302
## 33 345 321
## 34 34 15
## 35 261 289
## 36 341 301
## 37 322 264
## 38 264 264
## 39 524 261
## 40 335 210
## 41 15 5
## 42 154 44
## 43 480 445
## 44 240 126
## 45 119 46
## 46 294 330
## 47 493 480
## 48 109 67
## 49 134 130
## 50 10 10
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 110 795 218 81
## 2 Alaska 85 782 125 72
## 3 Arizona 751 839 737 641
## 4 Arkansas 195 812 165 167
## 5 California 647 828 604 275
## 6 Colorado 708 814 572 529
## 7 Connecticut 737 803 635 122
## 8 Delaware 530 812 476 106
## 9 Florida 649 820 622 360
## 10 Georgia 354 729 376 289
## 11 Hawaii 280 797 285 96
## 12 Idaho 368 809 225 116
## 13 Illinois 512 832 487 297
## 14 Indiana 394 815 398 216
## 15 Iowa 357 805 135 91
## 16 Kansas 433 803 436 286
## 17 Kentucky 481 812 298 123
## 18 Louisiana 160 827 351 60
## 19 Maine 225 822 217 73
## 20 Maryland 781 849 696 566
## 21 Massachusetts 768 827 660 307
## 22 Michigan 689 826 581 372
## 23 Minnesota 604 833 607 443
## 24 Mississippi 123 814 318 137
## 25 Missouri 591 806 579 381
## 26 Montana 40 787 30 88
## 27 Nebraska 160 813 65 80
## 28 Nevada 713 826 641 376
## 29 New Hampshire 458 828 374 154
## 30 New Jersey 783 823 770 451
## 31 New Mexico 150 783 90 122
## 32 New York 595 815 559 284
## 33 North Carolina 627 807 587 191
## 34 North Dakota 60 811 70 60
## 35 Ohio 575 817 492 175
## 36 Oklahoma 348 828 275 184
## 37 Oregon 468 817 347 281
## 38 Pennsylvania 554 834 400 176
## 39 Rhode Island 626 820 610 170
## 40 South Carolina 496 830 541 219
## 41 South Dakota 35 799 20 84
## 42 Tennessee 383 808 470 244
## 43 Texas 555 816 565 433
## 44 Utah 617 789 598 231
## 45 Vermont 160 808 65 72
## 46 Virginia 609 742 568 412
## 47 Washington 715 828 689 407
## 48 West Virginia 120 825 90 85
## 49 Wisconsin 400 806 251 90
## 50 Wyoming 55 744 45 82
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] Alaska Georgia Louisiana Maine Oklahoma Wisconsin
## 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(),na.rm=TRUE)+
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)
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('./Yellow Pages Businesses/statesRates- chiropractor .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypWellness <- read.csv('./Yellow Pages Businesses/statesRates- wellness clinic .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypMassage <- read.csv('./Yellow Pages Businesses/statesRates- massage spa .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypYoga <- read.csv('./Yellow Pages Businesses/statesRates- yoga .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypGym <- read.csv('./Yellow Pages Businesses/statesRates- gym .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypCoffee <- read.csv('./Yellow Pages Businesses/statesRates- coffee .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypHealthFood <- read.csv('./Yellow Pages Businesses/statesRates- health food .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypHairSalon <- read.csv('./Yellow Pages Businesses/statesRates- hair salon .csv',
sep=',', header=TRUE, na.strings=c('',' ','NA'))
ypTanning <- read.csv('./Yellow Pages 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_10cityAverageHomeValue"
## [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.spa_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.I was booted from apartments.com due to so many downloads, but used a VPN that allowed me to take the average of the average, minimum, and maximum prices of up to ten cities that are the most populated cities (rather than the top 3 cities) with prices on aparmtnents.com. 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. This last file was modified to read in the listings if available of the top 10 most populated cities, as was the Zillow home value listings for 10 most populated cities, instead of for the 3 most populated as the original scripts were done.
apt2and2 <- read.csv('./Apartments 2BR/apts_2BR2BA_prices.csv',sep=',',
header=TRUE, na.strings=c('',' ','NA'))
head(apt2and2,10)
## state TwoBedroomApartment_Listings Rent2BR2BA_MinPrice Rent2BR2BA_MaxPrice
## 1 AK 66 1382.5932 1941.500
## 2 AL 426 1022.1418 1417.039
## 3 AR 251 941.7521 1349.355
## 4 AZ 784 1306.9599 1931.324
## 5 CA 750 2845.5311 4242.752
## 6 CO 573 1702.5426 2695.661
## 7 CT 169 2092.9752 3064.426
## 8 DE 324 1860.7382 3155.914
## 9 FL 773 1586.4987 2192.446
## 10 GA 602 1431.4512 2302.219
## Rent2BR2BA_AvgPrice
## 1 1520.576
## 2 1158.649
## 3 1073.659
## 4 1573.541
## 5 3420.428
## 6 2154.953
## 7 2410.745
## 8 2440.300
## 9 1835.624
## 10 1817.301
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'
colnames(apt2and2)[2:5] <- paste(colnames(apt2and2)[2:5],'_10cities')
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_10cityAverageHomeValue"
## [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.spa_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 _10cities"
## [116] "Rent2BR2BA_MinPrice _10cities"
## [117] "Rent2BR2BA_MaxPrice _10cities"
## [118] "Rent2BR2BA_AvgPrice _10cities"
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"
## [2] "Hours"
## [3] "MBLEX_or_NCBTMB"
## [4] "applicationCost"
## [5] "licensingCost"
## [6] "licenseRenewalFee"
## [7] "CEU"
## [8] "LMT_AvgJobsListed_IndeedFirst5pages"
## [9] "LMT_AnualAvgPayAdvertised_Indeed"
## [10] "median2018IncomeByState"
## [11] "total_state_population"
## [12] "percent_black"
## [13] "percent_white"
## [14] "percent_two_or_more"
## [15] "percent_Native_American"
## [16] "percent_Asian"
## [17] "percent_Pacific_Islander"
## [18] "percent_Latino"
## [19] "houseCleaner_jobsListed"
## [20] "houseCleaner_avgAnnualSalary"
## [21] "warehouse_jobsListed"
## [22] "warehouse_avgAnnualSalary"
## [23] "nanny_jobsListed"
## [24] "nanny_avgAnnualSalary"
## [25] "clerical_jobsListed"
## [26] "clerical_avgAnnualSalary"
## [27] "tutor_jobsListed"
## [28] "tutor_avgAnnualSalary"
## [29] "dataScientist_jobsListed"
## [30] "dataScientist_avgAnualSalary"
## [31] "personalAssistant jobsListed"
## [32] "personalAssistant avgAnualSalary"
## [33] "massage.spa_businessListings"
## [34] "yoga_businessListings"
## [35] "gym_businessListings"
## [36] "coffee_businessListings"
## [37] "health.food_businessListings"
## [38] "hair.salon_businessListings"
## [39] "tanning_businessListings"
## [40] "TwoBedroomApartment_Listings _10cities"
## [41] "Rent2BR2BA_MinPrice _10cities"
## [42] "Rent2BR2BA_MaxPrice _10cities"
## [43] "Rent2BR2BA_AvgPrice _10cities"
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 _10cities
## 5 CA 750
## 42 TN 448
## Rent2BR2BA_MinPrice _10cities Rent2BR2BA_MaxPrice _10cities
## 5 2845.531 4242.752
## 42 1263.932 1903.112
## Rent2BR2BA_AvgPrice _10cities
## 5 3420.428
## 42 1501.203
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,800))+
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,800))+
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 647 581 797 553 795 715
## 42 TN 383 527 775 321 753 614
## dataScientist personalAssistant
## 5 616 660
## 42 282 491
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 78109.19 38881.41 42898.79 59304.45 51926.93 83925.24
## 42 TN 56340.78 27787.93 30193.88 31970.13 34101.78 37507.67
## dataScientist personalAssistant
## 5 156667.22 81616.46
## 42 73913.04 67789.67
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)
This is surprising. Because when using only the top three cities to get the salary information and number of jobs available, the LMT pay was below median for CA. But now, the charts are saying that the LMT pay is actually at or above the median annual pay of TN and CA using 2018 values not injusted for 3% inflation each year.