Tuesday, May 31, 2016

Python Fundamentals Part II

   This screenshot shows the results of a code that performs a dice rolling game based on the length of the players' name and creates a random list of 20 integers between 0 and 10. A conditional statement with a while loop is created to target a variable (the number 5 in this case) and remove it from the list for however many times it appears.

   How I created the code:

1.       I created a variable for the unlucky number then used a count method based on how many times the variable was in the list.
2.       I checked to see if the count variable was less than or equal to zero, if it was it would print “The number 5 is not in the list”
3.       If the variable was found in the list, a second conditional statement would state that the variable appeared and that its count would be deleted for however many times it appeared. Ex) the number 5 will be deleted 4 times.

4.       Next, a while loop was created in the second conditional statement that if the count of the variable was greater than zero, it would remove the variable count by 1 until the variable was completely removed from the list.

Thursday, May 26, 2016

Ethics


   This map shows Jordanian archaeological sites. The purpose of this module was to familiarize ourselves with ways to access site location coordinates, and how to use that information to make point locations in a map. Data for site locations was obtained from a publicly accessible site domain called MEGA, which is an archaeological site searchable database for the country of Jordan. While MEGA does provide site location, it also has varying levels of archaeological site information security based upon user identity. A guest to the site would have less access to site information than a user with administrative capabilities. Precautions like these aid in the prevention of site looting. 

   However, there is the concern that public domains like these and Google Earth give looters more accessibility to site location whereabouts, if not per say information about the sites. In retrospect,  this might in turn increase looting capabilities. Needless to say, site location sharing should be handled cautiously, considering there are now more ways than ever to view and find archaeological sites.

Saturday, May 21, 2016

Python Fundamentals Part 1


  For this lab, a script was made that would preview my full name, last name, and then the number of letters in my last name multiplied by three. 

   The full script included a written string of my full name, the string made into a list that split into individual names, my name indexed through printing, a function to find the length of my last name, a statement that multiplied the length of my last name by three, and the printing of the last name length multiplied by three.

   Here is an excerpt of how I calculated the length of my last name in PythonWin:
1.       This function wasn’t a task in the lab exercise, but I remembered it being used as a function in the reading.
2.       I wrote the first code as: name = “Priscilla Marie Woodrow”             len(Woodrow). Which was wrong because I forgot to add quotation inside the parenthesis, which specifies the object.

3.       It runs as: name = “Priscilla Marie Woodrow”          len(“Woodrow”)

Wednesday, May 18, 2016

Module 2, Queries and Clips

   
   This lab implemented queries and clipping to show historical landmarks affected by the Chicago Fire of 1871, as well as the landmarks built in the twenty-year regrowth period afterwards. Also shown are the wards damaged by the fire and the starting point of the fire.




Saturday, May 14, 2016

Introduction to Python

   This lab was an introduction to Python by running a script through PythonWin.

Here is what the script I ran did:
   The script created a new folder for the class called GISProgramming, with 12 folders for each module and three sub-folders in each for various outputs. This saves time from having to tediously create all the folders in one sitting or as the assignments come. It also assures all our folders are similar and easy to navigate through.

Here are the steps I noted while doing the task:

   1.       I copied the script from the R drive into a folder I made in the S drive for the class.
2.       I double-clicked the script to open it. I clicked the Run icon. It ran fast and I didn’t know where to expect to find it. I clicked back to the very beginning of my documents folder and found it there.
3.       I moved it from there to the next page, where I keep my main Data and Documents folders for other classes.