Skip to content

Commit

Permalink
update student version with curriculum book changes
Browse files Browse the repository at this point in the history
actions-user committed Oct 3, 2023
1 parent 2a0723c commit 24fe863
Showing 16 changed files with 178,755 additions and 175,055 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 GeoSmart
Copyright (c) 2023 GeoSmart

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
35 changes: 30 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
# GeoSMART Curriculum Jupyter Book (ESS 469/569)

[![Deploy](https://github.com/geo-smart/curriculum-book-student/actions/workflows/deploy.yaml/badge.svg)](https://github.com/geo-smart/curriculum-book-student/actions/workflows/deploy.yaml)
[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://geo-smart.github.io/curriculum-book-student)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/geo-smart/curriculum-book-student/HEAD?urlpath=lab)
[![Deploy](https://github.com/geo-smart/curriculum-book/actions/workflows/deploy.yaml/badge.svg)](https://github.com/geo-smart/curriculum-book/actions/workflows/deploy.yaml)
[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://geo-smart.github.io/curriculum-book)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/geo-smart/curriculum-book/HEAD?urlpath=lab)
[![GeoSMART Library Badge](book/img/curricula_badge.svg)](https://geo-smart.github.io/curriculum)
[![Student Version](book/img/student_version_badge.svg)](https://geo-smart.github.io/curriculum-book-student/)

## About
## Repository Overview

This repository stores configuration for GeoSMART curriculum content, specifically the student version of the book. This version of the book should never be directly edited, as the student version is automatically generated on push.
This repository stores configuration for GeoSMART curriculum content, specifically the teacher version of the book. Only this version of the book should ever be edited, as the student version is automatically generated on push by github actions.

## Making Changes

Edit the book content by modifying the `_config.yml`, `_toc.yml` and `*.ipynb` files in the `book` directory. The book is hosted on Github Pages and will be automatically updated on push, and the student book will also be created automatically on push.

To modify the exact differences between this book and the student book, edit `.github/workflows/clean_book.py`. When you push, a github action will clone the repo and run this python file which modifies certain parts of `*.ipynb` file contents, then pushes to the student repo. To edit the student repo's README, edit `STUDENT_README.md`. The Github Actions workflow also automatically replaces `README.md` with `STUDENT_README.md` in the student repo.

### `Student Response Sections`

One modifications made by the `clean_book.py` workflow is to clear sections marked for student response. Code cells marked for student response may contain code in the teacher version of the book, but will have their code removed and replaced with a TODO comment in the student version.

To mark a code cell to be cleared, insert a markdown cell directly preceding it with the following content:

````markdown
```{admonition} Student response section
This section is left for the student to complete.
```
````

## Serving Locally

Activate the `curriculum_book` conda environment (or any conda environment that has the necessary jupyter book dependencies). Navigate to the root folder of the curriculum book repository in anaconda prompt, then run `python server.py`.

On startup, the server will run `jb build book` to build all changes to the notebook and create the compiled HTML. The server code can take a `--no-build` flag (or `--nb` shorthand) if you don't want to build any changes you've made to the notebooks. In the case that you don't want to build changes made to the notebooks, you can just run `python serer.py --nb` from any terminal with python installed.
10 changes: 10 additions & 0 deletions STUDENT_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# GeoSMART Curriculum Jupyter Book (ESS 469/569)

[![Deploy](https://github.com/geo-smart/curriculum-book-student/actions/workflows/deploy.yaml/badge.svg)](https://github.com/geo-smart/curriculum-book-student/actions/workflows/deploy.yaml)
[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://geo-smart.github.io/curriculum-book-student)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/geo-smart/curriculum-book-student/HEAD?urlpath=lab)
[![GeoSMART Library Badge](book/img/curricula_badge.svg)](https://geo-smart.github.io/curriculum)

## About

This repository stores configuration for GeoSMART curriculum content, specifically the student version of the book. This version of the book should never be directly edited, as the student version is automatically generated on push.
2 changes: 1 addition & 1 deletion book/Chapter1-GettingStarted/1.5_version_control_git.md
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ Create a GitHub account using the same user name and email address as in your gi
GitHub has a Command Line Interface to use with the Terminal. Check out the Github CLI [Cheat Sheet](https://education.github.com/git-cheat-sheet-education.pdf).


GitHub has a GUI [desktop app](https://desktop.github.com/) for all OS. The desktop app handles the CLI in a user friendly API (Application Programming Interface). The workflow and visualization are really friendly and it is recommended to use from the laptop environment. In JupyterHubs from remote servers, it is still necessary to use CLI.
GitHub has a GUI [desktop app](https://desktop.github.com/) for all OS, including MacOSX and Windows. The desktop app handles the CLI in a user friendly API (Application Programming Interface). The workflow and visualization are really friendly and it is recommended to use from the laptop environment. In JupyterHubs from remote servers, it is still necessary to use CLI.

## Notes on GitHub enhanced authentication
GitHub offers 3 ways to enhance authentication. Download the Android/iOS GitHub Mobile app. Just like Duo, GitHub will use the phone for additional layers of authentication.
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 2.5 Data Formats\n",
"# 2.2 Data Formats\n",
"\n",
"In this tutorial, we will manipulate the data structure from and to several data formats.\n",
"\n",
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "47124ce9",
"metadata": {},
@@ -23,7 +22,7 @@
"\n",
"Sequence of data can be stored in python *lists*. Lists are very flexible; data of identical type can be appended to list on the fly.\n",
"\n",
"Numpy arrays are multi-dimensional objects of specific data types (floats, strings, integers, ...). Numpy arrays should be declared first! Allocating memory for the data ahead of time can save computational time. Numpy arrays support arithmetic operations.\n",
"Numpy arrays area multi-dimensional objects of specific data types (floats, strings, integers, ...). ! Numpy arrays should be declared first ! Allocating memory of the data ahead of time can save computational time. Numpy arrays support arithmetic operations.\n",
"There are numerous tutorials to get help. https://www.earthdatascience.org/courses/intro-to-earth-data-science/scientific-data-structures-python/numpy-arrays/"
]
},
@@ -37,8 +36,8 @@
"# import module\n",
"import numpy as np\n",
"\n",
"# define an array of one dimesion\n",
"# this is a list of floats:\n",
"# define an array of dimension one from.\n",
"#this is a list of floats:\n",
"a=[0.7 , 0.75, 1.85]\n",
"# convert a list to a numpy array\n",
"a_nparray = np.array(a)"
@@ -96,12 +95,11 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "178b20ce",
"metadata": {},
"source": [
"## Introduction to Matplotlib\n",
"## Introduction fo Matplotlib\n",
"\n",
"**Some tips from Sofware-Carpentry**\n",
"\n",
@@ -115,6 +113,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "323f29fc",
"metadata": {},
"outputs": [],
"source": [
@@ -134,6 +133,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d9451b3e",
"metadata": {},
"outputs": [],
"source": [
@@ -153,6 +153,7 @@
},
{
"cell_type": "markdown",
"id": "e156ec89",
"metadata": {},
"source": [
"## Synthetic Arrays\n",
@@ -166,6 +167,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e3938d8a",
"metadata": {},
"outputs": [],
"source": [
@@ -188,6 +190,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "449dfc8b",
"metadata": {},
"outputs": [],
"source": [
@@ -210,6 +213,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c74db68b",
"metadata": {},
"outputs": [],
"source": [
@@ -220,6 +224,7 @@
},
{
"cell_type": "markdown",
"id": "d5d9add8",
"metadata": {},
"source": [
"## 2D arrays in Numpy"
@@ -228,6 +233,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c97eb3cd",
"metadata": {
"scrolled": true
},
@@ -255,12 +261,12 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "5afc4417",
"metadata": {},
"source": [
"## Comparing 1D and 2D arrays\n",
"Comparing data often means calculating a distance or dissimilarity between the two data. Similarity is equivalent to the proximity of two data.\n",
"Comparing data often means calculating a distance or dissimilarity between the two data. Similarity is equialent to proximity of two data.\n",
"\n",
"**Euclidian distance**\n",
"\n",
@@ -309,7 +315,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3.9.6 ('madrona')",
"language": "python",
"name": "python3"
},
@@ -323,11 +329,11 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.0"
"version": "3.9.6"
},
"vscode": {
"interpreter": {
"hash": "c446eef832ec964573dc49f36fd16bdbed40cbfbefbf557bc2dc78d9e7968689"
"hash": "1c2df93b363d800c8a9b94963221f1be1d8deaf6a76f83b6b9a486ad05d69583"
}
}
},
175,029 changes: 0 additions & 175,029 deletions book/Chapter2-DataManipulation/2.3_pandas_rendered.ipynb

This file was deleted.

594 changes: 594 additions & 0 deletions book/Chapter2-DataManipulation/2.4_data_formats.ipynb

Large diffs are not rendered by default.

1,218 changes: 1,218 additions & 0 deletions book/Chapter2-DataManipulation/2.4_pandas.ipynb

Large diffs are not rendered by default.

175,034 changes: 175,034 additions & 0 deletions book/Chapter2-DataManipulation/2.4_pandas_rendered.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 2.4 Xarrays\n",
"# 2.5 Xarrays\n",
"\n",
"Xarrays are multi-dimensional arrays (\"tensors\") that can have several attributes and dimensions. The core structure is ``DataArray``, the N dimensional array that is similar to a ``pandas.Series``. The second is the ``Dataset`` that is a multi-dimensional, in-memory array database. It is a dictionary like container of ``DataArray``, the equivalent to ``pandas.DataFrame``.\n",
"\n",
1,248 changes: 1,248 additions & 0 deletions book/Chapter2-DataManipulation/mlgeo_2.2_pandas_basic_mapping.ipynb

Large diffs are not rendered by default.

594 changes: 594 additions & 0 deletions book/Chapter2-DataManipulation/mlgeo_2.4_data_formats.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -695,7 +695,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.9.13"
},
"vscode": {
"interpreter": {
8 changes: 4 additions & 4 deletions book/_toc.yml
Original file line number Diff line number Diff line change
@@ -49,11 +49,11 @@ parts:
- caption: Chapter 2 - Data Manipulation
chapters:
- file: Chapter2-DataManipulation/2.1_Data_Definitions
- file: Chapter2-DataManipulation/2.2_Numpy_arrays
- file: Chapter2-DataManipulation/2.2_data_formats_rendered
- file: Chapter2-DataManipulation/2.3_Numpy_arrays
- title: Pandas
file: Chapter2-DataManipulation/2.3_pandas_rendered
- file: Chapter2-DataManipulation/2.4_xarrays
- file: Chapter2-DataManipulation/2.5_data_formats_rendered
file: Chapter2-DataManipulation/2.4_pandas_rendered
- file: Chapter2-DataManipulation/2.5_xarrays
- file: Chapter2-DataManipulation/2.6_resampling
- file: Chapter2-DataManipulation/2.7_data_spectral_transforms
- file: Chapter2-DataManipulation/2.8_feature_engineering
2 changes: 1 addition & 1 deletion book/about_this_book/about_this_book.md
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ By the end of the quarter, the students should be able to:

# Syllabus

- Module 1 (weeks 1 and 2): Intro on ML in the Geo and basic tool building for Open Sciences
- Module 1 (weeks 1 ): Intro on ML in the Geo and basic tool building for Open Sciences
- Module 2: (weeks 3 and 4) Creating Machine-Learning Ready Data Sets
- Module 3: (weeks 5 and 6) Feature extraction and clustering
- Module 5: (weeks 7 and 8) Machine Learning

0 comments on commit 24fe863

Please sign in to comment.