This template is based on @chris1610 cookiecutter template. Full details and walk-through of his cookiecutter can be found over at Practical Business Python: Building a Repeatable Data Analysis Process with Jupyter Notebooks.
I made some minor changes to the directory structure. I reformatted the notebooks in the analysis directory to personal preference for data anlaysis.
├── analysis
│ ├── 1-Data_Wrangling.ipynb # Wrangling & cleaning notebook
│ └── 2-EDA.ipynb # Final analysis notebook
├── data # Categorized data files
│ ├── interim # Working folder
│ ├── processed # Cleaned and ready to use
│ └── raw # Unmodified originals
└── reports # Final reports
└── visualizations # Polished visualizations
To use Cookiecutter, you must have it installed along with Python. Once you have Python installed, install Cookiecutter into the current user's folder, upgrade if available:
PIP:
$ pip3 install -U --user cookiecutter
CONDA:
$ conda config --add channels conda-forge
$ conda install cookiecutter
Next, cd
into where you want to save your project file, and run the cookicutter as follows:
$ cookiecutter https://github.com/c-smith7/cookiecutter_data_analysis
In the terminal, you will then be prompted for your desired project name, directory/file name, and brief description of your project.
project_name [project_name]: data_analysis_project
directory_name [data_analysis_project]: project_file
description [More background on the project]: Brief project description..
In the above example, project_file
will be the name of the directory created. Also, the project name and description will automatically populate in the IPYNB notebooks.
Now that you have the cookiecutter template downloaded on your local machine, the next time you want to use it, simply run:
$ cookiecutter cookiecutter_data_analysis
If you'd like to create your own cookiecutter and use this as a template, cookiecutter docs has a quick run through of how to make one.