Please enable JavaScript to use CodeHS


Data Science

Lessons

  1. The Data Science Life Cycle

    1. 1.1 What is Data Science?

    2. Description

      In this lesson, students will learn what data science is, what a data scientist does, and the different types of questions that can be asked about data. Students will learn that statistical questions include computations or finding a relationship or pattern.

    3. Objective

      Students will be able to:

      • Recognize and formulate statistical questions
      • Think critically about data and its sources
    4. 1.2 Gathering Data

    5. Description

      In this lesson, students will learn about the data cycle and apply the first two steps of asking questions and considering data. Students will start a mini-project that spans through the rest of the module by asking a statistical question about a field of interest and gathering and structuring the data. They will also learn about and consider both quantitative and qualitative data.

    6. Objective

      Students will be able to:

      • Explain and apply the data cycle
      • Consider data as either quantitative or qualitative
      • Structure data into tables of rows and columns
    7. 1.3 Exploring Data Using Python

    8. Description

      In this lesson, students will learn the basics of Python programming in the context of data science. This includes how to define and use variables and lists, how to use comparison and logical operators, and the importance of knowing the different data types used in Python.

    9. Objective

      Students will be able to:

      • Use the basics of Python in the context of data science
      • Define and use variables and lists
      • Use comparison and logical operators
      • Understand the importance of the different data types used in Python
    10. 1.4 Modules, Packages & Libraries

    11. Description

      In this lesson, students will learn about Python modules and libraries and how to implement and use them within the editor.

    12. Objective

      Students will be able to:

      • Import and use Python modules and libraries
      • Explain the importance of documentation
      • Read and use documentation
    13. 1.5 Series and Central Tendency

    14. Description

      In this lesson, students will learn how to create a use a Pandas Series. They will also learn and explore measures of central tendency including the mean, median, and mode.

    15. Objective

      Students will be able to:

      • Create a Series using the Pandas library
      • Compute the mean, median, and mode of a Series
      • Decide whether the mean, median, or mode is the best measure of central tendency for a specific dataset
    16. 1.6 Measures of Spread

    17. Description

      In this lesson, students will expand their statistical knowledge to include the spread of a dataset. They will learn about and apply measures of spread including standard deviation, variance, range, and interquartile range.

    18. Objective

      Students will be able to:

      • Use functions to compute the standard deviation and variance of a Series
      • Use variables, functions, and operators to determine the range and interquartile range of a Series
      • Use functions to plot a boxplot and histogram
      • Understand what the measures of spread mean for a dataset
    19. 1.7 Pandas DataFrames

    20. Description

      In this lesson, students will learn how to create a data frame using the Pandas library. They will also learn and use functions to explore a data frame further including which data types are included, the shape of the data frame, the descriptive statistics of the data in each column, and more.

    21. Objective

      Students will be able to:

      • Create a data frame using Pandas
      • Explore a data frame using key functions
    22. 1.8 Selecting Columns

    23. Description

      In this lesson, students will learn how to filter a data frame by selecting and displaying only specific columns. They will also learn how to filter rows displayed by using conditionals. Lastly, students will learn how to change the index used in a data frame and set it to a column of their choice.

    24. Objective

      Students will be able to:

      • Filter a data frame by displaying specific columns
      • Filter a data frame using conditionals
      • Set and reset the indices of a data frame
    25. 1.9 Using Functions

    26. Description

      In this lesson, students will define and use functions, along with values in a dataset, to calculate and create new columns of data.

    27. Objective

      Students will be able to:

      • Define and use functions
      • Use existing data values to create new columns of data
    28. 1.10 Mini-Project: Findings

    29. Description

      In this lesson, students will practice collecting, explaining, and presenting the important data and details of their mini-project.

    30. Objective

      Students will be able to:

      • Interpret meaning from data
      • Extrapolate and present important details from a dataset
    31. 1.11 The Data Science Life Cycle Quiz

    32. Description

      In this lesson, students review content with a 15 question Unit Quiz.

    33. Objective

      Students will be able to:

      • Demonstrate their understanding of Python, Pandas, and data science basics
  2. Data Science for Change

    1. 2.1 Data Science for Change

    2. Description

      In this lesson, students will explore how data is used in the social sector. They will use this information to help formulate at least three problem statements each with two statistical questions.

    3. Objective

      Students will be able to:

      • Formulate a problem statement
      • Define a statistical question regarding data in the social sector
    4. 2.2 Big Data and Bias

    5. Description

      In this lesson, students will

    6. Objective

      Students will be able to:

      • Identify ethical issues in data science
      • Identify and compare potential bias issues in data science
    7. 2.3 Importing and Filtering Data

    8. Description

      In this lesson, students will

    9. Objective

      Students will be able to:

      • Explain and apply the data cycle
    10. 2.4 Conditional Filtering

    11. Description
    12. Objective
    13. 2.5 Data Cleaning

    14. Description

      In this lesson, students will

    15. Objective

      Students will be able to:

      • Explain and apply the data cycle
    16. 2.6 Exploring with Visualizations

    17. Description

      In this lesson, students will

    18. Objective

      Students will be able to:

      • Explain and apply the data cycle
    19. 2.7 Interpret and Present

    20. Description

      In this lesson, students will

    21. Objective

      Students will be able to:

      • Explain and apply the data cycle
    22. 2.8 Data Science for Change Quiz

    23. Description
    24. Objective
  3. Data Storytelling

    1. 3.1 Data Storytelling

    2. Description
    3. Objective
    4. 3.2 Data for Your Story

    5. Description
    6. Objective
    7. 3.3 Data Visualizations

    8. Description
    9. Objective
    10. 3.4 Line and Bar Charts

    11. Description
    12. Objective
    13. 3.5 Normal Distribution

    14. Description
    15. Objective
    16. 3.6 Explore Univariate Data

    17. Description
    18. Objective
    19. 3.7 Trends and Correlations

    20. Description
    21. Objective
    22. 3.8 Linear Regression

    23. Description
    24. Objective
    25. 3.9 Explore Bivariate Data

    26. Description
    27. Objective
    28. 3.10 Telling Your Story

    29. Description
    30. Objective
    31. 3.11 Data Storytelling Quiz

    32. Description
    33. Objective
  4. Data Science for Business

    1. 4.1 Data Science for Business

    2. Description
    3. Objective
    4. 4.2 Quality Datasets

    5. Description
    6. Objective
    7. 4.3 Aggregating Data

    8. Description
    9. Objective
    10. 4.4 Combining Datasets

    11. Description
    12. Objective
    13. 4.5 Your Business Data

    14. Description
    15. Objective
    16. 4.6 Bias in Data Analytics

    17. Description
    18. Objective
    19. 4.7 Business Report

    20. Description
    21. Objective
    22. 4.8 Data Science for Business Quiz

    23. Description
    24. Objective
  5. Final Exam

    1. 5.1 Final Exam

    2. Description
    3. Objective
  6. What's Next?

    1. 6.1 What's Next?

    2. Description
    3. Objective
  7. Basic Python Bootcamp

    1. 7.1 Printing in Python

    2. Description

      In this lesson, you?ll learn how to make the most basic python program, one that displays texts on the screen. When you run these programs, you?ll see text appear on the console screen. You will learn how to print in python using the print statement. You will also learn how to use quotations, apostrophes, and strings.

    3. Objective

      Students learn how to print text in Python.

    4. 7.2 Variables and Types

    5. Description

      In this video, students will learn about a fundamental aspect of every programming language: Variables. A variable is something that stores information in a program that you can use later. More specifically, a variable has 3 things: a name, type, and value. One of the variables students will be presented is Greeting.

    6. Objective

      SWBAT define Python variables and types.

    7. 7.3 User Input

    8. Description

      In this lesson, we cover user input. We learn how to request user input as both strings and integers, we learn where the input is stored, and we learn how to convert strings and integers. By converting strings to integers, students can incorporate their knowledge from the previous lesson (Mathematical Operators) with this lesson on user input.

    9. Objective

      SWBAT incorporate user input into their programs.

    10. 7.4 Mathematical Operators

    11. Description

      In this lesson, students will learn about using mathematical operators in their Python programs. They will work through multiple examples to get comfortable with operator precedence and using different types of operators.

    12. Objective

      Students will be able to:

      • Describe the different mathematical operators that can be used in their programs
      • Create programs that use basic math to compute useful things
      • Create programs that take in user input, do simple computations with the input, and produce useful output
    13. 7.5 String Operators

    14. Description

      In this lesson, students will be able to perform string operations in order to concatenate values together.

    15. Objective

      Students will be able to:

      • Use mathematical operators with strings
    16. 7.6 Booleans

    17. Description

      In this lesson we will discuss what is a Boolean and go over examples.

    18. Objective

      Students learn about booleans and how they might be useful in their programs.

    19. 7.7 If Statements

    20. Description

      In this lesson we will learn how to use If and If-Else Statements; these statements allow you to use conditions to determine how your code should run.

    21. Objective

      Students learn how to use if statements for control flow in their programs.

    22. 7.8 Comparison Operators

    23. Description

      In this lesson, students will dive into comparison operators. Comparison operators give the ability to compare two values. Using comparison operators in programming is similar to math in that less than <, greater than >, less than or equal to <=, and greater than or equal to >= are the same. The differences are that operators for equal to are == and not equal are !=. Using comparison operators allow programs to make decisions.

    24. Objective

      Students will be able to:

      • Explain the meaning of each of the comparison operators (<, <=, >, >=, ==, !=)
      • Create programs using the comparison operators to compare values
      • Predict the boolean result of comparing two values
      • Print out the boolean result of comparing values
    25. 7.9 Logical Operators

    26. Description

      In this lesson, students will look at logical operators. Logical operators give the ability to connect or modify Boolean expressions. Three logical operators are NOT (!), or and and. These logical operators can be used in combination. With these logical operators, logical statements can be constructed, such as ?I go to sleep when I am tired OR it?s after 9pm?, ?I wear flip flops when I am outside AND it is NOT raining?.

    27. Objective

      Students will be able to:

      • Describe the meaning and usage of each logical operator: or, and, and NOT (!)
      • Construct logical statements using boolean variables and logical operators
    28. 7.10 While Loops

    29. Description
      • While loops allow code to be executed repeatedly based on a condition.
      • It might be helpful to think of while loops as a repeating if statement.
      • Infinite loops are created if the exit condition of the while loop is never met, causing the code inside the while loop to repeat continuously.
    30. Objective

      Students learn how to effectively use while loops in their programs and to watch out for infinite loops.

    31. 7.11 For Loops

    32. Description

      In this lesson, students will explore how to use for loops in their Python programs. They will be reminded how to use i as a variable in their programs as well as how to control the values of i by altering the starting, ending, and interval values.

    33. Objective

      Students will be able to:

      • Implement for loops
      • Use the variable i as a counter
      • Control the values of i in a for loop
    34. 7.12 Break and Continue

    35. Description

      In this lesson, students learn about break and continue statements. A break statement is used to immediately terminates a loop. A continue statement is used to skip out of future commands inside a loop and return back to the top of the loop. These statements can be used with for or while loops.

    36. Objective

      Students will be able to:

      • Explain the critical difference between break and continue
      • Describe why a break or continue statement would be needed in a coding scenario
    37. 7.13 Nested Control Structures

    38. Description
      • When we use control structures within control structures, we refer to them as nested control structures.
      • When using a for loop within a for loop, we need to be careful to create a second variable to index on.
      • The inner loop will run to completion every time the outer loop runs.
    39. Objective

      Students build upon their control structures knowledge to start using nested control structures in their programs.

    40. 7.14 Functions

    41. Description

      In this lesson, we learn about Functions. Functions let us break our program into different parts that we can organize and reuse however we like. Functions are the main building block of complex Python programs.

    42. Objective

      Students will be able to:

      • modularize their programs with functions
    43. 7.15 Functions and Parameters

    44. Description

      In this lesson, we dive deeper into the concept of functions by exploring how to use parameters.

    45. Objective

      Students will be able to:

      • Effectively use parameters to customize functions in their programs
    46. 7.16 Namespaces in Functions

    47. Description

      In this lesson, we explore where variables exist and what the difference is between a local and global variable.

    48. Objective

      Students will be able to:

      • describe the different namespaces with regards to variables and functions
    49. 7.17 Functions and Return Values

    50. Description

      In this lesson, students explore functions with return values and deepen their understanding of and ability to use functions.

    51. Objective

      Students will be able to:

      • remove complexity from their programs by abstracting with functions
      • generalize their functions with parameters
      • chain functions together using return values
    52. 7.18 Exceptions

    53. Description

      In this lesson, students explore Python’s way of handling errors with exceptions.

    54. Objective

      Students will be able to:

      • create programs that can gracefully handle exceptions
      • continue to function when an error is raised