Anusha's Final Project and Reflection

by Anusha Suresh

22 Jun 2017

here is my code:

What a project?!? I initially chose to do the data analysis project because I am trying to understand if I want to get into data analysis. It seemed like a good decision at the time, and I still stand by my choice, even if everything didn’t go as planned. It took bit to find some data, so I ended up choosing two different files of medicare data to work with. It is boring data, I will admit that, but I was like “I can learn a little about medicare through this I think.” So off we went. From there I kind of overestimated how much data I could use. One of my files had 170,000 lines of data while the other had over 1,000,000 lines of data. I stupidly made the decision to clean the shorter dataset by hand, and that was a very bad idea. I wanted a sample of all the entries in the set, but it took way longer than expected. I didn’t make the same mistake on the million line file; for that one I just took the first 1000 lines and called it a day. From there, I started the program. I tried to do the user interface part and the functions at the same time, but I found out my program, was trying to make sense of too many wrong things at once. I was getting a lot of errors due to import statements. This was frustrating because these errors weren’t letting me print anything, so I was unable to see what my program was doing. Then I was trying to work around the errors, didn’t help. So after speaking with my group and someone at the python meetup group, I spoke to Elliott, and he gave me advice as to why everything was happening the way it was happening. At that point, it honestly seemed like everything was a mess, and that I was getting behind on the project. But, I did learn a lot about recursive import statements. All I know now is to keep imports as clean as you possibly can. I scrapped that entire mess and opened a new trinket. I thought it best to start taking my program function by function and line by line. This took pretty much forever, but it made a whole world of difference. I found through this process nothing was happening the way I intended, but this time, I could fix each issue without dealing with unrelated errors. I don’t know why I didn’t think of this sooner, but I absolutely believe that if I use this strategy in any future coding endeavors, it will totally help. After I got a few functions running, I went back to the user interface. I had some issues here, but it was mostly understanding when and where to indent. I also learned that sometimes you don’t need else or elif’s when testing input. My interface wasn’t running the way I wanted it to, but this was the issue. Gladly it was a simple fix. I went on to include a class. I was really really weary about including a class, which is why I made sure I had everything else running before I did this part. After we did the class hack activity, I realized that I wasn’t understanding classes for what they are. They made sense as a concept, but when trying to apply it, it became really difficult. I spent a lot of time reading up on classes’ and their structure, but mostly how to call and run them. I think above all else, how to call it was really confusing to me. I think because I kept thinking about how we assigned tina threw me off, so after reading up, it made more sense. The program uses a class to take in the user’s name. It was short and sweet, but it took a lot of time to get to this spot. I added a few more functions after this to build it out some, but they weren’t working as well as I’d hoped. The main issue that I had to keep working on through this project was indexing. I realized very quickly that many of my functions weren’t doing what I wanted them to because I hadn’t indexed them correctly. By the time I indexed something and moved on to something else, I found that not everything gets indexed and spliced in the same. I think this is one of the most annoying things ever, but when I was able to figure these issue out, it was satisfying. I think this was satisfying, but things went wrong more than they went right. It was really heartbreaking, especially in the early stages because it seemed like my project was falling off a cliff and I apparently I didn’t know how to index. Basically, all this to say that even though my code doesn’t look like much, I basically put everything I had into it. I was determined that this project would meet all the required criteria and do some of the things I wanted to do. My list of milestones did not change too much as the project went on, here is the list of them:

  • program can read the file correctly.
  • the user can see a set of instructions and a list of program abilities while using the program.
  • let the user choose which of two files they want to see data from
  • let the program display one chart for each data file
  • program uses a class to to something
  • user can choose what they want to see from the data.
  • program can run speedily, hopefully. (one file has 1.7 million entries, so…)
  • program uses a dictionary to store some data
  • program uses a list to store different data.
  • program can print information

I set my milestones to be kind of minimal. I knew what I wanted to hit, but I didn’t want to set my goals too high. I wanted to make sure I could accomplish something before it was improved. Maybe I stayed true to that. I think I made it to about 95% of everything that I wanted to, and that makes me really happy. My program isn’t impressive, but I am happy with how it turned out. In any of my previous coding experiences, I never ever thought that I would be able to make a program like this almost completely on my own. And I think that I have come a long way from the beginning of the class. My main take away from it all is I became more self-reliant. I was learned how to solve many problems on my own, they might have taken a long time, but I was able to spot issues and that’s kind of cool. Additionally, in the beginning of the class, I was super hesitant about starting any assignment, worried I wasn’t going to be able to do anything that the program wouldn’t work. When I started this project, I don’t believe I was hesitant, I think I just started it and tried to see where it could go. Then everything took a detour, but we won’t worry about that. The point is, I’ve got more confidence starting a programming assignment now, and that is a huge huge step for me. I don’t actually hate coding so much anymore. But finally, if there is one very important thing I learned, it is to not code when you are tired or hungry. Trust me, I kept hitting walls, eat snacks. I can confidently say that I am happy with this code, but for sure it could be bettered, and maybe I’ll get there.

Here are some of the previous trinkets I used for myself during this project, including the first, error filled one. https://trinket.io/python3/5995598295 > the error filled one https://trinket.io/python3/ba96f3da84 https://trinket.io/python3/1dee0f98c0

I am currently a rising junior here at UNC. I am hoping to be an INLS major, though I am currently a minor. In regards to this class, I have tried programming several times before with no success, but I am determined to learn something from this course. I love the fall, cookies and cream milkshakes(plus points if it's a malted shake), and jokes (good and bad, mostly). Find Anusha Suresh on Twitter, Github, and on the web.