Hands-on Activity Visualizing Neural Signals:
Interpreting Data to Understand Movement

Quick Look

Grade Level: 10 (10-12)

Time Required: 3 hours 15 minutes

(four 50-minute sessions)

Expendable Cost/Group: US $0.00

Group Size: 2

Activity Dependency: None

Subject Areas: Biology, Chemistry, Computer Science, Data Analysis and Probability, Life Science, Problem Solving, Reasoning and Proof, Science and Technology

NGSS Performance Expectations:

NGSS Three Dimensional Triangle
HS-ETS1-2
HS-ETS1-3
HS-LS1-1
HS-LS3-2
HS-PS2-6
HS-PS4-2

Teacher doing a demo for the class.
Teacher doing a demo for the class.
copyright
Copyright © Ashwin Mohan

Summary

This fourth and final activity in the unit allows students to analyze and visualize neural data, providing them with the opportunity to explore patterns in brain signals. Using Python, students interpret neural activity linked to various movements, such as finger and wrist motions, to understand how neural signals correspond to physical actions. The graphics.py library offers an intuitive introduction to data visualization, enabling students to create clear graphical representations of neural data before advancing to more sophisticated tools like matplotlib. By visualizing and analyzing their findings in a report, students deepen their understanding of neural data processing while honing critical skills in data analysis, programming, and scientific communication.
This engineering curriculum aligns to Next Generation Science Standards (NGSS).

Engineering Connection

Neural processing involves the analysis and interpretation of brain signals, and various types of engineering play crucial roles in this field. Biomedical engineering provides the foundation by designing devices and systems that interact with the nervous system, such as brain-computer interfaces (BCIs) or neural prosthetics, which rely on neural signal processing to restore function or enhance communication. Within this, neural engineering specifically focuses on developing technologies that directly interpret and manipulate neural signals, whether through decoding brain activity for controlling external devices or studying neural patterns to better understand brain function. Data engineering is essential for managing and processing the vast amounts of neural data generated from brain signal recordings, ensuring it is structured, stored, and made accessible for analysis. Finally, software engineering involves development of the algorithms and software systems necessary to analyze, visualize, and interpret neural data, enabling researchers to identify patterns, trends, and insights from complex neural signals. Together, these engineering disciplines collaborate to advance neural processing, from capturing and processing brain signals to interpreting them in meaningful ways for medical, research, and technological applications.

Learning Objectives

After this activity, students should be able to:

  • Analyze neural data in .csv format using Python.
  • Create visual representations of neural data using the graphics.py module in Python.
  • Understand the different kinds of graphs used for visualizing data.

Educational Standards

Each TeachEngineering lesson or activity is correlated to one or more K-12 science, technology, engineering or math (STEM) educational standards.

All 100,000+ K-12 STEM standards covered in TeachEngineering are collected, maintained and packaged by the Achievement Standards Network (ASN), a project of D2L (www.achievementstandards.org).

In the ASN, standards are hierarchically structured: first by source; e.g., by state; within source by type; e.g., science or mathematics; within type by subtype, then by grade, etc.

NGSS Performance Expectation

HS-ETS1-2. Design a solution to a complex real-world problem by breaking it down into smaller, more manageable problems that can be solved through engineering. (Grades 9 - 12)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This activity focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Design a solution to a complex real-world problem, based on scientific knowledge, student-generated sources of evidence, prioritized criteria, and tradeoff considerations.

Alignment agreement:

Criteria may need to be broken down into simpler ones that can be approached systematically, and decisions about the priority of certain criteria over others (trade-offs) may be needed.

Alignment agreement:

NGSS Performance Expectation

HS-ETS1-3. Evaluate a solution to a complex real-world problem based on prioritized criteria and trade-offs that account for a range of constraints, including cost, safety, reliability, and aesthetics, as well as possible social, cultural, and environmental impacts. (Grades 9 - 12)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This activity focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Evaluate a solution to a complex real-world problem, based on scientific knowledge, student-generated sources of evidence, prioritized criteria, and tradeoff considerations.

Alignment agreement:

When evaluating solutions it is important to take into account a range of constraints including cost, safety, reliability and aesthetics and to consider social, cultural and environmental impacts.

Alignment agreement:

New technologies can have deep impacts on society and the environment, including some that were not anticipated. Analysis of costs and benefits is a critical aspect of decisions about technology.

Alignment agreement:

NGSS Performance Expectation

