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.

No comments:

Post a Comment

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...