Data Science Hour of Code

Activity 7: Trying Other Charts

Scenario:

  • You're a data scientist working with a group of researchers from Antarctica.
  • They have collected a bunch of data about penguins, but need help answering questions about it.
  • Your job is to make some charts from the data and answer some of their questions.

Introduction:

There are a lot of chart types that can help us to answer different questions. Instead of making a Scatter Plot, let's try making some other chart types from the same data. Try making a Bar Chart, Box Plot, Histogram and Pie Chart. Each of these charts will show the same data from our Penguins2.csv but presents it in a different way.

Sample of Penguins2.CSV file
speciesislandbill_depthbill_lengthflipper_length
AdelieTorgersen18.739.1181
AdelieBiscoe18.337.8174
AdelieDream18.536.8193
GentooBiscoe13.246.1211
ChinstrapDream17.946.5192

Instructions:

In the code editor below, we have a similar program to the last lesson, except we've removed the code black that makes our chart a Scatter Plot. Add a code block from the palette below and place it above the other blocks that reference chart.

  1. Use the block(s) in the palette on the left.
  2. Place the 'BarChart chart = frame:BarChart()' block below the 'frame:AddSelectedFactors("island")' block in the block editor.
  3. Run the program.
  4. Hint: You may need to try different Chart types to find the answers to the questions below.
  5. Use the chart in the canvas to answer the questions in the Activity section.
  6. To try other chart types: stop the program, delete the block you added to the block editor and place one of the other blocks from the palette in the same location.
  7. Use the new chart in the canvas to answer the questions in the Activity section.

Coding:

Blocks

Activity:

Use the chart(s) you've created in the Coding section to answer a few questions.














End of Lesson

You have reached the end of the lesson for Data Science. To view more tutorials, press the button below or you can go back to the previous lesson pages.