M5: Exploring & Manipulating Data

Exploring & Manipulating Data

Module 5 has us working with search cursors, lists, dictionaries, and how to update them. We also learned how to check for, describe, and list data. 

I apologize in advance if this blog layout is wonky. The step 5 pictures were being difficult. It does seem like I have fixed it but I thought that twice before and had to fix it again. 

I only created flowcharts for the longer steps and tried not to put any specific code 
I separated the Search Cursor and Dictionary flowcharts but with the understanding that the fields come from the Search Cursor Flowchart.
I am not confident that these flowcharts are correct but a good college try was made. 

Steps 1 - 2 

I did not create a flowchart for the first 2 steps since it was just processes and print statements.
I did not struggle with either of these two steps. 



Step 3 and 4

Defined the fclist and create a for loop to copy all features to fGDB
I had an issue with this only copying the roads. 
I forgot to set the fclist, after I fixed that - worked like a (py)charm. ba dum tss
Added in a try-except for error checking. 

Copy Geodatabase




Copy Geodatabase Flowchart








Step 5 

I tried a few different options to get this done and setting the fields was the most successful. 
After seeing that negative populations were being added in I decided to use if-else statements to print “undetermined” (term borrowed from the pop-range of the cities table). I placed it in the correct location in the search cursor but dictionary took a couple of attempts. 

Search Cursor






Flowchart for Search Cursor






































































Step 6, 7, 8

Only issue I had with this was getting the if-else statement in the correct spot- only took a couple of tries though. 

Dictionary





Flowchart for Dictionary










Overall I would rate my struggles with this module about 35%. I knew how things should flow and all the basic setups. Most of the struggles were placement and figuring out which items were necessary and unnecessary. 





Our duck of luck is ready for cooler temps.


(They're yellow now because of sunburn)









Comments