In [7]:
# Magics first (server issues)
%matplotlib inline
# Do below if you want interactive matplotlib plot ()
# %matplotlib notebook
# https://ipython.org/ipython-doc/dev/config/extensions/autoreload.html
%load_ext autoreload
%autoreload 2
# %install_ext http://raw.github.com/jrjohansson/version_information/master/version_information.py
%load_ext version_information
%version_information numpy, scipy, matplotlib, pandas
Out[7]:
In [8]:
# Standard library
import os
import sys
sys.path.append("../src/")
# Third party imports
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
# Local imports
from simpleexample import example_func
In [9]:
# Customizations
sns.set() # matplotlib defaults
# Any tweaks that normally go in .matplotlibrc, etc., should explicitly go here
plt.rcParams['figure.figsize'] = (12, 12)
In [10]:
# Find the notebook the saved figures came from
fig_prefix = "../figures/2015-07-16-jw-"
In [ ]:
example_func()
In [15]:
In [3]:
from IPython.display import FileLink
In [4]:
FileLink("../deliver/coal_data_cleanup.ipynb")
Out[4]:
In [6]:
dframe = pd.read_csv("../data/coal_prod_cleaned.csv")
In [7]:
plt.scatter(dframe['Year'], dframe['Production_short_tons'])
Out[7]:
In [10]:
df2 = dframe.groupby('Mine_State').sum()
In [29]:
sns.jointplot('Labor_Hours', 'Production_short_tons', data=df2, kind="reg", )
plt.xlabel("Labor Hours Worked")
plt.ylabel("Total Amount Produced")
plt.tight_layout()
# plt.savefig(fig_prefix + "production-vs-hours-worked.png", dpi=350)
In [23]:
%load_ext autoreload
%autoreload 2
In [24]:
import sys
sys.path.append("../src/")
In [26]:
from simpleexample import example_func
example_func()
Out[26]:
In [27]:
example_func()
Out[27]:
In [ ]: