Loads and parses lists of stations, routes, timetables and ways-polylines of the Minsk public transport (Minsktrans company: bus, trolleybus, tram and metro).
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.
[
{
local_id: 14340,
name: "Филимонова",
lat: 53.92889,
lng: 27.63977
},
...
]
[
{
route_type: "bus",
route_number: "1",
route_name: "ДС Веснянка - Вокзал",
ways: [
{
local_id: 214500,
way_name: "ДС Веснянка - Вокзал",
stations_ids_list: [15846, 54756, 54757, ...]
},
...
]
},
...
]
[
{
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, ...
...
]
},
...
]
},
...
]
[
{
local_id: 52524,
polyline:
[
{ lat: 53.90686, lng: 27.43751 },
{ lat: 53.90632, lng: 27.44737 },
...
]
},
...
]