1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { manchesterBerylStationStatus } from "https://esm.town/v/neverstew/manchesterBerylStationStatus";
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
export let manchesterBerylStations = fetchJSON(
"https://gbfs.beryl.cc/v2_2/Greater_Manchester/station_information.json",
).then((data) =>
data.data.stations.map((station) => {
const { station_id, name, lat, lon, capacity } = station;
const stationStatus =
manchesterBerylStationStatus[station.station_id];
const { num_bikes_available, num_docks_available } = stationStatus;
return ({
station_id,
name,
lat,
lon,
capacity,
num_bikes_available,
num_docks_available,
});
})
);