Tuesday, May 27, 2025

Module 2: Python Fundamentals

 Module 2: Python Fundamentals

This weeks module was focused on the fundamentals of how to use Python within ArcGIS Pro. The focus was on using strings or text to write our names, fixing code that was previously written, writing loop statements, and removing numbers from previous generated code.

When doing string code it is important to put quotation marks around the words that you want to print. Also, when using string we tried indexing, where is the system of numbering a sequence of characters and can be used to fetch elements within a string. we are able to do this either through words in double quotation marks or lists with single quotation marks. Lists can be either be text or numbers. Lastly, I needed to just get my last name out of the list which is splicing. For this code the best way was to put -1 to get the last name out.

Next part of the module was fixing code that was already given to us. There were two errors that needed to be fixed and to start you want to run the code to see where the first problem was located. The first part that came up was that randint did not have the correct input. This code is considered a conditional statement and before it can run you need to import random before using random.randint. The second error was in the print portion of the code. It said that you cannot have both integers and strings in the print portion. So I needed to either make them all string or all integers. I had to do all string because the last portion could not be an integer. I had to put the integers in str() to get the code to work properly. After fixing that portion of the code it worked and showed the statement for each of the players.

The next portion of the code was creating a while loop statement. We were supposed to create a loop that creates 20 random numbers between 0-10. This code is similar to the one that was given to us but we needed to make sure the statement was empty and that the counter is 0. The while loop is based off a condition that was given to the code which was less than 20. Once again I needed to import random so that I could create random.randint (0, 10). In order to get the random numbers printed I needed to use the code .append(). Also, to make sure the code does not do it continuously and actually produces the numbers you need to add break before the print portion of the code.

Lastly, the last portion of the code was to chose a number that was going to be removed from the previous list that was generated. I used a for loop statement so I could get the if-else statement to determine if the number was in the generated list. Lastly, in this portion I had to use .remove() to get the number taken out of the generated list. It is important to note that the numbers are taken out of the list is done one at a time. The picture below shows the answers for all the code that was written.


Throughout all the different portions of the code there were some things that I learned which were make sure before running the loop structures code that you have a stop (break) statement. I did not have that and it caused ArcGIS Pro to crash and I had to close out of everything before I could get the code to run again. Also, make sure to do the exercise before anything and take notes that you can reference when doing the module. When doing steps 3 and 4 I needed to make sure that step 4 linked back to step 3 so that the numbers were connected. Lastly, when the numbers are being removed it is done one at a time. I think if you wanted all the numbers to be taken away at once it would be good to use the delete function.

This is the flowchart of the script that was written.



Saturday, May 17, 2025

Module 1: Python Environments and Flowcharts

 Module 1: Python Environments and Flowcharts

In this weeks lab we were learning about the basics of Python, Flowcharts, and create file paths for our work for the next 8 weeks.

Python is a programming language that is both simple and powerful. This is important because it makes it easy to learn compared to other programs, such as C++. Also, Python is considered interpreted which means that Python is interpreted or “interacted” during the time the script is being run. This is important because you can create the script you want, and it will immediately interact with Python. Also, it means it does not need compilation to binary code before you run it. Which means you can run the program directly from the source code. When using Python there are two ways you can write code that can interact with ArcGIS Pro, which are Integrated DeveLopment Environment (IDLE) and Notebooks. The difference between IDLE and ArcGIS Notebooks is that IDLE indirectly interacts with Python whereas ArcGIS Notebooks directly interacts with Python. Also, Notebooks can contain more than just code and can contain regular text, images, external links, and other elements. Whereas, IDLE contains only code and regular text that are comments. The two Python tools share in common are when you create and write script it will interact with the Python Command Prompt. Also, if you right-click on Python script you can edit IDLE within ArcGIS Pro which you can do with Notebooks.

Another aspect that we learned this week was Flowcharts, which uses symbols and shapes to represent an algorithm. This algorithm is created before it is put into Python to write the script. The symbols that are used for flowcharts comes from reading by Agarwal et al. (2010). Being able to know the common symbols is helpful because everyone will know what it being represented. This week we were supposed to make flowchart of a basic formula to convert radians to degrees, which is represented in the image below. This is important because it shows how you thought the script through before putting it into Python.



Lastly, in this weeks lab we were supposed to take an already written python script to create folders in our S: Drive for this class. First, I opened Python Command Prompt and typed in idle to open the idle interactive window. Second, within the IDLE window I opened CreateModFolders.py script. Third, it opened the script, but it did not immediately add the folders to my S Drive. I was confused at first and was not sure what to do next. That is when I went to the exercise and was able to figure out what I needed to do. Fourth, I went to the Run tab and clicked Run Module, and it opened that it was completed. Fifth, I opened the S Drive, and the folder was finally installed. Being able to work through the issues were important because I have not done Python before and it gave me an opportunity to learn more about the program.

Friday, May 2, 2025

Module 7: Google Earth

 Module 7: Google Earth

This weeks module is about using Google Earth and knowing how to show data through an interactive 3D map. One of the best things about Google Earth is that the data is free and can be used by everyone who is able to download the app on their computer. Much of the maps we created in this class are from ArcGIS Pro and using Google Earth is important to give data to the average person. 

It is important to note that the data that is used in Google Earth are KMZ/KML files. The data that is used in ArcGIS Pro are either feature classes or layers. The first step before using Google Earth is converting the data to KMZ/KML files. Once the data is converted it can be opened up in Google Earth. Also, in this module we learned how to use a png or jpeg file to image overlay the image onto the map. For this map it was a legend and we need to make sure the colors in the legend matched the colors on the map before getting converted to KMZ/KML files. The map below showed how all the data is able to be put within Google Earth and give it easily to other people who have Google Earth on their computer. The reason that is important is because ArcGIS Pro is expensive and people cannot always use that data to make maps in the future.


In the module we were able to learn how to create a Google Earth Tour to show all the information of the dot density map and the landscape. First we needed to create placemarks in dense areas in southern Florida, such as Miami, Fort Lauderdale, Tampa Bay, and St. Petersburg. To make the video we needed to turn off the names of the placemarks but could still use it for the 3D tour. A pro for using Google Earth is that there are some areas that were more photorealistic because there had been more data collected. An example is how Tampa looks more photorealistic because it is using LiDAR data whereas Fort Lauderdale was likely manually put in and does not look as realistic. In order to make the Tour you need to press the "Record a Tour" button and make sure to press the red record button. To zoom into the placemark areas you need to double-click the placemark and it will zoom into that area. When done you need to press the red record button again to stop the tour. When you save the tour you need to make sure to save as a kmz file so that it can be given to anyone with Google Earth on there computer.

This module is very important to learn because the data can be given to people who have Google Earth on their computer. Also, Google Earth is free and people are able to get a lot of information without having to pay a lot of money. Since ArcGIS Pro is very expensive, Google Earth is definitely a cheaper option.

Blog Post #5: GIS Portfolio

 Blog Post #5: GIS Portfolio In the final weeks for the GIS Internship we were given the task of creating a GIS portfolio either on paper or...