Comparison of the "Three Bs"


A chart showing how many works by Bach, Beethoven, and Brahms are performed each year at Carnegie Hall.

read lab report return to experiments

lab report


Comparison of the “Three Bs”


Create a line chart that correlates the number of works by Bach, Beethoven, and Brahms performed each year at Carnegie Hall.

Johann Sebastian Bach, Ludwig van Beethoven, and Johannes Brahms are sometimes playfully referred to as the “Three Bs” of classical music. The nearly 130-year history of Carnegie Hall presents and interesting opportunity to examine changes in popularity for these composers that now command such a central position in the classical music canon.

Rationale: a single concert might include performances of more than one work by any one of these composers, e.g. an “All-Beethoven” concert featuring several piano sonatas. The scope encompasses any work written by Bach, Beethoven, or Brahms (including portions of works, e.g. a performance of only one movement from a sonata) performed each year at CH from the first performances at the Hall in 1891 until July 1, 2019 (the most recent update of data on data.carnegiehall.org).


We created a SPARQL query to count the number of each composer’s works performed each year:

              PREFIX chnames: <http://data.carnegiehall.org/names/>
              PREFIX dcterms: <http://purl.org/dc/terms/>
              PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
              PREFIX foaf: <http://xmlns.com/foaf/0.1/>
              SELECT ?yearOfEvent (COUNT(DISTINCT ?workPerf) AS ?numberOfWorks)
              WHERE {
                ?work dcterms:creator chnames:1003166 .
                ?event dcterms:date ?date
                       BIND (str(YEAR(?date)) AS ?yearOfEvent)
                ?event event:product ?workPerf .
                ?workPerf event:product ?work
              GROUP BY ?yearOfEvent
              ORDER BY ?yearOfEvent

The query was run three times, substituting to appropriate identifier for each composer in the first line of the WHERE clause:

              ?work dcterms:creator chnames:1003166  (Bach)
              ?work dcterms:creator chnames:1005833  (Beethoven)
              ?work dcterms:creator chnames:1004316  (Brahms)

We then created a Google Sheet using the query results, added a Smooth Line chart to visualize the data, and created an embed link for the chart to use on our Data Lab site.


what we learned

Google Charts are very easy to create, and with the embed option they provide an out-of-the-box tool to make nice data visualizations with no special development skills.

further investigation

Using Google Sheets/Charts for visualizations requires hosting the data in a personal Google Drive account. Ideally, we’d like to learn how to use a tool like D3.js to create chart visualizations on our own without having to host the data files externally.

Another option: we currently use Ontotext’s GraphDB for our RDF data. GraphDB’s Workbench user interface offers several data display options, including the ability to create a Google Chart .svg file directly from the UI. Adding the .svg file to our Data Lab site could provide a more direct method for visualization with a shallower learning curve than D3.js.

return to experiments