Skip to content

Commit df5aa19

Browse files
committed
formatting and date_start -> date_end
1 parent ff86a84 commit df5aa19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nwss_wastewater/delphi_nwss/pull.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -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
@@ -68,7 +68,7 @@ def reformat(df, df_metric):
6868
"""
6969
# drop unused columns from df_metric
7070
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]
7272
]
7373
# get matching keys
7474
df_metric_core = df_metric_core.rename(columns={"date_end": "timestamp"})
@@ -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

Comments
 (0)