Hi,
if you are familiar with Python, you know how to create a simple webite.
With the bootstrap library it should be done rather quickly.
And what did I do (here the examples are in php, sorry)
I queried the database directly, but you may use the API as well.
1. Connected to the database (either with mysqli, PDO, ...; here I use meekrodb)
Code:
require_once 'meekrodb.class.php';
$pos = strpos($_SERVER["HTTP_HOST"],'ocalhost');
DB::$host='myHost';
DB::$user='myUsername';
DB::$password='myPassword';
DB::$dbName='myDatabaseName';
}
2. I mapped the necessary column names of LimeSurvey (which use the SGQA.syntax) to some variables
Code:
$survey=111111;
$tbl_daten='lime_survey_'.$survey;
$col_name=$survey.'X183X20282';
$col_gender=$survey.'X183X20284';
$col_age=$survey.'X183X20283';
...
3. Ran the necessary queries
Code:
$daten_male=DB::query("SELECT {$col_height}/100 as height, {$col_weight} as weight FROM {$tbl_daten} WHERE {$col_gender}=1 AND not isnull(submitdate)");
$daten_female=DB::query("SELECT {$col_height}/100 as height, {$col_weight} as weight FROM {$tbl_daten} WHERE {$col_gender}=2 AND not isnull(submitdate)");
$daten_BMI=DB::query("SELECT {$col_BMI},
SUM(IF({$col_BMI} <20, 1, 0)) AS A1,
SUM(IF({$col_BMI} BETWEEN 20 and 30, 1, 0)) AS A2,
SUM(IF({$col_BMI} > 30, 1, 0)) AS A3
FROM {$tbl_daten} WHERE not isnull(submitdate) GROUP BY {$col_gender}");
$daten_Verlauf=DB::query("SELECT Date(submitdate) as Datum,sum(IF ({$col_gender}=1,1,0)) as male,sum(IF ({$col_gender}=2,1,0)) as female FROM {$tbl_daten} WHERE not isnull(submitdate) group by Datum order by Datum");
4. I used the HighCharts library to display the charts.
(You wrote you are going to use leaflet.)
Just entered the appropriate data of the queries.
Code:
...
series: [{
name: 'weiblich',
type: 'scatter',
color: 'rgba(83,223, 83, .5)',
data: [
<?php
$cm=count($daten_female);
for ($i=0;$i<$cm;$i++) {
echo '['.$daten_female[$i]['height'].','.$daten_female[$i]['weight'].'],';
}
?>
]
}, {
name: 'männlich',
type: 'scatter',
...
This is an old example of mine where I played around a bit with the libraries to get familiar to them.
Maybe I'd do it a bit different today.
But you get the idea.
Now it is up to you.
This is not LimeSurvey related. So you prpbably get more help in forums related to web design, leaflet, bootstrap, ...
Joffm