State
stringclasses
50 values
State_Code
stringclasses
50 values
County
stringlengths
3
21
County_Code
stringlengths
5
5
Year
int64
2k
2.02k
Population
int64
0
10.1M
Deaths
int64
0
705
Original
bool
2 classes
State_Mortality_Rate
float32
0
0
County_Mortality_Rate
float32
0
0
Alabama
AL
AUTAUGA
01001
2,003
46,800
2
false
0.00006
0.000043
Alabama
AL
AUTAUGA
01001
2,004
48,366
3
false
0.000065
0.000062
Alabama
AL
AUTAUGA
01001
2,005
49,676
3
false
0.000065
0.00006
Alabama
AL
AUTAUGA
01001
2,006
51,328
4
false
0.000084
0.000078
Alabama
AL
AUTAUGA
01001
2,007
52,405
6
false
0.000115
0.000114
Alabama
AL
AUTAUGA
01001
2,008
53,277
6
false
0.000131
0.000113
Alabama
AL
AUTAUGA
01001
2,009
54,135
6
false
0.000128
0.000111
Alabama
AL
AUTAUGA
01001
2,010
54,761
6
false
0.00011
0.00011
Alabama
AL
AUTAUGA
01001
2,011
55,229
6
false
0.000121
0.000109
Alabama
AL
AUTAUGA
01001
2,012
54,970
6
false
0.000123
0.000109
Alabama
AL
AUTAUGA
01001
2,013
54,747
7
false
0.000139
0.000128
Alabama
AL
AUTAUGA
01001
2,014
54,922
8
false
0.000162
0.000146
Alabama
AL
AUTAUGA
01001
2,015
54,903
8
false
0.000164
0.000146
Alabama
AL
BALDWIN
01003
2,003
151,509
10
true
0.00006
0.000066
Alabama
AL
BALDWIN
01003
2,004
156,266
18
true
0.000065
0.000115
Alabama
AL
BALDWIN
01003
2,005
162,183
14
true
0.000065
0.000086
Alabama
AL
BALDWIN
01003
2,006
168,121
11
true
0.000084
0.000065
Alabama
AL
BALDWIN
01003
2,007
172,404
24
true
0.000115
0.000139
Alabama
AL
BALDWIN
01003
2,008
175,827
19
true
0.000131
0.000108
Alabama
AL
BALDWIN
01003
2,009
179,406
29
true
0.000128
0.000162
Alabama
AL
BALDWIN
01003
2,010
183,121
24
true
0.00011
0.000131
Alabama
AL
BALDWIN
01003
2,011
186,579
23
true
0.000121
0.000123
Alabama
AL
BALDWIN
01003
2,012
190,203
24
true
0.000123
0.000126
Alabama
AL
BALDWIN
01003
2,013
194,978
20
true
0.000139
0.000103
Alabama
AL
BALDWIN
01003
2,014
199,306
32
true
0.000162
0.000161
Alabama
AL
BALDWIN
01003
2,015
203,101
40
true
0.000164
0.000197
Alabama
AL
BARBOUR
01005
2,003
28,594
1
false
0.00006
0.000035
Alabama
AL
BARBOUR
01005
2,004
28,287
1
false
0.000065
0.000035
Alabama
AL
BARBOUR
01005
2,005
28,027
1
false
0.000065
0.000036
Alabama
AL
BARBOUR
01005
2,006
27,861
2
false
0.000084
0.000072
Alabama
AL
BARBOUR
01005
2,007
27,757
3
false
0.000115
0.000108
Alabama
AL
BARBOUR
01005
2,008
27,808
3
false
0.000131
0.000108
Alabama
AL
BARBOUR
01005
2,009
27,657
3
false
0.000128
0.000108
Alabama
AL
BARBOUR
01005
2,010
27,325
3
false
0.00011
0.00011
Alabama
AL
BARBOUR
01005
2,011
27,344
3
false
0.000121
0.00011
Alabama
AL
BARBOUR
01005
2,012
27,172
3
false
0.000123
0.00011
Alabama
AL
BARBOUR
01005
2,013
26,946
3
false
0.000139
0.000111
Alabama
AL
BARBOUR
01005
2,014
26,768
4
false
0.000162
0.000149
Alabama
AL
BARBOUR
01005
2,015
26,300
4
false
0.000164
0.000152
Alabama
AL
BIBB
01007
2,003
21,399
1
false
0.00006
0.000047
Alabama
AL
BIBB
01007
2,004
21,721
1
false
0.000065
0.000046
Alabama
AL
BIBB
01007
2,005
22,042
1
false
0.000065
0.000045
Alabama
AL
BIBB
01007
2,006
22,099
1
false
0.000084
0.000045
Alabama
AL
BIBB
01007
2,007
22,438
2
false
0.000115
0.000089
Alabama
AL
BIBB
01007
2,008
22,705
2
false
0.000131
0.000088
Alabama
AL
BIBB
01007
2,009
22,941
2
false
0.000128
0.000087
Alabama
AL
BIBB
01007
2,010
22,858
2
false
0.00011
0.000087
Alabama
AL
BIBB
01007
2,011
22,736
2
false
0.000121
0.000088
Alabama
AL
BIBB
01007
2,012
22,657
2
false
0.000123
0.000088
Alabama
AL
BIBB
01007
2,013
22,510
3
false
0.000139
0.000133
Alabama
AL
BIBB
01007
2,014
22,541
3
false
0.000162
0.000133
Alabama
AL
BIBB
01007
2,015
22,553
3
false
0.000164
0.000133
Alabama
AL
BLOUNT
01009
2,003
53,457
3
false
0.00006
0.000056
Alabama
AL
BLOUNT
01009
2,004
54,124
3
false
0.000065
0.000055
Alabama
AL
BLOUNT
01009
2,005
54,624
3
false
0.000065
0.000055
Alabama
AL
BLOUNT
01009
2,006
55,485
4
false
0.000084
0.000072
Alabama
AL
BLOUNT
01009
2,007
56,240
6
false
0.000115
0.000107
Alabama
AL
BLOUNT
01009
2,008
57,055
15
true
0.000131
0.000263
Alabama
AL
BLOUNT
01009
2,009
57,341
7
false
0.000128
0.000122
Alabama
AL
BLOUNT
01009
2,010
57,372
6
false
0.00011
0.000105
Alabama
AL
BLOUNT
01009
2,011
57,561
6
false
0.000121
0.000104
Alabama
AL
BLOUNT
01009
2,012
57,585
15
true
0.000123
0.00026
Alabama
AL
BLOUNT
01009
2,013
57,630
10
true
0.000139
0.000174
Alabama
AL
BLOUNT
01009
2,014
57,536
11
true
0.000162
0.000191
Alabama
AL
BLOUNT
01009
2,015
57,535
11
true
0.000164
0.000191
Alabama
AL
BULLOCK
01011
2,003
11,316
0
false
0.00006
0
Alabama
AL
BULLOCK
01011
2,004
11,056
0
false
0.000065
0
Alabama
AL
BULLOCK
01011
2,005
11,011
0
false
0.000065
0
Alabama
AL
BULLOCK
01011
2,006
10,776
0
false
0.000084
0
Alabama
AL
BULLOCK
01011
2,007
11,011
1
false
0.000115
0.000091
Alabama
AL
BULLOCK
01011
2,008
10,953
1
false
0.000131
0.000091
Alabama
AL
BULLOCK
01011
2,009
10,987
1
false
0.000128
0.000091
Alabama
AL
BULLOCK
01011
2,010
10,876
1
false
0.00011
0.000092
Alabama
AL
BULLOCK
01011
2,011
10,680
1
false
0.000121
0.000094
Alabama
AL
BULLOCK
01011
2,012
10,610
1
false
0.000123
0.000094
Alabama
AL
BULLOCK
01011
2,013
10,557
1
false
0.000139
0.000095
Alabama
AL
BULLOCK
01011
2,014
10,668
1
false
0.000162
0.000094
Alabama
AL
BULLOCK
01011
2,015
10,404
1
false
0.000164
0.000096
Alabama
AL
BUTLER
01013
2,003
20,833
1
false
0.00006
0.000048
Alabama
AL
BUTLER
01013
2,004
20,870
1
false
0.000065
0.000048
Alabama
AL
BUTLER
01013
2,005
20,830
1
false
0.000065
0.000048
Alabama
AL
BUTLER
01013
2,006
20,815
1
false
0.000084
0.000048
Alabama
AL
BUTLER
01013
2,007
20,894
2
false
0.000115
0.000096
Alabama
AL
BUTLER
01013
2,008
20,949
2
false
0.000131
0.000095
Alabama
AL
BUTLER
01013
2,009
20,867
2
false
0.000128
0.000096
Alabama
AL
BUTLER
01013
2,010
20,933
2
false
0.00011
0.000096
Alabama
AL
BUTLER
01013
2,011
20,867
2
false
0.000121
0.000096
Alabama
AL
BUTLER
01013
2,012
20,672
2
false
0.000123
0.000097
Alabama
AL
BUTLER
01013
2,013
20,359
2
false
0.000139
0.000098
Alabama
AL
BUTLER
01013
2,014
20,332
3
false
0.000162
0.000148
Alabama
AL
BUTLER
01013
2,015
20,168
3
false
0.000164
0.000149
Alabama
AL
CALHOUN
01015
2,003
112,705
6
false
0.00006
0.000053
Alabama
AL
CALHOUN
01015
2,004
113,462
7
false
0.000065
0.000062
Alabama
AL
CALHOUN
01015
2,005
114,477
7
false
0.000065
0.000061
Alabama
AL
CALHOUN
01015
2,006
115,388
9
false
0.000084
0.000078
Alabama
AL
CALHOUN
01015
2,007
116,211
11
true
0.000115
0.000095
Alabama
AL
CALHOUN
01015
2,008
117,274
17
true
0.000131
0.000145
Alabama
AL
CALHOUN
01015
2,009
118,363
12
true
0.000128
0.000101
Alabama
AL
CALHOUN
01015
2,010
118,420
19
true
0.00011
0.00016
Alabama
AL
CALHOUN
01015
2,011
117,767
12
true
0.000121
0.000102

