@@ -29,7 +29,7 @@ def sig_digit_round(value, n_digits):
2929 sign_mask = value < 0
3030 value [sign_mask ] *= - 1
3131 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 )
3333 result [sign_mask ] *= - 1
3434 result [zero_mask ] = in_value [zero_mask ]
3535 return result
@@ -71,7 +71,7 @@ def reformat(df, df_metric):
7171 :, ["key_plot_id" , "date_start" , "population_served" , * METRIC_SIGNALS ]
7272 ]
7373 # get matching keys
74- df_metric_core = df_metric_core .rename (columns = {"date_start " : "timestamp" })
74+ df_metric_core = df_metric_core .rename (columns = {"date_end " : "timestamp" })
7575 df_metric_core = df_metric_core .set_index (["key_plot_id" , "timestamp" ])
7676 df = df .set_index (["key_plot_id" , "timestamp" ])
7777
@@ -148,8 +148,8 @@ def pull_nwss_data(token: str):
148148
149149 # Pull data from Socrata API
150150 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 )
153153 df_metric = pd .DataFrame .from_records (results_metric )
154154 df_concentration = pd .DataFrame .from_records (results_concentration )
155155 df_concentration = df_concentration .rename (columns = {"date" : "timestamp" })
0 commit comments