Wednesday, June 17, 2020

Module 5: Exploring & Manipulating Data

a)

b)

c)

d)

e)

f)

     This week's lab required us to create a geodatabase and to copy feature layers into it via python code. We were then tasked with creating a search cursor to find cities that were county seats. The lab also had us create a dictionary and populate it with these cities using a for loop. The results of my script are depicted above in screenshots a-e, and the flowchart for the script is shown in screenshot f.
     While printing the results of the search cursor, I kept receiving an error from the POP_2000 field. The value of the field is an integer and the code I was using required a string. I tried putting the code in quotes, but that just returned the code and not the value desired. I took a brief break and realized that I needed to turn the value into a string by placing the code within the str() function. This fix was a simple one, yet it was the only part of the lab that I struggled with.

No comments:

Post a Comment