Overview

This dataset contains the number of yearly deaths due to Unintentional Drug Overdoses in the United States at a County Level between 2003-2015. To overcome the limitation of the original dataset, it is merged with population dataset to identify missing combinations and imputation is performed on the dataset taking into account the logical rules of the source dataset. Users can decide the proportion of the imputed values in the dataset by using the provided population and flag columns. Additional fields like state codes, FIPS codes are provided for the convenience of the user so that the dataset can be merged easily with other datasets.

Data Structure

The dataset contains the following fields:

  1. State (string): Name of the State
  2. State_Code (string): 2 Character abbreviation of the state
  3. County (string): Name of the County
  4. County_Code (string): 5 Charter representation of the County’s FIPS code
  5. Year (integer): Year
  6. Population (integer): Population of the County for the given year
  7. Deaths (integer): number of Drug overdose deaths in the county for the given year
  8. Original (Boolean): To indicate if the Deaths are from original dataset or imputed
  9. State_Mortality_Rate (float): Mortality rate of the state for the given year
  10. County_Mortality_Rate (float): Mortality rate of the county for the given year

Notes:

  1. County FIPS has been formatted as a string so that leading zeros are not lost and it is easier for the user to read it
  2. The County_Mortality_Rate which is provided for convenience is calculated after the imputation of the missing values, hence it might not be accurate for all the combinations, refer the "Original" column to identify the imputed values.

