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

Demographics and health endpoint and CSV updates #496

Merged
merged 8 commits into from
Dec 9, 2024
8 changes: 4 additions & 4 deletions csv_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,9 +1051,9 @@ def demographics_csv(data):
value_cols = []
for key in data.keys():
for subkey in data[key].keys():
if subkey != "description":
if subkey != "description" and subkey != "source":
value_cols.append(subkey)
value_cols = list(set(value_cols)) + ["description"]
value_cols = list(set(value_cols)) + ["description", "source"]

values = value_cols
fieldnames = ["variable"] + values
Expand All @@ -1066,9 +1066,9 @@ def demographics_csv(data):
if csv_dict["variable"] == key:
ordered_csv_dicts.append(csv_dict)

metadata = "# Demographic data for individual communities plus the state of Alaska and United States.\n"
metadata = "# Demographic and health data for individual communities plus the state of Alaska and United States.\n"

filename_data_name = "Demographic Data - "
filename_data_name = "Demographic and Health Data - "

return {
"csv_dicts": ordered_csv_dicts,
Expand Down
Loading