Intro to Data Visualization with Python

Over the past few months as my learning journey continued, I finally completed my first introductory course in data visualization and plotting in Python. It was a short course on Udemy which focused on utilizing the matplot library. Besides learning the actual course objective, which was plotting, I also learned something very important from this course, which was how to utilize a library in Python.

Plotting with matplotlib and pyplot

Above is a screenshot of my screen with the code we wrote in the course and the chart that was produced once the code ran. This was incredibly exciting for me to see and test for myself because I had no idea how writing code would create a chart. I had a lot of questions about data science and absolutely no frame of reference into the subject prior to this course, but this introduction has piqued my interest!

The library that we were working with had a lot of features that made it simple to create visuals and change them as needed. The image above shows many lines of code beginning with plt. and that is because we were heavily working within that library and using its prewritten features. I never actually took a course that focused on utilizing a single library; the other courses and projects I have done used multiple libraries, so although I was able to follow the general philosophy behind their usage, this course really helped me understand the basics much better.

Scale Matters

One takeaway I took from this introductory course is that when working with data, scale matters. Scale alters the initial impression of what the visual data is saying. For example, we changed the y and x axis values often, and when doing this, the lines on the graph, including where they began and ended, shifted in ways that changed the visual to relay different messages. This made me realize why data science, interpretation, and visualization is so important.

Since I’m a visual learner, the visual aspect of data science is very satisfying for me because it combines two aspects that I favor: information and art.(Yes, for the sake of this post, I will consider a graph a piece of art!)

I’ve worked heavily with data in previous jobs, and with this new knowledge, I think back to all of our excel spreadsheets with statistical data sorted from A-Z, and wonder what that data would have said if plotted in a chart. What trends that may have been overlooked would we be able to see?

What’s Next?!

I will be posting soon about this year’s Hacktoberfest! Because I’ve been traveling these past few months, it’s been a tad difficult to write as many posts as I would like, but that won’t be the case for much longer!

Lastly, once I get back to my home base and re-unite with my Raspberry Pi and Vector Robot, I will be utilizing my new knowledge for more projects. This course made me better able to understand how to utilize the libraries offered in the Anki Vector SDK, which I’m very happy to test out! It feels wonderful to witness information click together.

Errno 121 – The Error Code that Haunts Me

This is an update from my previous post about the live update project with the Raspberry Pi and LCD screen. Since that post, I’ve spent hours free-falling down the rabbit hole of troubleshooting.

Here’s what happened. Turns out the LCD screen I have has an adapter already soldered onto it (which most instructional websites have the type that requires you to solder yourself) and only requires four pins / wires instead of the usual sixteen. That may sound as if this would be easier since soldering comes with risks for those who are new at it, but alas, it is not!

Finally, I was getting close. I hooked up the Raspberry Pi to a monitor and began inputting the code. Like I said, I’m new at this, so although I was able to follow the steps (and at this point, memorize half of them) I still need to do some digging later on to understand why I was following those steps.

I enabled the i2c using the raspi-config, installed smbus and the i2c python library, tested and re-tested the hardware with sudo i2cdetect -y 1 and did a bunch of updates and reboots, amongst other steps.

Little by little, some steps that hadn’t worked previously were . actually working, which showed some promise. However, no matter the steps taken and those that passed onto the next step, I was continuously met with the same exact error code:

Eventually, I had to use some lifelines. I asked a friend. Okay, I asked many friends because one was a real human who I actually know (who I am eternally grateful for!), and the other was the internet (aka Reddit). Although it wasn’t my original goal to set up remote capabilities as part of this project, it was a positive outcome that was necessary regardless! My friend had remotely logged into my Raspberry Pi to see if he could figure out the issue. Alas, the night ended with everyone stumped, and we decided to take a break and re-group.

Intuitively, I think that the issue is something small I am missing, perhaps something with the way the site-package files are being read on my Raspberry Pi, that I’m unable to see. Or, something with the “__init__” part, but I’ll need to do some more reading on this particular type of error message. Or, perhaps I need to edit some lines in that file path? Hmm.

Even though I have not yet had the “payoff” of seeing the text display onto the LCD screen, I have already learned so much through troubleshooting this project.

Most importantly, I take this as an important test and “rite of passage” for my journey into the programming world; error messages will happen, so I better get used to it (and love the process of fixing them) if I want to succeed and continue to grow in this field.

After years of undergraduate, graduate school, and working full-time, I’ve learned that (for myself, at least) mental breaks are needed in order to re-approach a challenge. Today, I’m going to let everything that happened yesterday and the night before sink in. I’ve also come to accept that my most-likely route will involve me disconnecting everything and starting fresh, from the beginning.

It’s funny how this reminds me a lot of my creative work; when my novel or short-story draft reached it’s own “dead end” (creative error code?) I did the same thing: learn from it, and start over.

This is probably why my husband says I’m the right type of detailed-oriented and determined (translation: obsessive and a little crazy) for this field.

I’m used to spending hundreds of hours on a writing project, just to find out that something in its approach is fundamentally wrong and needs to be reworked. So instead of that deterring me, I’m actually very used to it. For example, I’ve spent the past three years in graduate school re-writing one novel, from different perspectives. I must have written at least a thousand pages by now between drafts and re-writes. That does not include the amount of drafts I have written since high school, during undergrad and afterwards of other writing projects.

With that being said, as I let yesterday’s lessons absorb into my mind, I’ll be flexing the other side of my brain today by writing my new thesis draft #9682967, but who can keep count? (Maybe I’ll make that into a program one day: a draft counter that will tell me exactly how many pages I’ve written between all of my combined documents).

Lastly, it has been really nice to engage with the community more through online sources. It’s been intimidating to “expose myself” as such a new beginner, and I definitely feel the fear of asking a dumb question, but I know it’s an important step regardless. Virtual hugs to all those who have commented on my questions with thoughtful responses! And, it was fun for me to see that I could actually hold up a conversation with people and utilize some of the new terms I’m learning.

I definitely went to sleep last night with error codes floating around my brain, but I’m happy to have woken up excited to try again!