Thursday, April 27, 2017

Week 10: Day 45-49 - VA Votes #3


Monday:
Today, I started tinkering with the tables on the va_votes_testing database. It seems I am getting a good understanding of how the table relationships work, and I'm very happy about that. What's even more important though, is getting the data into these tables. However, the current data is simply too disorganized to be able to go into the tables. I will have to find a good way of rearranging the data to fit into the tables I made.

Tuesday:
So, after discussing with Marco and Owen, we found a good way of getting the data into the tables. I started modifying the CSV data from the official Virginia elections website, and I think I have a grasp on what it should look like. Now what we need is for Marco to make a good Python program that will clean the data the way I want it to.

Wednesday:
Today, Mr. Elkner was not here. We had a good sub, who let us do our thing. Marco showed me the mechanics of how he plans to store data into the tables using Python. The way it works is that it uses the SQL integration that's built into Python to take the data and put it into the tables. We decided it's faster if we create a "data cleaner" which will modify the CSV files into the way I want it to be. Marco may have decided to delegate that task to Ali, not entirely sure. I exported a PGSQL file from my database so Marco could have a reference point, I also uploaded it to the VA Votes Github.

Thursday:
Today, I started by exporting an SQL file instead, since the pgsql format was not good for Marco. I spent the rest of class manually organizing data from the 2000 election so I can input into my database. I basically finished doing that, along with creating data for the other tables so I can see if it really works properly.

Friday:
I implemented legitimate voter election data into the database. It's from the U.S. Presidential Election in 2000. This was for proof of concept. The database that I make works properly, but now I must await until I get the diagram from Thursday night so I can design the next database.

Tuesday, April 18, 2017

Week 9: Day 41-44 - VA Votes #2


Tuesday:
Today, I am looking into transferring CSV files into Postgres. To import it, you must create a table with the corresponding columns in the data. However, the columns have slashes in it, the rows have both text and integers, and I have no idea what to do to import the data properly. This is extremely frustrating, but I hope that I figure it all out during the week.

Wednesday:
Today, we began designing the database. First, I created a new database so I could mess around without causing any damage to the va_votes database. In my endeavor to find out how to extract the CSV data into a table, I tried pointing out the problems with the particular ones I was dealing with to Owen and Marco. They had no idea how to fix it, and clearly I didn't either. Instead, we focused on designing the database, and we wrote it down on paper. Next, I put it into action, and I believe that I created the proper key relationships.

Thursday:
Today, I was going through the W3Schools course on SQL. I'm trying to figure out all the joins and their functions. I went through a lot of the course, and skipped the parts I already knew.

Friday:
I started working on the tables for the database, and I'm having a bit of a hard time wrapping my head around how we're going to rearrange the data.


Monday, April 3, 2017

Week 8: Day 35-40 - VA Votes #1


Monday:
Today, I accessed Mr. Elkner's postgres server and created a database called "va_votes". We added postgis to it, and I will be accessing it using a tool called QGIS. Unfortunately, the file was taking forever to install, it had a 2 hour estimate at 2:15 pm so I was not gonna have it done downloading by the end of class. One hopes the installation would be faster haha. For the rest of class I was learning postgres commands from their website, and I also helped Ali fix his connection to a virtual machine.

Tuesday:
Today, I studied some more postgres commands about user/role management, and file system management. I finished installing QGIS, and I'm in now. I connected to Mr. Elkner's server, and attempted to load the precinct data of Virginia. Although it did load, it took forever, and anytime I zoomed, it would return to loading for a very long time. Afterwards, we decided that it was best to make a postgres server that was local. I had Ali create a virtual machine for me, so I could create the server.

Wednesday:
Today, I created the postgres server locally. I got Mr. Elkner to transfer the precinct data from his server, in an SQL file, through scp to vavotes. I then transferred that data from the SQL file to the database "va_votes". On a side note, I also helped Ali fix his computer's connection to a virtual machine. Whether or not the precinct data loads quicker or at all, I will find out tomorrow since there isn't anymore time left in class.

Thursday:
It's confirmed, the data loads, and much quicker then before. Mr. Elkner laid out the course of action for the Taco Truck project, or at least gave me a preview of what's coming up. I proposed a new project to better my SQL skills, and that's to compile a playlist of my favorite artists, songs, and labels. He gave me the green light on that, and I've already started to be honest. I hope I can turn this into a website too in the near future.

Friday:
Today, I worked on my side project by inserting a lot of data into my tables and creating a database. In addition, I started analyzing the data that Marco gave me, and figuring out how to design the va_votes database. So far it seems like a lot of data to organize, and it's kind of hard for me to wrap my head around it right now, but hopefully that changes.