NGA Advanced Python Programming for GIS, GLGI 3001-1

Overview and Checklist

PrintPrint

This lesson builds on the previous and will be investigating advanced geoprocessing in Python. We will start with looking at Lists comprehensions and Regular Expressions (regex) and then transition to discussing two of the popular python package managers pip and conda. We will introduce some well known data science packages at a high level and finally work through some data manipulation in pandas.

Learning Outcomes

By the end of this lesson, you should be able to:

  • Operations on data lists
  • Use regex to perform data extraction.
  • Identify the main python packages used for spatial data science.
  • Perform data manipulation using pandas.

Lesson Roadmap

To finish this lesson, you must complete the activities listed below. You may find it useful to print this page out first so that you can follow along with the directions. 

Steps for Completing Lesson 3
Step Activity Access/Directions
1 Engage with Lesson 3 Content Begin with List Comprehension
2 Programming Assignment and Reflection  Submit your code for the programming assignment and 400 words write-up with reflections  
3 Quiz 3 Complete the Lesson 3 Quiz  
4 Questions/Comments Remember to visit Canvas to post/answer any questions or comments pertaining to Lesson 3

Downloads

The following is a list of datasets that you will be prompted to download through the course of the lesson. They are divided into two sections: Datasets that you will need for the assignments and Datasets used for the content and examples in the lesson.

Required:

Suggested:

  • None for this lesson; data for this lesson's examples have been downloaded during lesson 1.

Assignment

Please review the assignment at the of the lesson for full details

In this homework assignment, we want you to practice working with pandas and the other Python packages introduced in this lesson some more, and you are supposed to submit your solution as a nice-looking script.

The situation is the following: You have been hired by a company active in the northeast of the United States to analyze and produce different forms of summaries for the traveling activities of their traveling salespersons. Unfortunately, the way the company has been keeping track of the related information leaves a lot to be desired. The information is spread out over numerous .csv files. Please download the .zip file containing all (imaginary) data you need for this assignment and extract it to a new folder. Then open the files in a text editor and read the explanations below.

Write-up

Produce a 400-word write-up on how the assignment went for you; reflect on and briefly discuss the issues and challenges you encountered and what you learned from the assignment.

Deliverable

Submit a single .zip file to the corresponding drop box on Canvas; the zip file should contain:

  • Your script file
  • Your 400-word write-up

Questions?

If you have any questions, please send a message through Canvas. We will check daily to respond. If your question is one that is relevant to the entire class, we may respond to the entire class rather than individually.