Dataset

RailClass publishes 14,327 railway vehicle classes from outside Japan as Linked Data, linked to Wikidata. This page puts the counts, files, URIs, licences and sources in one place. The same description is also available for machines (VoID and DCAT).

Last updated: · VoID (Turtle) · JSON-LD

Counts

Classes
14,32714,321 linked to their Wikidata items with skos:exactMatch; the rest are classes of our own with no Wikidata item
Classes with a photo
10,402foaf:depiction, with the same Wikimedia Commons IRI as Wikidata P18
Wikidata values
81,591Operator, manufacturer, country, gauge and more, kept as Wikidata IRIs
Classes with known lines
9251,734 lines; 558 classes and 935 lines have an OpenStreetMap track on the map
3D models
25Linked to 22 classes; 25 liveries, 25 IIIF Manifests
ERATV mapping
629 typesTypes in the European Register of Authorised Types of Vehicles (ERATV) matched to 244 Wikidata classes
Triples
251,55417,034 subject resources, 55 predicates

Files

The dump holds every class, every 3D model and our own terms. Start with all.ttl.

URIs and how to get the data

A class is https://nakamura196.github.io/train-bodies/rdf/class/<ID> and a 3D model is https://nakamura196.github.io/train-bodies/rdf/model/<ID>. <ID> is the Wikidata Q id (e.g. Q696668), or an ID of our own starting with tb- for the few classes Wikidata has no item for.

Opening a URI in a browser shows a page for people. The RDF is next to it, with .ttl or .jsonld appended: GitHub Pages, which serves the site, does no content negotiation.

The URIs will move to persistent w3id.org URIs (https://w3id.org/railclass/).

For now the URIs still start with https://nakamura196.github.io/train-bodies/, the address before the repository was renamed, and do not open as they are. The pages and files are at https://railclass.ldas.jp/. Until the move to w3id.org, read the first part of a URI as this address (the examples below link there).

Examples: https://nakamura196.github.io/train-bodies/rdf/class/Q696668 · https://nakamura196.github.io/train-bodies/rdf/class/tb-skytrain-mk2 · https://nakamura196.github.io/train-bodies/rdf/model/icet_411

About SPARQL

There is no SPARQL endpoint. The site is static files only.

To query the data, load all.ttl into a local triple store (Oxigraph, Apache Jena, ...) or rdflib. It is 251,554 triples (9.7 MB of Turtle) and loads in seconds on a laptop.

To look at one resource, open its URI in LD Browser, a Linked Data browser that runs in the browser alone.

Open the ICE T class in LD Browser →

Example query (classes per country)
PREFIX tb:   <https://nakamura196.github.io/train-bodies/vocab#>
PREFIX wdt:  <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?country ?name (COUNT(?class) AS ?n) WHERE {
  ?class a tb:VehicleClass ; wdt:P17 ?country .
  OPTIONAL { ?country rdfs:label ?name FILTER(lang(?name) = "en") }
} GROUP BY ?country ?name ORDER BY DESC(?n) LIMIT 10

Licences

Class data (RDF)
CC0 1.0. Most values come from Wikidata (CC0).
3D models and their images
CC BY 4.0, also stated on each model in the RDF with schema:license.
Class photos
The terms of each Wikimedia Commons file. The RDF holds only the photo IRIs.
Line tracks (GeoJSON)
© OpenStreetMap contributors, ODbL. The RDF holds only the Wikidata IDs of the lines.
ERATV type IDs and names
From ERATV, European Union Agency for Railways (ERA), reproduced with acknowledgement as ERA's copyright notice allows.

Sources and method

Scripts and data (GitHub) →

How to cite

Nakamura, Satoru (2026). RailClass: railway vehicle classes of the world [dataset]. https://railclass.ldas.jp/en/dataset.html