Skip to content
This repository has been archived by the owner on Apr 21, 2020. It is now read-only.

opencars/opencars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCars

CircleCI Go Report Card

Overview

RESTful API with information about transport just using Ukrainian License Plate.

Server

Download PostgreSQL dump before starting the server. NOTE: This file is pretty big (3.1 GB)

$ gsutil cp gs://opencars/cars.sql cars.sql

Import database to PostgreSQL

$ cat cars.sql | psql -U postgres

Run the server

$ go run cmd/server/main.go

API

$ http localhost:8080/transport?number="АА9359РС"
[
  {
    "address": "8036600000",
    "body": "УНІВЕРСАЛ-B",
    "brand": "TESLA",
    "capacity": 0,
    "color": "ЧОРНИЙ",
    "date": "05.06.2019",
    "description": "ПЕРЕРЕЄСТРАЦIЯ У ЗВ`ЯЗКУ ЗI ЗМIНОЮ АНКЕТНИХ ДАНИХ ВЛАСНИКА",
    "fuel": "ЕЛЕКТРО",
    "kind": "ЛЕГКОВИЙ",
    "model": "MODEL X",
    "number": "АА9359РС",
    "office_id": 12290,
    "office_name": "ТСЦ 8041",
    "operation": 340,
    "person": "P",
    "purpose": "ЗАГАЛЬНИЙ",
    "weight": 2485,
    "year": 2016,
    "vin": "5YJXCCE40GF010543"
  }
]

For more information see documentation.

Parser

Parse CSV files from data.gov.ua into one SQL dump.

$ go run cmd/parser/main.go -path=<PATH> # Path to CSV file

Data

All information was taken from official Ukrainian resource

License

Project released under the terms of the MIT license.