june.groups.university¶
-
class
june.groups.university.
Universities
(universities: List[june.groups.university.University])¶ -
__init__
(universities: List[june.groups.university.University])¶ Initialize self. See help(type(self)) for accurate signature.
-
_make_member_ids_dict
(members)¶ Makes a dictionary with the ids of the members.
-
add
(group)¶
-
clear
()¶
-
classmethod
for_box_mode
()¶
-
classmethod
for_geography
()¶
-
classmethod
for_super_areas
(super_areas: june.geography.geography.SuperAreas, universities_filename: str = PosixPath('/home/sadie/JUNE/data/input/universities/uk_universities.csv'), max_distance_to_super_area=20)¶ Initializes universities from super areas. By looking at the coordinates of each university in the filename, we initialize those universities who are close to any of the super areas.
- super_areas:
an instance of SuperAreas
- universities_filename:
path to the university data
-
classmethod
from_file
()¶
-
get_from_id
(id)¶
-
get_spec
() → str¶ Returns the speciailization of the super group.
-
property
group_spec
¶
-
property
member_ids
¶
-
-
class
june.groups.university.
University
(coordinates=None, n_students_max=None, n_years=5, ukprn=None, area=None)¶ A group of people such as in a hospital or a school.
If a spec attribute is not defined in the child class then it is generated by converting the class name into snakecase.
-
__init__
(coordinates=None, n_students_max=None, n_years=5, ukprn=None, area=None)¶ A group of people such as in a hospital or a school.
If a spec attribute is not defined in the child class then it is generated by converting the class name into snakecase.
-
_collate_from_subgroups
(attribute: str) → List[june.demography.person.Person]¶ Return a set of all of the people in the subgroups with a particular health status
- attribute
The name of the attribute in the subgroup, e.g. “in_hospital”
The union of all the sets with the given attribute name in all of the sub groups.
-
classmethod
_next_id
() → int¶ Iterate an id for this class. Each group class has its own id iterator starting at 0
-
add
(person, subgroup='student')¶ Add a person to a given subgroup. For example, in a school a student is added to the subgroup matching their age.
- person
A person
group_type
-
clear
()¶
-
get_spec
() → str¶ Returns the speciailization of the group.
-
remove_person
(person: june.demography.person.Person)¶ Remove a person from this group by removing them from the subgroup to which they belong
- person
A person
-
_abc_impl
= <_abc_data object>¶
-
property
contains_people
¶ Does this group contain at least one person?
-
property
dead
¶
-
external
= False¶
-
id
¶
-
property
in_hospital
¶
-
property
infected
¶
-
property
is_full
¶
-
property
must_timestep
¶
-
property
n_students
¶
-
property
name
¶ The name is computed on the fly to reduce memory footprint. It combines the name fo the class with the id of the instance.
-
property
people
¶ All the people in this group
-
property
professors
¶
-
property
recovered
¶
-
property
size
¶
-
property
size_infected
¶
-
property
size_recovered
¶
-
property
size_susceptible
¶
-
spec
¶
-
property
students
¶
-
subgroups
¶
-
property
super_area
¶
-
property
susceptible
¶
-