Project 5: Data Analysis with Dictionaries
Due: Nov
18rd at 11:59pm
Summary:
In this project you will use while loops and dictionaries to practice
with our most recent topics.
We are going to take a break from NiceGUI for this one, since you all
have found more sharp edges in that library than I knew were possible.
Details:
For this project,
- Be sure you understand
anything that the built-in pycharm LLM/AI suggests or don't take the
suggestion
- First create a new project in pycharm make sure the project
name has your name and an indication of which project this
is.
- Be sure to install the colorama library that you learned about in
comp143 with Scarlet/Andrew
- Grab the Project5Start.zip file from
the online project page. Download it and uncompress the contents into
your project directory
- depending on your system (windows/linux/Mac) they might appear in a
subfolder. move the three files into your project folder.
- You should have three files
- Project5Helpers.py
- I wrote this for you to read the text file and create a list of
dictionaries. You don't need to understand it since we haven't
covered everything that I'm doing there in class.
- Project5Start.py
- I wrote a start to this file, but you will need to start from line
6 and do a lot of work in this file
- Project5Data.txt
- First I suggest you print the first item in the games list, see what
you are working with. Games is a list of 100 dictionaries which all have
the same keys. By printing out the first one you can see the keys that
they all have.
- Remove the print once you know what data you are working with
- Loop forever and offer the following options
-
[1] Find discounted games
[2] Find games in your price range
[3] Find game with biggest increase in sales rank
[4] Find game with biggest decrease in sales rank
[5] Find games that are increasing in sales rank and have been out more than 10 weeks
[6] Find the lowest price sale game
[7] Your own custom analysis here <replace this item with a description of the analysis that you chose>
[8] Quit
- If the user selects any value other than 1 through 8, report to the use that the choice in invalid in red text.
- If the user chooses choice 8, then break out of the loop to quit the program
- For all remaining options - put enough explanation text in your print, that a user knows what output they are looking at.
- If the user chooses choice [1] then go through all of the games and print the name and the discount amount for any games that are discounted. Print these with a background highlighted in a color (something other than green)
- If the user chooses choice [2] then ask the user for their max price
- then go through the games and find all of the games that have a current price lower than that price
- free to play games should be lower than all prices that the user selects.
- If the user chooses choice [3] go through all of the games
- find the games that are increasing in sales rank (hint, look at the data file - how is an increase in sales rank represented? What key in the dictionary is being used?)
- Then - using the same kind of technique that we used in class to find the game with the most players, find the game with the biggest increase in sales rank (so going from rank 30 last week and being rank 10 this week is an increase in rank of 20)
- Print this with some text describing what the user is looking at in a text color that you haven't used yet.
- If the user chooses choice [4] then do the inverse of choice 3, go through all of the data and find the game with the biggest fall in the chart. Make sure to use a different text color than the one in choice 3.
- If the user chooses choice [5] then go through all of the games and as the text says, print the names of any games that increased in sales rank (went up closer to rank 1) and have been out for more than 10 weeks. Print these games in 'bright yellow' in colorama terms
- If the user choice is [6] then find games that are on sale and find the game with the sale price which is lowest. Print this game with a green highlight color
- If the user choice is [7] then go through all of the games and find the game or games that match your analysis. This can be anything appropriate for class which requires looking through all the data to find. (so you cannot choose something like: find the rank 1 game).
- once you have this, be sure to explain to your user what they are looking at. Print this in a foreground and background color that you haven't used yet in the project
Of course put this into git and onto github sooner rather than later.
Additional requirements:
- Create a readme file in your project. In the read me include
- Your name
- The data analysis that you chose for choice 7.
- Which color combinations of foreground and background are being used for each analysis .
- A brief (few sentences) summary of what you learned game sales on Steam at the end of October 2026.
- Anything that you didn't get done
- Your code must be commented, you don't have to comment every line, but
you need to explain to me what you are doing in the code.
Submission:
As with the previous project, to submit
the project to me, share it with me on github. My github id is jsantore.
You can see directions for doing this here.