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

db-elevators

v0.0.6

Published

Deutsche Bahn elevator information, enriched with OSM data.

Downloads

9

Readme

db-elevators

Deutsche Bahn elevator information, enriched (by crowdsourcing) with OSM data. You're invited to help, see the data structure and contributing sections! Using this original dataset provided by Deutsche Bahn.

npm version Build Status license

Installation and Usage

If you're using Node.js or JavaScript with npm, you can install the package by running:

npm install db-elevators
const elevators = require('db-elevators')

elevators is an array of objects which looks as follows:

[
	{
		id: '10499641',
		description: 'zu Gleis 1',
		station: '8010212',
		location: {
			longitude: 14.6713589,
			latitude: 51.0993991
		},
		osmNodeId: '2793052424'
	},
	{
		id: '10499642',
		description: 'zu Gleis 2/3',
		station: '8010212',
		location: {
			longitude: 14.6713245,
			latitude: 51.0995518
		},
		osmNodeId: '4011664512'
	}
	// …
]

You can use the id to retrieve live availability information via the FaSta API.

Data structure

OpenStreetMap associations are stored in osm.ndjson, an ndjson file which contains one record per row. All records are objects with the following keys (required).

| key name | description | example | | -------- | ----------- | ------- | | id | elevator id from the main dataset | "10009222" | | osmNodeId | Id of the OSM elevator node. Note that OSM ids are not too stable, however this still seems to be the best way to associate data (for now). Additionally, tests that verify that ids are still valid and refering to an elevator are run on a daily basis. | "2381179238" | | stationName | Name of the station. Note that this field is required, but won't ever be parsed, we just use it to make the dataset a bit more human-readable. | "Bochum Hbf" | | description | Elevator description from the main dataset. As with stationName this field won't ever be parsed, we just use it to make the dataset a bit more human-readable. Optional, as some elevators don't have any description even in the original dataset. However: Feel free to write one yourself in this case. | "zu Gleis 1/2" | | revised | Some entries have been automatically fetched/guessed with a heuristical approach (false), while others have been manually inserted (true). This field is currently not exposed by the module, but can be used internally to monitor quality. | true |

Put together, our example would give us the following data row for the NDJSON file:

{"id":"10009222","osmNodeId":"2381179238","stationName":"Bochum Hbf","description":"zu Gleis 1/2","revised":false}

Contributing

If you want to add information to the dataset, fork this repository, add information and finally submit a pull request. If you don't know how any of this works, you can also just open an issue with the information you want to add in text form and I'll add it to the dataset for you. The same applies if you have found an error or want to change anything about the data structure.

Please note that by contributing to this project, you waive any copyright claims on the information you add.

See the todo list for a list of stations that have not been (fully) covered yet.

CLI

If you want to contribute to this project, you can either add data to osm.ndjson manually or use the CLI as follows:

  1. Clone the repository (or your fork)
git clone https://github.com/juliuste/db-elevators.git
  1. Navigate to the repository root
cd db-elevators
  1. Use the CLI to add entries to osm.ndjson
./build/bin/index # starts the cli
./build/bin/index --help # shows the help menu
./build/bin/index --auto-open # starts the CLI, opens OpenStreetMap around stations automatically (only on mac OS, using 'open' CLI)

License

The original dataset was released as CC-BY 4.0, the crowdsourced database of OpenStreetMap associations is licensed as CC0.