Week by week

You will find the course announcements and daily activities here.

🌀 Fall 2024 Week by week

Week 0 : Sept 22 - 28

THIS WEEK ONLY: The schedule and rooms remain the same, but Annie will lead the Thursday setup session, and Carmen will lead the full class on Friday. Everyone is expected to attend both.

Assignments (due by the end of Thursday)

  1. Read the course syllabus. You will find it on the landing page for our EDS 220 course website.

  2. Complete the entry survey. This will help the teaching team get to know you and your expectations for the course. The survey is part of your participation grade. https://forms.gle/s6mJ3BcZR6U7a2Q97.



Setup session (Thursday)

  1. Setup of discussion sections repository following the repository setup instructions
  2. Python assessment. This is not graded and completion counts towards participation grade.



Class 1 (Friday)

  1. Course introduction slides
  2. Set up of GitHub repository for in-class coding sessions.
  3. Covered Python review up to “Objects” section.
  1. Create a new repository on GitHub. Use the following settings:

    • Repository name: eds220-2025-in-class.

    • Description: In-class work for the EDS 220 MEDS course.

    • Visibility: Keep the repository public.

    • Don’t select any template to start.

    • Add a README file.

    • Add a Python .gitignore template.

    • Add the MIT License.

  2. In GitHub, update your repository’s README by:

    1. Deleting all the text that was automatically generated when you created the repo.
    2. Copy-pasting the markdown text below and update [YOUR NAME HERE]. Commit your changes.
# EDS 220 In-Class Repository

This repository hosts all the work completed by [YOUR NAME HERE] during the EDS 220 - *Working with Environmental Data* lectures.

## Course Information

