Coder Social home page Coder Social logo

reccs's Introduction

Python Programming in the Geosciences

This is a two-part (morning and afternoon) interactive workshop on using the Python programming language to perform data ingest, analysis, and visualization. The workshop is a part of the RECCS program at CU Boulder.

The workshop will not teach the details of Python--others have done this (see "Resources" below), and it takes more time than we have. The goal of this workshop is to show how a working geoscientist might use some of the plentiful scientific libraries available in Python.

Instructor

Requirements

  • Computer
  • Web browser
  • Internet access
  • Coffee (optional, but recommended)

Agenda

The workshop is divided into morning and afternoon sessions.

Morning

The morning session runs from 9 am until noon, with a break around the midpoint. It covers more basic concepts, but people with experience using Python can help those with less experience.

Topics:

  • Introductions
  • Why Python?
  • Logging in to EarthscapeHub
  • Using Jupyter Notebook
  • Python fundamentals
  • Importing Python libraries
  • Reading data from a csv file with pandas
  • Exercises and discussion

▶️ Run the workshop material on EarthscapeHub

Afternoon

The afternoon session runs from 1 pm until 4 pm, with a break around the midpoint. It covers more advanced topics.

Topics:

  • Loops, conditionals, try statement, functions
  • Reading data from a NetCDF file with scipy
  • Analyzing and visualizing data with Basemap and matplotlib
  • Exercises and discussion

▶️ Run the workshop material on the EarthscapeHub

Extra

Given time, some additional topics that can be covered.

Topics:

  • Exporting a notebook to a PDF file
  • Using shell commands in a terminal
  • Anaconda and conda
  • Using Python modules

Resources

Python:

CU Boulder:

Acknowledgments

CSDMS is supported by the National Science Foundation under Award No. 1831623, Community Facility Support: The Community Surface Dynamics Modeling System (CSDMS).

Portions of the Python language fundamentals section were derived from material that is copyright Software Carpentry and remixed under their license.

NEON (National Ecological Observatory Network). 2D wind speed and direction (DP1.00001.001). https://data.neonscience.org (accessed May 26, 2021)

20th Century Reanalysis V2 data provided by the NOAA/OAR/ESRL PSL, Boulder, Colorado, USA, from their website at https://psl.noaa.gov/data/gridded/data.20thC_ReanV2.html.

reccs's People

Contributors

mdpiper avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

reccs's Issues

Planning the workshops

Python Programming in the Geosciences I, II

Thursday, 2021 June 3

Workshop I (introductory): 9 am -- 12 noon
Workshop II (advanced): 1 pm -- 4 pm

Approximately 18 students from the RECCS program.

Tasks

  • Make syllabi for workshops I and II
  • Use GitHub repo as workshop website
  • Get data for examples
  • Compile a list of online resources for further study through the summer (e.g., Software and Data Carpentry lessons)
  • Make logins for students on CSDMS JupyterHub
  • Set up Zoom links for workshops

Planning

  • Use Excel or CSV as data format (data from NEON?)
  • Use netCDF as a data format (use my example from Level Up! webinars)
  • Review and use Software Carpentry Python material
  • Record meeting for students to review (don't forget to pause recording at lunch)

Workshop I

Goal: Use Python to read data from a file and make a plot in a Jupyter Notebook.

Topics:

  • Introductions
    • name, have you used Python, something about yourself
    • start with me
  • Why Python?
  • Logging on to the CSDMS JupyterHub
  • Using a Jupyter Notebook
  • (intro Python material from Software Carpentry)
  • Python libraries (pandas, matplotlib)
  • Read data from Excel with pandas
  • Plot data with matplotlib
  • Save notebook to a PDF file
  • Go over resources for further study

Workshop II

Goal: Read data from a file, analyze data, make a Jupyter Notebook with graphics as a report.

Topics:

  • Read data from a netCDF file with xarray
  • Creating a Jupyter Notebook
  • Loops, conditionals, try-except block, functions
  • (Use my example from Level Up! webinar)
  • (Analysis?)
  • Go over resources for further study

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.