Skip to content

eunnseo/elastic-demos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elastic-demos

elastic stack을 이용한 서울시 지하철 대시보드 만들기

https://github.com/eskrug/elastic-demos

1. 공공데이터로부터 추출, 색인, 매핑 및 템플릿 설정

공공 데이터

서울 열린 데이터 광장 에서 서울교통공사 연도별 일별 시간대별 역별 승하차 인원 데이터 사용

  • 데이터 색인 완료 후 아래 명령으로 확인
GET seoul-metro-logs-2018/_count

count

  • 데이터 내용 확인
GET seoul-metro-logs-2018/_search

data

  • seoul-metro-logs* 템플릿 생성
PUT _template/seoul-metro
{
  "order": 5,
  "index_patterns": [
    "seoul-metro-logs*"
  ],
  "settings": {
    "number_of_shards": 2
  },
  "mappings": {
    "properties": {
      "@timestamp": {
        "type": "date"
      },
      "code": {
        "type": "keyword"
      },
      "line_num": {
        "type": "keyword"
      },
      "line_num_en": {
        "type": "keyword"
      },
      "location": {
        "type": "geo_point"
      },
      "people": {
        "properties": {
          "in": {
            "type": "integer"
          },
          "out": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        }
      },
      "station": {
        "properties": {
          "name": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          }
        }
      }
    }
  }
}

2. Kibana 대시보드

Run

$ docker-compose up

Stop

$ docker-compose down

Port Forwarding

Host Container Service
5601 5601 kibana

호선 승하차 인원 역명 리스트

kibana_list

2018-01-01 ~ 2019-01-01 서울 지하철 대시보드

final_year

2018-05-08 ~ 2018-05-24 강남, 역삼, 선릉, 삼성역 대시보드

final_search

  • 오전과 오후 승하차 인원의 뚜렷한 차이를 확인할 수 있다.
  • 주말 대비 주중 승하차 인원이 더 많은 것을 확인할 수 있다.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors