Demo: Visualize data with Python

A graph of GDP versus time for countries in Oceania.

This demo shows you how to use BadgerCompute for visualizing data using Python's matplotlib and pandas packages.
Part of these materials are adapted from the Software Carpentries's Plotting with Python lesson.

Prerequisites

  • Access to BadgerCompute

Launch BadgerCompute and upload materials

  1. Launch BadgerCompute and sign in using your NetID.
  2. Choose the "Basic Data Science" environment. Click "Start".

    The environment selection screen.

  3. In the left-hand sidebar (navigation), double-click the "work" folder to navigate to your work directory.

    The navigation sidebar in BadgerCompute. The 'work' directory is circled and the 'New Folder' button is highlighted.

  4. Create a new working directory by clicking the "New Folder" button. Name the directory "demo-python-plot". Double-click the newly created directory to navigate into it.

    The navigation sidebar in BadgerCompute. The current directory is demo-python-plot.

  5. Click the large "+" button (or CTRL + SHIFT + L) to create a New Launcher page from the current directory.
  6. At the bottom of the Launcher page, click "Terminal".

    The terminal button.

  7. After the terminal launches, paste the command below to copy download the materials for the demo.
    wget http://badgercompute.wisc.edu/notebooks/demo-python-plot.ipynb
    wget https://swcarpentry.github.io/python-novice-gapminder/files/python-novice-gapminder-data.zip
    unzip python-novice-gapminder-data.zip
    
    In the navigation sidebar, you should see three new items:
    1. data (directory)
    2. python-novice-gapminder.zip
    3. demo-python-plot.ipynb

    Three files in the navigation sidebar.

  8. In the navigation sidebar, double-click demo-python-plot.ipynb to open the notebook. We will be working in this notebook for the rest of the demo.

📝 How to use the notebook

Read and follow the the rest of the guide in the notebook.

To execute code in cells (AKA "run cells"), there are multiple options.
  1. Click on the cell, hold SHIFT and press the ENTER key.
  2. Click the "Play" symbol at the top of the notebook.
  3. Click "Run" in the top menu bar, and select "Run Selected Cell".

🏃‍➡️ Continue exploring

Still want to learn more?
University logo that links to main university website
Website feedback, questions or accessibility issues:badger.compute@wisc.edu
Privacy Notice| © 2025 The Board of Regents of theUniversity of Wisconsin System
CHTC LogoDoIT LogoDSI Logo