Inspired by Dynamic Dave's "trainspotting" exercise, I am (again) making a departures board for railway stations.
Looking at the result without any styling overrides, it's very plain.
Clearly it can be enhanced, I just wondered how other Node-red fans would choose to display this data.
Here is the flow. I've included a bit of test data if anyone is interested but doesn't have a National Rail API key.
The stations are on the Oban and Mallaig routes, because who wouldn't want to make a trip to Rannoch Moor or Tyndrum Lower?
[{"id":"3fd2634d3eb8f47a","type":"tab","label":"Trains","disabled":false,"info":"","env":[]},{"id":"bec02064d7a5561c","type":"group","z":"3fd2634d3eb8f47a","name":"Departures Board - OpenLDBWS","style":{"label":true},"nodes":["3bb4cb26ff0d939a","32c367f59dd1d710","093b5812120c1d5d","b47efe72d2b80320","05bc265edbfe70be","b3469892d693bca6","418cb8f916d2027c"],"x":54,"y":119,"w":872,"h":122},{"id":"492283bddca59038","type":"group","z":"3fd2634d3eb8f47a","name":"Setup Station List","style":{"label":true},"nodes":["fdfbc56a0a08725a","c4279fd4b756290b","92053ffc3885fcfd","0f119829361b7add"],"x":54,"y":19,"w":632,"h":82},{"id":"fd6a03d270cd37e7","type":"group","z":"3fd2634d3eb8f47a","name":"Sample Data","style":{"label":true},"nodes":["de44c4077af65e98","c6eb178668784c60"],"x":54,"y":259,"w":352,"h":82},{"id":"3bb4cb26ff0d939a","type":"natrail","z":"3fd2634d3eb8f47a","g":"bec02064d7a5561c","name":"","scode":"","destscode":"","property":"payload","api":"02f91ae2b9002a87","x":150,"y":160,"wires":[["093b5812120c1d5d","05bc265edbfe70be"]]},{"id":"32c367f59dd1d710","type":"function","z":"3fd2634d3eb8f47a","g":"bec02064d7a5561c","name":"Select fields","func":"let payload = msg.payload;\nmsg.payload = {\n Destination: payload.destination.name,\n Due: payload.std,\n Expected: payload.etd,\n Platform: payload.platform,\n}\nmsg.topic = payload.serviceId\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":490,"y":200,"wires":[["b47efe72d2b80320"]]},{"id":"093b5812120c1d5d","type":"split","z":"3fd2634d3eb8f47a","g":"bec02064d7a5561c","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":330,"y":200,"wires":[["32c367f59dd1d710"]]},{"id":"b47efe72d2b80320","type":"join","z":"3fd2634d3eb8f47a","g":"bec02064d7a5561c","name":"","mode":"auto","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":650,"y":200,"wires":[["418cb8f916d2027c"]]},{"id":"05bc265edbfe70be","type":"switch","z":"3fd2634d3eb8f47a","g":"bec02064d7a5561c","name":"Empty?","property":"payload","propertyType":"msg","rules":[{"t":"empty"}],"checkall":"true","repair":false,"outputs":1,"x":340,"y":160,"wires":[["b3469892d693bca6"]]},{"id":"b3469892d693bca6","type":"function","z":"3fd2634d3eb8f47a","g":"bec02064d7a5561c","name":"\"No service\"","func":"msg.payload = [{\n Destination: \"No Service\",\n}]\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":160,"wires":[["418cb8f916d2027c"]]},{"id":"418cb8f916d2027c","type":"ui_table","z":"3fd2634d3eb8f47a","g":"bec02064d7a5561c","group":"53edc9958407538c","name":"Departure Board","order":0,"width":"12","height":"6","columns":[],"outputs":0,"cts":false,"x":820,"y":160,"wires":[]},{"id":"fdfbc56a0a08725a","type":"ui_dropdown","z":"3fd2634d3eb8f47a","g":"492283bddca59038","name":"","label":"Station","tooltip":"","place":"Select option","group":"d129285e4b08a665","order":1,"width":"0","height":"0","passthru":true,"multiple":false,"options":[],"payload":"","topic":"topic","topicType":"msg","className":"","x":420,"y":60,"wires":[["0f119829361b7add"]]},{"id":"c4279fd4b756290b","type":"function","z":"3fd2634d3eb8f47a","g":"492283bddca59038","name":"","func":"msg.options = [{\"Ardlui \":\"AUI\"},\n{\"Arisaig \":\"ARG\"},\n{\"Arrochar & Tarbert \":\"ART\"},\n{\"Banavie \":\"BNV\"},\n{\"Beasdale \":\"BSL\"},\n{\"Bridge of Orchy \":\"BRO\"},\n{\"Connel Ferry \":\"CON\"},\n{\"Corpach \":\"CPA\"},\n{\"Corrour \":\"CRR\"},\n{\"Crianlarich \":\"CNR\"},\n{\"Dalmally \":\"DAL\"},\n{\"Dalmuir \":\"DMR\"},\n{\"Dumbarton Central \":\"DBC\"},\n{\"Fort William \":\"FTW\"},\n{\"Garelochhead \":\"GCH\"},\n{\"Glasgow Queen Street \":\"GLQ\"},\n{\"Glenfinnan \":\"GLF\"},\n{\"Helensburgh Upper \":\"HLU\"},\n{\"Lochailort \":\"LCL\"},\n{\"Loch Awe \":\"LHA\"},\n{\"Loch Eil Outward Bound \":\"LHE\"},\n{\"Locheilside \":\"LCS\"},\n{\"Mallaig \":\"MLG\"},\n{\"Morar \":\"MRR\"},\n{\"Oban \":\"OBN\"},\n{\"Rannoch \":\"RAN\"},\n{\"Roy Bridge \":\"RYB\"},\n{\"Spean Bridge \":\"SBR\"},\n{\"Taynuilt \":\"TAY\"},\n{\"Tulloch \":\"TUL\"},\n{\"Tyndrum Lower \":\"TYL\"},\n{\"Upper Tyndrum \":\"UTY\"},\n];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":280,"y":60,"wires":[["fdfbc56a0a08725a"]]},{"id":"92053ffc3885fcfd","type":"inject","z":"3fd2634d3eb8f47a","g":"492283bddca59038","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"go","payloadType":"str","x":150,"y":60,"wires":[["c4279fd4b756290b"]]},{"id":"0f119829361b7add","type":"change","z":"3fd2634d3eb8f47a","g":"492283bddca59038","name":"","rules":[{"t":"set","p":"station","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":60,"wires":[["3bb4cb26ff0d939a"]]},{"id":"de44c4077af65e98","type":"function","z":"3fd2634d3eb8f47a","g":"fd6a03d270cd37e7","name":"","func":"msg.payload =[{\"std\":\"14:55\",\"etd\":\"On time\",\"platform\":\"8\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"L147ErXMszp5ov0xNUqDmA==\",\"origin\":{\"name\":\"Edinburgh\",\"crs\":\"EDB\"},\"destination\":{\"name\":\"Helensburgh Central\",\"crs\":\"HLC\"}},\n{\"std\":\"14:00\",\"etd\":\"On time\",\"platform\":\"4\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"h2K/HSMAiDcwXQ7KuGbVUw==\",\"rsid\":\"SR428600\",\"origin\":{\"name\":\"Glasgow Queen Street\",\"crs\":\"GLQ\"},\"destination\":{\"name\":\"Edinburgh\",\"crs\":\"EDB\"}},\n{\"std\":\"14:07\",\"etd\":\"On time\",\"platform\":\"9\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"/hX5fBuhljgrTu9K9xNIZQ==\",\"origin\":{\"name\":\"Partick\",\"crs\":\"PTK\"},\"destination\":{\"name\":\"Springburn\",\"crs\":\"SPR\"}},\n{\"std\":\"14:15\",\"etd\":\"On time\",\"platform\":\"9\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"kVdqLAqyiERVZkTn2Vq9KA==\",\"origin\":{\"name\":\"Helensburgh Central\",\"crs\":\"HLC\"},\"destination\":{\"name\":\"Edinburgh\",\"crs\":\"EDB\"}},\n{\"std\":\"14:16\",\"etd\":\"On time\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"p3wwREWYDgRjVyMbJsQNgQ==\",\"origin\":{\"name\":\"Glasgow Queen Street\",\"crs\":\"GLQ\"},\"destination\":{\"name\":\"Alloa\",\"crs\":\"ALO\"}},\n{\"std\":\"14:25\",\"etd\":\"On time\",\"platform\":\"8\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"tQ5TSAszmE1Uy589SCE61w==\",\"origin\":{\"name\":\"Edinburgh\",\"crs\":\"EDB\"},\"destination\":{\"name\":\"Helensburgh Central\",\"crs\":\"HLC\"}},\n{\"std\":\"14:26\",\"etd\":\"On time\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"uaZz1VhAhDPvl6EhT8Ix6g==\",\"origin\":{\"name\":\"Glasgow Queen Street\",\"crs\":\"GLQ\"},\"destination\":{\"name\":\"Cumbernauld\",\"crs\":\"CUB\"}},\n{\"std\":\"14:30\",\"etd\":\"On time\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"whotXv2qnkYJ22dq8ORe2Q==\",\"origin\":{\"name\":\"Glasgow Queen Street\",\"crs\":\"GLQ\"},\"destination\":{\"name\":\"Edinburgh\",\"crs\":\"EDB\"}},\n{\"std\":\"14:33\",\"etd\":\"On time\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"lr442VWAGOmTTJOwVSJOjg==\",\"origin\":{\"name\":\"Glasgow Queen Street\",\"crs\":\"GLQ\"},\"destination\":{\"name\":\"Anniesland\",\"crs\":\"ANL\"}},\n{\"std\":\"14:38\",\"etd\":\"On time\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"NAAgsCP/7WR/m4M/4/6RZw==\",\"rsid\":\"SR045400\",\"origin\":{\"name\":\"Glasgow Queen Street\",\"crs\":\"GLQ\"},\"destination\":{\"name\":\"Elgin\",\"crs\":\"ELG\"}},\n{\"std\":\"14:39\",\"etd\":\"On time\",\"platform\":\"8\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"wr0Gtvg5hM81q23CmQQOdg==\",\"origin\":{\"name\":\"Springburn\",\"crs\":\"SPR\"},\"destination\":{\"name\":\"Partick\",\"crs\":\"PTK\"}},\n{\"std\":\"14:44\",\"etd\":\"On time\",\"platform\":\"9\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"w/U0Mx1JmLx7/WUiV/aGGg==\",\"origin\":{\"name\":\"Helensburgh Central\",\"crs\":\"HLC\"},\"destination\":{\"name\":\"Edinburgh\",\"crs\":\"EDB\"}},\n{\"std\":\"14:50\",\"etd\":\"On time\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"AXiCxT1wkyDQDm7EMRI4Xw==\",\"rsid\":\"SR025500\",\"origin\":{\"name\":\"Glasgow Queen Street\",\"crs\":\"GLQ\"},\"destination\":{\"name\":\"Dundee\",\"crs\":\"DEE\"}},\n{\"std\":\"14:56\",\"etd\":\"On time\",\"platform\":\"8\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"WYnd3WLFSEaySKqD3l4whw==\",\"origin\":{\"name\":\"Edinburgh\",\"crs\":\"EDB\"},\"destination\":{\"name\":\"Helensburgh Central\",\"crs\":\"HLC\"}},\n{\"std\":\"15:00\",\"etd\":\"On time\",\"operator\":\"ScotRail\",\"operatorCode\":\"SR\",\"serviceId\":\"Dsf5kpcxGaiOpWGaXjbRQA==\",\"rsid\":\"SR429000\",\"origin\":{\"name\":\"Glasgow Queen Street\",\"crs\":\"GLQ\"},\"destination\":{\"name\":\"Edinburgh\",\"crs\":\"EDB\"}}];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":320,"y":300,"wires":[["093b5812120c1d5d"]]},{"id":"c6eb178668784c60","type":"inject","z":"3fd2634d3eb8f47a","g":"fd6a03d270cd37e7","name":"Sample Data","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":300,"wires":[["de44c4077af65e98"]]},{"id":"02f91ae2b9002a87","type":"natRail-config","name":""},{"id":"53edc9958407538c","type":"ui_group","name":"Departures","tab":"85850867b381145e","order":2,"disp":true,"width":"20","collapse":false,"className":""},{"id":"d129285e4b08a665","type":"ui_group","name":"Select Station","tab":"85850867b381145e","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"85850867b381145e","type":"ui_tab","name":"Trains","icon":"dashboard","disabled":false,"hidden":false}]