The Gamma: Tools for open data-driven storytelling
The Gamma is a simple JavaScript library that lets anyone create transparent and open data visualizations that are linked to the original data source and encourage the reader to further explore data and find interesting facts on their own.
The Gamma implements a scripting language with spreadsheet-inspired tooling that runs in the browser and lets users perform simple data aggregation and exploration. The package lets you run The Gamma scripts and provides a rich web-based editor that you can embed on your site.
The Gamma in action
- Project homepage contains all you need to get started
- The Gamma sample web shows a minimal demo (source)
- Visualization of Olympic medals is bigger sample project (source)
The Gamma script
The core of The Gamma project is a simple scripting langauge that makes it easy to write code to perform data aggregation and data exploration. For example, if you want to find the top 8 athletes by the number of gold medals from Rio 2016, you can write:
olympics
.'filter data'.'Games is'.'Rio (2016)'.then
.'group data'.'by Athlete'.'sum Gold'.then
.'sort data'.'by Gold descending'.then
.'paging'.take(8)
.'get the data'
Rich tooling is available when writing code using The Gamma web-based editor and so you get
auto-completion for available operations when typing .
, you can see a live preview of
the transformed data and you can even modify the code using a simple user interface.
Documentation
The full project documentation is available on thegamma.net web site:
- Contributing: Building from the source code - explains how to build everything locally for those who want to contribute! The Gamma is mostly written in F# and compiled to JavaScript using Fable.
- Developers: Using The Gamma JavaScript library discusses how to embed visualizations using The Gamma JavaScript library and how to create and interact with the built-in editor.
- Data: Providing data as a REST services discusses how to provide data for the visualization. This is just a matter of writing a simple service that evaluates queries.
- Exploring: Aggregating and visualizing data covers The Gamma scripting language and the tools that you and your readers can use to explore and visualize data.
Credits and license
The Gamma is built at The Alan Turing Institute and has been supported through the Google Digitial News Initiative. It is available as open-source using the permissive MIT license. This means that you are welcome to contribute, modify the project as you wish and use it commercially without restrictions.