smartcity-gis 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ MIT License
2
+ Copyright (c) 2026 Dongsoo Jung
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
@@ -0,0 +1,202 @@
1
+ Metadata-Version: 2.4
2
+ Name: smartcity-gis
3
+ Version: 0.2.0
4
+ Summary: GIS-based urban analytics for smart city planning: walkability, 2SFCA accessibility, isochrones and 15-minute city scores for Korean cities
5
+ Author-email: Dongsoo Jung <jds068888@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/DongsooJung/smart-city-gis
8
+ Project-URL: Repository, https://github.com/DongsooJung/smart-city-gis
9
+ Project-URL: Issues, https://github.com/DongsooJung/smart-city-gis/issues
10
+ Project-URL: Changelog, https://github.com/DongsooJung/smart-city-gis/blob/main/CHANGELOG.md
11
+ Keywords: gis,walkability,2sfca,accessibility,15-minute-city,urban-analytics,smart-city,korea,geopandas,osmnx
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Scientific/Engineering :: GIS
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: geopandas>=0.14.0
25
+ Requires-Dist: shapely>=2.0.0
26
+ Requires-Dist: pyproj>=3.6.0
27
+ Requires-Dist: pandas>=2.1.0
28
+ Requires-Dist: numpy>=1.26.0
29
+ Requires-Dist: scipy>=1.11.0
30
+ Requires-Dist: networkx>=3.2.0
31
+ Requires-Dist: requests>=2.31.0
32
+ Requires-Dist: python-dotenv>=1.0.0
33
+ Provides-Extra: network
34
+ Requires-Dist: osmnx>=1.7.0; extra == "network"
35
+ Requires-Dist: pandana>=0.7; extra == "network"
36
+ Provides-Extra: viz
37
+ Requires-Dist: matplotlib>=3.8.0; extra == "viz"
38
+ Requires-Dist: folium>=0.15.0; extra == "viz"
39
+ Requires-Dist: contextily>=1.4.0; extra == "viz"
40
+ Requires-Dist: plotly>=5.18.0; extra == "viz"
41
+ Provides-Extra: stats
42
+ Requires-Dist: libpysal>=4.8.0; extra == "stats"
43
+ Requires-Dist: esda>=2.5.0; extra == "stats"
44
+ Requires-Dist: pointpats>=2.4.0; extra == "stats"
45
+ Requires-Dist: rasterio>=1.3.0; extra == "stats"
46
+ Requires-Dist: fiona>=1.9.0; extra == "stats"
47
+ Provides-Extra: dev
48
+ Requires-Dist: pytest>=7.4.0; extra == "dev"
49
+ Requires-Dist: black>=23.12.0; extra == "dev"
50
+ Requires-Dist: ruff>=0.1.9; extra == "dev"
51
+ Requires-Dist: mypy>=1.7.0; extra == "dev"
52
+ Requires-Dist: jupyter>=1.0.0; extra == "dev"
53
+ Requires-Dist: ipykernel>=6.27.0; extra == "dev"
54
+ Requires-Dist: nbformat>=5.9.0; extra == "dev"
55
+ Dynamic: license-file
56
+
57
+ # Smart City GIS Analytics
58
+
59
+ > GIS-based urban analytics platform for smart city planning and policy simulation
60
+
61
+ [![CI](https://github.com/DongsooJung/smart-city-gis/actions/workflows/ci.yml/badge.svg)](https://github.com/DongsooJung/smart-city-gis/actions/workflows/ci.yml)
62
+ [![PyPI](https://img.shields.io/badge/PyPI-smartcity--gis-3776AB?style=flat-square&logo=pypi&logoColor=white)](https://pypi.org/project/smartcity-gis/)
63
+ [![Python](https://img.shields.io/badge/Python-3.11+-3776AB?style=flat-square&logo=python&logoColor=white)](https://python.org)
64
+ [![License](https://img.shields.io/badge/License-MIT-green?style=flat-square)](LICENSE)
65
+
66
+ 한국 도시계획 의사결정은 여러 기관에 흩어진 데이터에 의존한다. 본 프로젝트는 인구·교통·토지이용·부동산
67
+ 데이터를 결합해 **보행성·접근성·15분 도시** 지표를 계산하고 인터랙티브 지도로 시각화하는
68
+ end-to-end 분석 라이브러리다.
69
+
70
+ ## 📦 Installation
71
+
72
+ ```bash
73
+ pip install smartcity-gis # 코어 (보행성·접근성·15분도시)
74
+ pip install "smartcity-gis[network]" # + OSMnx·Pandana 네트워크 분석
75
+ pip install "smartcity-gis[viz]" # + Folium·matplotlib 시각화
76
+ pip install "smartcity-gis[stats]" # + PySAL 공간통계
77
+ ```
78
+
79
+ ## ✅ 구현 현황 (정직한 상태표)
80
+
81
+ 이 저장소는 **검증된 핵심 분석 라이브러리**와 OpenStreetMap 실데이터 기반 강남 대시보드를 제공한다.
82
+ 아래 표로 "실제 동작"과 "예정"을 명확히 구분한다.
83
+
84
+ | 기능 | 모듈 | 상태 | 테스트 |
85
+ |------|------|------|--------|
86
+ | 보행성 지수 (Walk Score 적응판) | `walkability.py` | ✅ 구현 | ✅ |
87
+ | Shannon 다양성 · 교차로/인구 밀도 | `walkability.py` | ✅ 구현 | ✅ |
88
+ | 격자 생성 `create_fishnet` | `geometry.py` | ✅ 구현 | ✅ |
89
+ | 2SFCA 접근성 (Luo & Wang 2003) | `accessibility.py` | ✅ 구현 | ✅ (보존법칙) |
90
+ | Gravity 접근성 모형 | `accessibility.py` | ✅ 구현 | ✅ |
91
+ | Isochrone 등시선 (networkx) | `accessibility.py` | ✅ 구현 | ✅ |
92
+ | 15분 도시 지수 (Moreno 2021) | `accessibility.py` | ✅ 구현 | ✅ |
93
+ | 시각화 (PNG/Folium/GeoJSON export) | `visualization.py` | ✅ 구현 | — |
94
+ | **인터랙티브 대시보드** | `docs/dashboard/` | ✅ 구현 | — |
95
+ | OSM POI·보행망 수집 | `fetch_osm_data.py` | ✅ 구현 | 스키마 검증 |
96
+ | NSDI / V-World / KOSIS 클라이언트 | `api_clients.py` | 🚧 스텁(로드맵) | — |
97
+
98
+ ## 🖥 인터랙티브 대시보드
99
+
100
+ `scripts/fetch_osm_data.py`가 OpenStreetMap의 현재 POI·보행망을 수집하고,
101
+ `scripts/build_dashboard.py`가 라이브러리로 강남 핵심부 격자 점수를 계산해
102
+ **단일 HTML 대시보드**([`docs/dashboard/index.html`](docs/dashboard/index.html))를 생성한다.
103
+ Leaflet 코로플레스(보행성/15분도시 토글) + POI 카테고리 필터 + 분포 차트로 구성된다.
104
+
105
+ ```bash
106
+ python scripts/fetch_osm_data.py # OSM 실제 POI·보행망 수집
107
+ python scripts/build_dashboard.py # 데이터 계산 + 대시보드 생성
108
+ # docs/dashboard/index.html 을 브라우저로 열기 (또는 GitHub Pages 배포)
109
+ ```
110
+
111
+ 배포 대시보드는 [`data/actual/`](data/actual/)의 최신 OSM 스냅샷을 사용한다. `data/sample/`은
112
+ 라이브러리 테스트와 오프라인 재현용으로만 유지한다.
113
+
114
+ ## 🧭 방법론
115
+
116
+ `docs/ARCHITECTURE.md`에 수식과 참고문헌이 정리되어 있다.
117
+
118
+ 1. **Walkability**: POI 카테고리 가중치 × 거리감쇠 → 0–100 (Walk Score 한국 적응)
119
+ 2. **2SFCA**: 2단계 유동 집수구역, 의료 형평성 분석 표준
120
+ 3. **15-Minute City**: 6대 생활 카테고리 15분 도보 도달 개수 (0–6)
121
+ 4. **Isochrone**: 도로망 그래프 travel-time ego-graph → 볼록껍질 등시선
122
+
123
+ ## 🧪 사례 연구 (방법론 데모)
124
+
125
+ 아래는 저자가 동일 방법론을 적용/제안한 도시계획 맥락이다. 코드 저장소는 방법론을
126
+ 재현하는 라이브러리와 강남 데모를 제공한다(고객 데이터는 비공개).
127
+
128
+ | 사례 | 맥락 | 방법 |
129
+ |------|------|------|
130
+ | 수원 군공항 이전 영향 | 연구 제안 | Buffer 분석, DID |
131
+ | 김포 스마트 재생 타당성 | 정책 검토 | 접근성 지수, 비용편익 |
132
+ | 부천역세권 개발 | 지자체 맥락 | 토지이용 분석 |
133
+
134
+ ## 🛠 Tech Stack
135
+
136
+ - **GIS Core:** GeoPandas, Shapely, pyproj, Fiona, Rasterio
137
+ - **Network:** OSMnx, NetworkX, Pandana
138
+ - **Spatial Stats:** libpysal, esda
139
+ - **Visualization:** Folium, Kepler.gl, Matplotlib, Leaflet + Chart.js (대시보드)
140
+ - **APIs (로드맵):** V-World, KOSIS, NSDI
141
+
142
+ ## 📁 Repository Structure
143
+
144
+ ```
145
+ smart-city-gis/
146
+ ├── .github/workflows/ci.yml # pytest 자동화 (3.11/3.12)
147
+ ├── pyproject.toml # 패키지 메타데이터 (pip install 지원)
148
+ ├── CHANGELOG.md # 버전별 변경 기록
149
+ ├── src/smartcity_gis/
150
+ │ ├── geometry.py # create_fishnet 격자 생성
151
+ │ ├── walkability.py # 보행성·다양성·밀도
152
+ │ ├── accessibility.py # 2SFCA·gravity·isochrone·15분도시
153
+ │ ├── visualization.py # PNG/Folium/GeoJSON export
154
+ │ └── api_clients.py # 공공 API 래퍼 (로드맵)
155
+ ├── scripts/fetch_osm_data.py # OSM 실데이터 수집
156
+ ├── scripts/build_dashboard.py # 대시보드 빌더
157
+ ├── notebooks/01_walkability_gangnam.ipynb
158
+ ├── data/actual/ # 배포용 OSM 실제 스냅샷
159
+ ├── data/sample/ # 테스트용 강남 샘플 GeoJSON
160
+ ├── docs/
161
+ │ ├── ARCHITECTURE.md # 방법론·수식
162
+ │ ├── data_dictionary.md # 데이터 스키마
163
+ │ ├── crs_reference.md # 좌표계 가이드
164
+ │ └── dashboard/index.html # 인터랙티브 대시보드
165
+ ├── tests/ # pytest (직선거리·통계 검증)
166
+ ├── requirements.txt
167
+ └── LICENSE
168
+ ```
169
+
170
+ ## 🚀 Quick Start
171
+
172
+ ```bash
173
+ pip install "smartcity-gis[dev]" # PyPI 설치 (개발용 extras 포함)
174
+
175
+ # 또는 소스에서 직접:
176
+ git clone https://github.com/DongsooJung/smart-city-gis.git
177
+ cd smart-city-gis
178
+ pip install -r requirements.txt
179
+ pytest tests/ -v # 검증
180
+ python scripts/fetch_osm_data.py # OSM 실제 데이터 갱신
181
+ python scripts/build_dashboard.py # 대시보드 생성
182
+ ```
183
+
184
+ ## 📄 License
185
+
186
+ MIT License
187
+
188
+ ## 👤 Author
189
+
190
+ **Dongsoo Jung** — Ph.D. Candidate, Seoul National University
191
+ Smart City Engineering · Civil & Environmental Engineering
192
+
193
+
194
+ ## 2026-10-31 수집·해석 범위 개정
195
+
196
+ - 기존 수집기의 변환 경로를 유지하며 읽기 전용 Overpass로 조회한다. 네 응답의 실제 수신 시각·DB 기준 시각·질의·해시를 metadata.json에 기록한다. 원응답은 기본 data/raw/osm(버전관리 제외), 또는 --raw-dir에 보관한다. 수집일은 현장 관측일·월간 통계 기준월이 아니다.
197
+ - POI는 연구 직사각형 안의 OSM 태그 노드다. 같은 좌표의 서로 다른 노드 ID를 합치지 않고, 경계 응답에 반복된 같은 ID만 중복 제거한다. way/relation으로 등록된 시설과 현장 영업 여부는 조사하지 않았다. 도로 그래프는 선택 highway의 중복 way/무방향 간선을 제거한다. 이전 좌표·분류별 중복 제거 저장본과 개수 증가율을 만들지 않는다.
198
+ - 연구 직사각형은 강남역 주변이며 강남구 행정경계가 아니다. 경계 밖 POI를 포함하지 않아 가장자리 효과가 있다. 보행성은 카테고리별 최근접 POI의 지수 감쇠(400m)와 1600m 한계를 사용해 가중치 합으로 정규화한 자체 지표이며 공식 Walk Score 인증값이 아니다.
199
+ - 생활 접근 0~6은 여섯 분류의 최근접 직선거리 1125m 이내 여부다(4.5km/h × 15분 가정). 실제 도보시간 검증값이 아니다. 도로망 근사권은 선택 무방향 그래프에서 5/10/15/20분 내 도달노드의 볼록껍질이며 통행권·횡단·출입구 연결은 전수 검증하지 않았다.
200
+ - 가공 생성일과 수집일을 분리하고 개소연도를 임의로 붙이지 않는다. docs/dashboard/data/에 같은 실행의 격자 CSV/GeoJSON·POI·그래프·근사권·요약·출처 JSON을 함께 생성한다. 완전한 네 응답을 확보하지 못하면 기존 수집 입력을 교체하지 않는다.
201
+
202
+ 재현: `python scripts/fetch_osm_data.py --raw-dir data/raw/osm` 후 `python scripts/build_dashboard.py`, `pytest tests/`를 실행한다. 원자료 응답이 달라지는 재수집과 저장본의 오프라인 재계산을 구분한다.
@@ -0,0 +1,146 @@
1
+ # Smart City GIS Analytics
2
+
3
+ > GIS-based urban analytics platform for smart city planning and policy simulation
4
+
5
+ [![CI](https://github.com/DongsooJung/smart-city-gis/actions/workflows/ci.yml/badge.svg)](https://github.com/DongsooJung/smart-city-gis/actions/workflows/ci.yml)
6
+ [![PyPI](https://img.shields.io/badge/PyPI-smartcity--gis-3776AB?style=flat-square&logo=pypi&logoColor=white)](https://pypi.org/project/smartcity-gis/)
7
+ [![Python](https://img.shields.io/badge/Python-3.11+-3776AB?style=flat-square&logo=python&logoColor=white)](https://python.org)
8
+ [![License](https://img.shields.io/badge/License-MIT-green?style=flat-square)](LICENSE)
9
+
10
+ 한국 도시계획 의사결정은 여러 기관에 흩어진 데이터에 의존한다. 본 프로젝트는 인구·교통·토지이용·부동산
11
+ 데이터를 결합해 **보행성·접근성·15분 도시** 지표를 계산하고 인터랙티브 지도로 시각화하는
12
+ end-to-end 분석 라이브러리다.
13
+
14
+ ## 📦 Installation
15
+
16
+ ```bash
17
+ pip install smartcity-gis # 코어 (보행성·접근성·15분도시)
18
+ pip install "smartcity-gis[network]" # + OSMnx·Pandana 네트워크 분석
19
+ pip install "smartcity-gis[viz]" # + Folium·matplotlib 시각화
20
+ pip install "smartcity-gis[stats]" # + PySAL 공간통계
21
+ ```
22
+
23
+ ## ✅ 구현 현황 (정직한 상태표)
24
+
25
+ 이 저장소는 **검증된 핵심 분석 라이브러리**와 OpenStreetMap 실데이터 기반 강남 대시보드를 제공한다.
26
+ 아래 표로 "실제 동작"과 "예정"을 명확히 구분한다.
27
+
28
+ | 기능 | 모듈 | 상태 | 테스트 |
29
+ |------|------|------|--------|
30
+ | 보행성 지수 (Walk Score 적응판) | `walkability.py` | ✅ 구현 | ✅ |
31
+ | Shannon 다양성 · 교차로/인구 밀도 | `walkability.py` | ✅ 구현 | ✅ |
32
+ | 격자 생성 `create_fishnet` | `geometry.py` | ✅ 구현 | ✅ |
33
+ | 2SFCA 접근성 (Luo & Wang 2003) | `accessibility.py` | ✅ 구현 | ✅ (보존법칙) |
34
+ | Gravity 접근성 모형 | `accessibility.py` | ✅ 구현 | ✅ |
35
+ | Isochrone 등시선 (networkx) | `accessibility.py` | ✅ 구현 | ✅ |
36
+ | 15분 도시 지수 (Moreno 2021) | `accessibility.py` | ✅ 구현 | ✅ |
37
+ | 시각화 (PNG/Folium/GeoJSON export) | `visualization.py` | ✅ 구현 | — |
38
+ | **인터랙티브 대시보드** | `docs/dashboard/` | ✅ 구현 | — |
39
+ | OSM POI·보행망 수집 | `fetch_osm_data.py` | ✅ 구현 | 스키마 검증 |
40
+ | NSDI / V-World / KOSIS 클라이언트 | `api_clients.py` | 🚧 스텁(로드맵) | — |
41
+
42
+ ## 🖥 인터랙티브 대시보드
43
+
44
+ `scripts/fetch_osm_data.py`가 OpenStreetMap의 현재 POI·보행망을 수집하고,
45
+ `scripts/build_dashboard.py`가 라이브러리로 강남 핵심부 격자 점수를 계산해
46
+ **단일 HTML 대시보드**([`docs/dashboard/index.html`](docs/dashboard/index.html))를 생성한다.
47
+ Leaflet 코로플레스(보행성/15분도시 토글) + POI 카테고리 필터 + 분포 차트로 구성된다.
48
+
49
+ ```bash
50
+ python scripts/fetch_osm_data.py # OSM 실제 POI·보행망 수집
51
+ python scripts/build_dashboard.py # 데이터 계산 + 대시보드 생성
52
+ # docs/dashboard/index.html 을 브라우저로 열기 (또는 GitHub Pages 배포)
53
+ ```
54
+
55
+ 배포 대시보드는 [`data/actual/`](data/actual/)의 최신 OSM 스냅샷을 사용한다. `data/sample/`은
56
+ 라이브러리 테스트와 오프라인 재현용으로만 유지한다.
57
+
58
+ ## 🧭 방법론
59
+
60
+ `docs/ARCHITECTURE.md`에 수식과 참고문헌이 정리되어 있다.
61
+
62
+ 1. **Walkability**: POI 카테고리 가중치 × 거리감쇠 → 0–100 (Walk Score 한국 적응)
63
+ 2. **2SFCA**: 2단계 유동 집수구역, 의료 형평성 분석 표준
64
+ 3. **15-Minute City**: 6대 생활 카테고리 15분 도보 도달 개수 (0–6)
65
+ 4. **Isochrone**: 도로망 그래프 travel-time ego-graph → 볼록껍질 등시선
66
+
67
+ ## 🧪 사례 연구 (방법론 데모)
68
+
69
+ 아래는 저자가 동일 방법론을 적용/제안한 도시계획 맥락이다. 코드 저장소는 방법론을
70
+ 재현하는 라이브러리와 강남 데모를 제공한다(고객 데이터는 비공개).
71
+
72
+ | 사례 | 맥락 | 방법 |
73
+ |------|------|------|
74
+ | 수원 군공항 이전 영향 | 연구 제안 | Buffer 분석, DID |
75
+ | 김포 스마트 재생 타당성 | 정책 검토 | 접근성 지수, 비용편익 |
76
+ | 부천역세권 개발 | 지자체 맥락 | 토지이용 분석 |
77
+
78
+ ## 🛠 Tech Stack
79
+
80
+ - **GIS Core:** GeoPandas, Shapely, pyproj, Fiona, Rasterio
81
+ - **Network:** OSMnx, NetworkX, Pandana
82
+ - **Spatial Stats:** libpysal, esda
83
+ - **Visualization:** Folium, Kepler.gl, Matplotlib, Leaflet + Chart.js (대시보드)
84
+ - **APIs (로드맵):** V-World, KOSIS, NSDI
85
+
86
+ ## 📁 Repository Structure
87
+
88
+ ```
89
+ smart-city-gis/
90
+ ├── .github/workflows/ci.yml # pytest 자동화 (3.11/3.12)
91
+ ├── pyproject.toml # 패키지 메타데이터 (pip install 지원)
92
+ ├── CHANGELOG.md # 버전별 변경 기록
93
+ ├── src/smartcity_gis/
94
+ │ ├── geometry.py # create_fishnet 격자 생성
95
+ │ ├── walkability.py # 보행성·다양성·밀도
96
+ │ ├── accessibility.py # 2SFCA·gravity·isochrone·15분도시
97
+ │ ├── visualization.py # PNG/Folium/GeoJSON export
98
+ │ └── api_clients.py # 공공 API 래퍼 (로드맵)
99
+ ├── scripts/fetch_osm_data.py # OSM 실데이터 수집
100
+ ├── scripts/build_dashboard.py # 대시보드 빌더
101
+ ├── notebooks/01_walkability_gangnam.ipynb
102
+ ├── data/actual/ # 배포용 OSM 실제 스냅샷
103
+ ├── data/sample/ # 테스트용 강남 샘플 GeoJSON
104
+ ├── docs/
105
+ │ ├── ARCHITECTURE.md # 방법론·수식
106
+ │ ├── data_dictionary.md # 데이터 스키마
107
+ │ ├── crs_reference.md # 좌표계 가이드
108
+ │ └── dashboard/index.html # 인터랙티브 대시보드
109
+ ├── tests/ # pytest (직선거리·통계 검증)
110
+ ├── requirements.txt
111
+ └── LICENSE
112
+ ```
113
+
114
+ ## 🚀 Quick Start
115
+
116
+ ```bash
117
+ pip install "smartcity-gis[dev]" # PyPI 설치 (개발용 extras 포함)
118
+
119
+ # 또는 소스에서 직접:
120
+ git clone https://github.com/DongsooJung/smart-city-gis.git
121
+ cd smart-city-gis
122
+ pip install -r requirements.txt
123
+ pytest tests/ -v # 검증
124
+ python scripts/fetch_osm_data.py # OSM 실제 데이터 갱신
125
+ python scripts/build_dashboard.py # 대시보드 생성
126
+ ```
127
+
128
+ ## 📄 License
129
+
130
+ MIT License
131
+
132
+ ## 👤 Author
133
+
134
+ **Dongsoo Jung** — Ph.D. Candidate, Seoul National University
135
+ Smart City Engineering · Civil & Environmental Engineering
136
+
137
+
138
+ ## 2026-10-31 수집·해석 범위 개정
139
+
140
+ - 기존 수집기의 변환 경로를 유지하며 읽기 전용 Overpass로 조회한다. 네 응답의 실제 수신 시각·DB 기준 시각·질의·해시를 metadata.json에 기록한다. 원응답은 기본 data/raw/osm(버전관리 제외), 또는 --raw-dir에 보관한다. 수집일은 현장 관측일·월간 통계 기준월이 아니다.
141
+ - POI는 연구 직사각형 안의 OSM 태그 노드다. 같은 좌표의 서로 다른 노드 ID를 합치지 않고, 경계 응답에 반복된 같은 ID만 중복 제거한다. way/relation으로 등록된 시설과 현장 영업 여부는 조사하지 않았다. 도로 그래프는 선택 highway의 중복 way/무방향 간선을 제거한다. 이전 좌표·분류별 중복 제거 저장본과 개수 증가율을 만들지 않는다.
142
+ - 연구 직사각형은 강남역 주변이며 강남구 행정경계가 아니다. 경계 밖 POI를 포함하지 않아 가장자리 효과가 있다. 보행성은 카테고리별 최근접 POI의 지수 감쇠(400m)와 1600m 한계를 사용해 가중치 합으로 정규화한 자체 지표이며 공식 Walk Score 인증값이 아니다.
143
+ - 생활 접근 0~6은 여섯 분류의 최근접 직선거리 1125m 이내 여부다(4.5km/h × 15분 가정). 실제 도보시간 검증값이 아니다. 도로망 근사권은 선택 무방향 그래프에서 5/10/15/20분 내 도달노드의 볼록껍질이며 통행권·횡단·출입구 연결은 전수 검증하지 않았다.
144
+ - 가공 생성일과 수집일을 분리하고 개소연도를 임의로 붙이지 않는다. docs/dashboard/data/에 같은 실행의 격자 CSV/GeoJSON·POI·그래프·근사권·요약·출처 JSON을 함께 생성한다. 완전한 네 응답을 확보하지 못하면 기존 수집 입력을 교체하지 않는다.
145
+
146
+ 재현: `python scripts/fetch_osm_data.py --raw-dir data/raw/osm` 후 `python scripts/build_dashboard.py`, `pytest tests/`를 실행한다. 원자료 응답이 달라지는 재수집과 저장본의 오프라인 재계산을 구분한다.
@@ -0,0 +1,94 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "smartcity-gis"
7
+ dynamic = ["version"]
8
+ description = "GIS-based urban analytics for smart city planning: walkability, 2SFCA accessibility, isochrones and 15-minute city scores for Korean cities"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.11"
12
+ authors = [
13
+ { name = "Dongsoo Jung", email = "jds068888@gmail.com" },
14
+ ]
15
+ keywords = [
16
+ "gis",
17
+ "walkability",
18
+ "2sfca",
19
+ "accessibility",
20
+ "15-minute-city",
21
+ "urban-analytics",
22
+ "smart-city",
23
+ "korea",
24
+ "geopandas",
25
+ "osmnx",
26
+ ]
27
+ classifiers = [
28
+ "Development Status :: 4 - Beta",
29
+ "Intended Audience :: Science/Research",
30
+ "Intended Audience :: Developers",
31
+ "License :: OSI Approved :: MIT License",
32
+ "Operating System :: OS Independent",
33
+ "Programming Language :: Python :: 3",
34
+ "Programming Language :: Python :: 3.11",
35
+ "Programming Language :: Python :: 3.12",
36
+ "Topic :: Scientific/Engineering :: GIS",
37
+ ]
38
+ # Runtime core deps kept minimal for a light install.
39
+ # Note: scipy is required (accessibility.py uses scipy.spatial.distance.cdist)
40
+ # but was missing from requirements.txt -- fixed here.
41
+ dependencies = [
42
+ "geopandas>=0.14.0",
43
+ "shapely>=2.0.0",
44
+ "pyproj>=3.6.0",
45
+ "pandas>=2.1.0",
46
+ "numpy>=1.26.0",
47
+ "scipy>=1.11.0",
48
+ "networkx>=3.2.0",
49
+ "requests>=2.31.0",
50
+ "python-dotenv>=1.0.0",
51
+ ]
52
+
53
+ [project.optional-dependencies]
54
+ network = [
55
+ "osmnx>=1.7.0",
56
+ "pandana>=0.7",
57
+ ]
58
+ viz = [
59
+ "matplotlib>=3.8.0",
60
+ "folium>=0.15.0",
61
+ "contextily>=1.4.0",
62
+ "plotly>=5.18.0",
63
+ ]
64
+ stats = [
65
+ "libpysal>=4.8.0",
66
+ "esda>=2.5.0",
67
+ "pointpats>=2.4.0",
68
+ "rasterio>=1.3.0",
69
+ "fiona>=1.9.0",
70
+ ]
71
+ dev = [
72
+ "pytest>=7.4.0",
73
+ "black>=23.12.0",
74
+ "ruff>=0.1.9",
75
+ "mypy>=1.7.0",
76
+ "jupyter>=1.0.0",
77
+ "ipykernel>=6.27.0",
78
+ "nbformat>=5.9.0",
79
+ ]
80
+
81
+ [project.urls]
82
+ Homepage = "https://github.com/DongsooJung/smart-city-gis"
83
+ Repository = "https://github.com/DongsooJung/smart-city-gis"
84
+ Issues = "https://github.com/DongsooJung/smart-city-gis/issues"
85
+ Changelog = "https://github.com/DongsooJung/smart-city-gis/blob/main/CHANGELOG.md"
86
+
87
+ [tool.setuptools]
88
+ package-dir = { "" = "src" }
89
+
90
+ [tool.setuptools.packages.find]
91
+ where = ["src"]
92
+
93
+ [tool.setuptools.dynamic]
94
+ version = { attr = "smartcity_gis.__version__" }
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,45 @@
1
+ """
2
+ Smart City GIS Analytics
3
+
4
+ 스마트시티 정책 시뮬레이션·도시 인프라 분석을 위한 GIS 도구 모음.
5
+
6
+ 주요 분석:
7
+ - Walkability (보행성 지수)
8
+ - Accessibility (접근성: 2SFCA / gravity / isochrone)
9
+ - 15-Minute City (15분 도시 지수)
10
+ - Land Use Mix (토지이용 다양성)
11
+
12
+ 데이터 소스:
13
+ - NSDI (국가공간정보포털): https://www.nsdi.go.kr
14
+ - V-World (브이월드): http://map.vworld.kr
15
+ - KOSIS (통계청): https://kosis.kr
16
+ - OpenStreetMap (osmnx)
17
+
18
+ 사용 예:
19
+ >>> from smartcity_gis import create_fishnet, compute_walkability
20
+ >>> grid = create_fishnet(boundary, cell_size=100)
21
+ >>> walk = compute_walkability(grid, amenities)
22
+ >>> from smartcity_gis import AccessibilityAnalyzer, fifteen_min_city_score
23
+ >>> score = fifteen_min_city_score(grid, amenities)
24
+ """
25
+
26
+ __version__ = "0.2.0"
27
+ __author__ = "Dongsoo Jung"
28
+ __email__ = "jds068888@gmail.com"
29
+
30
+ from smartcity_gis.geometry import create_fishnet # noqa: F401
31
+ from smartcity_gis.walkability import compute_walkability # noqa: F401
32
+ from smartcity_gis.accessibility import ( # noqa: F401
33
+ AccessibilityAnalyzer,
34
+ fifteen_min_city_score,
35
+ )
36
+ from smartcity_gis.api_clients import NSDIClient, VWorldClient # noqa: F401
37
+
38
+ __all__ = [
39
+ "create_fishnet",
40
+ "compute_walkability",
41
+ "AccessibilityAnalyzer",
42
+ "fifteen_min_city_score",
43
+ "NSDIClient",
44
+ "VWorldClient",
45
+ ]