Spaces:
Sleeping
Sleeping
Commit History
-
Upload app.py
Verified signaturec201d52 -
Upload app.py
Verified signaturedda215e -
Upload app.py
Verified signatureed344ce -
Upload app.py
Verified signature2f75255
-
fix: 比率型指標預設取平均、補上「臺中」等縣市簡稱、排行榜與趨勢分頁切換即出圖
HsiehMinChieh +1: Claude Opus 5.5- 欄名含率、%、每千人、平均等字樣時,數據總覽、地圖聚合、排行榜、趨勢圖改用平均,不再把比率加總 - 別名表的鍵配合「台→臺」轉換;只寫「臺中」「新北」時補上市/縣(新竹、嘉義有市有縣,不自動補) - 切到「排行榜」「趨勢分析」分頁時自動產生圖表 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>6924b31
-
revert: 拿掉「縣市+相鄰縣市」範圍(互動圖可以直接放大全國鄉鎮圖)
HsiehMinChieh +1: Claude Opus 5.5主地圖的鄉鎮範圍選單、手動填寫的「+相鄰縣市」選項與相鄰對照表都移除,範圍回到全國或單一縣市。 海面底色、分層框線、範圍選單常駐(避免卡在 processing)都保留。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>10b1057 -
fix: 鄉鎮範圍選單改為一直顯示,不再用 visible 切換
HsiehMinChieh +1: Claude Opus 5.5Gradio 6 前端在元件由隱藏變可見時不清掉載入狀態,選單一直蓋著 processing 不能點 (10/5 加範圍選單時就有)。範圍選單改成常駐、標籤註明鄉鎮層級才有作用; 層級/範圍改變只更新表格。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>450bcc7 -
fix: 範圍選單由隱藏變可見時不掛載入遮罩(Gradio 6 會一直卡在 processing)
HsiehMinChieh +1: Claude Opus 5.5Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>7f181df -
fix: 手動填寫的鄉鎮範圍選單卡在 processing(事件無限循環)
HsiehMinChieh +1: Claude Opus 5.5範圍選單的 change 會呼叫 on_manual_scope_change,而它又回頭更新範圍選單本身, Gradio 6 再觸發 change,一直循環。改成範圍改變只更新表格;層級改變才更新選單顯示。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>db97d46 -
feat: 地圖改海面底色與分層框線;鄉鎮圖加「縣市+相鄰縣市」範圍
HsiehMinChieh +1: Claude Opus 5.5- 底圖:互動圖與靜態圖(PNG、GIF、PPTX)都加淡藍海面底色 - 框線:縣市界深灰;鄉鎮界淺灰細線,再疊一層深灰縣市界(單一縣市與相鄰縣市範圍也有,只畫圖上有的縣市) - 範圍:主地圖新增鄉鎮範圍選單(鄉鎮層級才顯示),手動填寫的範圍也多了「某縣市+相鄰縣市」,方便看跨縣市的外溢、擴散 - 排名圖卡維持白底,只把白色界線改成深灰 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>527e290
-
refactor: fixed-size annotation label with marker dot for region picker
HsiehMinChieh +1: Claude Sonnet 5.5Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>8528213 -
fix: widen label box, pad single map so label sits over sea
HsiehMinChieh +1: Claude Sonnet 5.5Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>e84d216 -
fix: place region label box next to the selected region
HsiehMinChieh +1: Claude Sonnet 5.5Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>44c3957 -
feat: replace region outline with marker dot and leader line to label box
HsiehMinChieh +1: Claude Sonnet 5.5Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>81b663d -
feat: rank/value pill label for selected region on interactive and dual maps
HsiehMinChieh +1: Claude Sonnet 5.5Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>2fe1710 -
feat: region picker with outline and label on interactive and dual maps
HsiehMinChieh +1: Claude Sonnet 5.5Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>abfb5d8
-
feat(export): Chinese descriptive file names for all downloads
PNG/HTML/GIF/CSV/SVG/PPTX now download as e.g. 縣市出生數統計圖_2024.png, 新北市鄉鎮市區統計圖.png, 鄉鎮市區統計圖_一頁一縣市.pptx; a user-entered title is used as the file name; illegal filename characters are replaced. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>7f0e4f1 -
feat(rank): independent top-N / bottom-N counts (either may be 0)
Two sliders (0-11) replace the single "N each" slider; legend only lists the classes that are used and is re-centred; bottom never overlaps top. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>fe9116f -
fix(ui): compact the empty-state stats placeholder
The "upload data to see summary" placeholder had 60px padding and stacked layout, pushing the tabs far down. Make it a single compact line. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>d9056aa -
fix(pptx): data table no longer overflows the slide in PowerPoint
Verified with real PowerPoint rendering: default cell margins inflated the rows and cut off the last rows. Use 0.02in top/bottom margins, centre text. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>26ac68e -
fix(rank): readable text on light pills (auto dark/white by background)
Gray "other" pills used white text (low contrast). Pick text colour from background luminance; applied to the image and the native PPTX. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>37116f6 -
feat(pptx): all exported PowerPoint files use native, editable objects
- 圖解排名 slide: map regions are vector freeforms, pills are grouped shapes with text, title/subtitle/legend/unit/note are text boxes, leader lines are connectors - county slides: map regions as freeforms, labels as text boxes with leader lines, legend as shapes + text boxes (no raster pictures any more) - _render_manual_static collects a scene for the PPTX builder Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>abbf74d -
feat: infographic-style county ranking map (圖解排名 tab)
Mainland map coloured by rank (top N / bottom N / other) with pill labels (rank, county, value) in left/right columns, 臺北市 on top, islands on the bottom row, orthogonal leader lines. Title/subtitle/unit/footnote, colour pickers, ascending/descending rank. Exports PNG, SVG (transparent option) and a one-slide PPTX; data comes from the manual-fill county values. Exports merge the table additively so a stale table can't wipe the store. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>093c8e5 -
fix(ui): visible checkbox/radio state, auto-refresh options, transparency preview
- global input CSS wiped the check marks, so every checkbox/radio looked unchecked; restore checked styling - island / label / colour options regenerate the manual map automatically - PNG export shows a checkerboard preview so transparent background is visible; clearer hints on both checkboxes Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>a1137a2 -
fix(manual): label boxes washed out the interactive map
Scattergeo fill polygons follow d3's orientation rule: counter-clockwise rings are read as "whole globe minus the box", painting white over the choropleth. Use clockwise rectangles. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>bf86ea4 -
fix(manual): boxed labels on the interactive map to match exports
Interactive labels were bare black text and unreadable over dark regions. Draw white label boxes (filled scattergeo polygons) behind the text, with leader lines clipped to the box edge, so the web view looks like PNG/PPTX. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>f60b665 -
feat(manual): mutually-exclusive label layout with leader lines
Labels are treated as rectangles; overlapping pairs are pushed apart along the axis of least overlap with a weak spring back to their region. Labels that end up outside their region get a leader line and anchor dot. Used by the interactive map and PNG/SVG/PPTX exports. Box sizes are measured from the real axes extent (static) so spacing matches what is drawn. Skipped above 80 labels (national town view). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>bd1a327 -
feat(manual): town-level examples (numeric / categorical)
Sample data for 臺北市 + 新北市 (41 districts, made-up values) that switches the tab to town level; PPTX export then yields two county slides. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>5debdd4 -
feat(manual): PPTX works with county-only data; fix colorbar overlap
- no town data: one slide per filled county, whole-Taiwan map with that county highlighted plus its content in large text (was an error) - county-level static maps leave room so the colorbar no longer covers offshore labels Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>8934f79 -
feat(manual): export PPTX, one slide per county
- each county with town-level data gets a slide: title, town map and an optional data table; optional county overview slide first - all slides share one colour scale / category palette so pages compare - refactor static rendering into _render_manual_static (PNG/SVG/PPTX share it) - add python-pptx dependency Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>4451fd0 -
feat(manual): town-level maps for slides, scope picker, transparent export
- level switch: counties or towns (全國 368 towns with county outlines, or zoom to a single county); table is rebuilt per scope and entries live in a store so switching scope never loses data - paste accepts short town names inside a county scope, unique short names nationally, old names (桃園縣…), and warns about unknown ones - auto titles (臺灣各縣市 / 新北市各鄉鎮市區), town labels without county prefix - PNG/SVG export with optional transparent background for PowerPoint - town gdf gets a normalized 縣市 column Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>4040cf4 -
feat(manual): categorical/numeric modes, bulk paste, label controls, PNG/SVG export
- all-numeric entries -> gradient choropleth; text entries -> one colour per distinct value with legend (previously a single on/off colour) - paste rows from Excel, one-click examples, clear; unknown names warned - title, palette, label content/size, island toggle - crowded northern counties get labels moved offshore with leader lines - PNG and SVG exports share colours/labels with the interactive map Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>6ae59de -
fix(ui): make the page fill the full window width
fill_width=True plus an explicit width:100% on .gradio-container; the auto side margins in a flex parent were shrinking it to content width. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>e572948 -
feat: match current district names, classified GIF animation
- modernize_name(): map 桃園縣/鄉鎮市 names to current 桃園市/區 and strip the (海) marker from map names; applied to both map and user data - GIF animation honors classification mode, shares class edges / value range across frames, respects the island toggle, keeps no-data grey - GIF frames now rendered by build_static_map (single code path) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>ebb0e5a -
fix+feat: repair broken inputs, robust parsing, classification, layout polish
Fixes - resize_js now passes its args through; previously every button handler received None for all dropdowns, so user selections were ignored - requirements.txt: ASCII-only comments (pip failed on cp950), gradio>=6 - town map loads on new shapely via degenerate-ring cleanup fallback - alias 桃園縣 -> 桃園市; read CSV as utf-8-sig/cp950 - stricter time/numeric column detection, thousands separators - auto-rendered map after upload uses latest period, not stale UI values - force light theme (CSS is light-only); escape HTML in stat cards - missing regions shown grey instead of 0; replace DownloadButtons with button + file output; mkstemp; matplotlib Figure instead of pyplot Features - report data regions that cannot be matched to the map - quantile / equal-interval classification for map, PNG and HTML export - toggle outlying islands; rank top/bottom; diff as rate or absolute - sticky sidebar, collapsible overview, tidier tab controls Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic…1a8c409
-
refactor(ui): move per-feature controls into their tabs, mobile layout, auto-render map on upload
HsiehMinChieh +1: Claude Fable 5- Sidebar now only holds upload + global filters; each tab carries its own controls - Auto-draws the first map after a successful upload - CSS injected via gr.Blocks(css=) instead of inline <style> (no FOUC) - Mobile (<768px): sidebar stacks above main area - Quick-help cards collapsed into an accordion; removed unused .tw-status CSS Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>50cafd3 -
feat: multi-region trend comparison, interactive HTML map export, sample data loader
HsiehMinChieh +1: Claude Fable 5- Trend region dropdown is now multiselect; 2+ regions render as overlaid lines - New download button exports the interactive map as standalone HTML - Bundled sample_data.csv with gr.Examples for one-click demo - Perf: single-pass time parsing, precompiled regexes, request timeouts Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>9abf676
-
refactor: code review optimizations and bug fixes
HsiehMinChieh41708b9
-
Update README.md
Verified signature2432741 -
Update README.md
Verified signature396330d
-
Update app.py
Verified signature09fe721 -
Update app.py
Verified signature5bf1bbb -
Update app.py
Verified signature293bd8b -
Update app.py
Verified signaturebced39c -
Update app.py
Verified signaturee188b49 -
Update app.py
Verified signaturecf36185 -
Update app.py
Verified signaturef175cdb -
Update app.py
Verified signature41b0054 -
Update app.py
Verified signaturea5572c1 -
Update app.py
Verified signature149d1f4