Olist store의 공공데이터를 활용해 위도, 경도로 지도 시각화하기
https://www.kaggle.com/datasets/olistbr/brazilian-ecommerce
Brazilian E-Commerce Public Dataset by Olist
100,000 Orders with product, customer and reviews info
www.kaggle.com
table[olist_customers_dataset]
- customer_id : 주문 ID
- customer_unique_id : 고객 ID
- customer_zip_code_prefix : 고객 우편번호 앞 5자리 📭
- customer_city : 고객 주소 (도시)
- customer_state : 고객 주소 (주)
table[olist_sellers_dataset]
- seller_id : 판매자 ID
- seller_zip_code_prefix : 판매자 우편번호 앞 5자리 📭
- seller_city : 판매자 위치 (도시)
- seller_state : 판매자 위치 (주)
table[olist_geolocation_dataset]
- geolocation_zip_code_prefix : 우편번호 앞 5자리 📭
- geolocation_lat : 위도
- geolocation_lng : 경도
- geolocation_city : 도시
- geolocation_state : 주
1. 데이터를 불러와서 우편번호 기준으로 결합하기
데이터간 관계는 geolocation_zip_code_prefix = customer_zip_code_prefix = geolocation_zip_code_prefix
2. 지리적 역할 변경
geolocation_lat (위도)를 마우스 오른쪽 버튼 > Geographic Role(지리적 역할) > Latitude(위도)를 선택
geolocation_lng (경도)를 마우스 오른쪽 버튼 > Geographic Role(지리적 역할) > Longitude(경도)를 선택
3. 열, 행 지정
Geolocation lat 을 열 으로 끌어옵니다.
Geolocation lat 를 행 으로 끌어옵니다.
※ 반대로 하면 맵이 생성 안됨
4. 고객 ID를 추가해서 고객 위치 보기
customer Id를 색상정보 로 끌어옵니다.
➡️ Olist store는 브라질의 스토어이기때문에 고객(customer)이 브라질에 몰려있습니다.
Seller Id를 색상정보 로 끌어옵니다.
➡️ Olist의 판매자(seller) 또한 대부분 오프라인 판매자이기때문에 브라질에 몰려있습니다.
5. Null 값 제외
오른쪽 범례안에 null위에 마우스 올려두고 🚫제외 클릭
'🛠️Skill' 카테고리의 다른 글
[Tableau] 워드클라우드, 박스플롯, 계산된 필드 만들기 (0) | 2023.06.14 |
---|---|
[Tableau] 평균구하기, 트리맵, 산점도, 맵 (0) | 2023.06.14 |
[Tableau] 넷플릭스 이용현황 대시보드 만들기 (0) | 2023.05.13 |
댓글