1 of 22

NOVEMBER 23, 2022, 10:00 - 11:00 PST

Dianne Bencito and Fritz Andal

Using Python for Geospatial Data

2 of 22

�I. Introduction to Python�II. Introduction to GIS�III. Introduction to Python GIS� A. Jupyter� B. GeoPandas�IV.Activity�V. Closing

Topic Outline

3 of 22

Hi, I’m Dianne! :)

4 of 22

Hi, I’m Fritz! :)

5 of 22

Introduction to Python

6 of 22

It was created by Guido van Rossum in 1991 and further developed by the Python Software Foundation���It is also called general-purpose programming language as it is used in almost every domain we can think of such as web development, software development, data analytics, etc.

7 of 22

Why Python?

8 of 22

��Open source and large active community base ��Easy to read, learn and write��Extensive support libraries (NumPy for numerical calculations, Pandas for data analytics, etc.)

9 of 22

Introduction to GIS

10 of 22

11 of 22

GIS (Geographical Information Systems)

store, analyze, and visualize data for geographic positions on Earth’s surface.

12 of 22

Information

System

G I S

Geography

the study of places and the relationships

between people and their environments

Details of the features

Technology and methods for storing and analyzing data using the information.

13 of 22

2 TYPES OF GIS DATA

Vector

provides a way to represent real world features within the GIS environment. It consists of points, lines, and polygons.

Raster

made up of pixels, and each pixel has a value and also known as grid data.

14 of 22

Introduction to Python GIS

15 of 22

Variables

16 of 22

Exercise #1

We have a variable named distance_km below with the value 4135 - indicating the straight-line distance between San Francisco and New York in Kilometers. Create another variable called distance_mi and store the distance value in miles.

17 of 22

Data Structures

18 of 22

Exercise #2

From the dictionary below, how do you access the latitude and longitude values? print the latitude and longitude of new york city by extracting it from the dictionary below.

19 of 22

String Operations

20 of 22

Loops and Conditionals

21 of 22

Exercise #4

Write a program that prints the numbers from 1 to 50 and for multiples of 3 print "SOTM" instead of the number and for the multiples of 7 print "PNM". If it is divisible by both, print "PNM_SOTM_2022".

22 of 22

UP Resilience Institute, Magsaysay Ave., cor. Apacible St., University of the Philippines

Diliman, Quezon City

(+632) 924 2904 Loc 2770

resilience.institute@up.edu.ph

upri.rcw@up.edu.ph

resilience.up.edu.ph

UPResilienceInstitute

@UPResilience

UP Resilience Institute

Thank you! Maraming Salamat!