General python

In this section we review the fundamentals of using the Python programming language with a focus on being able to use python for geospatial data science with machine learning. Based on the list of goals, and your prior experience select from the list of tutorials. Feel free to do as many as you like, and skim lightly if you are already familiar with the topics.

For local practice you can install and user the Python with Conda, we recommend coding in a Jupyter Notebook which is similar to the Google Colab online editor that will be used in the other tutorials on this site.

Goals

  • Data types

    • Basic Types: Integers (Whole numbers), Floats (Numbers with decimals), Strings
    • Constructed Types: Lists, Dictionaries
      Note: Python Dictionaries and JSON files very similar.
  • Looping (Program flow control)

    • Using looping to iterate over a set of items to repeat a process

      • Example: Loop over a list of items

      • Example: Loop over list of files

  • Calling functions

    • Importing libraries (aka modules, packages)
    • How to call a function
    • How to write a small function

Lessons

Pick from the following lessons. We recommend at least 1, and if you choose to watch the videos then we suggest you also do some of the Interactive coding examples from the other options. Trying some code is one of the best ways to learn.

  1. An introduction or refresher for Python 3 Online Videos from Udemy
  2. Interactive lessons with examples and quizzes from CodeAcademy. All lessons except #10 on Classes (optional)
  3. Demonstration Notebooks that Accompany the Whirlwind Tour Of Python Book (Available for free). Lessons 1-9, everything else is optional.

Additional References

Python for Data Science

In this section we specifically review Python for Data Science, focusing on the main data structures used to manipulate data, numpy arrays and pandas dataframes. Each link is a tutorial or example that you can try.

Numpy Arrays

Important: Understanding multidimensional data arrays as a data structure.
Note: Numpy array data must all be of the same type (e.g. Integer, Float, etc…)

Lessons:

Pandas DataFrames

Important: Understanding data frames as a table (sheet), with data
records as rows, and data attributes as columns. Each column can be a different data type.

Lessons:

References

Plotting

Important: Being able to visualize selections of data in a variety of standard plot types. Histogram, Bar, Line, Scatter Plot (XY)