Welcome! This is a self-paced workshop designed to help you learn essential tools for environmental data analysis using Python and Jupyter Notebooks.
You are encouraged to search online, use ChatGPT or your favorite AI assistant, and explore additional resources to support your learning.
⚠️ Disclaimer: This course is currently in beta. You may encounter errors or inconsistencies. Please report any issues or contribute to improvements!
Please install the following programs before starting the course:
-
Git – Version control system
👉 Download Git -
Anaconda or Miniconda – Python environment manager
👉 Download Anaconda -
Visual Studio Code (VS Code) – Code editor and notebook interface
👉 Download VS Code
Follow these steps after installing the required programs:
- Clone this repository:
git clone https://github.com/gilbertoCM/env_data_analysis_course.git
cd env_data_analysis_course
- Create the Conda environment:
conda env create -f environment.yml
conda activate environmental_python
This creates an environment called
environmental_python
with all the necessary packages for data science and geospatial analysis.
To update the environment later:
conda env update --file environment.yml --prune
- Install pre-commit tools to clean Jupyter notebooks:
pip install pre-commit
pre-commit install
This ensures your notebooks stay clean by automatically removing outputs and metadata before each commit.
-
Open the folder in VS Code and install the recommended extensions when prompted:
- Python
- Jupyter
- Black Formatter
- GitHub Copilot
- Rainbow CSV
-
Test your setup by creating a new notebook and running:
print("Hello, world!")
All notebooks are in the scripts/
folder.
You can run them using:
jupyter lab
Or directly from VS Code.
The repository is organized into the following folders:
/data
— Contains the CSV database that will be used during the course./documentation
— Includes the course syllabus and exercise descriptions./manuals
— Helpful manuals and guides for Git, Python, and data analysis./output_files
— Stores generated outputs such as PDF files and results./scripts
— This is the main folder where you will work with Jupyter notebooks and Python scripts during the course.
This project uses nbstripout
and pre-commit
to:
- Automatically remove outputs and metadata from notebooks
- Keep Git commits clean and easy to review
No additional setup is needed once you run pre-commit install
.
This course was developed by:
José Gilberto Cardoso Mohedano
Email: gcardoso@cmarl.unam.mx