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:
- Select "Properties" from the "Project" menu
- Check "Custom"
- "Browse" to the Python 3.9 directory ("C:/Program Files/Python39" or "C:/Python39") and select the "python.exe" file
- 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!
- Introduction
- Introductions
- Introduction (PowerPoint)
- How to use the web site
- What is Python and why would I want to use it?
- Getting Started with Python and an Introduction to Arithmetic in Python
- 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"
- Introduction to Programming in Python (in the Wingware IDE)
- Documenting Code
- Generating Random Numbers
- Arithmetic in Python
- If you struggle with programming, see: The Power of believing that you can improve
- How Computers Work and While Loops
- How Computers Work
- Text and Numeric Types
- While Loops
- Generating Random Numbers
- When you have a chance, check out this online Python Tutor!
- Writing Geospatial Text Files
- Strings are Made Up of Characters
- Formatting Strings
- Writing to Text Files
- Writing to CSV Files
- Writing to CSV Files using the Python CSV library (new and optional)
- Grid ASCII File Format
- Creating ASCII Grid Files
- "For" Loops, and "If" statements
- Boolean Logic and "If" Statements
- Lists
- "For" Loops.
- Reformatting Data in Text Files With Python
-
Sample Locations File
- Reading Text Files
- Splitting Delimited Strings
- New: Using the csv library to read CSV files
- Converting Dates
- Converting Dates Using a Function
- Converting Files of Point Data
- Introduction to Functions
- Calling Functions to Get Pie
- Review outside class:
- Additional Variable Types
- Source Assistant
- Converting Coordinate
For Fun: Record number of UAVs
- Accessing data on the Internet
- How the Internet Works
- Accessing Data on the Internet
- Handling Exceptions
- The XML Standard
- Subsetting Strings
- Parsing XML Data
- Python Dictionaries
- The JSON Standard
- Parsing JSON Files
- For fun and motivation: Die-hard Coders Just Rescued NASA's Earth Science Data
- Accessing ArcGIS from Python
- Note: Using ArcGIS Pro, we need to specify one of the Python installs that comes with ArcGIS Pro:
- Open Project Properties in Wing IDE
- Browse to "c:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe"
- 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.
- An Overview of ArcGIS Functions
- Calling ArcGIS From Python
- Flavors of ArcGIS functions
- Adding Try/Except Blocks
- Finding the Format for arcpy Parameters
- Calling ArcGIS Pro From Python 3.x with Wing 6.0
- More on ArcGIS functions
- Accessing Attributes
- Assignment: Calling ArcGIS to Compute Watersheds (Extra Credit)
- Batch Processing With Python
- NapaCountry LiDAR SampleFiles
- Batch Processing in Python
- Running Python From the Command Line
- Debugging With Log Files (optional)
- User Interfaces and Classes
- Graphical User Interfaces (GUIs)
- Getting Started with PyQt
- Using QtDesigner with Python
- An Introduction to Classes
- Fun
- Other Packages
- Other Libraries/Packages
- NumPy & SciPy
- Introduction to Charting
- Shapefile Format
- Shapefile.py
- Getting File Paths from the user with Qt
- Getting File Paths from the User with tkinter
- New library: GeoViews
- Introduction to Software Design
- Design
- Classes, Modules, and Functions
- Open Source GIS Packages
- OpenSource GIS Packages
- SpPy Package (in development)
- Optional: Java and BlueSpray
- Structuring Code and Getting Anything to Work!
- Structuring Folders
- Documenting Programs
- Writing code that can be debugged and maintained
- Sub-Launching Other Programs
- The Ultimate ArcGIS Tools
- Simple Models
- Simple Painting with Qt
- New: Introduction to Agent Based Modeling with QT
- Old with tKinter: The Blob Class
- Cool stuff: Bird Migrations
- Creating larger projects
- Software Life cycle
- Investigation
- Design
- Classes, Modules, and Functions
- Implementation
- Testing
- Release
- Maintenance
- Where to Go From Here
- Presentation: See Canvas
- Optional:
- What will the world look like in 2100?
- Discussion: Where to go from here
- Review Test
- Interactive Python on the Web?
- 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:
- The Python GUI
- Dialog Boxes in tkinter
Building ArcGIS tools with Python
- Creating Custom Tools in ArcGIS
- Debugging ArcGIS Tools
- A Note on Model Builder To Python (optional)