Created
November 9, 2018 20:41
-
-
Save danhammer/cce57e36519f88972a0b039fe1b71dad to your computer and use it in GitHub Desktop.
Create a map of WTL stories
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.basemap import Basemap | |
path = "StoryLatLonsJuly-Nov.pkl" | |
data = pd.read_pickle(path) | |
df = pd.DataFrame(data, columns=["lat", "lon"]) | |
m = Basemap(resolution='i') | |
m.drawcoastlines(zorder=0, color='gray', linewidth=0.3) | |
m.drawcountries(zorder=0, color='gray', linewidth=0.2) | |
m.scatter(df['lon'], df['lat'], 1, marker='o', color='#3ea2f8', alpha=0.2) | |
plt.axis('off') | |
plt.savefig( | |
'tester.png', | |
format='png', | |
dpi=1200, | |
transparent=True, | |
border=False, | |
bbox_inches= 'tight', | |
pad_inches=0 | |
) |
Author
danhammer
commented
Nov 9, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment