This CS1 assignment asks students to use lists, dictionaries, tuples,
and basic programming concepts in Python to analyze Airbnb data.
Students are then asked to make a connection to the real world by
finding articles about regulating Airbnb and reflecting on how data
analysis might be relevant to those conversations. The difficulty of
the assignment can be varied by changing the assumptions that students
are allowed to make about the input files.
We have used this as a final program which students need to complete
without help from either their peers or teaching assistants, but it
could also be used as a regular weekly programming assignment. The
assignment assumes students have seen files, lists, dictionaries, tuples,
basic programming concepts, and how to import packages in Python. The
assignment could be translated from Python to other languages with
effort, but the difficulty might increase depending on, for example,
support for reading text files or running statistical tests. The
assignment can be made more or less complex by changing assumptions
that students are allowed to make about the input files: for example,
can fields include commas? are all files guaranteed to have the same
column headers in the same order?
This assignment asks students to analyze Airbnb data (Use Meaningful
and Relevant Content) and to reflect on how such analysis can inform
conversations about regulating Airbnb (Make Interdisciplinary
Connections to CS). Students are asked to locate relevant news
articles and to reflect on that content in the context of the program
they wrote. In addition, there are many ways in which the assignment
could be extended. For example, students can be asked to plot a
result of their choice or to devise and to conduct an additional
analysis of the data.
Materials and Links
Computer Science Details