This file contains 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 assign_taxi_zones(df, lon_var, lat_var, locid_var): | |
"""Joins DataFrame with Taxi Zones shapefile. | |
This function takes longitude values provided by `lon_var`, and latitude | |
values provided by `lat_var` in DataFrame `df`, and performs a spatial join | |
with the NYC taxi_zones shapefile. | |
The shapefile is hard coded in, as this function makes a hard assumption of | |
latitude and longitude coordinates. It also assumes latitude=0 and | |
longitude=0 is not a datapoint that can exist in your dataset. Which is | |
reasonable for a dataset of New York, but bad for a global dataset. | |
Only rows where `df.lon_var`, `df.lat_var` are reasonably near New York, |
This file contains 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
#!/bin/bash | |
sudo apt update && sudo apt upgrade -y | |
sudo apt install s3cmd awscli -y | |
wget https://repo.continuum.io/miniconda/Miniconda3-4.2.12-Linux-x86_64.sh | |
bash Miniconda*sh -b -p ${HOME}/miniconda3 | |
echo "export PATH=${HOME}/miniconda3/bin:${PATH}" >> ~/.bashrc | |
export PATH=${HOME}/miniconda3/bin:${PATH} | |
conda install -c conda-forge geopandas python-snappy dask distributed \ | |
fastparquet fiona numba boto3 jupyter seaborn -y |
This file contains 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
############################################################################## | |
#super duper shell wildcards. Makes zsh worth using | |
setopt extendedglob | |
############################################################################## | |
#keep history file between sessions | |
HISTSIZE=1000000 | |
SAVEHIST=1000000 | |
HISTFILE=$HOME/.history | |
setopt APPEND_HISTORY |