-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathexample2_icw.py
38 lines (26 loc) · 1.01 KB
/
example2_icw.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 30 09:20:49 2018
@author: gjacopo
"""
#%%
from __future__ import print_function
import os, re#analysis:ignore
import metadata
import build_chord
#%%
#==============================================================================
# CHORD SCRIPT
#==============================================================================
# control the indicators you want to select
INDICATOR_KEEP = ['icw']
DIMENSION_DROP = ['geo', 'time']
INDICATORxDIMENSION = '%sx%s' % (metadata.INDICATOR, metadata.DIMENSION)
ODIR = 'example2'
df = metadata.meta2data(ind= {'keep': INDICATOR_KEEP},
dim= {'drop': DIMENSION_DROP})
[dimensions, indicators, df_adjacency] = build_chord.data2adjacency(df)
build_chord.adjacency2json(df_adjacency, dim=dimensions, ind=indicators,
oifn = metadata.INDICATOR, odfn = metadata.DIMENSION,
oixdfn = INDICATORxDIMENSION, odir=ODIR)