Jiwonny29 commited on
Commit
5e26372
1 Parent(s): 786a507

Update test_dataset.py

Browse files
Files changed (1) hide show
  1. test_dataset.py +6 -6
test_dataset.py CHANGED
@@ -62,7 +62,7 @@ class HealthStatisticsDataset(datasets.GeneratorBasedBuilder):
62
  )
63
 
64
  def _split_generators(self, dl_manager):
65
- data = pd.read_csv(dl_manager.download_and_extract("https://drive.google.com/file/d/1ktRNl7jg0Z83rkymD9gcsGLdVqVaFtd-/view?usp=drive_link"))
66
  processed_data = self.preprocess_data(data)
67
  return [
68
  datasets.SplitGenerator(
@@ -98,7 +98,7 @@ class HealthStatisticsDataset(datasets.GeneratorBasedBuilder):
98
 
99
  @staticmethod
100
  def preprocess_data(data):
101
- data = pd.read_csv("https://drive.google.com/file/d/1ktRNl7jg0Z83rkymD9gcsGLdVqVaFtd-/view?usp=drive_link")
102
  data = data[['YearStart', 'LocationAbbr', 'LocationDesc', 'Geolocation', 'Topic', 'Question', 'Data_Value_Type', 'Data_Value', 'Data_Value_Alt',
103
  'Low_Confidence_Limit', 'High_Confidence_Limit', 'Break_Out_Category', 'Break_Out']]
104
  def convert_to_tuple(geo_str):
@@ -149,22 +149,22 @@ class HealthStatisticsDataset(datasets.GeneratorBasedBuilder):
149
  data.rename(columns={'Question':'Disease_Type', 'YearStart':'Year', 'Break_Out':'Break_Out_Details'}, inplace=True)
150
  data['Break_Out_Type'] = data['Break_Out_Type'].replace('Overall', 0)
151
 
152
- lt2000 = pd.read_csv("https://drive.google.com/file/d/1ktRNl7jg0Z83rkymD9gcsGLdVqVaFtd-/view?usp=drive_link")
153
  lt2000 = lt2000[(lt2000['race_name'] == 'Total') & (lt2000['age_name'] == '<1 year')]
154
  lt2000 = lt2000[['location_name', 'val']]
155
  lt2000.rename(columns={'val':'Life_Expectancy'}, inplace=True)
156
 
157
- lt2005 = pd.read_csv("https://drive.google.com/file/d/1xZqeOgj32-BkOhDTZVc4k_tp1ddnOEh7/view?usp=drive_link")
158
  lt2005 = lt2005[(lt2005['race_name'] == 'Total') & (lt2005['age_name'] == '<1 year')]
159
  lt2005 = lt2005[['location_name', 'val']]
160
  lt2005.rename(columns={'val':'Life_Expectancy'}, inplace=True)
161
 
162
- lt2010 = pd.read_csv("https://drive.google.com/file/d/1ItqHBuuUa38PVytfahaAV8NWwbhHMMg8/view?usp=drive_link")
163
  lt2010 = lt2010[(lt2010['race_name'] == 'Total') & (lt2010['age_name'] == '<1 year')]
164
  lt2010 = lt2010[['location_name', 'val']]
165
  lt2010.rename(columns={'val':'Life_Expectancy'}, inplace=True)
166
 
167
- lt2015 = pd.read_csv("https://drive.google.com/file/d/1rOgQY1RQiry2ionTKM_UWgT8cYD2E0vX/view?usp=drive_link")
168
  lt2015 = lt2015[(lt2015['race_name'] == 'Total') & (lt2015['age_name'] == '<1 year')]
169
  lt2015 = lt2015[['location_name', 'val']]
170
  lt2015.rename(columns={'val':'Life_Expectancy'}, inplace=True)
 
62
  )
63
 
64
  def _split_generators(self, dl_manager):
65
+ data = pd.read_csv(dl_manager.download_and_extract("https://docs.google.com/uc?export=download&id=1eChYmZ3RMq1v-ek1u6DD2m_dGIrz3sbi&confirm=t"))
66
  processed_data = self.preprocess_data(data)
67
  return [
68
  datasets.SplitGenerator(
 
98
 
99
  @staticmethod
100
  def preprocess_data(data):
101
+ data = pd.read_csv("https://docs.google.com/uc?export=download&id=1eChYmZ3RMq1v-ek1u6DD2m_dGIrz3sbi&confirm=t")
102
  data = data[['YearStart', 'LocationAbbr', 'LocationDesc', 'Geolocation', 'Topic', 'Question', 'Data_Value_Type', 'Data_Value', 'Data_Value_Alt',
103
  'Low_Confidence_Limit', 'High_Confidence_Limit', 'Break_Out_Category', 'Break_Out']]
104
  def convert_to_tuple(geo_str):
 
149
  data.rename(columns={'Question':'Disease_Type', 'YearStart':'Year', 'Break_Out':'Break_Out_Details'}, inplace=True)
150
  data['Break_Out_Type'] = data['Break_Out_Type'].replace('Overall', 0)
151
 
152
+ lt2000 = pd.read_csv("https://docs.google.com/uc?export=download&id=1ktRNl7jg0Z83rkymD9gcsGLdVqVaFtd-&confirm=t")
153
  lt2000 = lt2000[(lt2000['race_name'] == 'Total') & (lt2000['age_name'] == '<1 year')]
154
  lt2000 = lt2000[['location_name', 'val']]
155
  lt2000.rename(columns={'val':'Life_Expectancy'}, inplace=True)
156
 
157
+ lt2005 = pd.read_csv("https://docs.google.com/uc?export=download&id=1xZqeOgj32-BkOhDTZVc4k_tp1ddnOEh7&confirm=t")
158
  lt2005 = lt2005[(lt2005['race_name'] == 'Total') & (lt2005['age_name'] == '<1 year')]
159
  lt2005 = lt2005[['location_name', 'val']]
160
  lt2005.rename(columns={'val':'Life_Expectancy'}, inplace=True)
161
 
162
+ lt2010 = pd.read_csv("https://docs.google.com/uc?export=download&id=1ItqHBuuUa38PVytfahaAV8NWwbhHMMg8&confirm=t")
163
  lt2010 = lt2010[(lt2010['race_name'] == 'Total') & (lt2010['age_name'] == '<1 year')]
164
  lt2010 = lt2010[['location_name', 'val']]
165
  lt2010.rename(columns={'val':'Life_Expectancy'}, inplace=True)
166
 
167
+ lt2015 = pd.read_csv("https://docs.google.com/uc?export=download&id=1rOgQY1RQiry2ionTKM_UWgT8cYD2E0vX&confirm=t")
168
  lt2015 = lt2015[(lt2015['race_name'] == 'Total') & (lt2015['age_name'] == '<1 year')]
169
  lt2015 = lt2015[['location_name', 'val']]
170
  lt2015.rename(columns={'val':'Life_Expectancy'}, inplace=True)