视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
generate-tour-report【文档与办公】Generate a Quarto-based tour report with embedded maps, daily itineraries, logistics tables, and accommodation/transport details. Produces a self-contained HTML or PDF document suitable for offline use during travel. Use when compiling a planned tour into a shareable document, creating an offline-accessible travel guide, documenting a completed trip …
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
生含嵌入地圖、每日行程、後勤表格與實用旅行資訊之格式化行程報告。
建報告前收所有行程資料於結構化格式。
彙編之資料來源:
┌────────────────────┬──────────────────────────────────────────┐
│ 類別 │ 必要欄位 │
├────────────────────┼──────────────────────────────────────────┤
│ 路線段 │ From、To、distance_km、time_hrs、mode │
│ 航點 │ Name、lat、lon、arrival、departure、notes│
│ 住宿 │ Name、address、check-in/out、cost、conf# │
│ 交通 │ Type、operator、depart、arrive、ref# │
│ 活動 │ Name、time、duration、cost、booking_req │
│ 緊急聯絡 │ 當地急救號、使館、保險 │
│ 景點 │ Name、category、lat、lon、description │
└────────────────────┴──────────────────────────────────────────┘
依日組織資料以支每日節結構:
預期: 依日組織之完整資料集,時程無缺口(每夜有住宿,每段有交通)。
失敗時: 若資料不全,以 [TBD] 佔位記漏缺項目並加於報告末之後續清單。若日期不合(如抵住宿早於自前站出發),標衝突並調時間。
建附每日節之 Quarto 文件骨架。
---
title: "Tour Name: Region/Country"
subtitle: "Date Range"
author: "Planner Name"
date: today
format:
html:
toc: true
toc-depth: 3
theme: cosmo
self-contained: true
code-fold: true
pdf:
documentclass: article
geometry: margin=2cm
toc: true
execute:
echo: false
warning: false
message: false
---
依下結構建文件:
報告結構:
1. 概覽
- 行程摘要(日期、總距離、亮點)
- 概覽地圖(所有航點、全路線)
- 速查表(關鍵日期、預訂、聯絡)
2. 第一日:[標題]
- 當日摘要(起、止、公里、時數)
- 當日路線圖
- 時程/日程表
- 住宿詳情
- 景點與活動
3. 第二日:[標題]
...(每日重複)
N. 後勤附錄
- 完整住宿表
- 交通預訂表
- 打包清單
- 緊急聯絡
- 預算摘要
預期: 完整 .qmd 檔骨架,附 YAML 首,所有每日節為 H2 標題,每節含佔位內容。
失敗時: 若行程單一文件過長(逾十四日),可考慮分週或用標籤頁佈局({.tabset})以利導覽。若需 PDF 輸出,確無互動小工具(改用靜態地圖)。
於每節加空間視覺化。
概覽地圖:
#| label: fig-overview-map
#| fig-cap: "Tour overview with all stops"
leaflet::leaflet() |>
leaflet::addProviderTiles("OpenTopoMap") |>
leaflet::addPolylines(data = full_route, color = "#2563eb", weight = 3) |>
leaflet::addMarkers(data = stops, popup = ~paste(name, "<br>", date))
每日路線圖:
#| label: fig-day1-map
#| fig-cap: "Day 1 route: City A to City B"
day1_route <- full_route[full_route$day == 1, ]
leaflet::leaflet() |>
leaflet::addProviderTiles("OpenStreetMap") |>
leaflet::addPolylines(data = day1_route, color = "#2563eb", weight = 4) |>
leaflet::addCircleMarkers(data = day1_stops, radius = 6, popup = ~name)
海拔剖面(健行/騎行日):
#| label: fig-day3-elevation
#| fig-cap: "Day 3 elevation profile"
ggplot2::ggplot(day3_elevation, ggplot2::aes(x = dist_km, y = elev_m)) +
ggplot2::geom_area(fill = "#bfdbfe", alpha = 0.5) +
ggplot2::geom_line(color = "#1d4ed8", linewidth = 0.7) +
ggplot2::theme_minimal() +
ggplot2::labs(x = "Distance (km)", y = "Elevation (m)")
預期: 每日節至少有路線圖。多模式日(駕車+健行)兼有道路圖與海拔剖面。概覽節含示全行程之地圖。
失敗時: 若 leaflet 地圖無法渲染(PDF 模式常見),退回靜態地圖:用 tmap::tmap_mode("plot") 或 ggplot2 配 ggspatial::annotation_map_tile()。若某日空間資料不可得,以路線之簡單文字描述代之。
插入住宿、交通與預算之結構化表。
住宿表:
| Night | Date | Accommodation | Address | Check-in | Cost | Conf# |
|-------|------------|--------------------|--------------------|----------|--------|-------|
| 1 | 2025-07-01 | Hotel Alpine | Bergstrasse 12 | 15:00 | EUR 95 | AB123 |
| 2 | 2025-07-02 | Mountain Hut | Zugspitze Huette | 16:00 | EUR 45 | -- |
| 3 | 2025-07-03 | Pension Edelweiss | Dorfplatz 3 | 14:00 | EUR 72 | CD456 |
交通表:
| Date | Type | From | To | Depart | Arrive | Ref# |
|------------|-------|---------------|---------------|--------|--------|--------|
| 2025-07-01 | Train | Munich Hbf | Garmisch | 08:15 | 09:32 | DB1234 |
| 2025-07-03 | Bus | Zugspitze | Ehrwald | 10:00 | 10:25 | -- |
| 2025-07-04 | Train | Innsbruck | Munich Hbf | 16:45 | 18:30 | OBB567 |
預算摘要:
| Category | Estimated | Actual | Notes |
|-----------------|-----------|--------|-------------------------|
| Accommodation | EUR 212 | | 3 nights |
| Transport | EUR 85 | | Rail passes recommended |
| Food | EUR 150 | | EUR 50/day estimate |
| Activities | EUR 60 | | Cable car, museum |
| **Total** | **EUR 507** | | |
預期: 完整後勤表,所有預訂依時間列出。住宿表無漏日。預算合計正確計算。
失敗時: 若預訂詳情未定,用 [TBD] 並標示該列。若行程涉多幣別,加幣別欄並於註腳附匯率。
編譯 Quarto 文件為最終輸出格式。
# Render to self-contained HTML (best for offline use)
quarto render tour-report.qmd --to html
# Render to PDF (for printing)
quarto render tour-report.qmd --to pdf
# Preview with live reload during editing
quarto preview tour-report.qmd
渲染後檢查:
預期: 完整、獨立之文件,離線可用,所有行程資訊可導覽之格式。
失敗時: 若渲染失敗,核 R 主控台之套件錯(漏 sf、leaflet 或 ggplot2)。若獨立 HTML 過大(逾二十 MB),降低圖層解析度或用 PNG 截圖替互動地圖。若 PDF 渲染以 LaTeX 錯失敗,以 quarto install tinytex 裝 TinyTeX。
self-contained: true 或預渲染地圖為圖像。plan-tour-route — 生此報告所彙編之路線資料create-spatial-visualization — 建報告中嵌之地圖與圖表create-quarto-report — 通用 Quarto 文件建立與配置plan-hiking-tour — 為山地行程報告提供健行專屬資料check-hiking-gear — 為後勤附錄產打包清單