A logical, reasonably standardized but flexible project structure for doing and sharing data science work.
Cookiecutter Data Science (CCDS) is a tool for setting up a data science project template that incorporates best practices.
Cookiecutter Data Science requires Python 3.8+. Since this is a cross-project utility application, we recommend installing it within the base conda environment. Installation command options:
# With pip from PyPI
pip install git+https://github.com/RowSquared/cookiecutter-data-science.git
To start a new project, run:
ccds
The directory structure of your new project will look something like this (depending on the settings that you choose):
├── LICENSE <- Open-source license if one is chosen
├── Makefile <- Makefile with convenience commands like `make data` or `make train`
├── README.md <- The top-level README for developers using this project.
├── data
│ ├── external <- Data from third party sources.
│ ├── interim <- Intermediate data that has been transformed.
│ ├── processed <- The final, canonical data sets for modeling.
│ └── raw <- The original, immutable data dump.
│
├── docs <- A default mkdocs project; see mkdocs.org for details
│
├── models <- Trained and serialized models, model predictions, or model summaries
│
├── notebooks <- Jupyter notebooks. Naming convention is a number (for ordering),
│ the creator's initials, and a short `-` delimited description, e.g.
│ `1.0-jqp-initial-data-exploration`.
│
├── pipelines <- The pipelines are composed of Jupyter Notebooks, R/Python scripts, and R Markdown files.
│ It is recommended to place these files into specific existing folders or
│ create new ones to ensure optimal navigation and organization.
│
├── pyproject.toml <- Project configuration file with package metadata for {{ cookiecutter.module_name }}
│ and configuration for tools like black
│
├── references <- Data dictionaries, manuals, and all other explanatory materials.
│
├── reports <- Generated analysis as HTML, PDF, LaTeX, etc.
│ └── figures <- Generated graphics and figures to be used in reporting
│
├── requirements.txt <- The requirements file for reproducing the analysis environment, e.g.
│ generated with `pip freeze > requirements.txt`
│
├── setup.cfg <- Configuration file for flake8, ploomber...
│
├── pipelines.yaml <- Pipeline configuration file. It is reccomended to keep it at this level
│ as it might broke if moved into other folders. further info at https://docs.ploomber.io/en/stable/user-guide/index.html
│
└── {{ cookiecutter.module_name }} <- Source code for use in this project.
│
├── __init__.py <- Makes {{ cookiecutter.module_name }} a Python module
│
├── data <- Scripts to download or generate data
│ └── make_dataset.py
│
├── features <- Scripts to turn raw data into features for modeling
│ └── build_features.py
│
├── models <- Scripts to train models and then use trained models to make
│ │ predictions
│ ├── predict_model.py
│ └── train_model.py
│
└── visualization <- Scripts to create exploratory and results oriented visualizations
└── visualize.py