Skip to content

Commit

Permalink
🐛 harmonize: Fix harmonize ipython when used on already harmonized da…
Browse files Browse the repository at this point in the history
…tasets (#3577)

* 🐛 harmonize: Fix harmonize ipython when used on already harmonized datasets

* Patch harmonize_ipython
  • Loading branch information
pabloarosado authored Nov 20, 2024
1 parent 82b3050 commit 966a562
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions etl/harmonize.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,15 @@ def harmonize_ipython(
# Run automatic harmonization
harmonizer.run_automatic(logging="ipython")

# Need user input
harmonizer.run_interactive_ipython(
institution=institution,
num_suggestions=num_suggestions,
)
# Export mapping immediately after automatic harmonization
harmonizer.export_mapping()

# If there are ambiguous countries, proceed with interactive harmonization
if harmonizer.ambiguous:
harmonizer.run_interactive_ipython(
institution=institution,
num_suggestions=num_suggestions,
)


def read_table(input_file: str) -> pd.DataFrame:
Expand Down

0 comments on commit 966a562

Please sign in to comment.