Skip to content

Commit 53aeb39

Browse files
authored
Merge pull request #160 from cmu-delphi/dev/usafacts-upload-last-7
Dev/usafacts upload last 7
2 parents 4ef7e47 + 38ee4de commit 53aeb39

File tree

1 file changed

+3
-5
lines changed
  • usafacts/delphi_usafacts

1 file changed

+3
-5
lines changed

usafacts/delphi_usafacts/run.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ def run_module():
6767
params = read_params()
6868
export_start_date = params["export_start_date"]
6969
if export_start_date == "latest":
70-
export_start_date = date.today() - timedelta(days=1)
70+
export_start_date = datetime.combine(date.today(), time(0, 0)) - timedelta(days=1)
7171
else:
72-
export_start_date = date.strptime(export_start_date, "%Y-%m-%d")
72+
export_start_date = datetime.strptime(export_start_date, "%Y-%m-%d")
7373
export_dir = params["export_dir"]
7474
base_url = params["base_url"]
7575
static_file_dir = params["static_file_dir"]
@@ -102,9 +102,7 @@ def run_module():
102102
create_export_csv(
103103
df,
104104
export_dir=export_dir,
105-
start_date=datetime.combine(
106-
SMOOTHERS_MAP[smoother][3](export_start_date),
107-
time(0,0)),
105+
start_date=SMOOTHERS_MAP[smoother][3](export_start_date),
108106
metric=metric,
109107
geo_res=geo_res,
110108
sensor=sensor_name,

0 commit comments

Comments
 (0)