点赞发Nature
关注中Science
上一版是直接用了起始位置 + 运输量,代码在这:
基于距离矩阵的OD图
但是我们还希望加入交通运输轨迹,代码如下:
import geopandas as gpd
import matplotlib.pyplot as plt
import numpy as np
import os
import pandas as pd
import pickle
import seaborn as sns
path = r"E:\tencent files\chrome Download\Research\LCA\LCA Coal_fired power plant phaseout\data"
map_path = r"E:\tencent files\chrome Download\QGIS 3.12\中国基础数据\中国行政区.shp"
trans_2014 = r"coal_transport2014"
geo_data_file = r"Distance_matrix"
transport_matrix = r"coal_trasport2014.xlsx"
mines = "node_mine_pair.xlsx"
power_plants = "node_power_pair.xlsx"
file = r"Results.xlsx"
transport_route_path = os.path.join(path, trans_2014, geo_data_file)
transport_quantity_path = os.path.join(path, trans_201