june.hdf5_savers.geography_saver

june.hdf5_savers.geography_saver.load_geography_from_hdf5(file_path: str, chunk_size=50000, domain_super_areas=None)

Loads geography from an hdf5 file located at file_path. Note that this object will not be ready to use, as the links to object instances of other classes need to be restored first. This function should be rarely be called oustide world.py

june.hdf5_savers.geography_saver.restore_geography_properties_from_hdf5(world: june.world.World, file_path: str, chunk_size, domain_super_areas=None, super_areas_to_domain_dict: dict = None)

Long function to restore geographic attributes to the world’s geography. The closest hospitals, commuting cities, stations, and social venues are restored to areas and super areas. For the cases that the super areas would be outside the simulated domain, the instances of cities,stations, etc. are substituted by external groups, which point to the domain where they are at.

june.hdf5_savers.geography_saver.save_geography_to_hdf5(geography: june.geography.geography.Geography, file_path: str)

Saves the households object to hdf5 format file file_path. Currently for each person, the following values are stored: - id, n_beds, n_icu_beds, super_area, coordinates

companies

population object

file_path

path of the saved hdf5 file

chunk_size

number of people to save at a time. Note that they have to be copied to be saved, so keep the number below 1e6.