Df 0 3 0_ S Qlite Versions Of R O O T

Read an sqlite3 databases with RDataFrame and plot statistics on ROOT downloads.

Plot the downloads of different ROOT versions reading a remote sqlite3 file with RSqliteDS. Then a TH1F histogram is created and filled using a lambda expression which receives the recorded values in the "version" column of the sqlite3 database. The histogram shows the usage of the ROOT development version.

Author: Alexandra-Maria Dobrescu
This notebook tutorial was automatically generated with ROOTBOOK-izer from the macro found in the ROOT repository on Thursday, June 24, 2021 at 07:19 AM.

In [1]:
auto rdf = ROOT::RDF::MakeSqliteDataFrame("http://root.cern/files/root_download_stats.sqlite", "SELECT Version FROM accesslog;");

TH1F hVersionOfRoot("hVersionOfRoot", "Development Versions of ROOT", 8, 0, -1);

auto fillVersionHisto = [&hVersionOfRoot] (const std::string &version) {
   TString copyVersion = version;
   TString shortVersion(copyVersion(0,4));
   hVersionOfRoot.Fill(shortVersion, 1);

rdf.Foreach( fillVersionHisto, { "Version" } );

auto VersionOfRootHistogram = new TCanvas();


Draw all canvases

In [2]:
%jsroot on