final project!cs.brown.edu/courses/csci0931/2013/4-final/lec4-1.pdf · final project! april 16,...

46
Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Upload: others

Post on 10-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Final Project!

April 16, 2013

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Page 2: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Grading Breakdown

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 2

Page 3: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Final Project

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 3

Define Problem

Find Data

Write a set of instructions

Solution

Page 4: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Final Project

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 4

Define Problem

Find Data

Write a set of instructions

Solution

ANYTHING Numerical Data

Textual Data Twitter Data

Geographical Data ...

Page 5: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Final Project

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 5

Define Problem

Find Data

Write a set of instructions

Solution

ANYTHING Numerical Data

Textual Data Twitter Data

Geographical Data ...

ANYTHING COMPUTATIONAL

Find Trends/Patterns Predict Outliers/Groups

Describe Anomalies Assess Someone’s Claims

...

Page 6: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Final Project

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 6

Define Problem

Find Data

Write a set of instructions

Solution

ANYTHING Numerical Data

Textual Data Twitter Data

Geographical Data ...

ANYTHING COMPUTATIONAL

Find Trends/Patterns Predict Outliers/Groups

Describe Anomalies Assess Someone’s Claims

...

ANY TOOL Excel or Python

Probably...

Page 7: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Final Project

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 7

Define Problem

Find Data

Write a set of instructions

Solution

ANYTHING Numerical Data

Textual Data Twitter Data

Geographical Data ...

ANYTHING COMPUTATIONAL

Find Trends/Patterns Predict Outliers/Groups

Describe Anomalies Assess Someone’s Claims

...

ANY TOOL Excel or Python

Probably...

ANY ANALYSIS Plots, Tables, KML Files, ...

Page 8: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Final Project

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 8

Define Problem

Find Data

Write a set of instructions

Solution

ANYTHING Numerical Data

Textual Data Twitter Data

Geographical Data ...

ANYTHING COMPUTATIONAL

Find Trends/Patterns Predict Outliers/Groups

Describe Anomalies Assess Someone’s Claims

...

ANY TOOL Excel or Python

Probably...

ANY ANALYSIS Plots, Tables, KML Files, ...

Only Constant: you will use computers to process data automatically

Page 9: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Today

• What do we wish we had

known before?

• Example Final Projects

• Visitor!

• General Project Description

– Scope

– Timeline

• Let’s Get Started

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 9

Page 10: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

What do we wish we had known before?

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 10

Page 11: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Today

• What do we wish we had

known before?

• Example Final Projects

• Visitor!

• General Project Description

– Scope

– Timeline

• Let’s Get Started

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 11

Page 12: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Example 1: Where should I Live?

I want to buy a house somewhere near my hometown. Where should I buy?

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 12

Kasey Hass’s Project https://sites.google.com/a/brown.edu/house-hunting-mecklenburg-county/home

In Each Zip Code: Rent price: Red dollar sign Vacancies: For sale sign Income: Green dollar sign Marriage rate: Wedding rings

Page 13: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Example 1: Where should I Live?

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 13

Kasey Hass’s Project https://sites.google.com/a/brown.edu/house-hunting-mecklenburg-county/home

In Each Zip Code: Rent price: Red dollar sign Vacancies: For sale sign Income: Green dollar sign Marriage rate: Wedding rings

Page 14: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Example 1: Where should I Live?

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 14

Kasey Hass’s Project https://sites.google.com/a/brown.edu/house-hunting-mecklenburg-county/home

In Each Zip Code: Rent price: Red dollar sign Vacancies: For sale sign Income: Green dollar sign Marriage rate: Wedding rings

Page 15: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Example 2: Athletes & Geography

Malcolm Gladwell’s Outliers

• Professional Canadian hockey players

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 15

Page 16: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Example 2: Athletes & Geography

Malcolm Gladwell’s Outliers

• Professional Canadian hockey players

– Mostly born in January.

– Few are born in December.

– Junior league’s cutoff is Dec. 31st

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 16

Page 17: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Example 2: Athletes & Geography

Malcolm Gladwell’s Outliers

• Professional Canadian hockey players

– Mostly born in January.

– Few are born in December.

– Junior league’s cutoff is Dec. 31st

• Any association between professional players and where they were born?

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 17

Page 18: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Example 2: Athletes & Geography

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 18

Daniel Newmark’s Project https://sites.google.com/a/brown.edu/daniel-s-data/project-4--distribution-of-athletes

Football (NFL) Hockey (NHL)

Page 19: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Example 3: Growth of Top Digital Media Companies

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 19

How does the Growth Rate Compare in the Past 10 Years?

Page 20: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Example 3: Growth of Top Digital Media Companies

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 20

Nicholas Talbott’s Project https://sites.google.com/site/growthofdigitalmediacompanies/home

YouTube Video: http://www.youtube.com/watch? v=QDtDF6_mrkc

One KML File for Each Year Logo Size shows Growth

Page 21: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Visitor!

Gideon Goldin, PhD student in CLPS

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 21

Page 22: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Today

• What do we wish we had

known before?

• Example Final Projects

• Visitor!

• General Project Description

– Scope

– Timeline

• Let’s Get Started

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 22

Page 23: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Project Description

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 23

Page 24: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 24

Page 25: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

