Skip to content

Commit

Permalink
initial organisations framing script.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfiex committed Sep 10, 2024
1 parent e9c633e commit 93ad52a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
5 changes: 2 additions & 3 deletions JSONLD/scripts/organisations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@
"# await lddata\n",
"\n",
"frame = cmipld.Frame(lddata,frame).clean(['rmld','untag'])\n",
"data = frame.filterkeys(['cmip-acronym','name','ror'],True).keyval('cmip-acronym')\n",
"\n",
"# sort dictionary\n",
"data = dict(sorted(data.items()))\n",
"data = cmipld.utils.sorted_dict(frame.filterkeys(['cmip-acronym','name','ror'],True).keyval('cmip-acronym'))\n",
"\n",
"import json\n",
"json.dump(data,open(base+'/MIP_organisations.json','w'),indent=4)\n"
]
Expand Down
9 changes: 4 additions & 5 deletions JSONLD/scripts/organisations.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
# await lddata

frame = cmipld.Frame(lddata,frame).clean(['rmld','untag'])
data = frame.filterkeys(['cmip-acronym','name','ror'],True).keyval('cmip-acronym')
data = cmipld.utils.sorted_dict(frame.filterkeys(['cmip-acronym','name','ror'],True,'consortium').keyval('cmip-acronym'))

# sort dictionary
data = dict(sorted(data.items()))
import json
json.dump(data,open(base+'/MIP_organisations.json','w'),indent=4)


cmipld.utils.wjsn(data,base+'/MIP_organisations.json')
6 changes: 3 additions & 3 deletions MIP_organisations.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
},
"MIROC": {
"name": "MIROC Consortium",
"ror": null
"ror": "consortium"
},
"MOHC": {
"name": "Met Office",
Expand Down Expand Up @@ -181,7 +181,7 @@
},
"NCC": {
"name": "NCC Consortium",
"ror": null
"ror": "consortium"
},
"NERC": {
"name": "Natural Environment Research Council",
Expand Down Expand Up @@ -233,7 +233,7 @@
},
"SOLARIS HEPPA": {
"name": "SOLARIS HEPPA Consortium",
"ror": null
"ror": "consortium"
},
"THU": {
"name": "Tsinghua University",
Expand Down

0 comments on commit 93ad52a

Please sign in to comment.