Merge the population data with your main dataset
Ask Expert

Be Prepared For The Toughest Questions

Practice Problems

Merge the population data with your main dataset

Part 4: Census Data

Get Census Data

census_api_key("aa512886c5449a582d837da8d3a07af66a043fe5", install=TRUE, overwrite=T)

[1] "aa512886c5449a582d837da8d3a07af66a043fe5"

censusData = load_variables(2018, "acs5", cache=T)

Download Popultation Data from the Census

populationData = get_acs(geography = "zcta",

variables = 'B01003_001',

geometry = FALSE)

Remove the spurious “ZCTA5” in front of ZIP codes

populationData$mod_zcta = sub("ZCTA5 ", "", populationData$NAME)

Rename the Population Column and Clean Up Your Dataframe

• The population number is given in a column called “estimate.” Rename that column with a more explicit name, such as “population”

populationData =

populationData %>%

rename(population = estimate)

Question 9: Merge the population data with your main dataset

Question 10: Now that you have, for each ZIP code, their counts of ED visits and their populations, create a column that reports the rate of Emergency visits per inhabitant

Hint
ComputerA census is a survey conducted on the full set of observation objects belonging to a given population or universe.  A census is the complete enumeration of a population or groups at a point in time with respect to well defined characteristics: for example, population, production, traffic on particular roads....

Know the process

Students succeed in their courses by connecting and communicating with
an expert until they receive help on their questions

1
img

Submit Question

Post project within your desired price and deadline.

2
img

Tutor Is Assigned

A quality expert with the ability to solve your project will be assigned.

3
img

Receive Help

Check order history for updates. An email as a notification will be sent.

img
Unable to find what you’re looking for?

Consult our trusted tutors.

Developed by Versioning Solutions.