25

Page 26: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Project (Due Tues, May 7)

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 26

Page 27: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

27

Page 28: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Today

• What do we wish we had

known before?

• Example Final Projects

• Visitor!

• General Project Description

– Scope

– Timeline

• Let’s Get Started

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 28

Page 29: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Scope – Think Big! (& Have Backup Plans)

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 29

Define Problem

Find Data

Write a set of instructions

Solution

Page 30: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Scope – Think Big! (& Have Backup Plans)

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 30

Define Problem

Find Data

Write a set of instructions

Solution

Utilize MANY data sources to test your claim.

Page 31: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Scope – Think Big! (& Have Backup Plans)

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 31

Define Problem

Find Data

Write a set of instructions

Solution

Analyze the same dataset in DIFFERENT ways:

Make a number of related claims/hypotheses

Utilize MANY data sources to test your claim.

Page 32: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Scope – Think Big! (& Have Backup Plans)

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 32

Define Problem

Find Data

Write a set of instructions

Solution

Analyze the same dataset in DIFFERENT ways:

Make a number of related claims/hypotheses

Utilize MANY data sources to test your claim.

GENERALIZE the Program Try to Implement something we

haven’t discussed

Page 33: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Scope – Think Big! (& Have Backup Plans)

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 33

Define Problem

Find Data

Write a set of instructions

Solution

Analyze the same dataset in DIFFERENT ways:

Make a number of related claims/hypotheses

Utilize MANY data sources to test your claim.

Display the Results in Different Ways

GENERALIZE the Program Try to Implement something we

haven’t discussed

Page 34: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Something New: Clustering

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 34

Page 35: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Something New: Clustering

Here’s an Algorithm for Clustering Data into k groups:

1. Randomly select k data points.

2. Assign all other data points to the closest selected point.

3. Recompute each group’s mean point.

4. Repeat Steps 2 & 3 until nothing changes any more.

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 35

Page 36: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Something New: Clustering

Here’s an Algorithm for Clustering Data into k groups:

1. Randomly select k data points.

2. Assign all other data points to the closest selected point.

3. Recompute each group’s mean point.

4. Repeat Steps 2 & 3 until nothing changes any more.

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 36

Called k-Means Clustering

Page 37: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Today

• What do we wish we had

known before?

• Example Final Projects

• Visitor!

• General Project Description

– Scope

– Timeline

• Let’s Get Started

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 37

Page 38: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Timeline

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 38

Sun Mon Tues Wed Thurs Fri Sat

4/15 4/16 4/17 4/18 4/19

Final Project Out In-Class Work Time

4/22 4/23 4/24 4/25 4/26

In-Class Work Time Proposal Due

In-Class Work Time

4/29 4/30 5/1 5/2 5/3

In-Class Work Time In-Class Work Time

5/6 5/7 5/8 5/9 5/10

Final Project Due Exam Period 9-12

Meet With Staff At Least Once

Interactive Grading

Meet With Staff At Least Once

Page 39: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Today

• What do we wish we had

known before?

• Example Final Projects

• Visitor!

• General Project Description

– Scope

– Timeline

• Let’s Get Started

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 39

Page 40: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Before You Begin...

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 40

Define Problem

Find Data

Write a set of instructions

Solution

Say you have a vague idea of what you want to do....

Page 41: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Before You Begin...

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 41

Define Problem

Find Data

Write a set of instructions

Solution

Where is the data? What does it look like?

What format will be easiest for you to analyze?

Say you have a vague idea of what you want to do....

Page 42: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Before You Begin...

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 42

Define Problem

Find Data

Write a set of instructions

Solution

Where is the data? What does it look like?

What format will be easiest for you to analyze?

What is your claim? Are there any sub-claims?

What are your assumptions?

Say you have a vague idea of what you want to do....

Page 43: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Before You Begin...

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 43

Define Problem

Find Data

Write a set of instructions

Solution

Where is the data? What does it look like?

What format will be easiest for you to analyze?

What is your claim? Are there any sub-claims?

What are your assumptions?

What do you want the output to be?

What analysis will best test your claim?

Say you have a vague idea of what you want to do....

Page 44: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Before You Begin...

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 44

Define Problem

Find Data

Write a set of instructions

Solution

Where is the data? What does it look like?

What format will be easiest for you to analyze?

What is your claim? Are there any sub-claims?

What are your assumptions?

What do you want the output to be?

What analysis will best test your claim?

What are the steps? What tools are best for each step?

How can you GENERALIZE for a broader analysis?

Say you have a vague idea of what you want to do....

Page 45: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Let's Get Started!

• Pitch an Idea to a Partner

• Tell the Class your Idea

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 45

Page 46: Final Project!cs.brown.edu/courses/csci0931/2013/4-final/LEC4-1.pdf · Final Project! April 16, 2013 CS0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Before You Begin...

CS0931 - Intro. to Comp. for the Humanities and Social Sciences 46

Define Problem

Find Data

Write a set of instructions

Solution

Where is the data? What does it look like?

What format will be easiest for you to analyze?

What is your claim? Are there any sub-claims?

What are your assumptions?

What do you want the output to be?

What analysis will best test your claim?

What are the steps? What tools are best for each step?

How can you GENERALIZE for a broader analysis?