npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-node-tfl

v0.1.1

Published

Node-RED nodes to interrogate Transport-for-London (TfL) transport APIs for bus and Undergroound information

Downloads

14

Readme

node-red-node-tfl

Node-RED nodes to interrogate Transport-for-London (TfL) transport APIs for bus and Underground information.

Install

Run the following command in the root directory of your Node-RED install

    npm install node-red-node-tfl

Usage

###Buses

Transport for London Buses and River Buses query node. Get live bus departure/arrival info for your bus stop.

This node enables the user to get bus or river bus arrival information for selected lines arriving at selected stops. The node returns the first vehicle/vessel to arrive at a particular stop. The data is provided by Transport for London.

If bus departures are scheduled from the specified stop then the node sets msg.payload to provide information about this bus:

  • StopPointName : The name of the stop the bus is departing from.
  • lineID : The bus line's number.
  • DestinationText : The bus's destination text as displayed on the bus.
  • RegistratoinNumber : The vehicle's registration plate.
  • EstimatedTime : The Estimated Arrival Time of arrival at the specified stop as a JavaScript object.

In order to select your bus stop and line, you need to find bus stops first by searching for them based on a given GPS coordinate and a search radius around specified coordinate.

Before using this node, please sign up to Transport for London and accept the terms and conditions to gain access to the live feeds.

###Underground

Transport for London Underground query node.

This node enables the user to get the Transport for London status information for the selected London underground line. The node then sets the following properties:

  • msg.description - text stating which line the status information is about
  • msg.payload.status - the TfL CssClass, for example "GoodService", "DisruptedService"
  • msg.payload.goodservice - a boolean, true if msg.payload.status is "GoodService", false otherwise
  • msg.payload.description - the description of the status, for example "Good Service", "Part Suspended"
  • msg.payload.details - the status details if they exist (they are only present when msg.payload.description is not "Good Service")
  • msg.payload.branchdisruptions - an array of information about the disruptions if any exist
  • msg.data - object containing the full information about the requested line

The line can be selected from a list on the node UI, or fed into the node as the msg.payload.tubeline of the message input when "Input Defined" is chosen in the UI.

Before using this node, please sign up to Transport for London and accept the terms and conditions to gain access to the live feeds.

Powered by TfL Open Data.