A bike-share API (in the style of the GBFS standard) returns JSON like:
{"last_updated": "2026-03-02T08:15:00", "data": {"stations": [
{"id": "S1", "name": "Station North", "capacity": 20,
"location": {"lat": 28.01, "lon": 120.65}, "status": {"bikes": 5, "docks": 15}}, ...]}}
Read it from standard input, flatten the stations with pd.json_normalize, and print:
columns: id, name, capacity, location.lat, location.lon, status.bikes, status.docks- the table
name, status.bikes, capacity, fillsorted by fill (= bikes / capacity, 2 decimals), without index; empty stations: …(names with 0 bikes, ornone);system fill rate: 37.0%(total bikes / total capacity,:.1%);updated: ….