Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4 Data exploration and manipulation The task is to explore the US census population estimates by county for 2015 from the package usmap (load the

4 Data exploration and manipulation

The task is to explore the US census population estimates by county for 2015 from the package usmap (load the data frame from countypop.RData). The data frame has 3142 rows and 4 variables: fips is the 5-digit FIPS code corresponding to the county; abbr is the 2-letter state abbreviation; county is the full county name; pop_2015 is the 2015 population estimate (in number of people) for the corresponding county. Each row of the data frame represents a different county or a county equivalent. For the sake of simplicity, when we say a county, that also includes a county equivalent and when we say a state, that also includes the District of Columbia. Answer the following questions.

  1. Remove all the rows that contain at least one NA (1 point).
  2. How many unique 2-letter state abbreviations are there (1 point)?
  3. What is the total number of counties in the US (2 point)?
  4. How many unique county names are there (1 point)?
  5. What are the top 10 most common county names (1 point)?
  6. Which state has the largest number of counties? Which state has the smallest number of counties (1 point)?
  7. What is the average population of a county in the US (1 point)?
  8. Which state has the largest county in terms of population? How many people live in the largest county in terms of population (2 points)?
  9. What is the largest county in terms of population of each of the states (2 points)?
  10. What is the average population of the 100 largest counties in the US (2 points)?
  11. How many people live in each of the states (2 points)?
  12. What is the average population of a county in California (1 point)?

can you provide R code with dplyr function and without dplyr function? thank you.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Management Science The Art Of Modeling With Spreadsheets

Authors: Stephen G. Powell, Kenneth R. Baker

4th Edition

978-1118517376, 9781118800348, 1118517377, 1118800346, 978-1118582695

More Books

Students also viewed these Mathematics questions

Question

An improvement in the exchange of information in negotiations.

Answered: 1 week ago

Question

1. Effort is important.

Answered: 1 week ago