티스토리 뷰
지도 시각화
GeoPandas
!pip install geopandas
import pandas as pd
import geopandas as gpd
import matplotlib.pyplot as plt
path = '/content/drive/MyDrive/NLP_project/프로젝트 #1/project/data/'
test = pd.read_csv(f'{path}map/count.csv')
kr_sido = gpd.read_file(f'{path}map/a', encoding='cp949')
kr_sido = kr_sido.merge(test, on='CTP_KOR_NM')
kr_sido
from mpl_toolkits.axes_grid1 import make_axes_locatable
fig, ax = plt.subplots(figsize=(15, 15),
facecolor='white')
ax.axis('off')
kr_sido.plot(column='count',
cmap='coolwarm',
ax=ax,
alpha=.4,
)
plt.show()
외각선 추가
kr_sido.boundary.plot(ax=ax, color='white')
from mpl_toolkits.axes_grid1 import make_axes_locatable
fig, ax = plt.subplots(figsize=(15, 15),
facecolor='white')
ax.axis('off')
############################################
kr_sido.boundary.plot(ax=ax, color='white')#
############################################
kr_sido.plot(column='count',
cmap='coolwarm',
ax=ax,
alpha=.4,
)
plt.show()
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- print()
- _meaning
- underscore
- 덮어쓰기
- 파이썬 변수
- 재귀함수 설명
- Python
- list comprehension
- 콘다
- 연산속도
- asd ad
- 백준
- _의미
- arguments
- recursive function
- 파이썬
- 재귀?
- 재귀함수 이해
- anaconda
- matplotlib
- sad asd
- d asd asd
- 이중 프린트
- recursive
- sdsad
- 이스케이프 코드
- parameters
- sep=
- conda
- 변수 덮어쓰기
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함