LC044 / LC044/TrailSnap

feat(location): 旅行统计仪表盘 — 汇总旅行距离、足迹、偏好等数据洞察

Open
#57 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement status: pending-review
Dominant language
Python
Stars
739
Forks
97
Avg merge
10h 3m
Merged PRs (30d)
82

Description

功能描述

新增旅行统计仪表盘页面,展示深度数据洞察,填补"只有看图没有数据"的空白。

建议包含的统计项

  • 总旅行距离:基于 timeline 节点经纬度计算 haversine 距离之和
  • 最多造访的地点 / 最远的一次旅行
  • 旅行连续天数(streak)
  • 各月出行偏好雷达图
  • 旅行足迹半径:以常驻地为圆心,展示最远到达距离的可视化圆
  • 累计到访省/市/区/景区数量趋势(按年)

实现思路

  • 后端 photo_metadata 表有完整经纬度和时间,大部分计算可在 SQL 中完成
  • 新增 /api/locations/travel_stats 聚合查询接口
  • 前端可复用 ECharts 图表组件(LocationMapView.vue 已有使用)
  • 页面可作为位置相册下的独立 tab 或子页面

优先级

高 — 数据都在,计算简单,也是生成分享卡片的基础

依赖

  • 需要后端新增统计聚合 API

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the photo_metadata table and the existing LocationMapView.vue chart usage. Define the scope and calculations for the proposed travel statistics, then plan the /api/locations/travel_stats endpoint and dashboard page. Done means the agreed statistics are available through the API and displayed in the location album UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
api, data-visualization, database, full-stack
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.