Skip to content

Commit d2a5a23

Browse files
authored
Merge pull request #376 from cmu-delphi/nchs_mortality-docs
Update nchs docstrings to pass pydocstyle
2 parents d947887 + 869a8d6 commit d2a5a23

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

nchs_mortality/delphi_nchs_mortality/export.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# -*- coding: utf-8 -*-
2-
"""Function to export the dataset in the format expected of the API.
3-
"""
2+
"""Function to export the dataset in the format expected of the API."""
43
import pandas as pd
54
from epiweeks import Week
65

76
def export_csv(df, geo_name, sensor, export_dir, start_date):
8-
"""Export data set in format expected for injestion by the API
7+
"""Export data set in format expected for injestion by the API.
8+
99
Parameters
1010
----------
1111
df: pd.DataFrame
@@ -21,7 +21,6 @@ def export_csv(df, geo_name, sensor, export_dir, start_date):
2121
end_date: datetime.datetime
2222
The last date to report
2323
"""
24-
2524
df = df.copy()
2625
df = df[df["timestamp"] >= start_date]
2726

nchs_mortality/delphi_nchs_mortality/pull.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# -*- coding: utf-8 -*-
2+
"""Functions for pulling NCHS mortality data API."""
23
import numpy as np
34
import pandas as pd
45
from sodapy import Socrata
56

67
def pull_nchs_mortality_data(token: str, map_df: pd.DataFrame, test_mode: str):
7-
"""Pulls the latest NCHS Mortality data, and conforms it into a dataset
8+
"""Pull the latest NCHS Mortality data, and conforms it into a dataset.
89
910
The output dataset has:
1011

nchs_mortality/delphi_nchs_mortality/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
geo_res = "state"
3131

3232
def run_module():
33-
33+
"""Run module for processing NCHS mortality data."""
3434
params = read_params()
3535
export_start_date = params["export_start_date"]
3636
if export_start_date == "latest": # Find the previous Saturday

0 commit comments

Comments
 (0)