<jupyter_start><jupyter_text>Brazil and USA to China<jupyter_code>## USA TO CHN
usa_chn = df_from_json_clean('https://atlas.media.mit.edu/sitc/export/2012.2017/usa/chn/show/')
usa_chn = to_normalized_df(usa_chn)
## BRA TO CHN
bra_chn = df_from_json_clean('https://atlas.media.mit.edu/sitc/export/2012.2017/bra/chn/show/')
bra_chn = to_normalized_df(bra_chn)
graph_usabra_chn = nx.DiGraph()
# USA to CHN
add_relations_to_graph(graph_usabra_chn, usa_chn, "USA", "CHN")
# BRA to CHN
add_relations_to_graph(graph_usabra_chn, bra_chn, "BRA", "CHN")
graph_usabra_chn['USA']
nx.write_gexf(graph_usabra_chn, "usabra_chn.gexf")<jupyter_output><empty_output><jupyter_text>Brazil and China to USA<jupyter_code>## CHN TO USA
chn_usa = df_from_json_clean('https://atlas.media.mit.edu/sitc/export/2012.2017/chn/usa/show/')
chn_usa = to_normalized_df(chn_usa)
## BRA TO USA
bra_usa = df_from_json_clean('https://atlas.media.mit.edu/sitc/export/2012.2017/bra/usa/show/')
bra_usa = to_normalized_df(bra_usa)
graph_chnbra_usa = nx.DiGraph()
# CHN to EUA
add_relations_to_graph(graph_chnbra_usa, chn_usa, "CHN", "USA")
# BRA to EUA    
add_relations_to_graph(graph_chnbra_usa, bra_usa, "BRA", "USA")
graph_chnbra_usa['CHN']
nx.write_gexf(graph_chnbra_usa, "chnbra_usa.gexf")<jupyter_output><empty_output>