Skip Navigation
Canada Learning Code
    • Learning With Us
    • Learning Experiences
    • Private Workshops
    • Teen Ambassador Program
    • Teaching Code
    • Lesson Plans
    • Learning Tool
  • Volunteer
    • About Us
    • Our Team
    • Our Chapters
    • Code Mobile
      • Annual Report 2021
      • Annual Report 2020
      • Annual Report 2019
      • Annual Report 2018
      • Annual Report 2017
    • Theory of Change
    • Work With Us
  • Sponsors
  • Donate
  • Blog
  • fr
Opens in a new window Opens an external site Opens an external site in a new window
  1. Lessons Plans
  2. / CO2 Trends with Python
#teachers learning code

CO2 Trends with Python

By Paul Prescod 2 hours
Download Lesson
Level
Grades 9-12
Subjects
Science and Technology,
Mathematics
components
  • Programming
  • Data
  • Technology and Society
Tools & Languages
Python,
Trinket

Key Coding Concepts

  • Algorithms
  • Conditional Statements
  • Functions
  • Sequences

Terminology

Library

A bundle of reusable code that allows a programmer to achieve something that would otherwise be difficult or impossible. In this case, easy graphics programming.

Function

A list of statements that can be invoked repeatedly in a program, perhaps changing its behaviour on the basis of “parameters” that are passed in.

In this lesson, learners will use Python and the Pygal graphing library to visualize data about one of the most important issues facing our country: greenhouse gas emissions and their relation to climate change.

  • Familiarize yourself with Trinket:
    https://vimeo.com/107443021
  • Go through the activity yourself (linked under ‘Lesson’)
  • Optionally: Let the students log into Trinket using Google Accounts, Clever or Edmodo to save their programs easily

Tutorial
Watch a run through and tutorial of our “C02 Trends with Python” lesson plan, using Trinket:

If your learners are new to Python, begin with this Python Code-Along: “Intro to Computer Science”
http://bit.ly/teenslc-python-code-along

Show learners how to navigate Trinket, as done in the video above. Demonstrate how to edit and run code. Show learners how to navigate within the course using the arrow keys (top, right).

Guide learners along through the Trinket lesson, or have learners progress at their own pace.

Main activity available at: http://bit.ly/trinket-data-vis-python
(also linked in the slides)

See “Advanced (Optional) Topics” section of Trinket course for Python extensions.

Reflect on what we learned from this data:

  • What stood out?
  • What is something new that we learned?
  • What questions do we still have?

Brainstorm how your class can take action. What can we do to help (A) spread awareness, or (B) help solve this issue?

Have learners document at least one bug they encountered and how they solved it using the Debug It! Reflection questions in the Creative Computing Curriculum from the Harvard Graduate School of Education.

Make a plan for how to access students’ work in Trinket. You could sign up for Trinket Connect (https://trinket.io/schools) to collect projects, have students email you class links, or gather project links in a shared Google doc or blog.

Reflect on what we learned from this data:

  • What stood out?
  • What is something new that we learned?
  • What questions do we still have? 

Data visualization, line graphs, bar graphs, mapping data, environmental studies, cause and effect, carbon emissions, Canadian cities

Pygal Documentation
http://www.pygal.org/en/stable/

Smoke Stacks image by Pixabay from Pexels.com
https://www.pexels.com/photo/smoke-stacks-against-blue-sky-257775/

Debug It! Reflections (Creative Computing Curriculum, Unit 2: Animations, Debug It!)
http://scratched.gse.harvard.edu/guide/curriculum.html

Teach lessons that are tied to your existing curriculum! https://bit.ly/CLClessons

r

More Lesson Plans For Grades 9-12

    View All Lesson Plans

    Explore lessons based on components

    The K-12 Computer Science Framework

    Although learning how to build digital projects is a key part of Computer Science education, students should also learn a wider set of skills and competencies that will help them to harness the power of digital technologies as both creators and consumers. A comprehensive approach to K-12 Computer Science education includes learning about the following five focus areas:

    View Framework ➝

    Programming

    By the end of high school, students should be able to create a simple computer program.

    Programming Lessons

    Computing and Networks

    By the end of high school, students should understand and be able to use the tools and devices commonly used to build digital projects.

    Computing and Networks Lessons

    Data

    By the end of high school, students should be able to explain how we use computers to create, store, organize, and analyze data.

    Data Lessons

    Technology and Society

    By the end of high school, students should be able to explore the ways in which technology and society have mutually shaped each other.

    Technology and Society Lessons

    Design

    By the end of high school, students should be able to apply design principles to the digital projects they create.

    Design Lessons

    Join Our Community!

    Join us as a learner, volunteer, sponsor or advocate and be the first to hear about upcoming events, learning resources, exciting new partnerships and more!

    "*" indicates required fields

    I'm interested in (Select all that apply)*
    In these cities (Select all that apply)
    Canada Learning Code
    • Contact Us
    • Work With Us
    • Blog
    • Sponsors
    • Facebook
    • Twitter
    • LinkedIn
    • Instagram
    • YouTube

    © Copyright 2018. All rights reserved.

    CHARITABLE REGISTRATION NO. 834394108RR0001

    • Code of Conduct
    • Accessibility and Inclusion
    • Privacy Policy
    • Terms & Conditions
    • Refund Policy