10. A computer program product comprising a non-transitory computer readable storage medium having instructions encoded thereon that, when executed by a processor, cause the processor to: maintain one or more groups at an online system, each group including one or more users of the online system, with each user associated with a location; determine a location associated with each of the one or more groups, the location associated with a group based at least in part on locations associated with users in the group, comprising: determine a centroid of the locations associated with users in the group; determine distances between locations associated with each user in the group and the centroid; generate a histogram of the determined distances; and determine the centroid as the location associated with the group in response to at least a threshold percentile of the determined distances from the histogram being less than or equal to a threshold distance; receive a request from a requesting user of a social networking system to identify one or more groups maintained by the social networking system; determine a plurality of candidate groups for the requesting user from the one or more groups based at least in part on a distance between a location associated with the requesting user and locations associated with each of the one or more groups, a candidate group associated with a location within a threshold distance of the location associated with the user; include the plurality of candidate groups in one or more selection processes selecting a set of groups; and communicate information identifying the selected set of groups to a client device associated with the requesting user for presentation.
10. A computer program product comprising a non-transitory computer readable storage medium having instructions encoded thereon that, when executed by a processor, cause the processor to: maintain one or more groups at an online system, each group including one or more users of the online system, with each user associated with a location; determine a location associated with each of the one or more groups, the location associated with a group based at least in part on locations associated with users in the group, comprising: determine a centroid of the locations associated with users in the group; determine distances between locations associated with each user in the group and the centroid; generate a histogram of the determined distances; and determine the centroid as the location associated with the group in response to at least a threshold percentile of the determined distances from the histogram being less than or equal to a threshold distance; receive a request from a requesting user of a social networking system to identify one or more groups maintained by the social networking system; determine a plurality of candidate groups for the requesting user from the one or more groups based at least in part on a distance between a location associated with the requesting user and locations associated with each of the one or more groups, a candidate group associated with a location within a threshold distance of the location associated with the user; include the plurality of candidate groups in one or more selection processes selecting a set of groups; and communicate information identifying the selected set of groups to a client device associated with the requesting user for presentation. 16. The computer program product of claim 10 , wherein determine the plurality of candidate groups for the requesting user from the one or more groups based at least in part on the distance between the location associated with the requesting user and locations associated with each of the one or more groups comprises: identify a geographic region including the location associated with the requesting user, the geographic region including locations within a specified geographic area; and identify groups associated with locations included in the identified geographic region; determine a density of groups associated with locations associated with the identified geographic region based at least in part on a number of the identified groups and an area of the geographic region; generate a modified geographic region including the location associated with the requesting user by reducing one or more dimensions of the geographic region in response to the density of groups exceeding a threshold value; and identify groups associated with locations within the modified geographic region as candidate groups.