Skip to content

Минсктранс - Парсер остановок, маршрутов и расписания.

License

Notifications You must be signed in to change notification settings

pasvistelik/minsktrans-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minsktrans-parser

Loads and parses lists of stations, routes, timetables and ways-polylines of the Minsk public transport (Minsktrans company: bus, trolleybus, tram and metro).

Usage example:

npm i minsktrans-parser
import DataProvider from 'minsktrans-parser';

const stations = await DataProvider.getStations();
const routes = await DataProvider.getRoutes();
const times = await DataProvider.getTimes();
const routesPolylines = await DataProvider.getRoutesPolylines();

You also can run npm run save_json to save this objects as *.json files.

Results examples

Stations object

[
  {
    local_id: 14340,
    name: "Филимонова",
    lat: 53.92889,
    lng: 27.63977
  },
  ...
]

Routes object

[
  {
    route_type: "bus",
    route_number: "1",
    route_name: "ДС Веснянка - Вокзал",
    ways: [
      {
        local_id: 214500,
        way_name: "ДС Веснянка - Вокзал",
        stations_ids_list: [15846, 54756, 54757, ...]
      },
      ...
    ]
  },
  ...
]

Times object

[
  {
    way_id: 214500,
    trips_by_days: [
      {
        days_of_week: [0,6],
        arrives: [
          [340, 355, 370, 385, 400, 412, ...], // times (in minutes) of arrives to first station of way
          [342, 357, 372, 387, 402, 414, ...], // to second station of way, ...
          ...
        ]
      },
      ...
    ]
  },
  ...
]

Ways polylines object

[
  {
    local_id: 52524,
    polyline:
    [
      { lat: 53.90686, lng: 27.43751 },
      { lat: 53.90632, lng: 27.44737 },
      ...
    ]
  },
  ...
]

About

Минсктранс - Парсер остановок, маршрутов и расписания.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published