Video games have always been a pricy hobby. With the next generation of consoles just being announced (or about to be) it makes sense to look at how pricing has changed on that front over time.
During the course of this tutorial you will get more familiar with some non-core Python libraries: requests for making interactions with HTTP much more easier, matplotlib for generating graphs and charts of various kinds and tablib for easily generating CSV datasets.
To this end we will write a simple script that fetches video game platform information from Giantbomb.com, combine that with CPI information made available by the Federal Reserve Bank of St. Louis to adapt the value of the US dollar over time (this calculation is not meant to be accurate but it provides a nice example of working with diverse datasets) and generate a bar chart and a CSV file displaying the price development.
What else you will be exposed to:
API stands for Application Programming Interface, and provides a way for applications to talk to each other. Familiar applications include Twitter, Facebook, Yelp, Flickr, Instagram, etc. To interact with Twitter‘s API, you give input: authentication + 140 characters, and Twitter produces output: a tweet.
Applications can interact with each other too: If you have Instagram and Twitter paired, you upload a photo to Instagram, it communicates with Twitter over an API, and Twitter posts a link to the photo.
APIs receive calls – how you want to interact with the application, what parameters you will give that application, and the variables for those parameters. For instance, you make a call to Bit.ly, “Hey, I want you to give me a short link”, give the parameters “username”, “long URL”, with their associated variable, “roguelynn” and “https://github.com/econchick/new-coder”.