Welcome to the cores2code repository, the digital companion for the final week of the Cores to Code (C2C) summer research program. This repository contains instructional materials, datasets, and exercises designed to introduce undergraduate geoscience students to coding and data analysis using Python.
Course book: https://cascadiaquakes.github.io/cores2code/
Cores to Code is a three-week immersive summer experience hosted by CRESCENT (the Cascadia Region Earthquake Science Center). The program trains students in subduction zone science through:
- Week 1: Fieldwork – Collecting sediment cores from coastal sites
- Week 2: Lab Analysis – Stratigraphy, microfossil work, and core interpretation
- Week 3: Data & Code – Learning to work with and interpret geologic data using Python (this repo)
During this final week, students transition from physical samples to digital analysis. You'll gain experience in:
- Writing and executing basic Python code
- Loading and cleaning datasets (e.g., from field or lab work)
- Creating figures using
matplotlibandplotly - Performing simple statistical summaries
- Documenting workflows with Jupyter Notebooks
These skills help bridge traditional geoscience methods with modern computational tools.
cores2code/
├── notebooks/ # Jupyter notebooks for guided instruction
│ ├── 01_intro_to_python.ipynb
│ ├── 02_data_handling.ipynb
│ ├── 03_plotting_basics.ipynb
│ └── 04_mini_project_template.ipynb
├── data/ # Example datasets (CSV or similar formats)
│ └── sample_cores.csv
├── exercises/ # Hands-on practice notebooks
│ └── 01_data_cleaning_challenge.ipynb
├── requirements.txt # Python dependencies
└── README.md # This file-
Install Anaconda (recommended):
https://www.anaconda.com/products/distribution -
Launch Jupyter Lab:
jupyter lab
-
Install required packages (if not already installed):
pip install -r requirements.txt
-
Start with the first notebook:
Opennotebooks/01_intro_to_python.ipynband follow along.
- Python – for scripting and analysis
- Jupyter Notebooks – for interactive code + narrative
- NumPy – for working with arrays and math
- Pandas – for data wrangling
- Matplotlib / Plotly – for data visualization
This repository is maintained by instructors and TAs from the CRESCENT , with contributions from:
- Cal Poly Humboldt
- University of Oregon
- Virginia Tech
- UNC Wilmington
Contact your instructor or TA if you get stuck or want to go further!
This is not about becoming a software engineer—it's about learning how basic coding can help you be a better geoscientist. You'll be analyzing real data, automating repetitive tasks, and visualizing findings. Be curious, experiment, and don’t be afraid to break things (and then fix them)!
Happy coding!
— The C2C Teaching Team
This project is licensed under the BSD 3-Clause License. See LICENSE.
|
|
This project is supported by the National Science Foundation through the Cascadia Region Earthquake Science Center (CRESCENT), Cooperative Agreement EAR-2225286.

