Home Artists Posts Import Register

Content

So this is a bit of an odd one. One of my goals for a long (LONG) time is to learn Python for Data Science... and then use that knowledge to make informational comics and infographics!

I've been practicing with Python for y..yEARS now haha. It has been a long road. But!!! Recently I wanted a graph for electronics exports over time, to show how China's exports have grown and come to dominate. 

Specifically, for the background of this panel:


I couldn't find quite the graph that I wanted... so I figured I'd put my skills to the test and make it myself!

It took a bit of trial and error to find a good dataset, but eventually I landed on some Open Data from the UN.  http://data.un.org/Data.aspx?d=ComTrade&f=_l1Code%3a85 

I filtered it down to the "HS Code" (export code) for electronics. So funny that this dumb code that I always need to fill out when I'm shipping books and other goodies to people is coming back to help me now ;)

After that was just a bunch of additional filtering and data cleanup, until I got the data in the right format to make a nice simple line graph!

Ta-da!

If this is your cup of tea, feel free to check out the project on github!  https://github.com/jammyness/electronics_exports/blob/master/electronics-imports-un-data.ipynb  (wow! I have a github! haha...) please keep in mind this is the first thing I've ever shared on github..................EVER. so please be kind :)

Files

Comments

NJGR

I'm working with data more at my new position and want to do more data via Python, so it's moved up on my to-learn list. Do you have any recommendations for a newbie who wants to learn? I'm also getting more interested in different types of data! -jess

jam

YES. I DO. Holy moses I have tried EVERYTHING and maybe this will only work if you've done SOME Python, but nothing seemed to click for me until I did the tutorials on https://www.kaggle.com/learn/overview They are code-as-you-go and I think they've done a really good job of breaking it down step by step. Basically you just run the cell, google how to do it, and then try to get the right answer. This is how you would code in real life!