Work Hours
Everyday: 北京时间8:00 - 23:59
Final Project – Interactive Data-Explorer
Your Challenge
In this last project you will develop an interactive data-driven web-based Python application that tells a story with real-world data. You will show your mastery of many coding concepts as you interact with data real-world data. You will use pandas and NumPy modules for managing and interacting with data, MatPlotLib, or Pandas charts for plotting, PyDeck (or other mapping packages) for maps, and the Streamlit.io package for creating interactive web applications using Python.
Tell a Story with Real-World Data
Choose one of these data sets:
- London England Data (from Inside AirBnB)
- McDonalds Locations in the USA (14,171 rows) from GavinR’s Github
- NCAA Football Stadiums
- Fortune 500 Corporate Headquarters
- Boston Crime Data (also uses Police Districts) from Analyze Boston
- Skyscrapers (from SkyscraperCenter.com)
- Volcanoes (from Smithsonian National Museum of Natural History)
To ensure students create a variety of projects, you will sign up and select a data set during class. If you miss class, or if the signups are not approximately equally distributed, I will assign a data set for you to use.
Assignment Details
Part 1. Design – What do you want to show and tell with your data?
Due by Monday Nov 23 end of day
The purpose of this part is to get you thinking about what you might do before you start coding. Identify at least three different queries or questions you can ask about your data set and ways to interact with and present the data based on your understanding of Pandas DataFrames, MatPlotLib, maps, and the Streamlit.io packages.
Describe how your queries will be interactive by incorporating Streamlit’s user interface elements to obtain user input. Describe how you will visually present this data using charts, graphs, Streamlit tables or maps. For example, if analyzing housing data, you might use a dropdown list to specify a list of neighborhoods and a slider to specify a price range. You then might display all rooms for rent in that neighborhood within that price range using a table, chart, or map. (That’s an easy one. At least one of your queries needs to be more complex than this!)
Be sure your page is “user friendly” and as “polished” as possible. Be sure to label controls requiring user interaction, make sure your charts have titles, legends or explanations that would be helpful to the user.
Create a Word document describing your plans. Submit it on Blackboard. I will respond within 24 hours by email approving your proposed questions or making suggestions if they appear to be too complicated or too easy.
You may change your queries or visualizations after you start coding if you need to change your plans. If you do this, please notify me during the development period.
Feel free to add to your project as you explore Pandas and Streamlit capabilities and find cool ways to implement new or additional features. Part of your grade will be a “complexity/originality” score. If you use a module or do something cool that we may not have discussed in class or implement more than the minimum requirements, you will receive a higher score. A zero complexity score means you implemented the minimum requirements for this project.
Part 2. Code.
Create your Python application with a Streamlit UI and the various visualizations. Create at least two different charts, graphs of different types with custom legends, axis labels, tick marks, colors, other features), or a map showing latitude and longitude. Be sure to include appropriate context or labels in your user interface to cue the reader about which values to specify, and the purpose of each chart or graph. You may wish to add a few sentences explaining each chart. Place all UI controls in the left sidebar, and your visualizations in the main content area. Make your application as professional looking as you can.
Due Date
Post your code to Blackboard before the start of our scheduled final exam time, and plan to present your project during our final exam class period. (
Coding Checklist
As you write your program, be sure to include code that demonstrates each of these items. Each contributes to your project grade (see the rubric below).
Python: At least any four of these:
- At least one function that has two parameters that returns a value
- At least one function with a default parameter that returns a value
- At least one function that does not return a value
- A list comprehension
- A loop that iterates through items in a list, dictionary, or tuple
- Code that uses at least two different methods of lists, dictionaries, or tuples.
Streamlit:
At least three different UI Controls (sliders, drop downs, multi-selects, text box, etc.)- Page design features (sidebar, fonts, colors, images)
- Well-designed, professional-appearing, interactive website
Charts, Graphs, Maps:
At least two different charts (well labeled!)At least one map
Pandas: At least four of these:
- Sorting data in ascending or descending order, by one or more columns
- Filtering data by one or more conditions (AND or OR)
- Analyzing data with pivot tables
- Managing rows or columns
- Add/drop/select/create new/group columns, frequency count, other features as you wish
Usual rules about writing “good” code apply:
- Make your code as modular and easy to follow as possible
- Include a docstring, comments, and meaningful variable names.
- If you did something “cool” in your code that you are incredibly proud of, please write a comment call attention to what you did.
- If you referred to any online articles or other information beyond class examples, please be sure to list them as references/comments in your code.
- Make sure the program runs and the output is correct.
Other modules or packages. (Extra credit)
Python has several modules developed by other Python programmers that we have not covered during this semester. You are welcome to explore other package or modules (especially those available for visualizing data) which are available in Python’s Package Index. Use one in a meaningful way in your project for extra credit. Examples include Seaborn charts, Folium maps, Word Cloud, etc. See https://pypi.org/ for the complete list.
Part 3. Present.
Please present your project in person during our class final exam period, or if approved by your instructor, in a video of up to 5 minutes, showing both a demonstration of your project running in the browser and then describing at least one section of the code that you wrote of which you are most proud! Demonstrate what you feel is the most interesting part of your project. Then talk through the pandas and Streamlit code well enough to convince me that you understand how your code works and what you did.
Your presentation counts as an additional 2 percent toward your final grade in the course.
Part4. Publish Your Application Online (Easy Extra Credit)
Post your application to the web. Sign up for a free Streamlit Cloud community account at https://streamlit.io/cloud and follow the instructions to publish your app. Share your published link with your instructor on the signup sheet.
Grading
This project counts toward 15 percent of your final course grade with 2 percent additional for your presentation. The project is based on 50 points, as follows:
Number | Criteria | Points |
1 | Project: Proposal, Design and Queries submitted on time | 3 |
2 | Python Coding Features (at least four @ 3 points each) | 12 |
3 | Streamlit Features (3 controls and other page design features) | 8 |
4 | Charts, Graphs, Maps (at least four @ 3 points each) | 9 |
5 | Pandas features | 12 |
6 | Coding: Well documented, efficient, modular | 3 |
7 | Complexity: 0 = Your project implements less than the minimum requirements 1 = Your project implements the minimum requirements 2 = Your project includes some complex queries, charts, or UI features 3 = You went above and beyond in requirements, ether doing more than what is required, or by including features, modules, or packages learned independently or not described in class | 3 |
Total: | 50 | |
Extra Credit: Publish to Streamlit Cloud | 2 | |
Extra Credit: Use a python package or module we did not use in class | 2 | |
Presentation (2% of course grade) | 10 |
Getting Help:
This is a final project, so please do not discuss your program with anyone other than your instructor.
You can ask CIS Sandbox tutors for assistance on related or general topics, but you cannot ask them to help you write your code for this project. For example, you can ask tutors to help review examples of how to create bar charts in Python (in general), but you cannot ask them to help you debug a bar chart you might create using the data set for this project. You can ask for help with fixing syntax or runtime errors.