13.3.9. Macro “dataserverGeyserStat.py”
13.3.9.1. Objective
This part shows the complete code used to produce the console display in Computing the elementary statistic.
13.3.9.2. Macro Uranie
"""
Example of statistical usage
"""
from URANIE import DataServer
tdsGeyser = DataServer.TDataServer("geyser", "poet")
tdsGeyser.fileDataRead("geyser.dat")
tdsGeyser.computeStatistic("x1")
print("min(x1)= "+str(tdsGeyser.getAttribute("x1").getMinimum())+"; max(x1)= "
+ str(tdsGeyser.getAttribute("x1").getMaximum())+"; mean(x1)= " +
str(tdsGeyser.getAttribute("x1").getMean())+"; std(x1)= " +
str(tdsGeyser.getAttribute("x1").getStd()))
13.3.9.3. Console
This macro should result in this output in console:
min(x1)= 1.6; max(x1)= 5.1; mean(x1)= 3.487783088235295; std(x1)= 1.141371251105209