Skip to content

Commit

Permalink
fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
harivyasi committed Aug 9, 2023
1 parent 98ec4d9 commit 2f07e9a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion generate_map.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from pathlib import Path
from matplotlib.colors import rgb2hex
from matplotlib import colormaps
import matplotlib.patches as pat
import matplotlib.pyplot as plt
import pandas as pd
Expand Down Expand Up @@ -47,6 +48,11 @@
# include only mainland France for conciseness
map_country.drop(map_country[map_country.FID.isin(
["FRY", "FRM"])].index, inplace=True)

if "ES" in countries_included:
# include only mainland Spain for conciseness
map_country.drop(map_country[map_country.FID.isin(
["ES7"])].index, inplace=True)

# read city boundaries, specify the format, subset to countries included
map_city = gpd.read_file(jsons["city"])
Expand Down Expand Up @@ -132,7 +138,7 @@
map_country.plot(ax=ax, column="CNTR_CODE", cmap='tab20', edgecolor='w')

# color map for connections
tab10 = plt.cm.get_cmap('tab20', 10)
tab10 = colormaps["tab10"]

# plot the connections
connection_colors = []
Expand Down

0 comments on commit 2f07e9a

Please sign in to comment.