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
Looking through how a random coordinate is picked, I noticed a nearby place is randomly sampled.
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.