Takes in a city/state and outputs demographic data from the Missouri Census Data Center

getCensus(cities, radius)

Arguments

cities

list of cities to be passed

radius

numeric number used to create a boundary around the city coordinates

Value

Data frame containing demographic data

Examples

radius <- 5 cities <- c("Boston", "Los Angeles") df <- getCensus(cities, radius)
#> Information from URL : http://maps.googleapis.com/maps/api/geocode/json?address=Boston&sensor=false
#> Information from URL : http://maps.googleapis.com/maps/api/geocode/json?address=Los%20Angeles&sensor=false
head(df)
#> sitename radius Longitude Latitude IntPtLat IntPtLon LandSQMI #> 1 Boston 5 -71.0588801 42.3600825 42.361284 -71.079490 60.93 #> AreaSQMI TotPopsf1 vintage period TotPop Age0_4 pctAge0_4 Age5_9 pctAge5_9 #> 1 71.55 889,685 2015 5yr 924,825 49,583 5.4 38,604 4.2 #> Age10_14 pctAge10_14 Age15_19 pctAge15_19 Age20_24 pctAge20_24 Age25_34 #> 1 36,005 3.9 63,638 6.9 110,324 11.9 224,856 #> pctAge25_34 Age35_44 pctAge35_44 Age45_54 pctAge45_54 Age55_59 pctAge55_59 #> 1 24.3 118,911 12.9 99,436 10.8 45,281 4.9 #> Age60_64 pctAge60_64 Age65_74 pctAge65_74 Age75_84 pctAge75_84 Over85 #> 1 40,181 4.3 54,130 5.9 29,803 3.2 14,073 #> pctOver85 MedianAge Over5 pctOver5 Over15 pctOver15 Under18 pctUnder18 #> 1 1.5 32.6 875,242 94.6 800,633 86.6 146,803 15.9 #> Over18 pctOver18 Over21 pctOver21 Over25 pctOver25 Over62 pctOver62 #> 1 778,022 84.1 710,782 76.9 626,671 67.8 121,671 13.2 #> Over65 pctOver65 Males pctMales Over18Males pctOver18Males Over65Males #> 1 98,006 10.6 448,563 48.5 374,458 83.5 40,285 #> pctOver65Males Females pctFemales Over18Females pctOver18Females #> 1 9.0 476,262 51.5 403,564 84.7 #> Over65Females pctOver65Females OneRace pctOneRace White1 pctWhite1 Black1 #> 1 57,721 12.1 873,080 94.4 571,518 61.8 139,878 #> pctBlack1 Indian1 pctIndian1 Asian1 pctAsian1 HawnPI1 pctHawnPI1 Other1 #> 1 15.1 2,432 0.3 103,370 11.2 233 0.0 55,649 #> pctOther1 MultiRace pctMultiRace White2 pctWhite2 Black2 pctBlack2 Indian2 #> 1 6.0 51,745 5.6 618,302 66.9 174,387 18.9 7,053 #> pctIndian2 Asian2 pctAsian2 HawnPI2 pctHawnPI2 Other2 pctOther2 HispanicPop #> 1 0.8 113,981 12.3 1,419 0.2 63,571 6.9 166,293 #> pctHispanicPop NonHispPop pctNonHispPop NonHispWhite pctNonHispWhite #> 1 18.0 758,532 82.0 494,169 53.4 #> NonHispBlack pctNonHispBlack NonHispAmInd pctNonHispAmInd NonHispAsian #> 1 126,526 13.7 1,201 0.1 102,739 #> pctNonHispAsian NonHispHawnPI pctNonHispHawnPI TotHHs HHInc0 pctHHInc0 #> 1 11.1 186 0.0 368,235 39,104 10.6 #> HHInc10 pctHHInc10 HHInc15 pctHHInc15 HHInc25 pctHHInc25 HHInc35 pctHHInc35 #> 1 23,794 6.5 31,755 8.6 26,514 7.2 37,869 10.3 #> HHInc50 pctHHInc50 HHInc75 pctHHInc75 HHInc100 pctHHInc100 HHInc150 #> 1 55,999 15.2 40,355 11.0 55,411 15.0 24,949 #> pctHHInc150 HHInc200 pctHHInc200 NumHHEarnings pctNumHHEarnings NumHHSocSec #> 1 6.8 32,485 8.8 294,935 80.1 74,050 #> pctNumHHSocSec NumHHRetInc pctNumHHRetInc NumHHSuppSecInc pctNumHHSuppSecInc #> 1 20.1 32,392 8.8 24,723 6.7 #> NumHHPubAssist pctNumHHPubAssist NumHHFoodStmp pctNumHHFoodStmp MedianHHInc #> 1 12,103 3.3 58,978 16.0 $65,170 #> AvgHHInc AvgHHEarnings AvgHHSocSec AvgHHRetInc AvgHHSuppSecInc AvgHHPubAssist #> 1 $90,171 $96,409 $15,345 $25,427 $9,160 $4,483 #> FamHHs pctFamHHs FamHHInc0 pctFamHHInc0 FamHHInc10 pctFamHHInc10 FamHHInc15 #> 1 173,399 47.1 12,247 7.1 7,393 4.3 14,598 #> pctFamHHInc15 FamHHInc25 pctFamHHInc25 FamHHInc35 pctFamHHInc35 FamHHInc50 #> 1 8.4 13,778 7.9 19,056 11.0 25,692 #> pctFamHHInc50 FamHHInc75 pctFamHHInc75 FamHHInc100 pctFamHHInc100 FamHHInc150 #> 1 14.8 19,227 11.1 27,348 15.8 13,244 #> pctFamHHInc150 FamHHInc200 pctFamHHInc200 MedianFamInc AvgFamInc PCI #> 1 7.6 20,816 12.0 $78,456 $105,292 $37,848 #> NonFamHHs pctNonFamHHs MedianNonFamInc AvgNonFamInc FullTimeWorkers #> 1 194,836 52.9 $53,963 $74,260 335,832 #> FullTimeWorkersMale pctFullTimeWorkersMale FullTimeWorkersFemale #> 1 184,025 54.8 151,807 #> pctFullTimeWorkersFemale MedianEarnings MedianEarningsMale #> 1 45.2 $38,242 $56,833 #> MedianEarningsFemale PovUniverse Poor pctPoor PovUniverseUnder18 #> 1 $51,385 864,770 169,657 19.6 145,090 #> PoorUnder18 pctPoorUnder18 PovUniverse18_64 Poor18to64 pctPoor18to64 #> 1 38,739 26.7 624,514 113,828 18.2 #> PovUniverseOver65 PoorOver65 pctPoorOver65 PovUniverseFamilyPop #> 1 95,166 17,090 18.0 537,983 #> pctFamilyPopPoor PovUniverseUnrelated PoorInFamily pctPoorInFamily #> 1 62.2 326,787 83,253 15.5 #> PoorFamilies pctPoorFamilies PoorUnrelated pctPoorUnrelated PovRatioUnderHalf #> 1 25,542 14.7 86,404 26.4 89,812 #> pctPovRatioUnderHalf PovRatiov5tov99 pctPovRatiov5tov99 PovRatio1to2 #> 1 10.4 79,845 9.2 143,584 #> pctPovRatio1to2 PovRatioOver2 pctPovRatioOver2 Over16 LaborForce #> 1 16.6 551,529 63.8 793,322 549,737 #> pctLaborForce CivLabForce pctCivLabForce EmployedCLF pctEmployedCLF #> 1 69.3 549,000 69.2 506,771 92.3 #> UnemployedCLF pctUnemployedCLF Military pctMilitary NotInLF pctNotInLF #> 1 42,229 7.7 737 0.1 243,585 30.7 #> Over16Females pctOver16Females LaborForceFemales pctLaborForceFemales #> 1 411,162 51.8 269,847 34.0 #> CivLabForceFemales pctCivLabForceFemales EmployedFemales pctEmployedFemales #> 1 269,752 34.0 249,443 92.5 #> OwnKidsUnder6 OwnKidsU6AllPrntsWk pctOwnKidsU6AllPrntsWk OwnKidsOver6 #> 1 56,670 39,254 69.3 83,805 #> OwnKidsO6AllPrntsWk pctOwnKidsO6AllPrntsWk Worker16 Commuters pctCommuters #> 1 61,050 72.8 496,646 476,790 96.0 #> DriveAlone pctDriveAlone Carpool pctCarpool PublicTrans pctPublicTrans #> 1 186,116 37.5 32,572 6.6 159,924 32.2 #> WalkToWork pctWalkToWork OtherCommute pctOtherCommute WorkAtHome #> 1 78,091 15.7 20,087 4.0 19,856 #> pctWorkAtHome AvgCommute ManProfOccs pctManProfOccs ServiceOccs #> 1 4.0 29.0 256,980 50.7 95,996 #> pctServiceOccs SalesOffOccs pctSalesOffOccs FarmFishOccs pctFarmFishOccs #> 1 18.9 98,116 19.4 539 0.1 #> ConsOccs pctConsOccs TransOccs pctTransOccs Agriculture pctAgriculture #> 1 20,622 4.1 34,518 6.8 642 0.1 #> Construction pctConstruction Manufacturing pctManufacturing WholesaleTrade #> 1 16,954 3.3 27,861 5.5 8,787 #> pctWholesaleTrade RetailTrade pctRetailTrade Transportation pctTransportation #> 1 1.7 40,180 7.9 16,455 3.2 #> Information pctInformation Finance_Ins pctFinance_Ins Professional #> 1 13,142 2.6 42,155 8.3 89,224 #> pctProfessional Educ_Health_SocSvcs pctEduc_Health_SocSvcs RecreationEtc #> 1 17.6 155,952 30.8 55,596 #> pctRecreationEtc OtherIndustries pctOtherIndustries PublicAdmin #> 1 11.0 23,329 4.6 16,494 #> pctPublicAdmin PrivWageWorkers pctPrivWageWorkers GovWorkers pctGovWorkers #> 1 3.3 435,819 86.0 45,828 9.0 #> SelfEmpWorkers pctSelfEmpWorkers UnpaidFamWorkers pctUnpaidFamWorkers #> 1 24,622 4.9 502 0.1 #> TotPopNonInst NonInstUnder65 pctNonInstUnder65 NotInsuredUnder65 #> 1 918,300 823,134 89.6 44,210 #> pctNotInsuredUnder65 PublicInsuranceUnder65 pctPublicInsuranceUnder65 #> 1 5.4 226,767 27.5 #> PrivateInsuranceOnlyUnder65 pctPrivateInsuranceOnlyUnder65 NonInstUnder18 #> 1 577,957 70.2 146,601 #> pctNonInstUnder18 NotInsuredUnder18 pctNotInsuredUnder1 Families pctFamilies #> 1 16.0 2,406 0.0 173,399 47.1 #> FamsWithKids pctFamsWithKids MarriedCouples pctMarriedCouples CouplesWithKids #> 1 76,285 20.7 108,793 29.5 43,778 #> pctCouplesWithKids SingleMaleFamilies pctSingleMaleFamilies SingleFathers #> 1 11.9 14,590 4.0 5,317 #> pctSingleFathers SingleFemaleFamilies pctSingleFemaleFamilies SingleMothers #> 1 1.4 50,016 13.6 27,190 #> pctSingleMothers LivingAlone pctLivingAlone Over65Alone pctOver65Alone #> 1 7.4 134,148 70.0 37,574 19.3 #> HHsWithKids pctHHsWithKids HHsWithElders pctHHsWithElders AvgHHSize #> 1 83,960 22.8 74,391 20.2 2.33 #> AvgFamSize HHPop pctHHPop FamHHpop pctFamHHpop NonFamHHpop pctNonFamHHpop #> 1 3.10 859,058 96.1 558,636 65.0 300,422 35.0 #> GrpQuarters pctGrpQuarters Householder pctHouseholder Spouse pctSpouse #> 1 65,767 7.1 368,235 42.9 108,807 12.7 #> Child pctChild OtherRelative pctOtherRelative NonRelative pctNonRelative #> 1 196,203 22.8 59,574 6.9 126,239 14.7 #> UnmarriedPartner pctUnmarriedPartner UMPartnerHHsPerK NeverMarried #> 1 28,430 3.3 77 434,889 #> pctNeverMarried Married pctMarried Separated pctSeparated Widowed pctWidowed #> 1 54.3 254,708 31.8 19,435 2.4 31,340 3.9 #> Divorced pctDivorced Women15to50 UnmarriedWomen15to50 pctUnmarriedWomen15to50 #> 1 60,261 7.5 293,100 208,750 71.2 #> WomenGivingBirth pctWomenGivingBirth UnmarriedGivingBirth #> 1 11,879 4.0 4,033 #> pctUnmarriedGivingBirth Women15to19 pctWomen15to19 Women20to34 pctWomen20to34 #> 1 34.0 372 3.1 7,927 66.7 #> Women35to50 pctWomen35to50 UnmarriedGivingBirthPerk GivingBirthPerk #> 1 3,580 30.1 19 40 #> BirthRate15_19 BirthRate20_34 BirthRate35_50 GrandPrntsLvngWithGrndkid #> 1 183 98 87 14,125 #> GrandPrntsCaring pctGrandPrntsCaring GrandPrntsCaringLT1 #> 1 3,819 27.0 710 #> pctGrandPrntsCaringLT1 GrandPrntsCaring1or2 pctGrandPrntsCaring1or2 #> 1 18.6 940 24.6 #> GrandPrntsCaring3or4 pctGrandPrntsCaring3or4 GrandPrntsCaring5orMore #> 1 620 16.2 1,549 #> pctGrandPrntsCaring5orMore Over3 EnrolledOver3 pctEnrolledOver3 InNursery #> 1 40.6 895,081 272,550 30.4 12,168 #> pctInNursery InKindergarten pctInKindergarten InElementary pctInElementary #> 1 4.5 10,651 3.9 58,463 21.4 #> InHighSchool pctInHighSchool InCollege pctInCollege LessThan9th #> 1 30,459 11.2 160,809 59.0 49,093 #> pctLessThan9th SomeHighSchool pctSomeHighSchool HighSchool pctHighSchool #> 1 7.8 38,341 6.1 128,396 20.5 #> SomeCollege pctSomeCollege Associates pctAssociates Bachelors pctBachelors #> 1 76,058 12.1 25,327 4.0 155,508 24.8 #> GradProf pctGradProf HighSchoolOrMore pctHighSchoolOrMore Bachelorsormore #> 1 153,948 24.6 539,237 86.0 309,456 #> pctBachelorsormore Civilian pctCivilian Veteran pctVeteran Disabled #> 1 49.4 777,285 99.9 24,505 3.2 97,674 #> pctDisabled DisabledUnder18 pctDisabledUnder18 NonInst18_64 pctNonInst18_64 #> 1 10.6 6,820 4.7 676,533 73.7 #> Disabled18_64 pctDisabled18_64 NonInstOver65 pctNonInstOver65 DisabledElder #> 1 54,318 8.0 95,166 10.4 36,536 #> pctDisabledElder Over1 SameHouse pctSameHouse DiffHouse pctDiffHouse #> 1 38.4 914,118 718,917 78.7 172,844 18.9 #> DiffHouseSameCounty pctDiffHouseSameCounty DiffCounty pctDiffCounty #> 1 90,985 52.6 81,859 47.4 #> DiffCntySameState pctDiffCntySameState DiffState pctDiffState LivedAbroad #> 1 40,344 23.3 41,515 24.0 22,357 #> pctLivedAbroad USNative pctUSNative BornInUS pctBornInUS BornInCurrState #> 1 2.4 652,799 70.6 626,250 95.9 392,364 #> pctBornInCurrState BornInDiffState pctBornInDiffState BornAbroad #> 1 62.7 233,886 37.3 26,549 #> pctBornAbroad ForeignBorn pctForeignBorn Naturalized pctNaturalized #> 1 4.1 272,026 34.6 113,671 41.8 #> NonCitizen pctNonCitizen BornOutsideUS pctBornOutsideUS BornOutsideUSNative #> 1 158,355 58.2 298,575 32.3 26,549 #> pctBornOutsideUSNative NativeEnteredGE2000 pctNativeEnteredGE2000 #> 1 8.9 50,168 179.7 #> NativeEnteredLT2000 pctNativeEnteredLT2000 FBEnteredGE2000 pctFBEnteredGE2000 #> 1 16,744 63.1 142,385 52.3 #> FBEnteredLT2000 pctFBEnteredLT2000 FBMinusSea pctFBMinusSea FBEurope #> 1 129,641 47.7 272,026 29.4 40,359 #> pctFBEurope FBAsia pctFBAsia FBAfrica pctFBAfrica FBOceania pctFBOceania #> 1 14.8 80,273 29.5 27,516 10.1 1,096 0.4 #> FBLatinAmerica pctFBLatinAmerica FBNorthAmerica pctFBNorthAmerica EnglishOnly #> 1 117,743 43.3 5,039 1.9 533,394 #> pctEnglishOnly OthLang pctOthLang OthLangEnglishLTD pctOthLangEnglishLTD #> 1 60.9 341,848 39.1 154,835 45.3 #> Spanish pctSpanish SpanishEnglishLTD pctSpanishEnglishLTD TotHUs OccHUs #> 1 136,017 15.5 65,849 48.4 398,624 368,235 #> pctOccHUs OwnerOcc pctOwnerOcc RenterOcc pctRenterOcc AvgOwnerHHSize #> 1 92.4 124,780 33.9 243,455 66.1 2.44 #> AvgRenterHHSize VacHUs pctVacHUs VacantForSale pctVacantForSale VacantForRent #> 1 2.28 30,389 7.6 1,308 4.3 8,042 #> pctVacantForRent VacantSeasonal pctVacantSeasonal TotalOwnerUnits #> 1 26.5 4,665 15.4 126,088 #> OwnerVacRate TotalRentalUnits RenterVacRate PersonsInOwnerUnits #> 1 1.0 251,497 3.2 304,327 #> pctPersonsInOwnerUnits PersonsInRenterUnits pctPersonsInRenterUnits Units1 #> 1 32.9 554,731 60.0 64,158 #> pctUnits1 Units1Detached pctUnits1Detached Units1Attached pctUnits1Attached #> 1 16.1 39,488 61.5 24,670 38.5 #> Units2 pctUnits2 Units3_4 pctUnits3_4 Units5_9 pctUnits5_9 Units10_19 #> 1 63,187 15.9 96,125 24.1 44,327 11.1 29,829 #> pctUnits10_19 Units20up pctUnits20up MobileHomes pctMobileHomes BoatRV #> 1 7.5 100,389 25.2 404 0.1 205 #> pctBoatRV MobileHomesPerK Built2010orLater pctBuilt2010orLater Built2000_2009 #> 1 0.1 1 3,683 0.9 28,363 #> pctBuilt2000_2009 Built1990_1999 pctBuilt1990_1999 Built1980_1989 #> 1 7.1 14,195 3.6 25,860 #> pctBuilt1980_1989 Built1970_1979 pctBuilt1970_1979 Built1960_1969 #> 1 6.5 31,233 7.8 28,680 #> pctBuilt1960_1969 Built1950_1959 pctBuilt1950_1959 Built1940_1949 #> 1 7.2 22,905 5.7 21,128 #> pctBuilt1940_1949 BuiltBefore1940 pctBuiltBefore1940 MovedIn2010orLater #> 1 5.3 222,577 55.8 161,276 #> pctMovedIn2010orLater MovedIn2000_2009 pctMovedIn2000_2009 MovedIn1990_1999 #> 1 43.8 125,228 34.0 39,865 #> pctMovedIn1990_1999 MovedIn1980_1989 pctMovedIn1980_1989 MovedInBefore1980 #> 1 10.8 18,589 5.0 23,277 #> pctMovedInBefore1980 NoVehicles pctNoVehicles Vehicles1 pctVehicles1 #> 1 6.3 119,941 32.6 164,439 44.7 #> Vehicles2 pctVehicles2 VehiclesGE3 pctVehiclesGE3 HHFUtilGas pctHHFUtilGas #> 1 66,966 18.2 16,889 4.6 211,982 57.6 #> HHFLPGas pctHHFLPGas HHFElectric pctHHFElectric HHFKerosene pctHHFKerosene #> 1 7,849 2.1 89,700 24.4 52,659 14.3 #> HHFCoal pctHHFCoal HHFWood pctHHFWood HHFSolar pctHHFSolar HHFOther #> 1 171 0.0 270 0.1 177 0.0 1,834 #> pctHHFOther HHFNoFuel pctHHFNoFuel NoPlumbing pctNoPlumbing NoKitchen #> 1 0.5 3,593 1.0 1,449 0.4 3,153 #> pctNoKitchen NoPhone pctNoPhone PersonsPerRoomLow pctPersonsPerRoomLow #> 1 0.9 8,711 2.4 356,109 96.7 #> PersonsPerRoomMedium pctPersonsPerRoomMedium PersonsPerRoomHigh #> 1 7,686 2.1 4,440 #> pctPersonsPerRoomHigh HvalUnder50 pctHvalUnder50 Hval50 pctHval50 Hval100 #> 1 1.2 2,252 1.8 897 0.7 2,202 #> pctHval100 Hval150 pctHval150 Hval200 pctHval200 Hval300 pctHval300 Hval500 #> 1 1.8 4,706 3.8 18,535 14.9 49,032 39.3 34,392 #> pctHval500 HvalOverMillion pctHvalOverMillion HvalOver2Million #> 1 27.6 9,049 7.3 3,715 #> pctHvalOver2Million MedianHValue AvgHValue HUsMort pctHUsMort #> 1 3.0 $488,785 $566,283 89,386 71.6 #> HUsMortOver30Pct pctHUsMortOver30Pct MedianOwnerCostsMort HUsNoMort #> 1 34,713 38.8 $2,396 35,394 #> pctHUsNoMort HUsNoMortOver30Pct pctHUsNoMortOver30Pct MedianOwnerCostsNoMort #> 1 28.4 8,122 22.9 $900 #> CashRenter pctCashRenter NoCashRenter pctNoCashRenter MedianGrossRent #> 1 238,921 98.1 4,534 1.9 $1,402 #> AvgGrossRent CashRenterOver30Pct pctCashRenterOver30Pct CashRenterOver750 #> 1 $1,424 115,760 47.5 165,203 #> pctCashRenterOver750 pctNotInsuredUnder18 #> 1 67.9 1.6 #> [ reached getOption("max.print") -- omitted 1 row ]