june.groups.leisure.grocery.Groceries¶
-
class
june.groups.leisure.grocery.
Groceries
(social_venues: List[june.groups.leisure.social_venue.SocialVenue], make_tree=True) -
social_venue_class
alias of
Grocery
-
__init__
(social_venues: List[june.groups.leisure.social_venue.SocialVenue], make_tree=True) 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)
-
add_to_areas
(areas: june.geography.geography.Areas) Adds all venues to the closest super area
-
clear
()
-
classmethod
distribute_for_areas
(areas: List[june.geography.geography.Area], venues_per_capita: float = None, venues_per_area: int = None) Generates social venues in the given areas.
- areas
list of areas to generate the venues in
- venues_per_capita
number of venues per person in each area.
- venues_per_area
number of venues in each area.
-
classmethod
distribute_for_super_areas
(super_areas: List[june.geography.geography.SuperArea], venues_per_super_area=1, venues_per_capita=1) Generates social venues in the given super areas.
- super_areas
list of areas to generate the venues in
- venues_per_super_area
how many venus per super_area to generate
-
classmethod
for_areas
(areas: june.geography.geography.Areas, coordinates_filename: str = None)
-
classmethod
for_box_mode
()
-
classmethod
for_geography
(geography: june.geography.geography.Geography, coordinates_filename: str = None)
-
classmethod
for_super_areas
(super_areas: List[june.geography.geography.SuperArea], coordinates_filename: str = None)
-
classmethod
from_coordinates
(coordinates: List[numpy.array], super_areas: Optional[june.geography.geography.Areas], max_distance_to_area=5, **kwargs)
-
classmethod
from_file
()
-
get_closest_venues
(coordinates, k=1) Queries the ball tree for the closests venues.
- coordinates
coordinates in the format [Latitude, Longitude]
- k
number of neighbours desired
-
get_from_id
(id)
-
get_spec
() → str Returns the speciailization of the super group.
-
get_venues_in_radius
(coordinates, radius=5) Queries the ball tree for the closests venues.
- coordinates
coordinates in the format [Latitude, Longitude]
- radius
radius in km to query
-
make_tree
()
-
default_coordinates_filename
= PosixPath('/home/sadie/JUNE/data/input/leisure/groceries_per_super_area.csv')
-
property
group_spec
-
property
member_ids
-