Code Monkey home page Code Monkey logo

eds-217's Introduction

Python for Environmental Data Science

Binder

Course Description

This course teaches the fundamentals of programming in Python. Students will learn foundational skills and concepts including data structures, programming basics, and how to clean, subset, aggregate, transform and visualize data. Course materials demonstrate the application of these techniques for environmental data analysis and problem solving.

Course Goals

  1. To develop expertise in the Python programming language and the use of Python's data science stack to effectively store, manipulate, and gain insight into environmental data.

  2. To be able to apply this understanding to characterize data on environmental patterns and processes at varying spatial and temporal scales.

Course Format

Students will learn the principles of Python programming and environmental data science by working largely independently on daily course materials conducted in Python. Supplemental readings will be assigned for both programming and disciplinary content related to weekly themes.

How to use this repository.

If you are a student in EDS 217:

  1. Login to the EDS 217 JupyterHub Server.

    • The class server is located at https://taylor.bren.ucsb.edu/. You must be on campus or connected to the campus VPN to access this site.

    • Our server is running RStudio, which includes an installation of JupyterLab. JupyterLab is an interactive environment for executing python code. Here are a couple of tutorials that introduce JupyterLab:

  2. Fork this repository to create a local copy in your github account. Do this by clicking the "Fork" button in the upper right corner of the repository home page.

  3. Login to the class server using your Bren user ID.

Note: You will need to be on campus or connected to UCSB's VPN to access the server.

  1. Once you have logged into RStudio, start a new session by clicking the +New Session button at the to of the browser window.

  2. In the dialog box that pops up, create a session name (recommended: EDS 217), and select JupyterLab as the Editor. The Cluster option should be left as Local (the default)

  3. Wait a moment for the JupyterLab instance to get initialized.

  4. Clone the forked repository to your server instance.

    • Open a Terminal in your JupyterLab instance. (Instructions)

    • Type git clone and the the url for your forked copy of this repository, which is https://github.com/<your username>/eds-217, where is your github user id.

      The entire command will look like this:

      $ git clone https://github.com/<your username>/eds-217

      Note: In the line above, the $ is your terminal prompt. On other systems, the command prompt is something like >, or [username]$. To keep these directions more general, I will just use $ to represent the command prompt throughout our docs. The key point is that you don't need to type this as part of the command.

    • Press Enter. A local clone of the class repository will be created in your JupyterLab instance.

       $ git clone https://github.com/<your username>/eds-217
       > Cloning into eds-217...
       > remote: Counting objects: 10, done.
       > remote: Compressing objects: 100% (8/8), done.
       > remove: Total 10 (delta 1), reused 10 (delta 1)
       > Unpacking objects: 100% (10/10), done.
      

      You will now have a new local directory in your instance called eds-217/, which contains all of the course materials. Before proceeding, we need to make sure that your instance has all the necessary python libraries that the course materials require.

  5. Use the file browser in JupyterLab to open the eds-217/ directory.

  6. Double-click the test_environment.ipynb file. This will open the file into a Jupyter notebook editing environment.

  7. Follow the instructions in the notebook to execute the cells and confirm that your installation is working correctly. If all goes well, you will get a message saying You're all set!, and some detailed information on the various packages installed on taylor.bren.ucsb.edu. Now you're ready to learn some python! The index.ipynb notebook in the exercises folder is a good place to start to navigate to exercises according to the course outline.

Local Installation (for Instructors or non-students)

  1. Install Conda & Git.

    • Mac OS: Use homebrew

      $ brew install anaconda

      $ brew install git

    • Windows: ??

    • Linux: Use homebrew??

  2. Clone the repository to your local machine and cd into the class repo directory

    $ git clone https://github.com/environmental-data-science/eds-217

    $ cd eds-217

  3. Create a conda environment using the environment.yml file included in the repository.

    $ conda env create --file environment.yml

    Note: We are using python version 3.10.5 in this class. That may change in the future, but for now it matches the python that taylor.bren.ucsb.edu is using in RStudio's version of JupyterHub.

  4. Activate the conda envrionment

    $ conda activate eds-217

  5. Install pip into the local conda environment.

    $ conda install pip

  6. Add additional libaries to your conda environment using pip.

    $ pip install -r requirements.txt

    Note: We are using pip to manage dependencies within this conda environment. The use of pip and the requirements.txt file ensures consistency with our insallations on the JupyterHub server. This allows us to make sure that the working environment on our local machines matches exactly the working environment on JupyterHub.

    Note: If you add a package to your local environment that is used in any of the course materials, you must use pip freeze > requirements.txt and push the new commit to our repo.

    Update

eds-217's People

Contributors

anna-boser avatar brynemorgan avatar kcaylor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.