[Python] How Does Local Dominator’s Algorithm Work for Radius Analysis? Optimizing API Calls...

Discussão em 'Python' iniciado por Stack, Março 20, 2025.

  1. Stack

    Stack Membro Participativo

    I’m trying to understand how Local Dominator performs radius-based analysis. From my understanding, a given radius is split into a grid, and each grid cell makes an API call to Google’s Places API (Nearby Search, Text Search, etc.).

    For my project, I want to implement a similar system. I divide the radius into grids, retrieve business rankings from Google’s API, and calculate an average score based on the rank of a business compared to others found in each grid.

    The Problem: If I make 5 Nearby Search API calls per grid and use a 13×13 grid, that results in 685 API calls per analysis. This seems manageable, but with 80 users, the number jumps to 40,000 API calls, costing around $1,000. That means each heatmap generation would cost about $14 per user, which is significantly more expensive than Local Dominator’s pricing.

    Questions: Is there any article or resource explaining how Local Dominator optimizes its API usage? Would scraping Google’s data be a viable alternative, or does it pose legal and technical risks? Are there any other strategies to reduce API costs while maintaining accuracy?

    Any insights or recommendations would be greatly appreciated!

    Continue reading...

Compartilhe esta Página