- **Course Title:** [EDS 220 - Working with Environmental Datasets](https://bren.ucsb.edu/courses/eds-220)
- **Term:** Fall 2025
- **Program:** [UCSB Masters in Environmental Data Science](https://bren.ucsb.edu/masters-programs/master-environmental-data-science).

Teaching Team:

- **Instructor:** [Carmen Galaz García](https://github.com/carmengg)
- **Co-Instructor:** [Annie Adams](https://github.com/annieradams) 

Complete materials for the discussion sections and additional resources can be found on the [course website](https://meds-eds-220.github.io/MEDS-eds-220-course/).
  1. Add the URL to your GitHub repository to this spreadhseet.

  2. Clone your new repository into your MEDS/EDS-220 directory in workbench-1.

Preparation for Tuesday class (September 30)
  1. In your EDS-220/eds220-2025-in-class directory, create a new Python notebook called week1-pandas-series.ipynb.
  2. Read the notes chapter on pandas series data frames and follow along with the code.
  3. Read the best practices to write comments in the notes.
  4. Solve the check-in exercises. We’ll present these during class.
  5. Make a summary of the lesson. What are the most important concepts or ideas?

Week 1 : Sept 29 - Oct 5

Class 2 (Tuesday)

  1. Finished Python review.
  2. Student presentations of pandas.Series and pandas.DataFrames exercises.

To store your personal access token (PAT) in the server:

1. Have a PAT ready

If you already have a PAT that you can copy paste, you can skip to step 2. Otherwise, create or regenerate one. You can follow the instructions in the MEDS installation guide or create or regernerate one directly through GitHub.

2. Set up the git credential helper

  1. Using the terminal, navigate to the directory from where you want to push your updates. Make sure you are on that directroy (for example, verify you are on the eds-2025-in-class by running pwd on the terminal).

  2. Run the following command on the terminal:

git config --global credential.helper store

This indicates to git that you want to store the PAT instead of caching it.

  1. Run git config --global --list on the terminal. You should see something like this as the output:
user.name=carmengg
user.email=c_galazgarcia@ucsb.edu
credential.helper=store

That last line indicates that the credential helper is now store.

3. Complete a push

Go through the steps to make a push. Git will prompt you for your credentials, use your GitHub username and use the PAT as the password. Press enter and finalize the push!

4. Verify credentials

  1. Go to your user’s home directory by running cd ~.

  2. Run more .git-credentials. You should see something like this as the output:

https://carmengg:ghp_XTWwWrEtGfL45iIgU6PPDFd990ceIYydqY@github.com

This means your PAT is now stored (the PAT here is an example).

Git should have now stored your PAT on the server!

Preparation for Thursday class (October 2)
  1. Create a directory called data/ within your eds220-2025-in-class repository.
  2. Download the CSV file wetlands_seasonal_bird_diversity.csv from our shared drive.
  3. Do not push this file to GitHub.



Class 3 (Thursday)

  1. Completed activity (see below) to add the data/ directory to the .gitignore file of the EDS-220/in-class-notebooks/ directory.
  2. Covered pandas subsetting notes up to…

Setup:

  1. Download the CSV file wetlands_seasonal_bird_diversity.csv from our shared drive.

  2. In the workbench 1 server, inside your EDS-220/in-class-notebooks/ directory, create a new directory called data.

  3. Using the file navigation panel, upload the wetlands_seasonal_bird_diversity.csv file to the data/ directory.

In the terminal:

  1. Verify you are in the in-class-notebooks/ directory by using pwd. Your output should look like this:
/Users/your-username/MEDS/EDS-220/in-class-notebooks
  1. Run git status. At the end of the output you’ll see:
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        data/

This means git has detected that the data/ directory exists but it is not yet tracking changes in it. We are in charge of deciding whether we want to track changes in it or not!

  1. Run ls to see the files in the directory. Your output will look like this, notice the .gitiginore file is not listed:
README.md  week1-lesson1-python-review.ipynb
data       week1-lesson3-pandas-subsetting.ipynb
  1. Run ls -a to see all files in the directory, including hidden files (those that start with a period .). At this point, your output will look like this:
.                   README.md
..                  data
.git                week1-lesson1-python-review.ipynb
.gitignore          week1-lesson3-pandas-subsetting.ipynb
.ipynb_checkpoints
  1. Run nano .gitignore. This will open the .gitignore file in the nano editor.

  2. Add the data/ folder to the .gitignore file by adding this text at the top of the file:

# Ignore the 'data' directory
data/
  1. Once you have made your changes, save the file:
  • In nano, press CTRL + O (the letter O, not zero) to save.
  • Press Enter to confirm the file name (.gitignore).
  1. Exit the editor by pressing CTRL + X.

  2. Run less .gitignore to scroll through the .gitignore file and verify the changes are there:

  • Use the arrow keys or Page Up/Page Down to scroll through the file.
  • Press q to exit.
  1. Run git status and check the output. The data/ directroy will no longer be listed! You will see your .gitgnore having changes ready for commit.

  2. Commit and push your changes to the .gitignore.

Preparation for Tuesday class (October 7)
  1. In your EDS-220/eds220-2025-in-class directory, create a new Python notebook called week2-basic-plotting.ipynb.
  2. Read the notes on basic plotting and follow along with the code.
  3. Solve the check-in exercises. We’ll present these during class.
  4. Make a summary of the lesson. What are the most important concepts or ideas?



Discussion section (Friday)

There’s no setup for this week’s discussion section.

Week 2 : Oct 6 - Oct 12

Class 4 (Tuesday)

  1. Finished pandas subsetting notes.
  2. Student presentations of basic plotting exercises.
Preparation for next class

Task 1

  1. In your EDS-220/eds220-in-class directory, create a new Python notebook called week2-updating-dataframes.ipynb.
  2. Read the notes on updating dataframes up to the end of the “Removing columns” section and follow along with the code.
  3. We will cover the “Updating values” section during class. The class will start assuming you have all the data loaded.

Task 2

  1. In your EDS-220/eds220-in-class directory, create a new Python notebook called week2-groupby.ipynb.
  2. Read the notes on grouping and follow along with the code.
  3. Summarize the lesson and solve the check-in exercise. We’ll present it during class.



Class 5 (Thursday)

  1. Short review of updating dataframes notes up to “Updating values” section.
  2. Covered “Updating values” section of the updating dataframes notes.
  3. Student discussion of grouping notes and presented solutions for check-in.
Preparation for next class
  1. Install VS Code on your local computer. MEDS installation guide



Discussion section

Preparation for discussion section
  • Complete steps 1, 2, and 3 of the second discussion section to load the data before the discussion section.

  • You’ll be working on exercises 4-9 during section, so it is important that you have the data ready to go tomorrow.

  • Check-in with your discussion section teams via Slack to make sure you’re all ready to go on Friday!

Week 3 : Oct 13 - Oct 19

Class 6 (Tuesday)

  1. Covered conda environments notes on the workbench and slides.
  2. Set up VSCode to work on personal computers, without the course conda environment.
  1. Create a MEDS/EDS-220 directory in your personal computer.

  2. Open VSCode.

  3. Add a new bash terminal in it.

  4. Confirm git installation by running git version in the terminal. If git is installed you will get something similar to

git version 2.33.1
  1. If you don’t get a similar output, install git by following the MEDS installation guide.

  2. Clone your eds-220-in-class repository inside the MEDS/EDS-220 directory. You can do this using the terminal or using the VSCode interface:

  1. Confirm your conda installation by running conda info in the terminal. If conda is active you will get something similar to
active environment : base
active env location : /Users/galaz-garcia/opt/anaconda3
shell level : 1

[...]

UID:GID : 502:20
netrc file : None
offline mode : False
  1. If conda needs to be added to the shell profile, follow the troubleshooting steps in the MEDS installation guide within a bash terminal (not Powershell if you are on Windows).

  2. Install Python extension to VSCode:



Class 7 (Thursday)

  1. Built conda environment for the course on personal computers.
  2. Covered time series notes @ workbench.
  3. Reviewed git workflow with personal computer and workbench.

Make sure you have completed the VSCode set-up before creating the environment.

  1. Open VSCode on your computer.

  2. Download the following YAML file and move it into your eds220-in-class directory: https://github.com/MEDS-eds-220/MEDS-eds-220-course/blob/main/eds220-env.yml

  3. Open a bash terminal inside VSCode and in it:

  1. Verify you are in the eds220-in-class directory.
  2. Verify that the eds220-env.yml file is in the directory.
  3. Run the following conda command to build the environment used for the course:
conda env create --name eds220-env --file eds220-env.yml

It will take about 15 minutes to build the environment. Once conda has finished, verify that the environment was created by running conda env list.

Make sure you have built the eds220-env before creating the kernel.

  1. Open VSCode on your computer.

  2. Add a new bash terminal in it.

  3. Verify you have the eds220-env conda environment available by running

conda env list
  1. Activate the eds220-env by running
conda activate eds220-env
  1. Verify the environment has been activated. Then run
python -m ipykernel install --user --name eds220-env --display-name "EDS-220 env"
  1. Verify that the kernel has been created by running
jupyter kernelspec list

The output should look similar to this:

Available kernels:
  eds220-env        /Users/galaz-garcia/Library/Jupyter/kernels/eds220-env
  python3           /Users/galaz-garcia/opt/anaconda3/share/jupyter/kernels/python3
  1. Restart VSCode.

  2. To use the new kernel, open a Jupyter notebook on VSCode and…

Preparation for next class

Read the notes on coordinate reference systems and vector data formats. Most of it should be review from EDS 223. We will have some questions to test your understanding of key concepts at the start of the next class.



Discussion section (Friday)

Preparation for discussion section
  • Complete steps 1 of the third discussion section. There’s no data to be loaded.

  • You’ll be working on exercises 2-8 during section, so come prepared with some prior knowledge of this dataset..

  • Check-in with your discussion section teams via Slack to make sure you’re all ready to go on Friday!

Week 4 : Oct 20 - Oct 26

Class 8 (Tuesday)

  1. Went over git merge conflict slides.

  2. Installed Quarto following MEDS installation guide and installed the VSCode Quarto extension.

  3. Completed activites 1 and 2 to practice git merge conflicts.

Preparation for next class
  1. In the eds220-in-class repository in your personal computer, create a directory called data/.
  2. Confirm the data/ folder is not being tracked by git.
  3. Download the directories file ca_state_boundary and gbif_sus_scrofa_california from our shared drive. You should have the follwing file structure:
data
  ├── ca_state_boundary
     ├── all the shapefile files
  └── gbif_sus_scrofa_california
      ├── all the shapefile files



Class 9 (Thursday)

  1. Coordinate reference systems review.

  2. Covered the geopandas notes.

Preparation for next class



Discussion Section (Friday)