
Explore how Python serves as a flexible, cross platform glue for geospatial tasks, leveraging open source modules for reading and writing data, analyzing, and generating graphical output.
Explore how Python, an open-source, cross-platform interpreted language, supports multiple interpreters and paradigms from command-line scripts to graphical user interfaces, emphasizing readability and the Zen of Python.
Discover why Python suits GIS work: it's easy to learn, readable, and backed by a vast open-source community; leverage its flexible, modular workflow with the standard library and PyPI modules.
Python unlocks automation for geospatial data, enabling OS interactions, database access, and document handling. It also powers data science with numpy, pandas, seaborn, and scikit-learn for GIS applications.
Explore Python's geospatial capabilities: read and write data with gdal/ogr, perform spatial queries and map algebra, and create reproducible notebooks and apps for GIS workflows.
Compare Python 2 and 3 differences, why to adopt Python 3.6+, and key concepts like indentation, lists, dictionaries, and iterables for GIS Python work.
Install Python and PyCharm to match the GIS environment, using the QDOS package that includes Python and libraries needed for this course; on Windows, install key design for GUI development.
Install QDOS on macOS, install Python 3.6, navigate security prompts, verify with python3 --version, and run a hello world in the Python console to confirm setup.
Install and configure pyCharm community edition on macOS, set up a Python 3.6 interpreter, explore virtual environments, and run code from the editor with an integrated terminal and debugging features.
Explore how to assign and compare variables in Python, including booleans, none, true or false, integer and float types, and binary, hex, and octal representations.
Explore Python's type function to determine a variable's class (int, float, bool, none type, module) and practice converting values with int, float, hex, and base conversions, including string representations.
Explore how strings in Python are sequences of unicode characters, delimited by single or double quotes, supporting escaping and raw strings, and learn slicing and indexing to access substrings.
Discover how Python treats strings as objects and apply methods like length, min, max, sorted, capitalize, upper, lower, title, find, split, and format to process text.
This lecture compares simple concatenation with the format method and dives into Python string formatting, including positional and named placeholders, number formatting, padding, hexadecimal notation, percentage, and f-strings.
Explore Python operators, including assignment, multiple and augmented assignments, and comparison operators like == and !=, plus how Python treats objects and immutability.
Master Python operators, including logical, in, is, and arithmetic, with division behavior, floating point precision, modulus, exponentiation, and tolerance-based equality, emphasizing explicit evaluation using parentheses.
Explore how Python expressions combine constants, variables, operators, and functions to produce values and grasp operator precedence, including exponentiation and other operators.
Survey of Python for GIS applications introduces lists as versatile, mutable sequences in Python, covering indexing, slicing, and common methods like append, insert, pop, remove, and extend.
Learn how Python lists behave as mutable objects, exploring indexing, slicing, and negative indices, and distinguish between copy and assignment, plus common operations like append, extend, insert, and sort.
Explore tuples in python: immutability, parentheses, and sequence behavior. Access by indexing and slicing, use in/not in, and index and count; convert between lists and tuples.
Explore Python sets, unordered collections of unique, immutable elements you can iterate over and modify with add or remove. Learn creation with curly braces versus set(), understand duplicates are dropped, and apply operations like intersection, union, difference, symmetric difference, plus subset, superset, and disjoint checks for GIS use.
Explore how Python sets work in GIS workflows, mastering intersection, union, difference, and symmetric difference, the rule that sets can't contain mutable objects, plus subset relations and common set methods.
Explore dictionaries, an ordered collection of key-value pairs you index by keys, iterate with for loops, and modify in place using methods like get, pop, keys, and items.
Explore Python dictionaries by creating, accessing, and mutating key-value pairs, using lists as values, and leveraging methods like keys, values, items, get, pop, and the dictionary constructor.
Survey python data types for GIS: review class versus object, numeric types and booleans, strings as Unicode sequences, lists, tuples, sets, frozen set, and dictionaries, focusing on mutability and iteration.
Master program control in Python by implementing if statements that branch on conditions using colon and indentation. Discover how elif and else handle multiple conditions, with hemisphere and equator examples.
Discover how while loops in python repeat a code block while a condition is true, using indentation to define the block, incrementing the control variable, and employing break or continue.
Learn how Python for loops iterate over iterable data types, including lists and dictionaries, using for-each semantics and accessing values, items, and unpacking techniques.
Explore generators in Python, including range objects and list comprehensions, to generate values on the fly in a for loop, iterate efficiently, and compare with while loops.
Explore how to obtain user input in Python using the input function and command line arguments, convert input to int or float, and safely evaluate literals with ast.literal_eval.
Learn how to run a Python program from the terminal and read command line arguments using sys.argv, converting inputs with ast.literal_eval for safe typing.
Learn to collect latitude input, validate its range, and classify it as northern, southern, or equator using Python if statements, and handle out-of-bounds and loops for multiple entries.
Master how functions organize code in Python, reducing repetition and enabling reuse. Learn to define, call with parentheses, pass parameters, and return values.
This lecture demonstrates refactoring repeated code into a function that processes command line arguments, converts inputs to floats, determines northern or southern hemisphere, and shows print versus return for results.
Explore Python function arguments, including required positional parameters, optional defaults, keyword arguments, and arbitrary arguments (*args and **kwargs). Learn to define, call, and order them effectively.
Discover how Python's map and filter functions apply a custom function to list elements, producing a mapped result or a filtered subset. See latitude checks and 2d array conversions.
Explore lambda functions as anonymous one-line expressions used with map and filter in Python, including single-input examples for latitude in the northern hemisphere, and compare readability to full function definitions.
Explore nested functions and scope in python for GIS applications, including local, enclosing, global, and built-in scopes, and learn how decorator functions modify other functions and their web framework uses.
Learn to handle Python errors gracefully with try and except blocks, catching specific errors like file not found or division by zero, and optionally print the error.
Demonstrate robust error handling in Python using try-except to manage zero division, index, value, and type errors, and invalid inputs, plus numeric validation via float conversion.
Learn how Python modules—text files with code—organize projects, reuse standard and third-party libraries, and import techniques (module, alias, from module import, star) while avoiding top-level execution.
This course covers the basics of the python language, the python language, and the core python packages for data analysis, especially of geospatial data. The goal of the course is to provide a broad introduction to the capabilities of python and how all the various packages work together. This will provide a starting point for deeper exploration on your own or in future courses.
Introduction to python
Object oriented python
Packages and modules
Unit tests
Jupyter notebooks
Numpy
Matplotlib
Pandas
Fiona and shapely
Geopandas
Rasterio
Geocoding
PyQt