AI, Robotics & Software Engineering
Instructor: Ranyé McLendon
Module 2 - Understanding Data Structures and Visualizing with Python
Continue to Module 2
How many digital devices do you use regularly ?
Type your answers in the chat
01:00
Index
Monday:
Wednesday:
Quiz 1
Objectives
Module 2 Reading
Lab 2: Maryland Broadband Speed Analysis and Visualization
Submission
Real-World Data (pandas)
Next Week: Discussion 2, Robotics Simulation Basics
Python Lists & Dictionaries
Resources
Visualizations (matplotlib)
Pre-Lab Walkthrough
Lab 2 Preview
Objectives
- Read and manipulate real-world CSV data using pandas
- Use Python lists and dictionaries to organize information
- Create bar or pie charts using matplotlib
- Connect data insights to real-world digital inequality
Module 2 Reading Assignment
Book Reading: No assigned reading from Learning Robotics Using Python this week. Our focus is on Python data structures + visualization. These topics are not directly covered in the textbook. Instead, you will use beginner-friendly online Python resources to build your foundation. Recommended online resources:
- Python Lists and Dictionaries.
- Pandas Documentation: Working with CSV files.
- Matplotlib Documentation: Creating charts in Python.
These resources will prepare you for Lab 2.
Real-World Data
DataFrames are like tables. Easy to filter and analyze.
DataFrames
pd.read_csv('filename.csv') loads CSV into a DataFrame
Examples
Pandas simplifies data loading and manipulation.
pandas
pandas
DataFrames
Example
What and Why?
Google Colab
Python Lists & Dictionaries
Dictionaries
Lists
- Dictionaries store data in pairs: each key maps to a value
- Keys are unique and typically strings or numbers
- Great for representing structured data
- Ideal for organizing robot attributes or mapping labels to values
- Lists store multiple items in a specific order
- Items can be of any data type (numbers, strings, objects)
- Add, remove, or change items
- Useful for storing sequences like sensor readings
Example
Sample code snippet for Dictionaries
Sample code snippet for Lists
What and Why?
Google Colab
Visualization (matplotlib)
Common Charts
matplotlib
- Bar charts: Compare categories (e.g., internet access by area)
- Pie charts: Show proportions or percentages
- Line plots: Display trends over time or continuous data
- Other charts: scatter plots, histograms, box plots
- matplotlib is Python’s most widely used plotting library
- Enables creation of a variety of static, animated, and interactive visualizations
- Highly customizable: control over colors, labels, fonts, and styles
Example
Applying Insights to Digital Inequality
Visualizations reveal disparities in technology access
In 2018, 96,000 Baltimore households (40.7%) lacked wireline broadband, and 75,000 (33%) didn't own a desktop or laptop computer.These gaps are more pronounced in low-income households, with 80% of homes lacking computers in the bottom half of the city's income distribution.
Use this side to give more information about a topic.
Use this side to give more information about a topic.
Among households with children under 17, 27.3% in Baltimore lacked a desktop or laptop computer, significantly higher than the national rate of 16.2% .
These charts underscore the urgent need for targeted interventions in Baltimore's underserved neighborhoods.
Google Colab
Pre-Lab Walkthrough
Line Plot
Bar Chart
Colab
Pie Charts
Load CSV
Create a Pie Chart with plt.pie()
Create a Bar Chart with plt.bar()
Create and load the CSV using pandas
Open new Google Colab notebook
Create a Line Plot with plt.plot()
Lab 2 Preview: Visualizing Digital Access
Objective: Students will write a Python script that explores and visualize digital access data.
- Load a provided CSV (e.g., tech access by zip code)
- Use pandas to explore and clean the data
- Create a bar or pie chart using matplotlib
- Add a markdown cell explaining:
- Which zip code has the fastest average download speed?
- How does the average download speed compare to the minimum and maximum in the top 10?
- Are there significant differences between zip codes, or is the speed fairly uniform?
Lab 2 Walkthrough and CSV – Available in the Course Content materials sectio
Quiz 1: Python + Visualiztion
Please turn on your camera and log into the portal to take the quiz. 2/2 Do you like this personality? Ask ChatGPT
20:00
Google Colab
Lab 2: Maryland Broadband Speed Analysis and Visualization
- Go to colab.research.google.com. Click on "File" to start a "New notebook in Drive"
- Rename it Module2_LastNameAccess_Charts.ipynb
- Ensure you have the CSV file from the course content, Maryland_Broadband_Speed_Test_-__ZIP_Code_(Download).csv.
- Import pandas and matplotlib libraries
- Load the CSV into a DataFrame and check the first few rows
- Remove rows with missing average download speed
- Select the 10 zip codes with the highest average download speed and sort descending (fastest to slowest)
- Plot the vertical bar chart to visualize average download speed by zip code
- Calculate minimum, maximum, and average download speeds for the top 10 zip codes. Plot a pie chart
- Plot the line chart to visualize average download speed by zip code
Upload CSV to Colab: Download csv file provided in the course material, labeled as Maryland_Broadband_Speed_Test_-_ZIP_Code_(Download).csv
Take a Screenshot of the chart for the discussion board #2 (due next week)
Using markdown, add comment lines explaining:
- Which zip code has the fastest average download speed?
- How does the average download speed compare to the minimum and maximum in the top 10?
- Are there significant differences between zip codes, or is the speed fairly uniform?
There is no discussion post for this module; the second one will be due in Module 3
Lab 2 Submission
Grading Criteria:
- Code runs without errors (40 points)
- Top 10 zip codes correctly selected and visualized (40 points)
- Clear comments, Markdown explanations, and analysis observations (20 points)
Ensure your notebook has:
- A Markdown title with your name and date.
- All code commented for clarity.
- All the charts and screenshots.
- Observations or brief answers to analysis questions.
- Go to File, then Download (.ipynb) to save the notebook file.
- Upload the .ipynb file to the Lab 2 submission folder in Brightspace by Sunday at 11:59 PM EST.
Create and submit a Google Colab notebook (Module2_Access_Charts.ipynb) that:
- Loads the Maryland_Broadband_Speed_Test_-__ZIP_Code_(Download).csv dataset using pandas.
- Cleans the data by removing rows with missing average download speed.
- Selects the top 10 zip codes by average download speed.
- Visualizes the data using a vertical bar chart, line plot, and pie chart.
- Includes analysis and observations based on the charts.
Next Week
Focus: Robotics Simulation Basics — Logic, control systems, and assistive tech applications Skills: Using conditionals, simulating sensors, understanding robotics control logic, navigating TinkerCAD Circuits and Webots Lab: Simulate a simple robot with light or motion sensors, and use conditionals to mimic assistive technology behavior Assessments: Lab 3 + Discussion Post #2. Prep: Review Python conditionals (if, elif, else), explore TinkerCAD Circuits interface, watch an intro to Webots simulation tutorial
Resources
Data & Maps
- Abell Foundation – The Digital Divide in Baltimore (PDF): https://abell.org/wp-content/uploads/2022/02/2020_Abell_digital20divide_full20report_FINAL_web20dr.pdf
- Maryland Office of Statewide Broadband – Data Hub: https://office-of-statewide-broadband-maryland.hub.arcgis.com/
- FCC National Broadband Map – Data Download (June 2023): Provided in course files.
Tools & Platforms
- Google Colab (for Python coding in browser): https://colab.research.google.com/
- Lab 2 Walkthrough PDF - Provided in course files.
- Textbook: Learning Robotics Using Python (2nd Ed.) – Lentin Joseph
Python & Libraries
- Python Overview: https://www.python.org/about/
- Pandas (data analysis library): https://pandas.pydata.org/
- Matplotlib (data visualization library): https://matplotlib.org/
Why does Visualization matter?
- Turns raw numbers into understandable stories
- Helps identify patterns, gaps, and outliers
- Supports data-driven decisions on issues like digital inequality
Why Use Lists and Dictionaries?
- Flexible, easy-to-understand data structures
- Fundamental for data manipulation in Python
- A bridge between raw data and advanced analysis or visualization
Load a CSV file with pandas:
Example: import pandas as pd# Load data from CSV file into a DataFramedata = pd.read_csv('filename.csv')# Show the first 5 rows to preview the datasetprint(data.head())
pandas
Let's you quickly sort, filter, and analyze information
- Pandas is a powerful Python library designed to handle tabular data easily
- It lets you read data from various sources like CSV, Excel, SQL databases, and more
- Once loaded, data is stored in a DataFrame — think of it like a spreadsheet or SQL table
https://pandas.pydata.org/
DataFrames
The primary pandas data structure.
- A two-dimensional labeled data structure
- Rows represent records; columns represent variables/features
- You can easily sort, filter, group, and summarize data
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html
Week 2 - AI, Robotics & Software Engineering
Ranye Mclendon
Created on August 12, 2025
Start designing with a free template
Discover more than 1500 professional designs like these:
View
Customer Service Course
View
Dynamic Visual Course
View
Dynamic Learning Course
View
Akihabara Course
Explore all templates
Transcript
AI, Robotics & Software Engineering
Instructor: Ranyé McLendon
Module 2 - Understanding Data Structures and Visualizing with Python
Continue to Module 2
How many digital devices do you use regularly ?
Type your answers in the chat
01:00
Index
Monday:
Wednesday:
Quiz 1
Objectives
Module 2 Reading
Lab 2: Maryland Broadband Speed Analysis and Visualization
Submission
Real-World Data (pandas)
Next Week: Discussion 2, Robotics Simulation Basics
Python Lists & Dictionaries
Resources
Visualizations (matplotlib)
Pre-Lab Walkthrough
Lab 2 Preview
Objectives
Module 2 Reading Assignment
Book Reading: No assigned reading from Learning Robotics Using Python this week. Our focus is on Python data structures + visualization. These topics are not directly covered in the textbook. Instead, you will use beginner-friendly online Python resources to build your foundation. Recommended online resources:
- Python Lists and Dictionaries.
- Pandas Documentation: Working with CSV files.
- Matplotlib Documentation: Creating charts in Python.
These resources will prepare you for Lab 2.Real-World Data
DataFrames are like tables. Easy to filter and analyze.
DataFrames
pd.read_csv('filename.csv') loads CSV into a DataFrame
Examples
Pandas simplifies data loading and manipulation.
pandas
pandas
DataFrames
Example
What and Why?
Google Colab
Python Lists & Dictionaries
Dictionaries
Lists
Example
Sample code snippet for Dictionaries
Sample code snippet for Lists
What and Why?
Google Colab
Visualization (matplotlib)
Common Charts
matplotlib
Example
Applying Insights to Digital Inequality
Visualizations reveal disparities in technology access
In 2018, 96,000 Baltimore households (40.7%) lacked wireline broadband, and 75,000 (33%) didn't own a desktop or laptop computer.These gaps are more pronounced in low-income households, with 80% of homes lacking computers in the bottom half of the city's income distribution.
Use this side to give more information about a topic.
Use this side to give more information about a topic.
Among households with children under 17, 27.3% in Baltimore lacked a desktop or laptop computer, significantly higher than the national rate of 16.2% .
These charts underscore the urgent need for targeted interventions in Baltimore's underserved neighborhoods.
Google Colab
Pre-Lab Walkthrough
Line Plot
Bar Chart
Colab
Pie Charts
Load CSV
Create a Pie Chart with plt.pie()
Create a Bar Chart with plt.bar()
Create and load the CSV using pandas
Open new Google Colab notebook
Create a Line Plot with plt.plot()
Lab 2 Preview: Visualizing Digital Access
Objective: Students will write a Python script that explores and visualize digital access data.
Lab 2 Walkthrough and CSV – Available in the Course Content materials sectio
Quiz 1: Python + Visualiztion
Please turn on your camera and log into the portal to take the quiz. 2/2 Do you like this personality? Ask ChatGPT
20:00
Google Colab
Lab 2: Maryland Broadband Speed Analysis and Visualization
Upload CSV to Colab: Download csv file provided in the course material, labeled as Maryland_Broadband_Speed_Test_-_ZIP_Code_(Download).csv
Take a Screenshot of the chart for the discussion board #2 (due next week)
Using markdown, add comment lines explaining:
There is no discussion post for this module; the second one will be due in Module 3
Lab 2 Submission
Grading Criteria:
Ensure your notebook has:
Create and submit a Google Colab notebook (Module2_Access_Charts.ipynb) that:
Next Week
Focus: Robotics Simulation Basics — Logic, control systems, and assistive tech applications Skills: Using conditionals, simulating sensors, understanding robotics control logic, navigating TinkerCAD Circuits and Webots Lab: Simulate a simple robot with light or motion sensors, and use conditionals to mimic assistive technology behavior Assessments: Lab 3 + Discussion Post #2. Prep: Review Python conditionals (if, elif, else), explore TinkerCAD Circuits interface, watch an intro to Webots simulation tutorial
Resources
Data & Maps
- Abell Foundation – The Digital Divide in Baltimore (PDF): https://abell.org/wp-content/uploads/2022/02/2020_Abell_digital20divide_full20report_FINAL_web20dr.pdf
- Maryland Office of Statewide Broadband – Data Hub: https://office-of-statewide-broadband-maryland.hub.arcgis.com/
- FCC National Broadband Map – Data Download (June 2023): Provided in course files.
Tools & Platforms- Google Colab (for Python coding in browser): https://colab.research.google.com/
- Lab 2 Walkthrough PDF - Provided in course files.
- Textbook: Learning Robotics Using Python (2nd Ed.) – Lentin Joseph
Python & LibrariesWhy does Visualization matter?
Why Use Lists and Dictionaries?
Load a CSV file with pandas:
Example: import pandas as pd# Load data from CSV file into a DataFramedata = pd.read_csv('filename.csv')# Show the first 5 rows to preview the datasetprint(data.head())
pandas
Let's you quickly sort, filter, and analyze information
https://pandas.pydata.org/
DataFrames
The primary pandas data structure.
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html