GOAL
Draw meaningful conclusions from data using Python programming and Scientific Computing principles
2025-08-18_v1.0
Scientific Computing &
Data Visualization with Python
2
2
Objectives
Learn what code is
Learn about libraries
Download a dataset
Code with Python in Google Colaboratory
Write a program to explore and visualize your data
3
PART 1
Scientific Computing and Code
4
Examples of Scientific Computing !
USING HIVE DATA TO SAVE THE BEES
IMPROVING ATHLETE PERFORMANCE THROUGH BIOMETRIC DATA
BUILDING MODELS TO PROMOTE WILDLIFE CONSERVATION
MAPPING OUR FUTURE IN SPACE EXPLORATION
5
5
ANSWER ME!
So let’s think… what are some topics you are interested in?
6
6
Getting Things Done
So how do we actually get these things done?? Coding!
…But what do computer programs look like???
And what actually is code?
6
7
7
What is coding?
Coding is simply telling a computer what to do by giving it instructions!
We write these instructions in programming languages.
We write programs in a development environment.
8
Understanding Code
Even though code is written in a different language, you might be able to interpret and understand it better than you think!
Watch this video to learn more about what code is, what it looks like, and how we can read and understand it!
9
PART 2
Diving Into Python
Python Code
10
Each line of code usually does something!
print("Hello, World!")
Comments are special lines of Python code that don’t do anything
# This is a comment
11
11
11
Let’s Try Google Colab!
Step 1) Open this Colab Notebook.
Step 2) Click the button located in the top left corner.
Step 3) From the dropdown menu, select
Step 4) A new tab should appear with a copy of the Colab Notebook. This is now your personal copy to edit and learn with!
Step 5) Feel free to rename your file in the top left corner next to the
Step 6) Read through all the contents of the Colab Notebook, run the cells, and do the activities to learn more about coding and try it out yourself!
Open the dropdown menu to copy the file here
Save a copy in your Drive here
Name your file here
12
12
Python Libraries
What about when we need to do something more complicated?
We can always write more complicated code, or we can call upon pre-written instructions from libraries!
13
Using Libraries
import library_name as alias
alias.function_name(parameters)
Pandas
Pandas is a library that helps you load in and work with data.
Example Usage:
import pandas as pd
df = pd.read_csv("my_data.csv")
Plotly Express
Plotly is a library that helps create graphs and make interactive visualizations. Plotly express is a simplified version that helps streamline code even more.
Example Usage:
import plotly.express as px
fig = px.scatter(df, x="age", y="income")
fig.show()
14
15
15
Pandas DataFrames
A DataFrame is simply a 2 dimensional table of data in Python.
They’re used to organize and store data, label rows and columns, and easily work with and manipulate different types of data all in one place.
DataFrames also have built in capabilities to help you load in, clean, explore, and analyze your data!
16
PART 3
Dealing With Data
17
17
Data
We code to understand data and the world around us!
Data is everywhere!!
With scientific computing, we can turn this data from just a bunch of numbers into real, valuable insights that can improve our lives!
18
18
CSV Files
In this lab, we will use CSV files, which stands for comma-separated values. CSV files are one of the simplest and most commonly used ways to store and organize data, where each row represents a new record and each column represents a different variable!
Watch this video to learn more about CSV files.
18
19
PART 4
Your Turn! Creating A Data Visualization
20
Your Task: Using Sci Comp to Visualize Your Own Data
✅
WHAT YOU’LL DO:
20
21
Your Turn! Find a Dataset
Now, it’s your turn to find a dataset! Think about what interests you, and search for data on a topic you enjoy. As long as it’s a CSV file, you can use any dataset you want, so make it fun!! We recommend starting your search at one of the following websites:
This website contains lots of information from the U.S. government!
From the link above, scroll down to the sidebar section titled “Format” and select “CSV.” From there, type any topic in the search bar to see all CSV files about it!
Once you’ve found a file, download the CSV version!
Kaggle has all kinds of datasets about unique and fun topics, but you will have to log in to access them.
Navigate to “Datasets” in the sidebar, select “CSV” from the filters located in the search bar, and search away!
Once you’ve found a file, scroll down to where you see the table, and download from there!
22
22
22
Back to Google Colab!
Now, we’re going to work with a new Colab Notebook to take a look at this data! Following the same initial process as last time, do the following:
Step 1) Open this Colab Notebook.
Step 2) Click the button located in the top left corner.
Step 3) From the dropdown menu, select
Step 4) Work through your copy of the Colab Notebook up until the cell that tells you to return to the slides! Make sure you read through the code and try to understand what is happening!
23
23
Thinking About Your Data
Now that everyone has loaded their data and started to explore it, let’s come back together and think about the next step.
Ask good data questions help us uncover patterns, trends, or relationships�
Types of Graphs in Plotly
24
Chart Type | Code Example | When to Use |
Scatter | px.scatter(df, x=..., y=...) | To compare two numeric columns |
Bar | px.bar(df, x=..., y=...) | To compare quantities across categories |
Line | px.line(df, x=..., y=...) | To show changes or trends over time |
Histogram | px.histogram(df, x=...) | To show the distribution of a single numeric column |
Box plot | px.box(df, x=..., y=...) | To compare distributions & spot outliers across groups |
Customizations in Plotly
25
Parameter to Add | Purpose |
title="Your Chart Title" | Adds a title to your chart |
color="another_column" | Adds color groups |
labels={"column_x": "X Label", "column_y": "Y Label"} | Renames axes |
template="plotly_dark" | Recolors the chart (you can google other templates for different color schemes) |
26
26
26
Your Task: Creating Your Own Visualization!
Work through all of these steps with your own dataset that you have selected!
Follow along with the code given to you, and then make your own chart from scratch!
Make sure your chart includes the following:
27
Continue to Explore
If you liked today’s activity, you may be interested in these topics:
Types of engineering relevant to Scientific Computing:
If you want to dive deeper into this topic, Engineering Tomorrow offers a full Scientific Computing course which can be completed independently of this lab. We will teach you to code from scratch and help you work on an awesome project to learn more about sci comp and boost your resume!
If you’re interested, ask your teacher to talk to our ET staff!
Thank you!