@@ -29,7 +29,7 @@ def sig_digit_round(value, n_digits):
29
29
sign_mask = value < 0
30
30
value [sign_mask ] *= - 1
31
31
exponent = np .ceil (np .log10 (value ))
32
- result = 10 ** exponent * np .round (value * 10 ** (- exponent ), n_digits )
32
+ result = 10 ** exponent * np .round (value * 10 ** (- exponent ), n_digits )
33
33
result [sign_mask ] *= - 1
34
34
result [zero_mask ] = in_value [zero_mask ]
35
35
return result
@@ -68,7 +68,7 @@ def reformat(df, df_metric):
68
68
"""
69
69
# drop unused columns from df_metric
70
70
df_metric_core = df_metric .loc [
71
- :, ["key_plot_id" , "date_start " , "population_served" , * METRIC_SIGNALS ]
71
+ :, ["key_plot_id" , "date_end " , "population_served" , * METRIC_SIGNALS ]
72
72
]
73
73
# get matching keys
74
74
df_metric_core = df_metric_core .rename (columns = {"date_end" : "timestamp" })
@@ -148,8 +148,8 @@ def pull_nwss_data(token: str):
148
148
149
149
# Pull data from Socrata API
150
150
client = Socrata ("data.cdc.gov" , token )
151
- results_concentration = client .get ("g653-rqe2" , limit = 10 ** 10 )
152
- results_metric = client .get ("2ew6-ywp6" , limit = 10 ** 10 )
151
+ results_concentration = client .get ("g653-rqe2" , limit = 10 ** 10 )
152
+ results_metric = client .get ("2ew6-ywp6" , limit = 10 ** 10 )
153
153
df_metric = pd .DataFrame .from_records (results_metric )
154
154
df_concentration = pd .DataFrame .from_records (results_concentration )
155
155
df_concentration = df_concentration .rename (columns = {"date" : "timestamp" })
0 commit comments