Wednesday, May 30, 2018

Python Fundamentals Part 1

This week was a shallow dive into the basics of Python scripting.  We learned about basic variables, objects, functions, methods and how to use these elements to create a basic script.  The script itself only had one input in the beginning.  This input would be a users name.  From there the script would take the variable with the name, turn it into a list for every name in the initial string that was separated by a space, and then print the last name to the screen.  From there the length of the last name was determined and then tripled.  The final part of the script was to print tripled count value of the last name to the screen.  Here is a screen shot of how mine turned out. 


The script was tested using a number of different name strings as the initial variable and the final outcome always printed whatever the last name and triple the number of characters in that last name.  Again, this was all basic scripting to allow us to scratch the surface of script programming and get a feel for the basic elements of Python. 

Let me know what you think in the comments below!  I can also answer any questions on how to achieve this outcome efficiently as well.  

Wednesday, May 23, 2018

Introduction to Python

Here we are in our first week of GIS Programming.  This week focused on setting up our folders in our S:/ drive and getting a basic understanding of Python scripting and editors.  The editors we looked at were IDLE, PythonWin, and the Python editor which is in ArcMap 10.5.1.  Within these editors, a simple script was run to display the text "Hello World".  Nothing too fancy, just enough to show how different elements are highlighted and displayed in the different editors.  For the most part we will be using PythonWin for this course. 

To set up our folders for the course, we used a python script vice manually creating 3 folders for each of the 12 modules in the course.  The screenshot below shows the outcome of this script.


The overall process summary felt like an introduction to completing process summaries.  This one focused on showing where you store your data, asked some questions from the reading, and then had us explain how a certain step was completed in our own words.  This introduction to process summaries would be beneficial to first time students or those who have been away for a couple of semesters. 

Other than that, this was probably the only simple week I can hope to have during this course.  My coding/scripting skills are extremely rusty, but I am hoping it will all come back quickly and overall I am looking forward to this course.  

Thursday, May 3, 2018

Computer Cartography - Finally Done!


This final project was designed to utilize the cartographic skills, methods, and principles that were learned throughout this course.  To illustrate mastery of these skills, a complex map depicting multiple layers of data was created.  The data used to create this map were the 2014 nationwide average SAT scores for each state as well as each state’s student participation percentage in taking the SAT.  By mapping these two pieces of data together on the same map, it could show a correlation between SAT scores and how many students actually participated in the testing. 
To create a map that depicts two different sets of data, two thematic methods were chosen to provide enough distinction between the data sets.  The two thematic methods used were choropleth mapping using graduated colors for the average composite SAT scores in each state and proportional symbol mapping using graduated symbols for the participation percentage. 
            The data for the state average SAT scores needed to be combined into a composite score as it was provided as the three SAT section scores.  No normalization of the composite scores was applied to the data.  Once these scores were combined for each state, the resulting composite scores were used to create a choropleth map of the United States.  Graduated color symbology was used in ArcMap to achieve this.  The data was also divided into five groups, or score ranges, using the quantile breaks method.  This was used to ensure an equal number of states was in each group, providing some color differentiation and even balance to the overall map.  The color ramp for this data series was red (lower SAT scores) to green (higher SAT scores
            The participation percentage data was taken directly from the source document and no manipulation or normalization was required for mapping.  To map this data, proportional symbology, in the form of graduated circles, was used to map the participation percentage on top of the existing choropleth map for the average scores.  A light blue circle with a black border was used to contrast the color scheme of the base map.  The actual percentage was also placed inside the circle to clearly show the data on the map.  For this symbology the data was divided into five groups, however using natural breaks instead of quantile.  
            As one looks at this map, you can quickly see that the states with the higher average composite SAT scores also happen to be the states reporting the lower participation percentage.  One could assume that only smarter students are encouraged to take the SAT’s in these states where as the states with the lower averages and higher participation rates have their average scores brought down by more average students.  One could also assume that if the states with lower participation rates were to encourage more students to take the SAT, their average composite scores would also come down and fall more in line with the higher participating states.  
          So this map brings this course to an end.  I will say that of all the GIS coursework I have done up till now, this has been one of the more frustrating courses for me.  I think that is because a lot of the evaluation has been subjective in interpretation.  That combined with being colorblind, application of certain principles has proven to be quite challenging.  This is definitely hasn’t been as easy as just obtaining data and creating a map from it.  That being said, I have learned a lot and I guess the Marine in me gets enjoyment and fulfillment from challenging and frustrating situations.