{"id":33352069,"url":"https://github.com/kkawailab/nagoya_convenience_stores","last_synced_at":"2026-05-15T14:33:14.316Z","repository":{"id":324990357,"uuid":"1099367271","full_name":"kkawailab/nagoya_convenience_stores","owner":"kkawailab","description":"名古屋市内のコンビニエンスストアの分布を可視化・分析するインタラクティブな地図アプリケーション。Leaflet.js、ヒートマップ、クラスター分析機能を搭載。GeoJSONデータ対応。","archived":false,"fork":false,"pushed_at":"2025-11-19T00:01:03.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-19T01:20:45.432Z","etag":null,"topics":["geojson","geospatial","heatmap","interactive-map","javascript","leaflet","location-analysis","mapping","openstreetmap","visualization"],"latest_commit_sha":null,"homepage":"https://kkawailab.github.io/nagoya_convenience_stores/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kkawailab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-18T22:50:02.000Z","updated_at":"2025-11-19T00:01:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kkawailab/nagoya_convenience_stores","commit_stats":null,"previous_names":["kkawailab/nagoya_convenience_stores"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/kkawailab/nagoya_convenience_stores","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkawailab%2Fnagoya_convenience_stores","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkawailab%2Fnagoya_convenience_stores/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkawailab%2Fnagoya_convenience_stores/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkawailab%2Fnagoya_convenience_stores/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kkawailab","download_url":"https://codeload.github.com/kkawailab/nagoya_convenience_stores/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkawailab%2Fnagoya_convenience_stores/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33069905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geojson","geospatial","heatmap","interactive-map","javascript","leaflet","location-analysis","mapping","openstreetmap","visualization"],"created_at":"2025-11-22T11:00:29.762Z","updated_at":"2026-05-15T14:33:14.302Z","avatar_url":"https://github.com/kkawailab.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 名古屋市コンビニエンスストア立地分析\n\n名古屋市内のコンビニエンスストアの分布を可視化・分析するインタラクティブな地図アプリケーションです。GeoJSON形式のデータを使用して、店舗の立地パターン、ブランド分布、密集度などを多角的に分析できます。\n\n![Map Preview](https://img.shields.io/badge/Leaflet-Interactive%20Map-green)\n![License](https://img.shields.io/badge/license-MIT-blue)\n\n## 🌟 主な機能\n\n### 📍 インタラクティブマップ\n- **Leaflet.js**を使用した高性能な地図表示\n- OpenStreetMapタイルレイヤーによる詳細な背景地図\n- ブランドごとに色分けされたマーカー表示\n- クリックでポップアップ表示（店舗名、営業時間、駐車場情報など）\n\n### 🔍 フィルタリング機能\n- **ブランドフィルター**: セブン-イレブン、ファミリーマート、ローソン、ミニストップ\n- **エリアフィルター**: 名古屋市16区（千種区、東区、北区、西区、中村区、中区、昭和区、瑞穂区、熱田区、中川区、港区、南区、守山区、緑区、名東区、天白区）\n\n### 📊 視覚化機能\n- **ヒートマップ表示**: `leaflet.heat`プラグインを使用した店舗密度の可視化\n  - 青→緑→黄→赤のグラデーション表示\n  - 密集度が一目でわかる\n- **クラスター分析**: `leaflet.markercluster`プラグインを使用したグルーピング\n  - 近接店舗の自動クラスタリング\n  - ズームレベルに応じた動的な表示切替\n  - クリックで詳細表示\n\n### 📈 統計ダッシュボード\n- 総店舗数\n- 平均店舗間距離\n- 最密集エリア\n- 現在表示中の店舗数\n\n### 💾 データエクスポート機能\n- **GeoJSONエクスポート**: 加工したデータをGeoJSON形式でダウンロード\n  - フィルター条件を反映（ブランド・エリア）\n  - タイムスタンプ付きファイル名の自動生成\n  - 標準GeoJSON形式で他のGISツールでも利用可能\n  - エクスポート時に店舗数を確認表示\n\n## 🚀 デモ\n\nGitHub Pagesでホスティング中：\n**https://kkawailab.github.io/nagoya_convenience_stores/**\n\n## 📦 技術スタック\n\n| 技術 | 用途 | バージョン |\n|------|------|-----------|\n| [Leaflet.js](https://leafletjs.com/) | 地図表示ライブラリ | 1.9.4 |\n| [Leaflet.heat](https://github.com/Leaflet/Leaflet.heat) | ヒートマップ表示 | 0.2.0 |\n| [Leaflet.markercluster](https://github.com/Leaflet/Leaflet.markercluster) | マーカークラスタリング | 1.5.3 |\n| [OpenStreetMap](https://www.openstreetmap.org/) | 地図タイル | - |\n| GeoJSON | データ形式 | - |\n\n## 📂 プロジェクト構成\n\n```\nnagoya_convenience_stores/\n├── index.html          # メインアプリケーションファイル（スタンドアロン）\n└── README.md          # このファイル\n```\n\n## 🔧 インストール方法\n\n### 方法1: ローカルで実行（推奨）\n\n1. **リポジトリをクローン**\n   ```bash\n   git clone https://github.com/kkawailab/nagoya_convenience_stores.git\n   cd nagoya_convenience_stores\n   ```\n\n2. **ブラウザで開く**\n   ```bash\n   # macOS\n   open index.html\n\n   # Linux\n   xdg-open index.html\n\n   # Windows\n   start index.html\n   ```\n\n   または、ファイルマネージャーから`index.html`をダブルクリック\n\n### 方法2: ローカルサーバーで実行\n\nCORS制限を回避するため、ローカルサーバーを使用することを推奨：\n\n#### Python 3を使用\n```bash\npython -m http.server 8000\n```\nブラウザで `http://localhost:8000` にアクセス\n\n#### Node.jsを使用\n```bash\nnpx http-server -p 8000\n```\nブラウザで `http://localhost:8000` にアクセス\n\n#### VS Code Live Server拡張機能\n1. [Live Server拡張機能](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer)をインストール\n2. `index.html`を右クリック → \"Open with Live Server\"\n\n### 方法3: GitHub Pagesで公開\n\n1. GitHubリポジトリのSettings → Pages\n2. Sourceで`main`ブランチを選択\n3. Saveをクリック\n4. 数分後に`https://\u003cusername\u003e.github.io/nagoya_convenience_stores/`でアクセス可能\n\n## 📊 データについて\n\n### 現在のデータ\nこのアプリケーションは**デモ用の合成データ**を使用しています。\n- JavaScriptの`generateStoreData()`関数で動的生成\n- 名古屋市16区にランダムに配置された架空の店舗データ\n\n### 実データの入手方法\n\n実際のコンビニデータを使用する場合、以下の方法でデータを取得できます：\n\n#### 1. Overpass API（OpenStreetMapデータ）\n\n**無料・オープンソース**のOSMデータを使用：\n\n```bash\n# Overpass Turbo (https://overpass-turbo.eu/) で以下のクエリを実行\n[out:json][timeout:25];\narea[\"name\"=\"名古屋市\"]-\u003e.searchArea;\n(\n  node[\"shop\"=\"convenience\"](area.searchArea);\n  way[\"shop\"=\"convenience\"](area.searchArea);\n  rel[\"shop\"=\"convenience\"](area.searchArea);\n);\nout body;\n\u003e;\nout skel qt;\n```\n\n#### 2. 国土地理院 地理院地図\n\n- [地理院地図](https://maps.gsi.go.jp/)から施設情報をダウンロード\n- KML/GeoJSON形式で出力可能\n\n#### 3. オープンデータポータル\n\n- [名古屋市オープンデータ](https://www.city.nagoya.jp/shicho/page/0000132694.html)\n- [政府統計の総合窓口（e-Stat）](https://www.e-stat.go.jp/)\n\n#### 4. Google Places API（有料）\n\n```javascript\n// Google Places APIを使用する例\nconst service = new google.maps.places.PlacesService(map);\nservice.nearbySearch({\n  location: { lat: 35.1815, lng: 136.9066 },\n  radius: 10000,\n  type: 'convenience_store'\n}, callback);\n```\n\n### データ形式\n\nこのアプリケーションはGeoJSON形式を使用します：\n\n```json\n{\n  \"type\": \"FeatureCollection\",\n  \"features\": [\n    {\n      \"type\": \"Feature\",\n      \"geometry\": {\n        \"type\": \"Point\",\n        \"coordinates\": [136.9066, 35.1815]\n      },\n      \"properties\": {\n        \"id\": 1,\n        \"name\": \"セブン-イレブン 名古屋中区1号店\",\n        \"brand\": \"セブン-イレブン\",\n        \"ward\": \"中区\",\n        \"営業時間\": \"24時間\",\n        \"駐車場\": \"あり\"\n      }\n    }\n  ]\n}\n```\n\n### データの置き換え方法\n\n実データを使用する場合は、`index.html`の以下の部分を修正：\n\n```javascript\n// 現在（合成データ）\nstoreData = generateStoreData();\n\n// 実データを使用する場合\nfetch('data/stores.geojson')\n  .then(response =\u003e response.json())\n  .then(data =\u003e {\n    storeData = data;\n    currentLayer = createMarkerLayer(storeData);\n    currentLayer.addTo(map);\n    updateStats(storeData);\n  });\n```\n\n## 🎯 使い方\n\n1. **基本操作**\n   - マウスドラッグで地図移動\n   - スクロールホイールでズーム\n   - マーカークリックで詳細情報表示\n\n2. **フィルタリング**\n   - ブランドドロップダウンで特定ブランドのみ表示\n   - 区ドロップダウンで特定エリアのみ表示\n\n3. **可視化切替**\n   - 「ヒートマップ表示」ボタン: 密度分布を表示\n   - 「クラスター分析」ボタン: グループ化表示\n   - 「リセット」ボタン: 初期表示に戻る\n\n4. **データエクスポート**\n   - 「GeoJSONエクスポート」ボタン: 現在表示中のデータをダウンロード\n   - フィルターを適用してから実行すると、絞り込んだデータのみエクスポート\n   - ファイル名にフィルター条件とタイムスタンプが自動付与\n   - エクスポート例:\n     - 全データ: `nagoya_convenience_stores_2025-11-19T12-30-15.geojson`\n     - セブン-イレブンのみ: `nagoya_convenience_stores_セブン-イレブン_2025-11-19T12-30-15.geojson`\n     - 中区のみ: `nagoya_convenience_stores_中区_2025-11-19T12-30-15.geojson`\n     - 両方: `nagoya_convenience_stores_ローソン_千種区_2025-11-19T12-30-15.geojson`\n   - エクスポートしたGeoJSONは、QGIS、ArcGIS、他のLeafletアプリ等で利用可能\n\n## 🛠️ カスタマイズ\n\n### ブランドカラーの変更\n\n```javascript\nconst BRANDS = {\n    'セブン-イレブン': '#00AB4E',  // 緑\n    'ファミリーマート': '#00A0DC', // 青\n    'ローソン': '#0066B3',         // 濃青\n    'ミニストップ': '#F39800'      // オレンジ\n};\n```\n\n### ヒートマップのグラデーション調整\n\n```javascript\ngradient: {\n    0.0: 'blue',   // 低密度\n    0.5: 'lime',   // 中密度\n    0.7: 'yellow', // 高密度\n    1.0: 'red'     // 最高密度\n}\n```\n\n### クラスターの半径調整\n\n```javascript\ncurrentLayer = L.markerClusterGroup({\n    maxClusterRadius: 50,  // クラスター半径（px）\n    spiderfyOnMaxZoom: true,\n    showCoverageOnHover: true,\n    zoomToBoundsOnClick: true\n});\n```\n\n## 📱 ブラウザ対応\n\n- ✅ Chrome 90+\n- ✅ Firefox 88+\n- ✅ Safari 14+\n- ✅ Edge 90+\n- ✅ モバイルブラウザ（iOS Safari, Chrome Mobile）\n\n## 🤝 貢献\n\nプルリクエストを歓迎します！大きな変更の場合は、まずissueで議論してください。\n\n### 開発の流れ\n\n1. このリポジトリをフォーク\n2. フィーチャーブランチを作成 (`git checkout -b feature/AmazingFeature`)\n3. 変更をコミット (`git commit -m 'Add some AmazingFeature'`)\n4. ブランチにプッシュ (`git push origin feature/AmazingFeature`)\n5. プルリクエストを作成\n\n## 📄 ライセンス\n\nこのプロジェクトはMITライセンスの下で公開されています。\n\n## 👤 作者\n\n- GitHub: [@kkawailab](https://github.com/kkawailab)\n\n## 🙏 謝辞\n\n- [Leaflet.js](https://leafletjs.com/) - オープンソース地図ライブラリ\n- [OpenStreetMap](https://www.openstreetmap.org/) - オープンソース地図データ\n- [Leaflet.heat](https://github.com/Leaflet/Leaflet.heat) - ヒートマッププラグイン\n- [Leaflet.markercluster](https://github.com/Leaflet/Leaflet.markercluster) - クラスタープラグイン\n\n## 📮 お問い合わせ\n\n質問や提案がある場合は、[Issues](https://github.com/kkawailab/nagoya_convenience_stores/issues)で報告してください。\n\n---\n\n## 📝 更新履歴\n\n### [1.1.0] - 2025-11-19\n\n#### 追加\n- **GeoJSONエクスポート機能**: フィルタリングしたデータをGeoJSON形式でダウンロード\n  - 現在のフィルター条件（ブランド・エリア）を反映\n  - タイムスタンプ付きファイル名の自動生成\n  - フィルター条件をファイル名に含める（例: `nagoya_convenience_stores_セブン-イレブン_中区_2025-11-19T12-30-15.geojson`）\n  - 標準GeoJSON形式（`application/geo+json`）でエクスポート\n  - エクスポート時に店舗数の確認メッセージ表示\n  - エクスポートしたデータはQGIS、ArcGIS等のGISツールで利用可能\n\n#### 改善\n- UIに緑色のエクスポートボタンを追加\n- Blob APIを使用した安全なファイルダウンロード実装\n- メモリリーク防止のためのURL.revokeObjectURL処理\n\n### [1.0.0] - 2025-11-19\n\n#### 追加\n- 初回リリース\n- Leaflet.jsベースのインタラクティブマップ機能\n- GeoJSON形式のデータ構造実装\n- 名古屋市16区のエリア分け\n- 4大コンビニブランド（セブン-イレブン、ファミリーマート、ローソン、ミニストップ）のサポート\n- ブランドおよびエリア別フィルタリング機能\n- leaflet.heatプラグインによるヒートマップ表示\n- leaflet.markerclusterプラグインによるクラスター分析\n- 統計ダッシュボード（総店舗数、平均距離、最密集エリア、表示中店舗数）\n- レスポンシブデザイン対応\n- GitHub Pagesでのホスティング対応\n\n#### 技術詳細\n- Leaflet 1.9.4\n- Leaflet.heat 0.2.0\n- Leaflet.markercluster 1.5.3\n- デモ用合成データ生成機能\n\n---\n\n**Made with ❤️ for 名古屋**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkawailab%2Fnagoya_convenience_stores","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkkawailab%2Fnagoya_convenience_stores","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkkawailab%2Fnagoya_convenience_stores/lists"}