google earth and project data -...

Post on 09-Oct-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Google Earth and Project Data

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

Reminders

• Review ACT 2-7 and HW 2-4

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

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

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

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

Today

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

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

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

Google Earth

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

• Play around with Google Earth

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

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

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

Hm, let’s talk about color

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

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

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

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

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

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

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

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

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

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

Why hexadecimal?

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

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

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

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

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

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

top related