Using python to accelerate research and increase reproducibility
Woods Hole Oceanographic Institution
Oct 26 & 27, Nov 2 & 3, 2020
8:30AM to 12:30PM EDT
Amber York, Karen Soenen
Where: This training will take place online.
The instructors will provide you with the information you will need to connect to this meeting.
This workshop is targeted towards the technical WHOI staff in order to improve project efficiency and build technical skills. It will only be held for 20 people at a time through an online Zoom meeting. Registration is required. Please contact email@example.com for availability.
To get the most out of this workshop we suggest that participants are already using python for data analysis at a novice or intermediate level. A strong familiarity with Python syntax and basic constructs such as loops, lists and conditionals (i.e. if statements) is required. Python skills covered will progress from novice to intermediate over the course of the workshop.
When: Four half-day, morning workshops on Mondays and Tuesdays. October 26th and 27th, November 2nd and 3rd. Each day will start at 8:30AM and finish at 12:30PM. Breaks will be included in the schedule.
Requirements: Participants must bring a laptop with a
Mac, Linux, or Windows operating system (not a tablet, Chromebook, etc.) that they have administrative privileges on. They should have a few specific software packages installed (listed below).
We are dedicated to providing a positive and accessible learning environment for all. Please
notify the instructors in advance of the workshop if you require any accommodations or if there is
anything we can do to make this workshop more accessible to you.
Workshop sponsorship: DDVPR Technical Staff Training Award
Why take this course?
Managing tabular data for analysis and reproducibility
Improving python skills for data analysis, and visualisation, both for tabular and grdided data
Introducing collaboration and versioning using github and jupyter notebooks.
Managing tabular data for analysis and reproducibility.
Good data organization is the foundation of any research project. Most researchers have data in spreadsheets, so it’s the place that many research projects start.
We organize data in spreadsheets in the ways that we as humans want to work with the data, but computers require that data be organized in particular ways. In order to use tools that make computation more efficient, such as programming languages like R or Python, we need to structure our data the way that computers need the data. Since this is where most research projects start, this is where we want to start too! The concepts learned here also apply more broadly to other tabular formats (e.g. csv and tsv).
In this lesson, you will learn:
Good data entry practices - formatting data tables in spreadsheets
How to avoid common formatting mistakes
Approaches for handling dates in spreadsheets
Basic quality control and data manipulation in spreadsheets
Exporting data from spreadsheets
Improving python skills for data analysis and visualization.
Python is rapidly emerging as the programming language of choice for data analysis in the atmosphere and ocean sciences. By consulting online tutorials and help pages, most researchers in this community are able to pick up the basic syntax and programming constructs (e.g. loops, lists and conditionals). This self-taught knowledge is sufficient to get work done, but it often involves spending hours to do things that should take minutes, reinventing a lot of wheels, and a nagging uncertainty at the end of it all regarding the reliability and reproducibility of the results. To help address these issues, these Data Carpentry lessons cover a suite of programming and data management best practices that aren’t so easy to glean from a quick Google search.
Introducing collaboration and versioning using github and jupyter notebooks.
We will be taking this to a next level, introducing tools to increase collaboration, ensure code provenance and lower mistakes with documentation, and use versioning to not save a thousand copies of your code.
About Data Carpentries
Data Carpentry develops and teaches workshops on the fundamental data skills needed to conduct research. Its lessons are domain specific, building on learners' existing knowledge to enable them to quickly apply skills learned to their own research. Participants will be encouraged to help one another and to apply what they have learned to their own research problems.
If you haven't used Zoom before, go to the
to download and install the Zoom client for your computer.
Set up your workspace
Like other Carpentries workshops,
you will be learning by "coding along" with the Instructors.
To do this, you will need to have both the window for the tool
you will be learning about (a terminal, RStudio, your web browser, etc..)
and the window for the Zoom video conference client open.
In order to see both at once,
we recommend using one of the following set up options:
Two monitors: If you have two monitors,
plan to have your terminal up on one monitor and
the video conferencing software on the other.
Two devices: If you don't have two monitors,
do you have another device (tablet, smartphone) with a medium to large
sized screen? If so, try using the smaller device as your video
conference connection and your larger device (laptop or desktop)
to follow along with the tool you will be learning about.
Divide your screen: If you only have one device
and one screen, practice having two windows
(the video conference program and one of the tools you will be using
at the workshop) open together.
How can you best fit both on your screen?
Will it work better for you to toggle between them
using a keyboard shortcut?
Try it out in advance to decide what will work best for you.
This blog post includes detailed information on how to set up your screen to follow along during the workshop.
Python is a popular language for research computing, and great for general-purpose programming as
well. Installing all of its research packages individually can be a bit difficult, so we recommend
an all-in-one installer.
Regardless of how you choose to install it,
please make sure you install Python version 3.x
(e.g., 3.6 is fine).
We will teach Python using the Jupyter Notebook,
a programming environment that runs in a web browser (Jupyter Notebook will be installed by Anaconda). For this to work you will need a reasonably
up-to-date browser. The current versions of the Chrome, Safari and
Firefox browsers are all
(some older browsers, including Internet Explorer version 9
and below, are not).
Download the Anaconda Installer with Python 3 for Linux.
(The installation requires using the shell. If you aren't
comfortable doing the installation yourself
stop here and request help at the workshop.)
Open a terminal window and navigate to the directory where
the executable is downloaded (e.g., `cd ~/Downloads`).
and then press
Tab to autocomplete the full file name. The name of
file you just downloaded should appear.
(or Return depending on your keyboard).
You will follow the text-only prompts.
To move through the text, press Spacebar.
Type yes and press enter to approve the license.
Press Enter (or Return)
to approve the default location
for the files.
Type yes and press
Enter (or Return)
to prepend Anaconda to your PATH
(this makes the Anaconda distribution the default Python).
Close the terminal window.
After installing either Anaconda launch a Jupyter notebook by typing this command from the terminal:
The notebook should open automatically in your browser. If it does not or you wish to use a different browser, open this link: <http://localhost:8888>.
For a brief introduction to Jupyter Notebooks, please consult our [Introduction to Jupyter Notebooks](https://datacarpentry.org/python-ecology-lesson/jupyter_notebooks/) page.