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
def continentlabs(row): | |
shape = row['geometry'].centroid | |
x,y = shape.x,shape.y | |
return (x,y,row['name']) | |
%matplotlib inline | |
from matplotlib import legend | |
f, ax = plt.subplots(1, figsize=(20, 12)) | |
gpd.read_file(gpd.datasets.get_path('naturalearth_lowres')).plot(ax=ax,color='white',linewidth=0.2) | |
gdf.merge(countdf,left_on='name',right_on='NAME').plot(column='counted',cmap='OrRd',scheme='Fisher_Jenks',ax=ax,linewidth=0.1,edgecolor='white',legend=True,alpha=0.4) |
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
# Author: Linwood Creekmore | |
# email: [email protected] | |
# date: 17 April 2017 | |
import matplotlib.pyplot as plt | |
from matplotlib import gridspec | |
import matplotlib.patches as patches | |
import datetime | |
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 geopandas as gpd | |
import numpy as np | |
import requests | |
import gdal | |
import fiona | |
import uuid | |
import re | |
# informaed by: https://gis.stackexchange.com/questions/225586/reading-raw-data-into-geopandas/225627 |
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
# Author: | |
# Linwood Creekmore III | |
# email: [email protected] | |
# Custom functions for Twitter Geospatial Analysis Blog | |
################################# | |
# Class for corrupt json | |
################################# |
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
# Author | |
# Linwood Creekmore III | |
# April 8 2017 | |
# heavy input from http://socialmedia-class.org/twittertutorial.html | |
# [email protected] | |
import re | |
import copy | |
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
# By: Linwood Creekmore | |
# https://www.linkedin.com/in/linwood-creekmore-iii-a2174538/ | |
from dateutil.parser import parse | |
from concurrent.futures import ProcessPoolExecutor | |
from functools import partial | |
import datetime | |
import re | |
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
[I 21:11:04 InstallContribNbextensionsApp] jupyter contrib nbextension install --user | |
[I 21:11:04 InstallContribNbextensionsApp] Installing jupyter_contrib_nbextensions nbextension files to jupyter data directory | |
[I 21:11:04 InstallContribNbextensionsApp] Installing /Users/linwood/anaconda3/lib/python3.5/site-packages/jupyter_contrib_nbextensions/nbextensions/code_prettify -> code_prettify | |
[I 21:11:04 InstallContribNbextensionsApp] Up to date: /Users/linwood/Library/Jupyter/nbextensions/code_prettify/code_prettify.js | |
[I 21:11:04 InstallContribNbextensionsApp] Up to date: /Users/linwood/Library/Jupyter/nbextensions/code_prettify/code_prettify.yaml | |
[I 21:11:04 InstallContribNbextensionsApp] Up to date: /Users/linwood/Library/Jupyter/nbextensions/code_prettify/demo-jv.gif | |
[I 21:11:04 InstallContribNbextensionsApp] Up to date: /Users/linwood/Library/Jupyter/nbextensions/code_prettify/demo-py.gif | |
[I 21:11:04 InstallContribNbextensionsApp] Up to date: /Users/linwood/Library/Jupyter/nbextensions/code_prettify/demo-R |
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
[D 15:17:30.243 NotebookApp] Searching ['/Users/linwood', '/Users/linwood/.jupyter', '/Users/linwood/anaconda3/envs/scipyML/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files | |
[D 15:17:30.244 NotebookApp] Looking for jupyter_config in /etc/jupyter | |
[D 15:17:30.244 NotebookApp] Looking for jupyter_config in /usr/local/etc/jupyter | |
[D 15:17:30.244 NotebookApp] Looking for jupyter_config in /Users/linwood/anaconda3/envs/scipyML/etc/jupyter | |
[D 15:17:30.245 NotebookApp] Looking for jupyter_config in /Users/linwood/.jupyter | |
[D 15:17:30.245 NotebookApp] Looking for jupyter_config in /Users/linwood | |
[D 15:17:30.246 NotebookApp] Looking for jupyter_notebook_config in /etc/jupyter | |
[D 15:17:30.246 NotebookApp] Looking for jupyter_notebook_config in /usr/local/etc/jupyter | |
[D 15:17:30.246 NotebookApp] Looking for jupyter_notebook_config in /Users/linwood/anaconda3/envs/scipyML/etc/jupyter | |
[D 15:17:30.246 NotebookApp] Loaded config file: /Users/linwood/anaconda3/envs/scipyML/etc/jupyter/jupyter_notebook_c |
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
[D 02:18:44.009 NotebookApp] Searching ['/Users/linwood/projects', '/Users/linwood/.jupyter', '/Users/linwood/anaconda3/envs/scipyML/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files | |
[D 02:18:44.010 NotebookApp] Looking for jupyter_config in /etc/jupyter | |
[D 02:18:44.010 NotebookApp] Looking for jupyter_config in /usr/local/etc/jupyter | |
[D 02:18:44.010 NotebookApp] Looking for jupyter_config in /Users/linwood/anaconda3/envs/scipyML/etc/jupyter | |
[D 02:18:44.011 NotebookApp] Looking for jupyter_config in /Users/linwood/.jupyter | |
[D 02:18:44.011 NotebookApp] Looking for jupyter_config in /Users/linwood/projects | |
[D 02:18:44.012 NotebookApp] Looking for jupyter_notebook_config in /etc/jupyter | |
[D 02:18:44.012 NotebookApp] Looking for jupyter_notebook_config in /usr/local/etc/jupyter | |
[D 02:18:44.012 NotebookApp] Looking for jupyter_notebook_config in /Users/linwood/anaconda3/envs/scipyML/etc/jupyter | |
[D 02:18:44.034 NotebookApp] Loaded config file: /Users/linwood/anaconda3/envs/scipyML/etc/jupyter/ |
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
# Author: | |
# Linwood Creekmore III | |
# email: [email protected] | |
# Acknowledgements: | |
# http://programmingadvent.blogspot.com/2013/06/kmzkml-file-parsing-with-python.html | |
# http://gis.stackexchange.com/questions/159681/geopandas-cant-save-geojson | |
# https://gist.github.com/mciantyre/32ff2c2d5cd9515c1ee7 | |