Skip to content

biased towards places with population density #1

Description

@BrianHung

Looking through how a random coordinate is picked, I noticed a nearby place is randomly sampled.

    # Step 1: Find a nearby place or location using the Places API
    places_url = f"https://maps.googleapis.com/maps/api/place/nearbysearch/json"
    places_params = {
        'location': f"{info_dict['lat']},{info_dict['lon']}",
        'radius': radius,  # 5km radius
        'key': GOOGLE_API_KEY
    }

This would biased the sampling because places are usually around where there are people.

The alternative would be to check if a streetview exists at a random coordinate.

https://maps.googleapis.com/maps/api/streetview/metadata

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions