Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nchs docstrings to pass pydocstyle #376

Merged
merged 1 commit into from
Oct 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions nchs_mortality/delphi_nchs_mortality/export.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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]

Expand Down
3 changes: 2 additions & 1 deletion nchs_mortality/delphi_nchs_mortality/pull.py
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
2 changes: 1 addition & 1 deletion nchs_mortality/delphi_nchs_mortality/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down