Final Project Data Output

by Damola Ajao

20 Jun 2018

In the beginning I chose a data analysis as the point of focus for my project. As I worked on my project I came to focus on the UI as the initial target to get operating. As such I ended up using a base from a class example to create a UI that asks different options in a while loop nested with if statements. I set an option for breaking out of the loop and ending the program if a specific option is selected. This does allow the user’s input for confirmation on the program’s actions however the input is rather limited as well allowing for me to code my program to be considerably hearty to incorrect inputs as an else statement allows me to impart a structure to reset the selection if an incorrect statement is entered.

My method for the project was trying to determine exactly what I wanted to perform. This came hurt me when I found that my initial target was in an entirely different markup language to the work we were focusing on. As a result, I changed the source of my data to focus on census data. This however accrued further complications due to the lack of uniformity I found in these different census CSVs. I found that I needed to comprise my selections and take results from a single census following both years 2010 and 2000 and split them in 2 for further analysis to be performed. This led me to find further issues in the code such as the use of blank spaces instead of underlines that led to trouble in creating code to correctly identify the breaks between words. This led me to an understanding of the irregularity of the formation of census CSVs with disparity probably occurring between different states and cities considering the differences. To try and cut down on the white spaces I formatted the data I selected to reduce the white space and allow my program to parse it without fault. However before setting upon this I tried to engage the issue through trying a different method to transfer the file’s contents to a dictionary using an extended method involving the CSV module. This method that I found resulted in a strange occurrence of the CSV file that was originally being read to be wiped. The code shown here

with open('coors.csv', mode='r') as infile:
    reader = csv.reader(infile)
    with open('coors_new.csv', mode='w') as outfile:
        writer = csv.writer(outfile)
        mydict = {rows[0]:rows[1] for rows in reader}
source: https://stackoverflow.com/questions/6740918/creating-a-dictionary-from-a-csv-file

I tried to relate it to my code in order to utilize the previous setup that the .CSV file held prior. However, repeated trials in running the code showed it only deleting the .CSV it was supposed to read from. This leads me to suspect the issue arises from the writing of the dictionary occurring in the area pf the CSV file instead. Working on this project I came to realize the faults in my design and see more issues grow as I sought to solve problems around the initial issues I was resolving.

This resulted I feel from a lack of a solidified goal. By which I am referring to my initial switching of database sources. I had some ideas that were not properly scoped in the measure of what I could perform. This resulted in me trying to resolve conflicts that I could have easily avoided. Another issue I encountered was the lack of uniformity in data sources. This was something that was strangely prevalent in my early work. Another issue I found was not stepping back to look at all my code when trying to solve my problems. When I ran into the .CSV deletion, I ended up taking more time on solving the issue which eventually led to what felt like a waste of time to get it back in working order. I did however save multiple versions of my project which allowed me to go back and look at the differences of the programs. This was an assurance that I did use however immediately checking the source .CSV file would have probably benefited me better. In constructing the code, I ran into issues with the creation of a visual representation of my data. I tried to start off with the creation of a sample bar graph the result was no formation when the function creating it was called. This is something that could be caused by the input. 

On a whole I feel like I’ve learned much from the class. My process to decide on a data sources was met with trouble due to the issues I mentioned prior in my reflection. These could have been solved quicker to iron out knits that I run into. Another point to my progress is the need for me to engage problems head on more consistently. While working on my program I ran into issues that may have been solved sooner by proceeding along the time scale sooner. I feel I had an issue with correctly setting my goals. While I have come to complete certain functions of my program I still found trouble in points involving class structure, and visual output. The use of a dictionary did occur; however, the dictionary has trouble tabbing its results. Overall my work came to become less hardy as I continued. I see this as a natural result of continuing to grow my code as the interacting parts conflicting with each other. I feel the failure of the graphical output should have not been although. My initial steps to test it were met with failure throughout. This was met with when the code was in the functions module or main module. The result I meant to work towards should be a method to properly parse multiple types of censuses. This could be helped by the adopting of a policy of methods to format the census data that could be widely adapted. With more time I hope to iron out the issues with the dictionary and present a viewable graphic output. The class utilization I tried to engage ended up becoming a source of issues thus I left it as a comment. 

With time I would like to include a class to assign objects a calculator that would be listed. Despite the failings of my work I feel I have learned in this course. The frustrations I met have been many despite this, however the experience I gained working on the github platform, learning the python language, and attending a meetup gave me an excellent introduction to the field and multiple points of reference. I learned much from trying to achieve many goals and picked up knowledge of hotkeys that will be useful in other areas of programming.  
Here's a little about Damola Find Damola Ajao on Twitter, Github, and on the web.