Skip to content

Commit 07b4f09

Browse files
committed
using published data to power the survey dashboard
1 parent b7f0d92 commit 07b4f09

File tree

4 files changed

+647
-3
lines changed

4 files changed

+647
-3
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# custom
2-
*.csv
2+
responses_cleaned_mapped_to_publish.csv
33
#survey_dashboard/hmc_layout/static/en_files/fonts/
44

55
# Byte-compiled / optimized / DLL files

survey_dashboard/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
def get_data_path():
3737
"""Get the path to the data file relative to this module"""
3838
this_folder = Path(__file__).parent.parent
39-
return this_folder / "data" / "responses_cleaned_mapped_to_publish.csv"
39+
return this_folder / "data" / "hmc_survey_2021_data.csv"
4040

4141
DATAFILE_PATH = str(get_data_path())
4242

survey_dashboard/core/data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ class DataProcessor:
5050

5151
def __init__(self):
5252
"""Initialize the data processor with survey data."""
53-
self.survey_data = pd.read_csv(DATAFILE_PATH)
53+
# Read CSV, skipping comment lines that start with #
54+
self.survey_data = pd.read_csv(DATAFILE_PATH, comment='#')
5455
# Rename columns to human readable names
5556
self.survey_data.rename(columns=HCS_colnamesDict, inplace=True)
5657

0 commit comments

Comments
 (0)