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
import requests | |
from bs4 import BeautifulSoup | |
import pandas as pd | |
import datetime | |
import time | |
import os | |
# CONSTANTS | |
expected_ga=4908874 | |
expected_pa=6902763 |
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
import matplotlib.pyplot as plt | |
import numpy as np | |
import pandas as pd | |
gdp_ = 'http://www.ggdc.net/MADDISON/Historical_Statistics/vertical-file_02-2010.xls' | |
gdp = pd.read_excel(gdp_, sheet_name='PerCapita GDP', header =2, usecols=[0, 182], names=['year', 'GlobalGDPPerCapita']).dropna() | |
gdp.year = gdp.year.astype(int) | |
co2_ = 'ftp://data.iac.ethz.ch/CMIP6/input4MIPs/UoM/GHGConc/CMIP/yr/atmos/UoM-CMIP-1-1-0/GHGConc/gr3-GMNHSH/v20160701/mole_fraction_of_carbon_dioxide_in_air_input4MIPs_GHGConcentrations_CMIP_UoM-CMIP-1-1-0_gr3-GMNHSH_0000-2014.csv' | |
co2 = pd.read_csv(co2_) |
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
from __future__ import print_function | |
import sys | |
from nhlscrapi.games.game import Game, GameKey, GameType | |
from nhlscrapi.games.cumstats import Score, ShotCt, Corsi, Fenwick | |
print(sys.version) | |
season = 2014 # 2013-2014 season | |
game_num = 1226 # | |
game_type = GameType.Regular # regular season game |
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 | |
# example use: | |
# [~/gitrepos/dkmehrmann.github.io/_ipynb]$ ../scripts/convert.sh google_maps.ipynb | |
# | |
BUILD_DIR="/home/andrew/gitrepos/dkmehrmann.github.io/_ipynb/" | |
POST_DIR="/home/andrew/gitrepos/dkmehrmann.github.io/_posts/" | |
# use nbconvert on the file |