Independence, Taking Risks, Technology

The Making of Investrivia

Investrivia, a group project between me and Kaleb Tefera, is a website that provides a visualization of stock data (2021 – 2022) from certain tech companies. Users are then asked to guess whether they think that the stock price would increase or decrease based on news surrounding the company that month. It’s a simple game that tests the users’ skills to predict stocks and it takes less than 5 seconds to complete. 

Taking Stock of Websites

Investrivia is built upon different APIs, which means that Investrivia pulls data from different websites/databases. In this case, we used APIs for the stock information and news articles needed for players. Now, the thing with working with APIs is that you have to learn how to extract the data and use it in meaningful ways that are not wasteful since APIs limit how much data you can pull. As such, managing and organizing data was an integral part of Investrivia. We had multiple methods, but we went with creating a dictionary that holds multiple values such as the open and closed stock prices as well as short descriptions and links to the news articles that we pulled. By doing this, we streamlined the creation of Investrivia and how each round works.

Tabling Data

Another complicated factor of Investrivia was the user database, which was made on our own using SQL. When creating your database, it’s crucial to understand its purpose and how it’ll be set up; otherwise, issues can quickly arise. For instance, we decided to track user scores by linking into an account they would make on the site so their score is saved for the next time they decide to play. Managing user data can be scary as you don’t want to accidentally delete or corrupt any data, as such, creating exhaustive tests was essential to make sure nothing messes up during runtime. We also had to update the database on runtime as we kept track of the user’s highest score and streak. To weave the user database functionality with the game could have been extremely messy but since we had this database in mind in our initial design, the integration was seamless. When creating a website from scratch, it is important to have a thorough understanding of the core design and the tools you have available, such as Python Flask and MySQL.