Using Real-World Data in

AP Computer Science A

Lab Assignments

Would you like to increase student engagement in AP Computer Science A? Do you believe that if students connect to the material they are studying they will be motivated to do their best and will continue to pursue the field? If so, then this session is for you. A best practice for introductory computer science courses is to make the content relevant, meaningful, relatable, and exciting. One of the easiest ways to do this is to incorporate real-world data sets into already existing programming assignments while maintaining the rigor you have established for your course.

Hello APAC!

I am Ria Galanos

This is my talk for the 2018 AP Annual Conference in Houston, TX.

I teach at Thomas Jefferson High School for Science and Technology.

Find me at ria.galanos@gmail.com, /in/riagalanos/, or @cscheerleader.

2

bit.ly/apcsarealdata

0

A little about me

  • Former aero engineer turned math computer science teacher
  • Taught for 11 years (9 teaching APCS A/AB) in Roswell, GA
  • Starting year 7 at TJ where I teach
    • Data Structures, Android Development, Senior Research
  • Reader/Table/Question Leader for the APCS A Exam since 2007
  • Workshop Consultant for the College Board
  • Development Committee Member for APCS A since 2017

4

A little about cs at tj

  • One year CS requirement for all students in grades 9-12
  • 5 years of CS curriculum options
    • Data Structures, Artificial Intelligence, Computer Vision, Parallel Computing, Mobile App Development, Web App Development
  • 2 full-year CS research options
    • Computer Systems Research
    • Mobile/Web Application Development Research

5

Why do we need to do anything different in our computer science courses?

1

I’m another person suggesting that you do something different in your course. Why?

Because we need

  • more computer scientists
  • more professional software developers
  • more diversity in the field
  • more people who know how to program to solve problems in whichever field they are in.

7

Need an icon

Okay. Now why do we need to increase diversity in the field?

2

“People solve the problems that they see.”

- Ben Jealous

9

Talk about uber, Mihir’s lymphedema app

How can we help to increase the number of people and diversity in

the field?

3

11

Course Should Be Rigorous

I believe a class is rigorous when students, in addition to learning the skills involved in programming, are given opportunities to apply those skills to dissect and solve unfamiliar, real-world situations.

12

Course Should Be Relevant

#2: CS Should Represent Everyone

#4: CS Needs to Feel Relevant

#5: CS + X: Computer Science Alone is Not the Solution

From Google’s

K-12 CS Outreach Code

13

Course Should Be Exciting

What did you do in computer science class today?

I wrote a program to…

I created …

I discovered…

I get it. Now what?

4

Give students data to work with that they find interesting

15

Never ask students to write a program to do something that they could easily do by hand. ~Owen Astrachan

16

I know the data is out there. How do I find it and how can I make it easy for students to use?

5

Easy changes,

big payoff

File I/O

Teach students to read data in from text files.

JSON Wrappers

Teach students to read JSON data into an array of objects.

APIs

Teach students to retrieve real-time data from the Internet.

18

$

File I/O

Student-Created Text Files

Have students collect data, store in Excel, then save as a .txt file (or just make text file directly)

Teacher-Provided Text Files

Provide a text file such as one that contains the text from something they are reading in English or history class.

Student-Discovered Text Files

Have students search for data that interests them. If they find data on on a website, then can paste into an Excel file then convert to .txt.

19

20

Needed import statement

Create file object from text file in same folder

Change where scanner is reading from

Create try/catch in case file doesn’t exist

While loops reads line by line until it runs out of lines, adding each line to an ArrayList as it goes

JSON Wrapper

  • Sinbad is created by Berry College
  • Students practice:
    • Writing classes
    • Working with arrays of objects

21

22

23

24

25

Real-Time Data

Find a Free API for Java Developers

Then teach students how to use it to retrieve real-time data from the Internet.

See the CS-1 Twitter Assignment as an Example

https://github.com/riagalanos/cs1-twitter

26

Talk about spotify api, yelp api

CS1-Twitter

  • Part I
    • 11 steps
    • Set up development environment
    • Create Twitter developer account
    • Test the code that creates the Twitter connection
    • Tweet first message from Java program

27

CS1-Twitter

  • Part II
    • Objective is to find most common word in someone’s last 2,000 tweets
    • APCS A topics covered: class design, string manipulation, ArrayLists, sorting, finding max value, method decomposition, file I/O, working with unfamiliar code
    • Fun fact: Trevor Packer’s (@ap_trevor) most commonly used word as of July 8, 2018 was ap in 75% of his tweets

28

CS1-Twitter

  • Part III
    • IMO the best part because it is open ended and provides students choice
    • Experiment with Twitter 4J methods after reading the documentation
    • Investigate something interesting using Twitter data

29

Where to find data

  • Data.gov
    • U.S. government open data with almost 200,000 data sets in 14 different areas including climate, health, and science.
  • Harvard Dataverse
    • Open source research data sets
  • The Cancer Imaging Archive
    • Cancer images and data sets
  • More Free Big Data Sets
    • List of freely available big data sets

30

and here

31

and also here

32

But the real money is when students search for data sets that interest themselves. Set them loose!

6

Thanks!

Any questions?

34

APAC 2018 - Real-World Data - Google Slides