Masthead

GSP 318: Schedule

Link to Canvas

Sample Data:

Note: We will be using Python 3.10 this semester with Wing 8 (or 9)! To activate Python 3.10 in the Wing IDE:

  1. Select "Properties" from the "Project" menu
  2. Check "Custom"
  3. "Browse" to the Python 3.9 directory ("C:/Program Files/Python39" or "C:/Python39") and select the "python.exe" file
  4. Click OK

Schedule

Below is an outline of the presentation of topics numbered by week. While this is a rather long list, don't panic! We will not be covering every topic. The material is presented here in this format so you (and me) can search for the Python code we need during class and beyond!

  1. Introduction
    1. Introductions
      1. Introduction (PowerPoint)
      2. How to use the web site
      3. What is Python and why would I want to use it?
    2. Getting Started with Python and an Introduction to Arithmetic in Python
      1. Quote: "programming is like writing a book...except if you miss out a single comma on page 126 the whole thing makes no damn sense"
      2. Introduction to Programming in Python (in the Wingware IDE)
      3. Documenting Code
      4. Generating Random Numbers
      5. Arithmetic in Python
      6. If you struggle with programming, see: The Power of believing that you can improve
  2. How Computers Work and While Loops
    1. How Computers Work
    2. Text and Numeric Types
    3. While Loops
    4. Generating Random Numbers
    5. When you have a chance, check out this online Python Tutor!
  3.  Writing Geospatial Text Files
    1. Strings are Made Up of Characters
    2. Formatting Strings
    3. Writing to Text Files
    4. Writing to CSV Files
    5. Writing to CSV Files using the Python CSV library (new and optional)
    6. Grid ASCII File Format
    7. Creating ASCII Grid Files
  4. "For" Loops, and "If" statements
    1. Boolean Logic and "If" Statements
    2. Lists
    3. "For" Loops.
  5. Reformatting Data in Text Files With Python
    1. Sample Locations File
    2. Reading Text Files
    3. Splitting Delimited Strings
    4. New: Using the csv library to read CSV files
    5. Converting Dates
    6. Converting Dates Using a Function
    7. Converting Files of Point Data
    8. Introduction to Functions
    9. Calling Functions to Get Pie
    10. Review outside class:
      1. Additional Variable Types
      2. Source Assistant
      3. Converting Coordinate

      For Fun: Record number of UAVs

  6. Accessing data on the Internet
    1. How the Internet Works
    2. Accessing Data on the Internet
    3. Handling Exceptions
    4. The XML Standard
    5. Subsetting Strings
    6. Parsing XML Data
    7. Python Dictionaries
    8. The JSON Standard
    9. Parsing JSON Files
    10. For fun and motivation: Die-hard Coders Just Rescued NASA's Earth Science Data
  7. Accessing ArcGIS from Python
    1. Note: Using ArcGIS Pro, we need to specify one of the Python installs that comes with ArcGIS Pro:
      1. Open Project Properties in Wing IDE
      2. Browse to "c:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe"
      3. If you have to use ArcMap, you'll need to use "C:\python27\ArcGISX.X\python.exe" where X.X is the version of ArcMap you have installed. There are also some other small differences in arcpy between ArcMap and ArcGIS Pro.
    2. An Overview of ArcGIS Functions
    3. Calling ArcGIS From Python
    4. Flavors of ArcGIS functions
    5. Adding Try/Except Blocks
    6. Finding the Format for arcpy Parameters
    7. Calling ArcGIS Pro From Python 3.x with Wing
    8. More on ArcGIS functions
    9. Accessing Attributes
    10. Assignment: Calling ArcGIS to Compute Watersheds (Extra Credit)
  8. Batch Processing With Python
    1. NapaCountry LiDAR SampleFiles
    2. Batch Processing in Python
    3. Running Python From the Command Line
    4. Debugging With Log Files (optional)
  9. User Interfaces and Classes
    1. Graphical User Interfaces (GUIs)
    2. Getting Started with PyQt
    3. Using QtDesigner with Python
    4. An Introduction to Classes
    5. Fun
  10. Other Packages
    1. Other Libraries/Packages
    2. NumPy & SciPy
    3. Introduction to Charting
    4. Shapefile Format
    5. Shapefile.py
    6. Getting File Paths from the user with Qt
    7. Getting File Paths from the User with tkinter
    8. New library: GeoViews
  11. Introduction to Software Design
    1. Design
    2. Classes, Modules, and Functions
  12. Open Source GIS Packages
    1. OpenSource GIS Packages
    2. Optional: Java and BlueSpray
  13. Structuring Code and Getting Anything to Work!
    1. Structuring Folders
    2. Documenting Programs
    3. Writing code that can be debugged and maintained
    4. Sub-Launching Other Programs
    5. The Ultimate ArcGIS Tools
  14. Simple Models
    1. Simple Painting with Qt
    2. New: Introduction to Agent Based Modeling with QT
    3. Old with tKinter: The Blob Class
    4. Cool stuff: Bird Migrations
  15. Creating larger projects
    1. Software Life cycle
    2. Investigation
    3. Design
      1. Classes, Modules, and Functions
    4. Implementation
    5. Testing
    6. Release
    7. Maintenance
  16. Where to Go From Here
    1. Presentation: See Canvas
    2. Optional:
      1. What will the world look like in 2100?
      2. Discussion: Where to go from here
      3. Review Test
      4. Interactive Python on the Web?
  17. Finals Week: See Canvas

Other Resources:

Machine Learning in Python

ArcPy and ArcGIS-geospatial Analysis with Python : Use the ArcPy Module to Automate the Analysis and Mapping of Geospatial Data in ArcGIS (in our library)

Python Programming Learning Resources

Official Python Web site

Python Tutorial

Dive Into Python (e-book)

Link to Tracy Kugler's Examples for ArcGIS 9

PyOpenGL

tutorialspoint Python Programming

Ton's of programming cartoons

National Climate Data

Think Python

Beginner's Guide to SQL

Old Materials

Old tKinter GUI modules:

  1. The Python GUI
  2. Dialog Boxes in tkinter

Building ArcGIS tools with Python

  1. Creating Custom Tools in ArcGIS
  2. Debugging ArcGIS Tools
  3. A Note on Model Builder To Python (optional)

© Copyright 2018 HSU - All rights reserved.