不得不做类似的事情,但希望在这个案例中真正统一地在欧洲传播。在import shapefile
from shapely.geometry import Point, shape
from numpy.random import uniform
from collections import Counter
shp = shapefile.Reader('shapefiles/TM_WORLD_BORDERS-0.3.shp')
# Adjust for your case:
EU3 = ['ARM', 'BIH', 'BIH', 'CYP', 'DNK', 'IRL', 'AUT', 'EST', 'CZE', 'FIN'
, 'FRA', 'DEU', 'GRC', 'HRV', 'HUN', 'ISL', 'ITA', 'LTU', 'LVA', 'BLR'
, 'MLT', 'BEL', 'AND', 'GIB', 'LUX', 'MCO', 'NLD', 'NOR', 'POL', 'PRT'
, 'ROU', 'MDA', 'ESP', 'CHE', 'GBR', 'SRB', 'SWE', 'ALB', 'MKD', 'MNE'
,