Skip to content

Commit

Permalink
version 0.9 and adding diff to v0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
quirinmanz committed Aug 17, 2022
1 parent 2720f75 commit e0d2e84
Show file tree
Hide file tree
Showing 3 changed files with 13,687 additions and 4 deletions.
14 changes: 14 additions & 0 deletions openrefine/v0.9/create_diff_v0.9_v0.8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import os
import pandas as pd

# make sure the working directory when running this file is the project root of the git repository
os.chdir('../../')

old = pd.read_csv('openrefine/v0.8/IHEC_metadata_harmonization.v0.8.csv')
old.index = old.EpiRR
new = pd.read_csv('openrefine/v0.9/IHEC_metadata_harmonization.v0.9.csv')
new.index = new.EpiRR

diff_tbl = old.compare(new)
diff_tbl.rename(columns={'self': 'v0.8', 'other': 'v0.9'}, inplace=True)
diff_tbl.apply(lambda x: [x.dropna()], axis=1).to_json('openrefine/v0.9/diff_v0.8_v0.9.json', indent=True)
8 changes: 4 additions & 4 deletions openrefine/v0.9/create_v0.9.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import json
import os.path
import warnings
import xml.etree.ElementTree as et
from collections import defaultdict
from subprocess import run
from typing import Dict, List, Tuple

import pandas as pd
from collections import defaultdict

# make sure the working directory when running this file is the project root of the git project
os.chdir('../../')

# first get the ncit thesaurus
from typing import Dict, List, Tuple
import xml.etree.ElementTree as et

tree = et.parse('ontologies/Thesaurus.owl')
root = tree.getroot()
Expand Down
Loading

0 comments on commit e0d2e84

Please sign in to comment.