Intended Audience
High School+
Objective
Students will explore space weather phenomena by training a machine learning imagery model with Teachable Machine and then run their models through a simple web app. They will also practice coding skills by customizing the app’s HTML and JavaScript.
Duration
2–3 class periods (45–60 minutes)
What’s Needed?

- Computers with internet access
- Access to Google Teachable Machine (https://teachablemachine.withgoogle.com/)
- Access to an IDE such as Visual Studio Code and the ability to run a very simple local web server
- All assets for this lesson (images and code): starter code · training images

Open Student Handout Browse Starter Code Browse Training Images Download All Assets (.zip)

## Assignment Summary

In this lesson, students will dive into the world of space weather with fun, hands-on activities that mix coding and machine learning. Using Google’s Teachable Machine, they’ll train models to recognize different kinds of space weather and its effects on Earth, like solar flares, auroras, or GPS and electrical blackouts. Next, they’ll make their models come alive by adding them into a simple web app. To take it a step further, students will get the chance to tinker with the HTML and JavaScript behind the app, discovering how machine learning connects with real-world coding and how they can shape digital tools to match their own creative ideas.

## Quick Start (for instructors)

1. Open the Student Handout and follow the training steps.
2. Use VS Code with Live Server or run `python -m http.server 8000` to serve the files.
3. Open webcam.html or image.html and paste your Teachable Machine model URL where indicated.