Project 4: Graph some data from first
principles
Due: Tues Nov
3rd at 11:59pm
Summary:
In this project you will open a window, and draw couple of graphs using shapes
and the NiceGUI library.
Details:
For this project,
- 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 and import the NiceGUI library
- Grab the RentPerSquareFootAug2026.csv
file from the online project page.
- Open up the data file and examine it. It is a more real file than the
ones we worked on in class
- there are two header lines instead of just one - be careful of that.
- look down through the data - how is data that they don't have
represented?
- Notice that some of the metro areas are in more than one state!! use
the python
in keyword to check if your
state is one of them
- Notice that some of the data is incomplete. Your program should
check for that (you can't remove the .;.;.; lines
from the file)
- Select two states
- one from the New England (Maine, New Hampshire, Vermont,
Massachusetts, Connecticut, Rhode Island)
- one of the following from elsewhere in the country: Virginia, Ohio,
Tennessee, North Carolina, Kentucky, Iowa
- These out of New England states are all much larger, so only graph
the first 8 cities with real data (again skip over the missing
data.)
- Make these Graphs(using just NiceGUI shapes - yes a couple of you have
experience with more libraries and topics we haven't covered yet, but
deep inside most of these libraries, this is what someone implemented)
- one for each of the two states that you've picked above
- In class I'll hand out a printout of my solution to this project to
help you visualize what I mean. I've used different states than I've
mentioned above so your graphs will look different.
- Each Graph should
- have a label above it to tell us what we are looking at
- have an X-axis and Y-axis drawn. label the x-axis
- Draw horizontal bars on the graph representing the August 2026
median rent for the metro/city
- each bar should be appropriate size for the median rent.
- Each bar should be labeled with the name of the city/metro in a
readable format
- this can be cut off a bit if you have one of the metros with
ridiculous rent like Martha's Vinyard, New York, etc.
- each bar should be one color if the rent increased in Aug 2026
compared to Aug 2025
- and a different color is the rent decreased in Aug 2026 compared
to Aug 2025
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 two states that you chose to graph.
- Which color represents an increase in rent and which represents a
decrease.
- A brief (few sentences) summary of what you learned about rent and
where it is going in the two states that you are graphing.
- 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. Last time I
was quite forgiving, I'll be marking off this time.
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.