Wednesday, May 31, 2023

Module 2: Python Fundamentals


Module 2: Python Fundamentals

In the picture above, it shows the code I wrote for this module running and working. The first line displays my last name. The lines under that is a dice game from pre-written code that I had to figure out the two errors in the code in order for the game to work properly. It rolls some dice and lets you know if you win, lose, or tie. 

The list underneath the dice game in the first picture is a randomized list the spits out 20 random numbers between 0 and 10. The flow chart for this code is located in the picture above. The code for this only goes to the first instance of print(luckyList). The rest of the flow chart displays the rest of the code for the last list in the first picture. This code removes a chosen integer (I choose 7) and will print out how many times the chosen number will be removed from the list. It then prints out the new list with the chosen integer removed from the list.

Notes:

1         Import math and random should be at the top of code to work correctly.

2         Indexing is very useful to find certain words or letters in a statement.

3         Breaks can end loops when they reach certain conditions designated in your code.

4         Str(var)+, +str(var)+ is how to add strings to statements that hold variables.


Wednesday, May 24, 2023

Module 1


 The output for 3 radians to degrees is 171.9745222929936 degrees.

My interpretation of Zen python by Tim Peters:
These are the principles of python by Tim Peters. Code needs to be easy to read. Your code needs to be understandable to someone who knows nothing about your program. Don’t overcomplicate your code. Keep your code as simple and readable as possible, even when working with complex problems. Stick to a flat code structure with minimal nesting. It’s preferable to have several easy-to-follow lines of code than a dense one-liner. In Python, there are lots of best practices that make your code more readable for other programmers follow these practices instead of doing it your way. If it’s more practical to solve a problem “your way” and it keeps code readable and easy-to-follow, you may sometimes deviate from established best practices. Deal with errors when they occur rather than letting them silently pass by, not dealing with errors could lead to bigger issues (unless you explicitly silenced the error). Apply critical thinking to understand the problem and then find an appropriate solution. If you can’t explain the implementation of your code to friends or coworkers it’s a bad code and probably over complicated the code. If you can easily explain the implementation of your code to friends and coworkers the code might be good. In Python, you can have isolated namespaces or a collection of names that allow each and every object in your program to have a unique name. Namespaces create a system where names in one of your modules are not conflicting with names in another making them very useful.

Process Summary Notes:
  • CreateModFolders.py script creates 6 module folders each containing sub folders data, script, and results for this class to keep folders organized. (I ran it accidentally before starting the lab and noticed the folders before I started and just figured UWF added them to my folder somehow, but after reading through the lab I realized that it was me.)
  • Print(“hello world”)- to print words you need “__” . 
  • Print (sum)- variables do not need “__”
  •  Flowcharts use certain symbols for each process of your code. 
  • Pi is not known by computer so you must assign its value first before assuming the program knows pi.

Monday, April 10, 2023

Current Land Use Map of Germantown, Maryland


 This map displays the land use classification area for Germantown, Maryland. Over the past 30 years, Maryland’s population has increased by 30% while land consumption has increased by 100% . The City of Germantown wants to follow the Governor’s advice and work toward Maryland’s “Smart, Green and Growing Initiative.” Using the combination of the bands Red: 4, Green: 5, Blue: 6 created the image for the map.
 The class names and color are located under the class names section with the area of each class to the left in acres. The distance image represents the Spectral Euclidean Distance, the brighter a pixel, the greater the difference. Urban/Residential areas are located in pink with an area of 1,999 acres. Agriculture areas are located in cyan with an area of 11,538 acres. Water areas are located in blue with an area of 639 acres. The rest of the classes are located under the class name legend.

Monday, March 27, 2023




 For this weeks lab we used different band combinations to identify different features in Northwest Washington. 

The image on the left shows bare soil features on the map, the areas covered in the red/brownish color are the features covered by bare soil. This was found using the TM False Natural Color which uses the band combination of RGB: 5, 4, 3. 

The image in the middle shows snow features on the map, the areas covered in the yellow and purple colors indicate areas where snow has fallen or could collect due to elevation. This was found using the band combination of RGB: 2, 4, 5. 

The image on the right shows the urban features on the map, the areas covered in grey color are features covered by urban features/development. This was found using the TM False Color IR band combination of RGB: 4, 3, 2.

Monday, March 6, 2023

Land Use Classification Washington State Forest


 For this weeks lab I explored the ERDAS Imagine 32-bit software. I identified how to utilize a subset of the data in the software and export that subset of data to ArcGIS Pro and also identified multiple ways to save, export, and zoom into the different views. The map I created above is the subset of an original image I had explored in ERDAS Imagine 32-bit and after exporting the subset data file into ArcGIS pro, I created a map of the subset area with the land information categorized by the "Class_Names" in the legend and additionally, the area in hectares corresponding to those different land classifications to the right of them in the legend.

Sunday, February 19, 2023

Land Use/Land Cover of Pascagoula, MS


 This map displays the land use/land cover of the Pascagoula, MS area. It also displays the level of accuracy that each land use/land cover zone has by using point features to show if these areas are zoned correctly in the correct areas. The map I produced has a 87% point accuracy which is relatively pretty good accuracy. 

Thursday, February 2, 2023

Aerial Photograph Depicting Various Tones/Texture

This map is classified in two categories tone and texture. For tone they are classified by: very light, light, medium, dark, very dark. For texture they are classified by: very fine, fine, mottled, coarse, and very coarse. 

For this map I identified features and objects by: shape size, shadows, pattern, and association. For shape size I identified three features: the parked cars, the main road and the restaurant. The main roads shape was easily identifiable and so were the tiny parked cars in the parking lot. The restaurants shape was also easy to identify as it was the largest building along the beach. For shadows I identified objects by their shadow such as the water tower, the sign to a store and a light pole along the road. For pattern I looked for objects that had a similar pattern to them such as: the ocean (because of wave action), the parking lot, and the beach housing community to the east in the image. Finally I identified objects by association and found: the pier, the hotel pool (in middle of hotel), and the community pool for the housing on the east side of image. 





Module 7 Google Earth

 Google Earth For this week's lab we were tasked with creating a dot density map of south Florida in Google Earth. The map also includes...