diff --git a/nchs_mortality/delphi_nchs_mortality/export.py b/nchs_mortality/delphi_nchs_mortality/export.py index ac6a7f4a8..a1ab430c8 100644 --- a/nchs_mortality/delphi_nchs_mortality/export.py +++ b/nchs_mortality/delphi_nchs_mortality/export.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- -"""Function to export the dataset in the format expected of the API. -""" +"""Function to export the dataset in the format expected of the API.""" import pandas as pd from epiweeks import Week def export_csv(df, geo_name, sensor, export_dir, start_date): - """Export data set in format expected for injestion by the API + """Export data set in format expected for injestion by the API. + Parameters ---------- df: pd.DataFrame @@ -21,7 +21,6 @@ def export_csv(df, geo_name, sensor, export_dir, start_date): end_date: datetime.datetime The last date to report """ - df = df.copy() df = df[df["timestamp"] >= start_date] diff --git a/nchs_mortality/delphi_nchs_mortality/pull.py b/nchs_mortality/delphi_nchs_mortality/pull.py index 1a529bc8b..73aa64810 100644 --- a/nchs_mortality/delphi_nchs_mortality/pull.py +++ b/nchs_mortality/delphi_nchs_mortality/pull.py @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- +"""Functions for pulling NCHS mortality data API.""" import numpy as np import pandas as pd from sodapy import Socrata def pull_nchs_mortality_data(token: str, map_df: pd.DataFrame, test_mode: str): - """Pulls the latest NCHS Mortality data, and conforms it into a dataset + """Pull the latest NCHS Mortality data, and conforms it into a dataset. The output dataset has: diff --git a/nchs_mortality/delphi_nchs_mortality/run.py b/nchs_mortality/delphi_nchs_mortality/run.py index 87bf18c02..dbfc0777d 100644 --- a/nchs_mortality/delphi_nchs_mortality/run.py +++ b/nchs_mortality/delphi_nchs_mortality/run.py @@ -30,7 +30,7 @@ geo_res = "state" def run_module(): - + """Run module for processing NCHS mortality data.""" params = read_params() export_start_date = params["export_start_date"] if export_start_date == "latest": # Find the previous Saturday