Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

FIPS County Province _ State 2 5 0 0 1 Barnstable Massachusetts 2 5 0 0 3 Berkshire Massachusetts 2 5 0 0 5 Bristol

FIPS County Province_State25001 Barnstable Massachusetts25003 Berkshire Massachusetts25005 Bristol Massachusetts25007 Dukes Massachusetts25009 Essex Massachusetts25011 Franklin Massachusetts25013 Hampden Massachusetts25015 Hampshire Massachusetts25017 Middlesex Massachusetts25019 Nantucket Massachusetts25021 Norfolk Massachusetts25023 Plymouth Massachusetts25025 Suffolk Massachusetts25027 Worcester Massachusetts34001 Atlantic New Jersey34003 Bergen New Jersey34005 Burlington New Jersey34007 Camden New Jersey34009 Cape May New Jersey34011 Cumberland New Jersey34013 Essex New Jersey34015 Gloucester New Jersey34017 Hudson New Jersey34019 Hunterdon New Jersey34021 Mercer New Jersey34023 Middlesex New Jersey34025 Monmouth New Jersey34027 Morris New Jersey34029 Ocean New Jersey34031 Passaic New Jersey34033 Salem New Jersey34035 Somerset New Jersey34037 Sussex New Jersey34039 Union New Jersey34041 Warren New Jersey36001 Albany New York36003 Allegany New York36005 Bronx New York36007 Broome New York36009 Cattaraugus New York36011 Cayuga New York36013 Chautauqua New York36015 Chemung New York36017 Chenango New York
36019 Clinton New York36021 Columbia New York36023 Cortland New York36025 Delaware New York36027 Dutchess New York36029 Erie New York36031 Essex New York36033 Franklin New York36035 Fulton New York36037 Genesee New York36039 Greene New York36041 Hamilton New York36043 Herkimer New York36045 Jefferson New York36047 Kings New York36049 Lewis New York36051 Livingston New York36053 Madison New York36055 Monroe New York36057 Montgomery New York36059 Nassau New York36061 New York New York36063 Niagara New York36065 Oneida New York36067 Onondaga New York36069 Ontario New York36071 Orange New York36073 Orleans New York36075 Oswego New York36077 Otsego New York36079 Putnam New York36081 Queens New York36083 Rensselaer New York36085 Richmond New York36087 Rockland New York36089 St. Lawrence New York36091 Saratoga New York36093 Schenectady New York36095 Schoharie New York36097 Schuyler New York36099 Seneca New York36101 Steuben New York36103 Suffolk New York36105 Sullivan New York36107 Tioga New York
36109 Tompkins New York36111 Ulster New York36113 Warren New York36115 Washington New York36117 Wayne New York36119 Westchester New York36121 Wyoming New York06123 Yates New Y The workbook has 2 worksheets:1. FIPS: for each county the worksheet has the following information: FIPS: a unique five-character string to identify each county in each state State County 2. Main: it has a wide table about the GDP of each county in each year. For example, thehighlighted cell shows the GDP of county 25001 in year 2001 Open V2.xlsx.
The workbook has 2 worksheets:
1. FIPS: for each county the worksheet has the following information:
FIPS: a unique five-character string to identify each county in each state
State
County
2. Main: it has a wide table about the GDP of each county in each year. For example, the highlighted cell shows the GDP of county 25001 in year 2001.
Figure 1
Task 1:
Convert data in worksheet Main from its wide form to long form using Power Query. After conversion, the structure of the long table should be:
Figure 2
During conversion, please make sure that FIPS is converted as text/string (such as 01001), not as number (such as 1001). Change column names in the converted long table as in figure above.
Power Query export the long table to a new worksheet in your workbook. Rename this worksheet as Tasks1_2.
Task 2:
Open Tasks1_2. Right now, it has 3 columns as shown in Figure 2. Add the following two columns:
State: use vlookup function to retrieve state names from worksheet FIPS based on FIPS.
County: use vlookup function to retrieve county names from worksheet FIPS based on FIPS.
Note that for each vlookup function, its fourth parameter needs to be False as the match is an exact match. After task 2 is finished, worksheet Tasks1_2 has a structure as in Figure 3:
Note that for each vlookup function, its fourth parameter needs to be False as the match is an exactmatch. After task 2 is finished, worksheet Tasks1_2 has a structure as in Figure 3:Year FIPS GDP State County20012500111078518 Massachusetts Barnstable2001250035777869 Massachusetts Berkshire20012500520007712 Massachusetts Bristol2001250071198038 Massachusetts Dukes20012500931790091 Massachusetts Essex2001250112604606 Massachusetts Frankli

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

Step: 3

blur-text-image

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

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions

Question

16. What makes them unique? (special features of the group)

Answered: 1 week ago