13.3.10. Macro “dataserverGeyserRank.py

13.3.10.1. Objective

This part shows the complete code used to produce the console display in Computing the ranking.

13.3.10.2. Macro Uranie

"""
Example of rank usage for illustration purpose
"""
from URANIE import DataServer

tdsGeyser = DataServer.TDataServer("geyser", "poet")
tdsGeyser.fileDataRead("geyser.dat")
tdsGeyser.computeRank("x1")
tdsGeyser.computeStatistic("Rk_x1")

print("NPatterns="+str(tdsGeyser.getNPatterns())+";  min(Rk_x1)= " +
      str(tdsGeyser.getAttribute("Rk_x1").getMinimum())+";  max(Rk_x1)= " +
      str(tdsGeyser.getAttribute("Rk_x1").getMaximum()))

13.3.10.3. Console

This macro should result in this output in console:

NPatterns=272;  min(Rk_x1)= 1.0;  max(Rk_x1)= 272.0