QuantEcon / QuantEcon.notebooks

Jupyter notebooks contributed by QuantEcon developers, users and the community
BSD 3-Clause "New" or "Revised" License
122 stars 106 forks source link

Updates to notebooks to incorporate changes to incorporate fetch_nb_dependencies() method in QuantEcon #15

Closed mmcky closed 8 years ago

mmcky commented 8 years ago

This PR updates relevant notebooks to use the new dependencies folder and fetch method in QuantEcon.py ...

Submitted notebooks can now use additional code files (*.py), or data files (*.csv) but they should be located in the new dependencies folder in QuantEcon.notebooks. They can be fetched using a simple QuantEcon method fetch_nb_dependencies.

An example

The Wald_Friedman.ipynb uses Wald_Friedman_utils.py file to house some code that would otherwise clutter the notebook. To make this importable it should be located at the root level of the jupyter notebook.

Wald_Friedman_utils.py should be located in dependencies/ and then two lines added to the notebook:

from quantecon import fetch_nb_dependencies
fetch_nb_dependencies(["Wald_Friedman_utils.py"])

This will download the file from GitHub directly - allowing this notebook to be run anywhere. This can also be done with data files etc.

mmcky commented 8 years ago

The current notebook on Lucas Tree has inbuilt write methods for support files. Given this is a community contributed notebooks - I would propose we leave it as is and remove the redundant copies of support files:

This notebook was originally updated to support a lucastree/ dependencies folder but *.py and *.csv files are no longer tracked at the root level. Therefore the notebook can safely write support files and be a self contained notebook.

mmcky commented 8 years ago

@jstac Are you happy for this to be merged into the master branch. We have published a new version of QuantEcon that contains the simple fetch utility.