Add representation invariants to visualization.py
This commit is contained in:
@@ -22,12 +22,24 @@ class UserFloat:
|
|||||||
|
|
||||||
This is used for both COVID tweet frequency and popularity ratio data, because both of these
|
This is used for both COVID tweet frequency and popularity ratio data, because both of these
|
||||||
are floating point data.
|
are floating point data.
|
||||||
|
|
||||||
|
Representation Invariants:
|
||||||
|
- self.name != ''
|
||||||
|
|
||||||
"""
|
"""
|
||||||
name: str
|
name: str
|
||||||
data: float
|
data: float
|
||||||
|
|
||||||
|
|
||||||
class Sample:
|
class Sample:
|
||||||
|
"""
|
||||||
|
A sample of many users, containing statistical data that will be used in graphs.
|
||||||
|
|
||||||
|
Representation Invariants:
|
||||||
|
- self.name != ''
|
||||||
|
- all(name != '' for name in self.users)
|
||||||
|
|
||||||
|
"""
|
||||||
name: str
|
name: str
|
||||||
users: list[str]
|
users: list[str]
|
||||||
# Total frequencies of all posts for each user across all dates (sorted)
|
# Total frequencies of all posts for each user across all dates (sorted)
|
||||||
|
|||||||
Reference in New Issue
Block a user