Hello,
I am conducting data analysis at the county level. One of the datasets I am using simply writes “(All Counties)” under the “County Variable.” This is problematic as I am calculating the HHI at the county level. Further below are two tables - Table 1 shows the current dataset, and Table 2 shows what I would like it to look like.
Does anyone have advice on the code I use to make the data look like the Table below? I can pull the counties by state from U.S. Census Bureau.
Table 1. Current Dataset
Table 2. What the Data Needs to Look Like
I am conducting data analysis at the county level. One of the datasets I am using simply writes “(All Counties)” under the “County Variable.” This is problematic as I am calculating the HHI at the county level. Further below are two tables - Table 1 shows the current dataset, and Table 2 shows what I would like it to look like.
Does anyone have advice on the code I use to make the data look like the Table below? I can pull the counties by state from U.S. Census Bureau.
Table 1. Current Dataset
State | County |
Alabama | (All Counties) |
Table 2. What the Data Needs to Look Like
State | County |
Alabama | Autauga County |
Alabama | Baldwin County |
Alabama | Barbour County |
Alabama | Bibb County |
Alabama | Blount County |
Comment