Skip to content

Commit

Permalink
Demographics and health endpoint and CSV updates (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
cstephen authored Dec 9, 2024
1 parent ea2a0e1 commit eccd8c4
Show file tree
Hide file tree
Showing 3 changed files with 220 additions and 58 deletions.
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

0 comments on commit eccd8c4

Please sign in to comment.