Home Labs Nb 2 Html Tests 211 Web Scraper Wordclouds Looking At Data Satellltes Naomi Nlp Nomi Food Cook Food Fish Food Science History Dad History History Life DateIdeas Life Words

Don't Look! I'm changing!

URL Copied

SETUP:

Import Modules

Python install packages into our Colab Virtual Enviornment using inline terminal commands (prefixed with an ! )

Now that the libraries have been installed. import them into our script here.

Configure Enviornment

This just makes things nice to look at

(Optional) Local File Access

We uploaded our shapefile into google drive. this will give us file access to the drive.?

Go to this URL in a browser: https://accounts.google.com/o/oauth2/auth?client_id=947318989803-6bn6qk8qdgf4n4g3pfee6491hc0brc4i.apps.googleusercontent.com&redirect_uri=urn%3aietf%3awg%3aoauth%3a2.0%3aoob&response_type=code&scope=email%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdocs.test%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive%20https%3a%2f%2fwww.googleapis.com%2fauth%2fdrive.photos.readonly%20https%3a%2f%2fwww.googleapis.com%2fauth%2fpeopleapi.readonly Enter your authorization code: ¡¡¡¡¡¡¡¡¡¡ Mounted at /content/drive

Now that we have access to the drive, lets change our file path to the location where our data is stored. (change directory = cd )

/content/drive/My Drive/colabs/DATA/naomi

list file contents in this directory to ensure we have what we need.

Capa.cpg Capa.dbf Capa.prj Capa.shp Capa.shx images/

Retrieve GIS Data

Import the data using Geopandas.

Observe the first few records

namedescTimeStampPhotossym_namegeometry
0I-1aRules & regs2020-03-18images/I-1a.jpgRed PinPOINT Z (-77.243...
1I-2aWelcome to your ...2020-03-18images/I-2a.jpgRed PinPOINT Z (-77.242...
2I-3aDirections2020-03-18images/I-3a.jpgRed PinPOINT Z (-77.238...
3I-4aWildlife drive2020-03-18images/I-4a.jpgRed PinPOINT Z (-77.237...
4I-5aNo digging2020-03-18images/I-5a.jpgRed PinPOINT Z (-77.236...

Ensure the data can be plotted

Image Alt Text,Name: WGS 84 ,Axis Info [ellipsoidal]: ,- Lat[north]: Geodetic latitude (degree) ,- Lon[east]: Geodetic longitude (degree) ,Area of Use: ,- name: World ,- bounds: (-180.0, -90.0, 180.0, 90.0) ,Datum: World Geodetic System 1984 ,- Ellipsoid: WGS 84 ,- Prime Meridian: Greenwich Please enter the new Filename to save the data to ('acs_csa_merge_test': shp2csv

Great. We just converted the shapefile to csv to remove any metadata that may be attached.

This approach loads a map using a geometry column

Image Alt Text
Unnamed: 0namedescTimeStampPhotossym_namegeometry
00I-1aRules & regs2020-03-18images/I-1a.jpgRed PinPOINT Z (-77.243...