HS-LS1-1. Construct an explanation based on evidence for how the structure of DNA determines the structure of proteins which carry out the essential functions of life through systems of specialized cells. (Grades 9 - 12)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This activity focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Construct an explanation based on valid and reliable evidence obtained from a variety of sources (including students' own investigations, models, theories, simulations, peer review) and the assumption that theories and laws that describe the natural world operate today as they did in the past and will continue to do so in the future.

Alignment agreement:

Systems of specialized cells within organisms help them perform the essential functions of life.

Alignment agreement:

All cells contain genetic information in the form of DNA molecules. Genes are regions in the DNA that contain the instructions that code for the formation of proteins, which carry out most of the work of cells.

Alignment agreement:

Investigating or designing new systems or structures requires a detailed examination of the properties of different materials, the structures of different components, and connections of components to reveal its function and/or solve a problem.

Alignment agreement:

NGSS Performance Expectation

HS-LS3-2. Make and defend a claim based on evidence that inheritable genetic variations may result from: (1) new genetic combinations through meiosis, (2) viable errors occurring during replication, and/or (3) mutations caused by environmental factors. (Grades 9 - 12)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This activity focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Make and defend a claim based on evidence about the natural world that reflects scientific knowledge, and student-generated evidence.

Alignment agreement:

In sexual reproduction, chromosomes can sometimes swap sections during the process of meiosis (cell division), thereby creating new genetic combinations and thus more genetic variation. Although DNA replication is tightly regulated and remarkably accurate, errors do occur and result in mutations, which are also a source of genetic variation. Environmental factors can also cause mutations in genes, and viable mutations are inherited.

Alignment agreement:

Environmental factors also affect expression of traits, and hence affect the probability of occurrences of traits in a population. Thus the variation and distribution of traits observed depends on both genetic and environmental factors.

Alignment agreement:

Empirical evidence is required to differentiate between cause and correlation and make claims about specific causes and effects.

Alignment agreement:

NGSS Performance Expectation

HS-PS2-6. Communicate scientific and technical information about why the molecular-level structure is important in the functioning of designed materials. (Grades 9 - 12)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This activity focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Communicate scientific and technical information (e.g. about the process of development and the design and performance of a proposed process or system) in multiple formats (including orally, graphically, textually, and mathematically).

Alignment agreement:

Attraction and repulsion between electric charges at the atomic scale explain the structure, properties, and transformations of matter, as well as the contact forces between material objects.

Alignment agreement:

Investigating or designing new systems or structures requires a detailed examination of the properties of different materials, the structures of different components, and connections of components to reveal its function and/or solve a problem.

Alignment agreement:

NGSS Performance Expectation

HS-PS4-2. Evaluate questions about the advantages of using a digital transmission and storage of information. (Grades 9 - 12)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This activity focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Evaluate questions that challenge the premise(s) of an argument, the interpretation of a data set, or the suitability of a design.

Alignment agreement:

Information can be digitized (e.g., a picture stored as the values of an array of pixels); in this form, it can be stored reliably in computer memory and sent over long distances as a series of wave pulses.

Alignment agreement:

Systems can be designed for greater or lesser stability.

Alignment agreement:

Modern civilization depends on major technological systems.

Alignment agreement:

Engineers continuously modify these technological systems by applying scientific knowledge and engineering design practices to increase benefits while decreasing costs and risks.

Alignment agreement:

  • SEP.12.9-12.4. Use mathematical representations of phenomena or design solutions to describe and/or support claims and/or explanations. (Grades 9 - 12) More Details

    View aligned curriculum

    Do you agree with this alignment?

Suggest an alignment not listed above

Materials List

Each student needs:

Each group needs:

For the entire class to share:

  • 1 laptop/computer and projector with internet access (for you to demonstrate code)
  • Google Colab account setup

Worksheets and Attachments

Visit [www.teachengineering.org/activities/view/umo-2938-neural-data-graphs-python-activity] to print or download.

Pre-Req Knowledge

Students should have:

Introduction/Motivation

In this activity, you will continue exploring neural data, but this time, you will focus on data visualization.

After processing the neural data into a .csv format, you will use Python and the graphics.py library to draw graphs and create visual representations of the data. Visualizing data is crucial because it can reveal patterns and trends that are not immediately obvious from raw data alone. You will also learn about downsampling and smoothing techniques to make the data more manageable, which is important when working with large datasets to reduce noise and highlight important features. This process will not only help you develop technical skills, but it will also show you how valuable data visualization is in scientific research.

As you work through this activity, think about questions like, "What can we learn from visualizing neural data?" and "How can visual representations help us understand neural signals better?" You might also wonder, "Why is downsampling useful when working with large datasets?" and "How does smoothing affect the interpretation of neural data?" These questions will spark your curiosity and guide you to a deeper understanding of the analysis. By the end of the activity, you will not only create visualizations but also interpret your findings in a detailed report, helping you solidify your understanding of neural data and its significance.

Procedure

Background

The activity focuses on the analysis and visualization of neural data. Understanding how to use Python for data manipulation and graphics.py for creating visual representations is essential. Students can use graphics.py library for graphing.

To effectively teach Python for data manipulation and visualization with graphics.py, you should first ensure that students understand fundamental programming concepts. This includes variables, data types, loops, conditionals, and functions, which provide the foundation for processing and organizing data. Additionally, working with lists and dictionaries, reading and writing files, and performing basic data calculations help students manage real-world datasets before visualizing them.

Once students grasp data handling, they can begin using graphics.py to create visual representations. Teachers should introduce the library by demonstrating how to set up a graphics window with GraphWin() and draw basic shapes such as circles, rectangles, and lines. Customizing visuals with colors and interactivity, such as using getMouse(), allows students to explore how graphical elements respond to user input. These skills help learners transition from static data to dynamic visual representations.

To reinforce learning, you can use hands-on activities, real-world examples, and project-based approaches. Starting with simple shape-drawing exercises builds confidence before progressing to more complex data visualizations, such as plotting graphs from scientific experiments or real-world statistics. Encouraging students to create their own projects fosters creativity and problem-solving, ensuring they understand how Python and graphics.py can transform raw data into meaningful insights.

Before the Activity

A photo showing a teacher doing a demo for the class.
Teacher doing a demo for the class.
copyright
Copyright © Ashwin Mohan

During the Activity

Day 1: Introduction to Data Visualization and Basics of Python Graphics

  1. Explain today’s objective: Students will better understand the importance of data visualization and learn the basics of using Python and the graphics.py library.
  2. Hand out one Pre-Assessment to each student.
  3. Give students time to answer the pre-assessment questions.
  4. As a class, discuss the importance of data visualization in understanding complex datasets.
    • Tell students: “Data visualization is important because it helps us understand information quickly, spot trends and patterns, and make better decisions. Instead of looking at long lists of numbers, we can use graphs and charts to see data in a clear and meaningful way. For example, if you have a year’s worth of temperature data, a graph can instantly show the hottest and coldest months, making patterns easy to identify. Scientists, engineers, and businesses rely on data visualization to analyze problems and find solutions efficiently.”
  1. As a class, discuss what we can learn from visualizing neural data.
    • Tell students: “Visualizing neural data allows us to detect patterns, trends, and anomalies that may not be evident from raw numerical data. For example, visualizations can help identify correlations between neural signals and physical movements, such as differences in activity during finger versus wrist movements. It simplifies complex data into more understandable forms, facilitating insights into neural behavior and functionality.”
  1. Describe different types of visualizations (line graphs, bar charts, scatter plots) that can be created using neural data.
    • Tell students: “Different types of graphs help us analyze neural data in unique ways, revealing patterns in brain activity, neuron firing rates, and signal correlations. These visualizations help neuroscientists make sense of complex neural data, revealing insights about how the brain processes information and responds to stimuli. Here are some key visualizations:
      • A line graph is useful for showing changes in neural activity over time. For example, a neuroscientist might record the electrical activity of a neuron over a 10-second period and plot its firing rate on a graph. The x-axis represents time (seconds), while the y-axis represents the number of spikes per second. This allows researchers to observe how a neuron's activity fluctuates in response to a stimulus, such as a flash of light or a sound.
      • A bar chart is helpful when comparing the average neural responses of different groups or conditions. For example, if a study measures brain activity in response to different types of visual stimuli (such as colors or shapes), a bar chart can show how much activity is generated in different brain regions for each stimulus type. The x-axis represents different conditions (e.g., red, blue, green light), while the y-axis shows the average neural response (such as voltage or firing rate). This makes it easy to compare and identify the most responsive conditions.
      • A scatter plot is ideal for analyzing relationships between two variables in neural data. For instance, a researcher might examine whether there is a correlation between a neuron's firing rate and a person's reaction time in a decision-making task. Each point on the scatter plot represents a trial, with the x-axis showing the neuron's firing rate (spikes per second) and the y-axis showing the reaction time (milliseconds). If the points form a clear trend (such as a downward slope), this suggests a relationship—perhaps that faster-firing neurons lead to quicker reaction times.”
  1. Have students get into pairs.
  2. Give each group time to explore https://www.w3schools.com/python/default.asp, which gives a brief overview of Python programming basics.
  3. Give each group time to explore https://mcsp.wartburg.edu/zelle/python/graphics/graphics.pdf, which introduces the graphics.py library and its functionalities.
  4. Have each group download graphics.py from https://www.rose-hulman.edu/class/csse/resources/Python/ZelleGraphics.html, or have them use the one provided: graphics.py. (Note: Remind students that the graphics.py file must be in the same folder as the Python script file. It must also be imported into the Python script using the import statement as shown in the script.)
  5. Demonstrate different types of visualizations using the code in Data Visualization Code handout.
  6. Optional: Go through the code line by line, explaining what each line does.
  7. Give each pair time to explore and plot basic graphs using graphics.py, Linegraph Script.py, and BarGraph.py.
  8. Assign homework: Have students review their first activity about neuroscience and the importance of visualization in scientific research.

Day 2: Advanced Visualization Techniques and Data Processing

  1. Explain today’s objective: Students will learn advanced visualization techniques and data processing methods such as downsampling and smoothing.
  2. Briefly review the previous day’s content, addressing any questions or challenges students faced with their homework or previous session.
  3. Have students sit next to their partner from the previous day.
  4. Give each pair time to write a Python program to load the sample original, downsampled, and smoothed neural data from a .csv file generated in the Collaborative Data Analysis:
    Building a Virtual Lab With Python activity.
  5. Guide students to create a simple line graph of the neural data using graphics.py.
  6. Encourage students to experiment with different graph styles and colors.
  7. Once each pair has successfully created their graphs, discuss their initial observations from the visualizations created, by asking guiding questions:
    • What can we learn from visualizing neural data?
    • How can visual representations help us understand neural signals better?
    • Why is downsampling useful when working with large datasets?
    • How does smoothing affect the interpretation of neural data?
  1. Assign homework: Have students compare and contrast their graphs of original data, downsampled data, and smoothed neural data.

A line graph of finger yaw, pitch, roll data at three different frequencies.
A line graph of finger yaw, pitch, roll data at three different frequencies.
copyright
Copyright © NA

A bar graph of the data for finger movement and wrist movement with amplitude greater than 10,000 microvolts.
A bar graph of the data for finger movement and wrist movement with amplitude greater than 10,000 microvolts.
copyright
Copyright © NA

A line graph of wrist yaw, pitch, roll data at three different frequencies.
A line graph of wrist yaw, pitch, roll data at three different frequencies.
copyright
Copyright © NA

Day 3: Data Interpretation and Reporting

  1. Explain today’s objective: Students will interpret their visualizations and compile their findings into a detailed report.
  2. Briefly review the previous day’s content, addressing any questions or challenges students faced with their homework or previous session.
  3. As a class, discuss how to interpret different types of visualizations.
  4. Highlight key features to look for in neural data (e.g., patterns, trends, anomalies).
  5. Guide students in compiling their visualizations and observations into a detailed report.
  6. Provide a Neural Data Visualization Report Template to each pair that includes sections for introduction, methods, results, and discussion.
  7. Encourage students to include responses to the guiding questions in their reports.
  8. Assign homework: Have students finalize their detailed report on the neural data visualizations and interpretations.

Day 4: Presentation and Peer Review

  1. Explain today’s objective: Students will present their findings, visualizations, and reports to the class and receive constructive feedback from their peers.
  2. Give each pair a Presentation Rubric.
  3. Allow student pairs time to make final adjustments to their presentations.
  4. Give each group 5 minutes to present their visualizations and findings to the class.
  5. After each group presents, allow 1-2 minutes for question and answers from their peers.
  6. Once each group has presented, facilitate a class discussion about the presentations.
    • Highlight common strengths and areas for improvement observed during the presentations.
    • Encourage students to share what they learned from their peers’ work.
  1. To summarize the activity, ask students to reflect on their learning experience throughout the activity. The following questions can be used to prompt the students:
    • What was the most challenging part of this activity?
    • How did visualizing the neural data enhance your understanding of neural signals?

Vocabulary/Definitions

.csv file: A comma-separated value file that stores tabular data.

data visualization: The graphical representation of information and data.

graphics.py: A simple, object-oriented graphics library for Python created by John Zelle. The library is intended to make it easy for novice programmers to experiment with computer graphics.

Python Integrated Development Environment (IDE): A software application that provides comprehensive tools and features for developing Python programs efficiently without leaving the environment.

Python library: A collection of Python modules and functions that help in performing specific tasks.

Assessment

Pre-Activity Assessment

Class discussion: Discuss the importance of data visualization. Have students predict how they might visualize neural data, and what insights they expect to gain.

Pre-Assessment: Students answer the questions in the Pre-Assessment, which review previous material learned and let students predict what they expect to see in visualized neural data.

Activity Embedded (Formative) Assessment

Python coding: Monitor students as they work through data analysis and visualization. Provide guidance and check for understanding. Have them collaborate with their group of different types of graphs using graphics.py.

Post-Activity (Summative) Assessment

Presentations: Have students present their visualizations and reports. Assess their understanding based on their ability to interpret the data and the clarity of their visual representations and reports.

Post Assessment: Students answer the questions in the Post Assessment and reflect on what they learned during this activity.

Reflection questions: To summarize and conclude the activity, lead a class discussion around the following two questions:

  • What was the most challenging part of this activity?
  • How did visualizing the neural data enhance your understanding of neural signals?

Troubleshooting Tips

  • Ensure that all software is installed and functioning properly.
  • Be prepared to assist students with Python coding errors.
  • Ensure that all data is saved correctly to prevent loss.

Activity Scaling

  • For younger students, provide more detailed instructions and simplify the Python scripts.
  • For more advanced students, include additional data analysis techniques and challenges.
  • Use Python libraries such as matplotlib.py to draw the graphs.
  • Perform statistical tests to compare different sections of neural data.

Additional Multimedia Support

The following websites are excellent resources for troubleshooting tips for Python, including common programming problems and error handling:

  • Stack Overflow (stackoverflow.com): A popular Q&A site where you can search for specific Python errors and find solutions provided by the community.
  • Real Python (realpython.com): Offers tutorials and articles on various Python topics, including troubleshooting common issues.
  • Geeks for Geeks (geeksforgeeks.org): Provides a wide range of Python programming tutorials, including error handling and troubleshooting tips.
  • Python Documentation (docs.python.org): The official Python documentation includes a section on handling and troubleshooting errors in Python.
  • W3Schools (w3schools.com): Offers a comprehensive guide to Python, including a section on exceptions and error handling.

Subscribe

Get the inside scoop on all things TeachEngineering such as new site features, curriculum updates, video releases, and more by signing up for our newsletter!
PS: We do not share personal information or emails with anyone.

More Curriculum Like This

High School Activity
Collaborative Data Analysis: Building a Virtual Lab With Python

This third activity builds on the data collected from the previous "Decoding Muscle Movement: Analyzing Neuromuscular Signals With EMG" activity. Students now gather electrical data from various groups' experiments using Muscle SpikerBox kits, which save the data in .wav format. They then use Google...

High School Unit
Neural Engineering in Action: Exploring Muscle Movement Through Data and Design

This unit introduces students to neuroscience through a systems approach with a strong emphasis on computational thinking and data analysis. Students investigate the neural origins of muscle movement by collecting and analyzing electrical signals from surface electrodes placed on the arm during simp...

High School Activity
Panoptes and the Bionic Eye

In this activity, students learn about the visual system and then conduct a model experiment to map the visual field response of a Panoptes robot.

High School Lesson
Intro to Vectors Physics and Augmented Reality

Students learn about video motion capture technology within the context of a high school physics class. They learn about vector components, magnitudes and directions, position, velocity, and acceleration. Students use a (free) classroom data collection and processing tool, the ARK Mirror to visual a...

Copyright

© 2025 by Regents of the University of Colorado; original © 2024 University of Missouri

Contributors

Dr. Ashwin Mohan, CS faculty at Illinois Math and Science Academy ; Dr. Sowmya Anjur, Retired science faculty at Illinois Math and Science Academy; Dr. Satish Nair, Professor, Robert H. Buescher Faculty Fellow at University of Missouri

Supporting Program

Research Experience for Teachers (RET), University of Missouri Columbia

Acknowledgements

This work is based on work supported in part by the National Science Foundation under grant no. EEC-1801666—Research Experiences for Teachers at the University of Missouri. This activity was developed as part of the NSF RET grant in partnership with teachers from Illinois math and science academy. Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.

This endeavor would not have been possible without the guidance and support of Prof. Satish S. Nair, University of Missouri, Neural Engineering Laboratory, Columbia, Missouri (https://nairs.mufaculty.umsystem.edu/home

Last modified: May 30, 2025

Free K-12 standards-aligned STEM curriculum for educators everywhere.
Find more at TeachEngineering.org