28.5.25

Module 2: Python Fundamentals

This week, our assignment focused on Python basics, including working with strings, fixing errors in loops, building and modifying lists, and learning how to use both for and why loops to control code behavior. The screenshot below shows the successful results from all four parts of the lab assignment (Figure 1).  


Figure 1

The screenshot displays the output of my full script. It starts with my last name printed from a list, followed by the dice game output where each player’s roll and result is shown. Next is the randomly generated list of 20 numbers between 0 and 10. Finally, the results show how many times the number 7 appeared in the list, confirmation that it was removed, and the final cleaned-up list.

I worked through each task step using the provided template and building out the code in ArcGIS Notebook. Some things went smoothly, such as printing my last name using indexing from a list, while others took some trial and error, especially working with while loops and understanding how to cleanly remove elements from a list.

In the dice game, the tricky part was catching a type mismatch between a string and an integer. I was initially confused by the error, but realized the problem was that I was trying to add an integer (the result of a dice roll) to a string without converting it first. A quick fix using str() cleared it up.

Creating the list of 20 random integers using a while loop helped reinforce how loop conditions work. I used a counter variable to track how many numbers had been added, and used an if statement with a break to stop the loop once I reached 20.

The final step, removing a selected number from the list, was a solid test of logic. I used an if statement to check if the number was in the list, and then a while loop to remove every instance of it using remove(). I also used count() beforehand to see how many times it appeared, which helped me double-check the results. Seeing the list before and after was a simple but helpful visual to confirm everything worked.

Overall, this assignment was a good balance of basic review and new concepts. Each step built on the last, and having to troubleshoot small errors along the way helped reinforce what I was learning.

22.5.25

Module 1: Python Environments and Flowcharts

 

This week, we explored the relationship between Python's interpreted nature, its design philosophy, and how simple visual tools like flowcharts can support clear and effective programming.

Interpreted Nature of Python

Unlike compiled languages such as C++, Python is interpreted, meaning it runs source code directly without needing to be converted into a separate executable file (Zandbergen 2024). Code is executed line by line, which makes Python especially useful for writing, testing, and debugging in small increments. This flexibility supports a more experimental, hands-on approach to learning how to code.

The Zen of Python

The Zen of Python by Tim Peters offers guidelines for writing clean, readable code. While I may not fully embrace phrases like “Namespaces are one honking great idea”, I do appreciate the overall message: code should be simple, concise, and easy to understand.

As an archaeologist working in a field filled with complexity and ambiguity, I often rely on clear language to explain nuanced results. If I can’t make my interpretations understandable, I haven’t done my job. This same value applies to scripting: even when the process is complex, the script should be readable to others.

Thinking Algorithmically with Flowcharts

To practice algorithmic thinking, I created a flowchart to convert 3 radians to degrees using the formula:: degrees = radians * 180 / pi (Figure 1).

 


Figure 1

It begins with a Start symbol, assigns the value 3 to the radians variable, the value of pi, and then performs the calculation degrees = radians * 180 / pi. The result is then printed using an output symbol, and the flow stops with an End. I used standard flowchart symbols: ovals for start/end, rectangles for assigning vales and processing, a parallelogram for output. This simple visualization mirrors Python’s top-to-bottom execution and reinforces the importance of sequential logic. The code itself was simple and clear, conforming to the guidelines of the Zen of Python.

I tested the calculation in ArcGIS Notebook (Figure 2). At first, I ran into a syntax error due to a missing set of parentheses in the print function. It was a helpful reminder that Notebooks are excellent for catching errors quickly and providing feedback. Once corrected, the output was accurate: 171.88733853923566.

Figure 2


This module reinforced the value of Python's interpreted environment for testing and refining code, and the usefulness of simple visual tools like flowcharts in early-stage programming.

2.5.25

Google Earth South Florida Tour

 

This week, I worked with Google Earth Pro to explore population distribution and major cities across South Florida. The lab focused on converting GIS data into KMZ format, organizing spatial layers in Google Earth, and creating a recorded tour to showcase key urban areas using the platform’s 3D visualization tools.

KMZ

The population dot density layer, county boundaries, and map legend image were provided. My primary GIS task involved working with the surface water data. In ArcGIS Pro, I symbolized hydrology features, excluding any features that did not match the legend’s categories, and exported the layer as a KMZ file using the Layer to KML tool. After importing the new hydrology KMZ into Google Earth, along with the other provided layers, I arranged them so that the population dot density remained visible above all others. I also used the image overlay tool to place the legend just off the coast of Florida (Figure 1).


Figure 1

To organize the map, I created a folder in Google Earth containing all the imported layers and saved the entire setup as a single KMZ file. The final map includes the population dot density layer on top, categorized hydrology, counties as vector data with clickable attribute pop-ups, and a clearly placed legend. All 23 counties are visible at the default extent, and the map functions as an interactive KMZ that can be easily shared with anybody that has access to Google Earth.

Tour

For my last class assignment, I created a recorded Google Earth tour. Using the original data I added placemarks to each destination. The tour begins with a full overview of South Florida, then visits the Miami metropolitan area, Downtown Miami, Downtown Fort Lauderdale, the Tampa Bay area, St. Petersburg, and Downtown Tampa (Figure 2). Each location showcases different aspects of the built environment using 3D models. Downtown Miami includes a mix of clickable, photorealistic buildings and basic 3D structures, while Downtown Tampa features LiDAR-generated models with realistic buildings, as well as trees, bridges, and even vehicles.

Figure 2

The tour transitions between locations, using zoom, pan, and double-clicking the placenames. I concluded the recording by returning to the full regional view, providing a final look at the overall population distribution and landscape. Navigating the 3D environment was occasionally awkward, and I could use more practice, but I appreciated the opportunity to combine spatial analysis with a more accessible multimedia presentation. Overall, this module helped me better understand how GIS data can be shared with a wider audience through platforms like Google Earth.