Parallels view for collection lists

Here i am making an initial proposal for a new view for the SC parallels data. If it seems like a good idea, I’ll refine it here first, then make it a formal proposal on Github.


Sometimes it’s handy to see information about parallels in one view. The old SC layout allowed for more of a quick overview of parallels, albeit mixed up with other data such as vol/page, translations, etc. I propose we make a special view for parallels. This will be in part similar to the old SC view, although purely presenting parallels.


The new view will be implemented as a variation on the “collection view”. Up till now we have called this the “suttaplex list”, but since it will no longer be just suttaplexes, we should probably change it. In any case, this is the primary view that is opened when you click on something in the sidebar.

It may be the case that a higher level view is desirable. For example, we could visualize the parallels for the whole of the four nikayas. This would, however, raise a set of difficult new problems, so let us leave it for now.

Currently we have a standard and compact view. These are toggled via a switch in the toolbar menu. According to my “Adaptive Tab Bar everywhere” proposal, we would add an ATB to the collection view, enabling the switch between normal and compact; as it is a local change the switch should be local.

We can then add a third option, “parallels view”. These would be “radio buttons”, looking something like this:

◉ Standard view
○ Compact view
○ Parallels view

By adding the parallels view to the collections views, we minimize the work to be done: the navigation and data are already there, we just change the view. Note that the richness of the current navigation fully applies, so you can select by full collection, vagga, etc.


The parallels view consists of three parts: statistical summary, visualization, and list of parallels.

Statistical summary

This is a brief overview of main statistics for the selected collection. A user should at a glance get an idea of the parallels for this collection. Thus there should not be too much detail.

The basic view would look something like this. (Dummy data!)

Summary of parallels for DN

  • Number of parallels: 1037
  • Number of suttas with parallel: 34/34 (100%)
  • Parallels by language:
    • Chinese: 978 (96%),
    • Sanskrit: 87 (4%),
    • Tibetan: 67 (4%).
  • Parallels by type:
    • Full: 800 (87%)
    • Resembling: 123 (12%)
    • Sectional: 26 (6%)
    • Mention: 7 (1%)


Here we can provide a graph or visualization of some kind to represent the parallels.

I propose a bar graph, with narrow columns (remembering there may be many suttas in a collection). Extra data could be available as a tooltip on the bars. Something roughly along these lines.

The horizontal axis is the sutta number, the vertical axis is the number of parallels, the colors are the different parallel types.

For extra coolness, we might make it also an arc diagram, with arcs to represent parallels within a collection. Not exactly like this, but you get the idea:

Other kinds of visualization may be possible, let’s see!

One thing to bear in mind is that the data on large collections gets pretty big, and the visualization could use as much space as possible. Thus the whole thing should be designed as dynamic vector graphics. We should give the option to display at full screen.

Parallels table

This is a simple table of the parallels, not dissimilar to a simplified view of legacy SC.

  • Table includes sutta IDs only.
  • Two columns: left is the main sutta ID, right is a comma separated list of parallels IDs.
  • Types of parallels are color-coded with the same colors as the bar graph.
  • Each ID links to the relevant suttaplex, i.e. <a href="/dn1">DN 1</a>
  • Structural elements such as vaggas etc. are represented as a row in the table; this will help to break them up visually.

Something like this (color-coding not shown).


Made a little doodle to show SC parallels using a Sankey graph display:

The interactive graph is here to play around with:

The GitHub repro is here:

This is just a doodle made from the SuttaCentral parallels.json data but it would be a whole lot easier to do with the ArangoDB database queries and then you would be able to go deeper into layers, etc.

The frontend is a lit-element using Google Charts, which has many types of visualizations of data:

The sankey chart is not yet in the Google Charts gallery because the webcomponent is very new and still under development.


Sadhu sadhu!
That’s really neat. For those of us who don’t code, would it be easy for you to create two more versions where there was a comparison between Pali and Pali, and one with Pali and everything else? As it is, it’s a little overwhelming. :dizzy_face:

[Sorry, I just realized that yours was not the OP. If comments in this thread are inappropriate, please remove my post.]


So nice! I love the work you’re doing with this, i have been hoping for something like this for years, and to finally see it, well wow.

I think the parallels data is available from ArangoDB via our REST API, so you should be able to query it directly? @blake is that right?


Yes, that’s right. You can use the lit-element I wrote inside SC with REST API queries.

This is only a draft to see what is possible. When incorporated in SC all possible queries should be possible.


I would definitely like to see this implemented. Presently, it’s a little time consuming on my end of the internet waiting for the JavaScript to load data for each individual text.


Isn’t the API public? I think anyone can consume it.

1 Like

The database + REST API can be downloaded but it takes several hours to load all the text. It is probably quicker to create a new database and load the parallels data in there. You would need a new query for this so new addition to the API. But you cannot run that on a free NOW site.