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

✨ Improve fast-track #3217

Merged
merged 3 commits into from
Aug 30, 2024
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
4 changes: 2 additions & 2 deletions apps/wizard/app_pages/fasttrack/fast_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ def data_diff(self) -> Tuple[bool, str]:
existing_data = pd.read_csv(self.snapshot.path)

exit_code = diff_print(
df1=existing_data,
df2=self.data.reset_index(),
df1=existing_data.set_index(["country", "year"]),
df2=self.data,
df1_label="existing",
df2_label="imported",
absolute_tolerance=0.00000001,
Expand Down
3 changes: 3 additions & 0 deletions apps/wizard/app_pages/fasttrack/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ def import_google_sheets(url: str) -> Dict[str, Any]:


def parse_data_from_sheets(data_df: pd.DataFrame) -> pd.DataFrame:
# drop empty rows
data_df = data_df.dropna(how="all")

# lowercase columns names
for col in data_df.columns:
if col.lower() in ("entity", "year", "country"):
Expand Down
6 changes: 3 additions & 3 deletions snapshots/fasttrack/latest/africa_cdc.csv.dvc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ meta:
attribution_short: Africa CDC
url_main: https://africacdc.org/thematic-area/surveillance-and-disease-intelligence/africa-cdc-weekly-event-based-surveillance/
url_download: https://docs.google.com/spreadsheets/d/1KlqUXISKxEpvHxxG8rSzqT3YK5w0mEpJH0ttyAOGLwo/pub?output=csv
date_accessed: '2024-08-28'
date_accessed: '2024-08-30'
date_published: '2024-08-16'
license:
name: © All rights reserved Africa CDC
Expand All @@ -17,6 +17,6 @@ meta:
license:
name: © All rights reserved Africa CDC
outs:
- md5: cc20be7a41c443e4fb229b9544b62410
size: 1820
- md5: 28429135b7f4652e790a2af320ff574a
size: 1799
path: africa_cdc.csv
Loading