Python 데이터 시각 화 pyecharts 기반 지리 도표 그리 기
바 이 두 지도 설 인구 이동 빅 데이터(바 이 두 이동 으로 약칭)는 바 이 두 가 2014 년 춘 운 기간 에 내 놓 은 기술 프로젝트 이다.바 이 두 이전 은 빅 데 이 터 를 이용 하여 자신 이 가지 고 있 는 LBS(지리 적 위 치 를 바탕 으로 하 는 서비스)빅 데 이 터 를 계산 분석 하고 시각 화 된 표현 방식 으로 중국 설 전후 인구 대 이동 의 궤적 과 특징 을 동태 적 이 고 실시 간 이 며 직관 적 으로 보 여 준다.
사이트 주소:https://qianxi.baidu.com/2021/
기초 문법 소개
문법
설명 하 다.
from pyecharts.charts import Geo
지도 라 이브 러 리 가 져 오기
Geo()
Pyecharts 지리 도표 그리 기
.add_map(maptype=“china“)
지도 종류
.add()
데이터 추가
.set_global_opts()
전역 설정 항목 설정
3.중국 지도 제작
인 스 턴 스 코드:
from pyecharts.charts import Geo
import pyecharts.options as opts
from commons import Faker
(
Geo()
.add_schema(maptype='china') #
.add(series_name='', data_pair=[(i, j) for i, j in zip(Faker.provinces, Faker.values())])
.set_global_opts(
title_opts=opts.TitleOpts(title=' '),
visualmap_opts=opts.VisualMapOpts(
# is_piecewise=True #
)
)
).render()
실행 결과:4.중국 지도(특수효과 산포도)
인 스 턴 스 코드:
from pyecharts.charts import Geo
import pyecharts.options as opts
from pyecharts.globals import ChartType
from commons import Faker
(
Geo()
.add_schema(maptype='china') #
.add(series_name='', data_pair=[(i, j) for i, j in zip(Faker.provinces, Faker.values())],
type_=ChartType.EFFECT_SCATTER)
.set_global_opts(
title_opts=opts.TitleOpts(title=' ( )'),
visualmap_opts=opts.VisualMapOpts(
is_piecewise=True
)
)
).render()
실행 결과:5.중국 인구 지리 이동 도 그리 기
인 스 턴 스 코드:
from pyecharts.charts import Geo
from pyecharts.globals import ChartType, SymbolType
import pyecharts.options as opts
# ( )
city_num = [(' ', 105), (' ', 70), (' ', 99), (' ', 80)]
start_end = [(' ', ' '), (' ', ' '), (' ', ' ')]
(
Geo()
.add_schema(maptype='china', itemstyle_opts=opts.ItemStyleOpts(color='#323c48', border_color='#111')) #
.add('', data_pair=city_num, color='white') # ( )
.add('', data_pair=start_end, type_=ChartType.LINES, #
effect_opts=opts.EffectOpts(symbol=SymbolType.ARROW,color='blue', symbol_size=7)) #
).render()
실행 결과:6.열력 도:광동 지도 열력 도 그리 기 1
인 스 턴 스 코드:
from pyecharts.faker import Faker
from pyecharts import options as opts
from pyecharts.charts import Geo
from pyecharts.globals import ChartType
c = (
Geo()
.add_schema(maptype=" ", itemstyle_opts=opts.ItemStyleOpts(color="#323c48", border_color="#111"),)
.add("",[list(z) for z in zip(Faker.guangdong_city, Faker.values())],type_=ChartType.HEATMAP)
.set_global_opts(
visualmap_opts=opts.VisualMapOpts(),
title_opts=opts.TitleOpts(title=" "),
)
)
c.render()
실행 결과:7.열력 도:광동 지도 열력 도 그리 기 2
인 스 턴 스 코드:
from pyecharts.charts import Map
from pyecharts import options as opts
from pyecharts.globals import ChartType
c = (
Map()
.add('', [list(z) for z in zip(Faker.guangdong_city, Faker.values())], " ")
.set_global_opts(
title_opts=opts.TitleOpts(title="Map- "),
visualmap_opts=opts.VisualMapOpts(),
)
)
c.render()
실행 결과:파 이 썬 데이터 시각 화 에 관 한 pyecharts 기반 지리 도표 그리 기 에 관 한 글 은 여기까지 입 니 다.더 많은 관련 pyecharts 지리 도표 그리 기 내용 은 우리 의 이전 글 을 검색 하거나 아래 의 관련 글 을 계속 조회 하 시기 바 랍 니 다.앞으로 많은 관심 을 가 져 주 십시오!
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Python의 None과 NULL의 차이점 상세 정보그래서 대상 = 속성 + 방법 (사실 방법도 하나의 속성, 데이터 속성과 구별되는 호출 가능한 속성 같은 속성과 방법을 가진 대상을 클래스, 즉 Classl로 분류할 수 있다.클래스는 하나의 청사진과 같아서 하나의 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.