google earth and project data -...

28
Google Earth and Project Data CSCI 0931 - Intro. to Comp. for the Humanities and Social Sciences 1

Upload: others

Post on 09-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Google Earth and Project Data

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

Page 2: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Reminders

• Review ACT 2-7 and HW 2-4

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

Page 3: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Suggestions

• Have a small dataset for testing as you develop; add the full data only after things seem to be working

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

Page 4: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Suggestions

• Have a small dataset for testing as you develop; add the full data only after things seem to be working

• Do not assume there will be some way to resolve an issue down the road

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

Page 5: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Suggestions

• Have a small dataset for testing as you develop; add the full data only after things seem to be working

• Do not assume there will be some way to resolve an issue down the road

• You will lose points if you do not include test functions like in HW 2-3 and HW 2-4

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

Page 6: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Today

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

Page 7: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Today

• Google Earth and map-based data • Modifying and creating map data files • Overview of colors and number systems • Project 2 work time

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

Page 8: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Google Earth

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

• If you’re on a laptop, download and install Google Earth

• Download CIT.kml from the course webpage

Page 9: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Google Earth

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

• Play around with Google Earth

Page 10: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Google Earth

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

• Play around with Google Earth • Do Task 1 in ACT 3-2

– Try zooming, panning, and creating pins on the map

Page 11: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Google Earth

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

• Play around with Google Earth • Do Task 1 in ACT 3-2

– Try zooming, panning, and creating pins on the map

• Do Task 2

Page 12: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Google Earth

• Now open CIT.kml in a text editor and try changing the following: – Name – Description – Size of Pin – Coordinates

– What about color?

12

http://geographyworldonline.com/tutorial/instructions.html

CSCI 0931 - Intro. to Comp. for the Humanities and Social Sciences

Page 13: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Hm, let’s talk about color

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

Page 14: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Today

• Google Earth and map-based data • Modifying and creating map data files • Overview of colors and number systems • Project 2 work time

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

Page 15: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

KML Color Codes

15

ff0000ff O = Opacity B = Blue G = Green R = Red

O B G R

These are two-digit hexadecimal numbers.

CSCI 0931 - Intro. to Comp. for the Humanities and Social Sciences

Page 16: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Two-Digit Numbers

Decimal (10 unique values per digit): 0-9 00 01 02 03 04 05 06 07 08 09 ?

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

Page 17: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Two-Digit Numbers

Decimal (10 unique values per digit): 0-9 00 01 02 03 04 05 06 07 08 09 10 11 12 ... 99

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

Page 18: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Two-Digit Numbers

Decimal (10 unique values per digit): 0-9 00 01 02 03 04 05 06 07 08 09 10 11 12 ... 99 Binary (2 unique values per digit): 0-1 00 01 ?

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

Page 19: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Two-Digit Numbers

Decimal (10 unique values per digit): 0-9 00 01 02 03 04 05 06 07 08 09 10 11 12 ... 99 Binary (2 unique values per digit): 0-1 00 01 10 11

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

Page 20: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Two-Digit Numbers

Decimal (10 unique values per digit): 0-9 00 01 02 03 04 05 06 07 08 09 10 11 12 ... 99 Binary (2 unique values per digit): 0-1 00 01 10 11 Hexadecimal (16 unique values per digit): 0-9,a-f 00 01 ... 08 09 0a 0b 0c 0d 0e 0f ?

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

Page 21: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Two-Digit Numbers

Decimal (10 unique values per digit): 0-9 00 01 02 03 04 05 06 07 08 09 10 11 12 ... 99 Binary (2 unique values per digit): 0-1 00 01 10 11 Hexadecimal (16 unique values per digit): 0-9,a-f 00 01 ... 08 09 0a 0b 0c 0d 0e 0f 10 11 ... fe ff

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

Page 22: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Two-Digit Numbers

Decimal (base 10): 0-9 00 01 02 03 04 05 06 07 08 09 10 11 12 ... 99 Binary (base 2): 0-1 00 01 10 11 Hexadecimal (base 16): 0-9,a-f 00 01 ... 08 09 0a 0b 0c 0d 0e 0f 10 11 ... fe ff

22

Decimal: 102 = 100 two-digit #s

Binary: 22 = 4 two-digit #s

Hexadecimal: 162 = 256 two-digit #s

CSCI 0931 - Intro. to Comp. for the Humanities and Social Sciences

Page 23: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Why hexadecimal?

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

Page 24: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Why hexadecimal?

• A variety of reasons, but here are a couple: – A two-digit hexadecimal number can have the

same number of distinct values as a computer “byte”.

– Easier to type the value of a byte than some other systems, like binary. E.g., 01100100 in binary = 64 in hexadecimal = 100 in decimal

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

Page 25: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

The truth?

• Tradition • More user-friendly systems rapidly replacing

hex for color-naming • But not fast enough, so we need to learn it

CSCI 0931 - Intro. to Comp. for the Humanities and Social Sciences 25

Page 26: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

KML Color Codes

26

ff0000ff O = Opacity B = Blue G = Green R = Red

O B G R

Hexadecimal (16 digits): 0-9,a-f 00 01 ... 08 09 0a 0b 0c 0d 0e 0f 10 11 ... fe ff

CSCI 0931 - Intro. to Comp. for the Humanities and Social Sciences

Page 27: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Today

• Google Earth and map-based data • Modifying and creating map data files • Overview of colors and number systems • Project 2 work time

CSCI 0931 - Intro. to Comp. for the Humanities and Social Sciences 27

Page 28: Google Earth and Project Data - cs.brown.educs.brown.edu/courses/cs0931/2014-fall/3-synthesis/LEC3-4.pdf · Google Earth CSCI 0931 - Intro. to Comp. for the Humanities and Social

Today

• Google Earth and map-based data • Modifying and creating map data files • Overview of colors and number systems • Project 2 work time

– By the end of class, you should have all the data files you need for your analysis, and know how to load them into your Python program

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