LBS Market Analyzer
This skill provides specialized workflows for analyzing business competitors using geographical data from the AMAP (Gaode) LBS API.
Core Workflow
- 1. Setup (Proactive): If
AMAP_KEY is missing from environment/.env, run scripts/amap_key_automator.py immediately. - Geocoding: Convert a user's address or point of interest into coordinates.
- Competitor Scanning: Retrieve POIs based on industry keywords and radius.
- Structured Reporting: Generate a density and gap analysis report.
Usage Guidelines
1. Automated Provisioning
If you don't have an AMAP API Key:
python3 scripts/amap_key_automator.py
Note: A browser will open for manual Alipay/AMAP login. The script will then automatically create a Web Service Key and append it to .env.
2. Market Analysis Execution
Run the analysis script to fetch data:
INLINECODE5
3. Insight Generation
After fetching data, use the logic in
references/analysis-logic.md to interpret the results (e.g., identifying "blue oceans" or high-pressure zones).
Scripts
- -
scripts/amap_key_automator.py: Browser automation for AMAP console. Handles login (manual scan) and automatic Key creation. scripts/competitor_analysis.py: Interacts with AMAP API to fetch POI data. Requires AMAP_KEY.
References
LBS市场分析器
该技能提供利用高德LBS API的地理数据分析商业竞争对手的专业工作流程。
核心工作流程
- 1. 初始化(主动式):如果环境变量/.env文件中缺少AMAPKEY,立即运行scripts/amapkey_automator.py。
- 地理编码:将用户的地址或兴趣点转换为坐标。
- 竞争对手扫描:根据行业关键词和半径检索POI数据。
- 结构化报告:生成密度与缺口分析报告。
使用指南
1. 自动配置
如果您没有高德API密钥:
python3 scripts/amap
keyautomator.py
注意:浏览器将打开供手动进行支付宝/高德登录。脚本随后会自动创建Web服务密钥并将其追加到.env文件中。
2. 市场分析执行
运行分析脚本获取数据:
python3 scripts/competitor_analysis.py --address 您的地址 --keywords 行业关键词 --radius 3000
3. 洞察生成
获取数据后,使用
references/analysis-logic.md中的逻辑解读结果(例如,识别蓝海或高压区域)。
脚本
- - scripts/amapkeyautomator.py:高德控制台的浏览器自动化。处理登录(手动扫码)和自动密钥创建。
- scripts/competitoranalysis.py:与高德API交互以获取POI数据。需要AMAPKEY。
参考资料