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
fig = plt.figure(figsize=(20,10)) | |
wmap = Basemap(projection='moll',lon_0=0,resolution='c') | |
wmap.drawmapboundary(fill_color='lightskyblue') | |
wmap.drawcountries() | |
wmap.fillcontinents(color='darkseagreen',lake_color='lightskyblue',zorder=0) | |
wmap.drawcoastlines() | |
wmap.scatter(longarray, latarray, latlon=True, color='lime', s=20) | |
plt.show() |
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
fig = plt.figure(figsize=(20,10)) | |
wmap = Basemap(projection='ortho',lon_0=-80,lat_0=60,resolution='l') | |
wmap.drawmapboundary(fill_color='lightskyblue') | |
wmap.drawcountries() | |
wmap.fillcontinents(color='darkseagreen',lake_color='lightskyblue',zorder=0) | |
wmap.drawcoastlines() | |
wmap.scatter(longarray, latarray, latlon=True, color='lime', s=20) | |
plt.show() |
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 matplotlib.pyplot as plt | |
from mpl_toolkits.basemap import Basemap | |
import numpy as np | |
import pandas as pd | |
# Import Data | |
data = pd.read_csv('scrubbed.csv') | |
# Separate Latitude and Longitude, Re-format, Clean | |
df = pd.DataFrame() |
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
wmap.scatter(longarray, latarray, latlon=True, color='lime', s=20) | |
plt.title('Reported UFO Sightings') | |
plt.show() |
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
latarray = np.array(df['lat']) | |
longarray = np.array(df['long']) |
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
wmap = Basemap(projection='mill', llcrnrlat = -90, urcrnrlat = 90, llcrnrlon = -180, urcrnrlon = 180, resolution='c') | |
wmap.drawcoastlines() |
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
fig = plt.figure(figsize=(20,10)) | |
plt.rcParams.update({'font.size': 20}) |
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
df = pd.DataFrame() | |
df['lat'] = pd.to_numeric(data['latitude'], errors='coerce') | |
df['long'] = pd.to_numeric(data['longitude '], errors='coerce') | |
df = df.dropna() |
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 matplotlib.pyplot as plt | |
from mpl_toolkits.basemap import Basemap | |
import numpy as np | |
import pandas as pd |
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 numpy as np | |
import matplotlib.pyplot as plt | |
from wordcloud import WordCloud | |
from PIL import Image | |
data_dropped = data.dropna() | |
text = data_dropped['shape'].values | |
string_text = ' '.join(text) |