Data Source

  1. Deaths Data: The original source of the data is the US Vital Statistics Agency Link, however, for this project, it has been downloaded from a different source for convenience.

  2. Population Data: To have consistency with the Mortality Data, the population Data has been downloaded from the CDC Wonder portal. Population data is used for 2 purposes: to calculate the mortality rate and as a master list of Counties to perform the Imputation

  3. Other Data: To provide convenience to the users of the Dataset, additional fields such as County Fips, State Codes etc. have been added so that users can easily combine it with other datasets if required. This mapping is a standard mapping which can be found on the internet.

The raw data files are present in the .01_Data/01_Raw folder for reference.

Methodology

To study the impact of drug related deaths, one of the primary sources is the US Vital Statistics Agency. There is a limitation in the report since US Vital Statistics does not report the deaths in a county if the number of deaths in that county is less than 10 for privacy reasons. This means that the deaths available in the report are not fully representative of the deaths and hence any analysis performed on it may not be fully accurate. To overcome this, in this dataset, values are imputed for the missing counties based on State level mortality rates and population limiting factors. While this may not be 100% representative, it gives a slightly different and better approach to perform analysis on the drug related deaths.

Post the basic data cleaning and merging, the imputation is performed in the following steps:

  1. Mortality Rate is calculated at the State-Year level using the available data
  2. Master combination of State-County is obtained from Population file
  3. For the missing counties a reverse calculation is performed using the state level mortality rate and the population of the county. A maximum calculated limit of 9 is imposed to preserve the conditions of the original data set.
  4. Flag column is added to indicate if the values seen are original values or imputed ones

Since the original trend of the dataset may distort due to the imputations, the population data is left in the dataset and an additional column is added to the dataset to indicate if the values seen are from the original dataset or if they were imputed. Using the population and the flag column, the users of the dataset can decide the proportion of the imputed data in the analysis (This is the population limit factor).

The below graph shows the relation between the population limit factor and the % of imputed values in the dataset: Plot

Files and Folder Structure

  1. Data Files: The raw data files are present in the .01_Data/01_Raw folder for reference. The intermediate Population and Mortality files are present in the .01_Data/02_Processed folder. The final dataset is present in the root folder.

The Data folder is hidden so that the raw and itermediate files are not loaded by the library.

  1. Code Files: The code files are present in the 02_Code folder.
    • The "*_eda.ipynb" files are the exploratory files which the user can refer to understand the processing of the data in a step by step manner.
    • The "*_script.py" files are the optimized scripts which contain only the required steps from the eda files to process the data.

provided the raw data files are present in the .01_Data/01_Raw folder, all the other intermediate and final data files can be generated using the script files provided in the 02_Code folder.

Disclaimers

  1. This dataset has been created purely for educational purposes. The imputations performed is one of the many ways to handle the missing data, please consider the % of imputed data in the dataset before performing any analysis.
  2. The Dataset does NOT contain data for Alaska since the original data for it is messsy, users can however make use of the raw files and modify the scripts if required to include Alaska
  3. Only 1 type of drug related deaths is present in the dataset, refer to the master_eda file for details
  4. Please refer to the original source of the data (links provided in the data source section) for any legal or privacy concerns.
Downloads last month
3
Edit dataset card