Belgian Railway Network

Source Notebook

The Belgian railway network data

Details

The vertices represent stations in the Belgian railway system.
The edges represent direct railway connections between stations, with edge weights representing the physical distance (in km) between connected stations.
This graph consists of 554 vertices (stations) and 691 edges (direct railway routes).

(691 elements)

Examples

Basic Examples (3) 

Retrieve the graph:

In[1]:=
GraphPlot[ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\)]]
Out[1]=

Find the vertex count for the network:

In[2]:=
VertexCount[ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\)]]
Out[2]=

Find the edge count for the network:

In[3]:=
EdgeCount[ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\)]]
Out[3]=

Scope & Additional Elements (3) 

Get the names of the first 100 stations:

In[4]:=
VertexList[ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\)]][[;; 100]]
Out[4]=

Visualize the histogram of the vertex degree of the graph:

In[5]:=
Histogram[VertexDegree[ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\)]], Sequence[
 100, FrameLabel -> {"VertexDegree"}, PlotTheme -> "Detailed"]]
Out[5]=

Visualize the histogram of the distance between stations:

In[6]:=
Histogram[Values[ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\), "EdgeWeight"]], Sequence[
 2000, FrameLabel -> {"Distance(km)"}, PlotTheme -> "Detailed"]]
Out[6]=

Visualizations (2) 

Visualize the full GeoGraphPlot:

In[7]:=
Show[GeoListPlot[Entity["Country", "Belgium"], PlotStyle -> {
Directive[Orange, Dashed, 
EdgeForm[{DarkOrange, Thick}], 
Opacity[0.1]]}], GeoGraphPlot[ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\)] /. ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\), "Position"], PlotTheme -> "Scientific"]]
Out[7]=

Visualize "ANTWERPEN-C" and "BRUXELLES-ND" stations:

In[8]:=
Show[GeoListPlot[Entity["Country", "Belgium"], PlotStyle -> {
Directive[Orange, Dashed, 
EdgeForm[{DarkOrange, Thick}], 
Opacity[0.1]]}], GeoListPlot[{"ANTWERPEN-C", "BRUXELLES-ND"} /. ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\), "Position"], Sequence[
  PlotStyle -> Directive[Black, 
Opacity[1], 
PointSize[10]], PlotMarkers -> GeoMarker]]]
Out[8]=

Analysis (2) 

Generate the weighted graph:

In[9]:=
g = Graph[ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\)], EdgeWeight -> ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\), "EdgeWeight"]];
Out[3]=

Find the shortest path between two stations:

In[10]:=
sp = FindShortestPath[Graph[ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\)]], "ARLON", "LEUVEN"]
Out[10]=

And visualize the path:

In[11]:=
GeoGraphPlot[HighlightGraph[Graph[ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\)] /. ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\), "Position"]], PathGraph[DeleteDuplicates[sp /. ResourceData[\!\(\*
TagBox["\"\<Belgian Railway Network\>\"",
#& ,
BoxID -> "ResourceTag-Belgian Railway Network-Input",
AutoDelete->True]\), "Position"]]]], PlotTheme -> "Scientific"]
Out[11]=

Wolfram Discrete Computation, "Belgian Railway Network" from the Wolfram Data Repository (2026)  

Data Resource History

Source Metadata

See Also

Publisher Information