Posts

Showing posts from May, 2025

Debug and Error Handling Module 3

Image
 In this week's lab we were given three scripts to understand debugging procedures and handle error messages. Debugging in Python is essential to improving the code quality and productivity. Understanding and handling error messages is important because it stops the programs execution of the script. Being able to read and interpret the error message is critical to identify the problem within the code. This project also incorporated pulling information from ArcGIS with a Python script. The first script given had two errors that needed to be addressed. One demonstrated how Python is case sensitive and something need to be capitalized. The other had two words switched around causing Python not to understand what you were asking it to execute. The following image shows Python shell output of the successful script with the name of all the layers in the ArcGIS project. The second script had multiple errors and exceptions throughout. The variable "filepath" had the incorrect fil...

Python Fundamentals Module 02

Image
 Successful script results The screenshot above shows the successful script results from four python scripts: 1. Printing Last Name     My last name "Adkins" is printed as the last name from a list created using my full name. 2. Dice Game The results of a simulated dice game from a list of players. Each player's roll result is shown in the screenshot and the outcome (win, lose, or tie) of their roll. 3. Random Integer List  A list of 20 randomly generated numbers from 0 to 10 was created. 4. Removing Integer from List An integer was chosen to be removed from the previously created random integer list.  9 (the chosen integer) was then removed from the list 4 times generating a new list. Below are flowcharts for each script: Printing Last Name Dice Game Random Integer List Removing Integer from List Here are the steps I took when creating the Removing Integer from List code: 1          I selected the number “9” as the intege...

Python Environments & Flowcharts Module 1

Image
The first week of class has been focused on getting familiar with general information about Python. We looked at two different Python interpreters Integrated Development and Learning Environment (IDLE) and ArcGIS Notebooks and how they read and execute Python code. IDLE has two main window types the shell window and the editor window. ArcGIS Notebooks provide a space to edit, write, document, and run Python code within ArcGIS Pro. With ArcGIS Notebooks you can easily incorporate Python and maps together. Using a prewritten script that was run through IDLE folders and subfolders for the course were created. We were also tasked with using code to print and then interpret The Zen of Python by Tim Peters. Which  gives a set of guiding principles in writing effective and readable Python code. A few of the set of guidelines it emphasizes include simplicity, clarity, and readability. When handling errors they should not be ignored unless purposeful. If you run into an issue do not guess, ...

Google Earth Lab 7

Image
This week for the lab was focused on Google Earth. Google Earth Pro was used which is a 3D interactive mapping environment. It is easy navigable and the data can be saved and shared with others who may not have GIS knowledge. Points across southern Florida were mapped and a recorded video tour of these points were made. The points and video tour were then saved as a KML file.  A dot density map of southern Florida was also created in Google Earth. A layer of surface water data was converted from a layer in ArcGIS to a KML file to be uploaded into Google Earth. The dot density layer was then also added to Google Earth. The Image Overlay function was then used to add an image of the legend containing information on the density dots and surface water data.