Code Monkey home page Code Monkey logo

ghilbut / test-kakaobank-2020.03 Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 2.0 1.28 MB

카카오뱅크 입사 과제 / 서울열린데이터 광장의 ‘서울시 공영주차장 안내 정보'를 활용해서 주차 가능한 주차장을 찾을 수 있는 서비스 구현

License: MIT License

HCL 45.93% Dockerfile 2.17% Python 32.90% JavaScript 1.65% HTML 1.02% Vue 13.10% TypeScript 3.24%
django django-rest-framework django-docker uwsgi-nginx uwsgi-nginx-docker vue vuejs vuejs2 vuetify vuetifyjs

test-kakaobank-2020.03's People

Contributors

ghilbut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

asmtal kimgsungsu

test-kakaobank-2020.03's Issues

[Django] crawling 기능에서 테스트를 위해 설정한 값들을 변경한다.

Open API 결과에서 중복된 공영주차장을 제거한다.

아래와 같이 API를 호출하여 100개의 주차장 정보를 요청하였을 때,

아래의 주차장이 25번 중복되어 있는 것을 발견하였다.

  • [1191037] 동부청과(시)

즉, 100개의 목록을 요청하였으나 데이터베이스에는 76개의 데이터만 저장되었다.
따라서, 중복된 내용을 제거한 후 데이터베이스를 업데이트 한다.

[Django] 리팩토링

  • service.models 패키지의 ParkingLot 클래스 이름을 ParkingLotModel로 변경한다.

Django에서 오픈 API로 주차장 정보 수집

OpenAPI에서 공영주차장 정보를 수집하여 데이터베이스에 복사한다.

  • CRON 등으로 조작 가능하도록 별도의 커맨드로 분리한다.
  • OpenAPI로 정보를 가져온다.
  • 데이터베이스에 존재하지 않는 주차장 정보는 생성한다.
  • 데이터베이스와 다른 주차장 정보는 업데이트 한다.
  • 데이터베이스에 있으나 OpenAPI에 없는 주차장 정보는 삭제한다.

전화번호 필드 정규화

전화번호의 표현식이 통일되어 있지 않고,
전화번호가 없거나 복수의 전화번호를 갖는 곳도 있다.
1:n 형태가 되도록 테이블을 분리한다.

전화번호에 대하여 공영주차장과 1:n 관계 모델로 분리하려 했으나
우선은 필드의 표현식을 바꾸고 varchar 필드에 대한 문자열 탐색 정도로 동작을 확인해 본다.

[Django] 현재 위치에서 가까운 순으로 정렬한다.

정렬에 필요한 데이터 처리 변경 + 크롤링 정책

주차 가능 시간과 주차 요금은 평일과 일요일, 공휴일에 따라 달라진다.
따라서 현재 시간과 로우데이터의 관계로 매번 계산하는 것은 무리가 있다.
매일 자정 크롤링 하면서, 해당 날짜에 맞는 주차 가능 시간과 요금테이블을 만든다면,
공공데이터 포털(https://www.data.go.kr/dataset/15012690/openapi.do)을 통해 공휴일을 확인하여
적절히 대응할 수 있을 것으로 기대된다.

요금테이블은 현재 시간에서 폐장시간까지 1시간 단위로 만든다.
검색 조건에서 예상 주차시간을 설정한다.

시간-요금 테이블 시간값은 다음과 같이 한다.

  • -1: 월정액
  • 0: 일 최대요금
  • 1: 1시간 요금
  • 2: 2시간 요금
  • 3: 3시간 요금
  • 4: 4시간 요금

연관 이슈들

  • #21 [Django] 예상요금 최소 주차장 순으로 정렬한다.
  • #35 [Vue.js] 현재 주차가능 여부를 표시한다.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.