Python for GIS Librarians:

Toward a Data Science Core Competency for Geospatial Librarianship

Phil White

Earth Sciences & Environment Librarian

University of Colorado Boulder

philip.white@colorado.edu

WAML San Diego 2018

Phil White, WAML 2018

Title

Text

Phil White, WAML 2018

Overview of Presentation

  • What is Python?

  • Why did I learn it? Why should you?

  • Learning Resources

  • Toward a Data Science Core Competency

Phil White, WAML 2018

Any Python users in the house?

Any R users in the house?

Phil White, WAML 2018

What is Python?

  • Programming language
  • Free and open source
  • Among the most used programming languages in the world
  • "There's a Python library for that"

Image: wikimedia

Phil White, WAML 2018

Quick Vocab Lesson

Library: Collection of functions/methods that you can call up without having to write code from scratch.

Numpy: math, stats

xml: working with xml

Pandas: working with tabular data

Requests: calling URLs

API (Application Programming Interface): Method of data exchange.

Script: A series of commands that you run to automate tasks. Python is a scripting language.

Phil White, WAML 2018

Why did I learn Python?

(still learning)

  • But in truth, necessity is the mother of invention
  • Software Carpentry workshop 2.5 years ago... about 2 hours of Python
  • From there, mostly self taught (YouTube! Code Academy)
  • About 2-3 months gnashing of teeth, pounding of head, tear drops

Phil White, WAML 2018

Why learn Python? 

  • Do it for Open Science!
  • Cataloging; metadata creation & manipulation...

...but so much more!

  • Data reference: 

2. Mining, scraping, APIs, downloading

1. Data munging & transformations

  • Is code the future of GIS?
  • Do it for your students!

Phil White, WAML 2018

Example 1:

Data that doesn't play nice.

 

(Massage the data!!)

Phil White, WAML 2018

Why Learn Python?

  • Python is the most common language used in GIS
  • Built right in to ArcGIS, QGIS
  • Automate repetitive geoprocessing tasks
  • Free geocoding
  • Fast and efficient
  • Makes you feel good at your job!

Phil White, WAML 2018

Example 2:

Save hours of work for yourself

 

(or your heady fwends)

Phil White, WAML 2018

Learning Resources

Recommended Installation

Interfaces

Anaconda comes with Jupyter Notebooks!!

Wikimedia

Phil White, WAML 2018

Example 3:

Jupyter Notebooks will help you break through!

 

(Bonus: Mine data from an API!!)

Phil White, WAML 2018

Resources

GIS Libraries for Python

  • ArcPy: Automate ArcGIS tasks
  • PyQGIS: Automate QGIS tasks (open source)
  • GeoPandas: Adds geospatial operations to Pandas (open) 
  • Shapely: Geometry (buffer, intersect, union, etc.) (open)
  • Rasterio: Raster operations (open)
  • GeoPy: Geocoding and distance calculations (open)
  • Plotly: Visualization (free(mium))
  • So Many Others!!!

Phil White, WAML 2018

Toward a Data Science Core Competency

1. Our patrons are increasingly skilled in tech.

2. GIS Librarians serve a broad community... any discipline!

3. There is so much data out there... if we can just get to it!

4. We should embrace open technologies.

Phil White, WAML 2018

Can you learn Python?

 

Phil White, WAML 2018

Title

Text

Yes We Can!

obamalibrary.gov

Phil White, WAML 2018

for q in audience:

          query = ask(q)

presentation.close()

print ('Thank You')

email = 'philip.white@colorado.edu'

print (email)

Made with Slides.com