from rumi.viz import dataquery
from rumi.viz import ploting
from rumi.io import filemanager
import altair as alt

model_instance =r"/home/vikrant/programming/work/github/PIER/"

modelmanager_ = dataquery.ModelInstance(model_instance)
scenario = "1_Ref"
Process Process-2:
Traceback (most recent call last):
  File "/usr/lib/python3.13/multiprocessing/process.py", line 313, in _bootstrap
    self.run()
    ~~~~~~~~^^
  File "/usr/lib/python3.13/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vikrant/programming/work/github/Rumi-dev/rumi/io/logger.py", line 68, in listener_process
    sleep(1)
    ~~~~~^^^
KeyboardInterrupt
p = ploting.DemandCarrierWisePerSectorNormalisedBarPlot(scenario=scenario,name="Demand Sector Wise Normalised")
chart = p.plot()
chart
#chart.to_dict()
p = ploting.DemandDrillDownSectorCarrierNormalisedBarPlot(scenario=scenario,name="Demand Sector Wise Normalised")
p.plot()
/tmp/ipykernel_76033/1011442938.py:2: UserWarning: Automatically deduplicated selection parameter with identical configuration. If you want independent parameters, explicitly name them differently (e.g., name='param1', name='param2'). See https://github.com/vega/altair/issues/3891
  p.plot()
/home/vikrant/usr/local/rumiviz/lib/python3.13/site-packages/altair/vegalite/v6/api.py:3801: UserWarning: Automatically deduplicated selection parameter with identical configuration. If you want independent parameters, explicitly name them differently (e.g., name='param1', name='param2'). See https://github.com/vega/altair/issues/3891
  dct = self.to_dict(context={"pre_transform": False})
p = ploting.DemandSectorWise(scenario=scenario, name="Demand Sector Wise")
p.plot()
p2 = ploting.DemandDrillDownSectorCarrierBarPlot(scenario="1_Ref", name="Demand by Sector")
c2 = p2.plot()
d2 = c2.to_dict()
c2
/tmp/ipykernel_76033/255902262.py:2: UserWarning: Automatically deduplicated selection parameter with identical configuration. If you want independent parameters, explicitly name them differently (e.g., name='param1', name='param2'). See https://github.com/vega/altair/issues/3891
  c2 = p2.plot()
/tmp/ipykernel_76033/255902262.py:3: UserWarning: Automatically deduplicated selection parameter with identical configuration. If you want independent parameters, explicitly name them differently (e.g., name='param1', name='param2'). See https://github.com/vega/altair/issues/3891
  d2 = c2.to_dict()
/home/vikrant/usr/local/rumiviz/lib/python3.13/site-packages/altair/vegalite/v6/api.py:3801: UserWarning: Automatically deduplicated selection parameter with identical configuration. If you want independent parameters, explicitly name them differently (e.g., name='param1', name='param2'). See https://github.com/vega/altair/issues/3891
  dct = self.to_dict(context={"pre_transform": False})
p3 = ploting.DemandDrillDownSectorCarrierAreaPlot(scenario="1_Ref", name="Demand by Sector")
p3.plot()
/tmp/ipykernel_76033/1760489610.py:2: UserWarning: Automatically deduplicated selection parameter with identical configuration. If you want independent parameters, explicitly name them differently (e.g., name='param1', name='param2'). See https://github.com/vega/altair/issues/3891
  p3.plot()
/home/vikrant/usr/local/rumiviz/lib/python3.13/site-packages/altair/vegalite/v6/api.py:3801: UserWarning: Automatically deduplicated selection parameter with identical configuration. If you want independent parameters, explicitly name them differently (e.g., name='param1', name='param2'). See https://github.com/vega/altair/issues/3891
  dct = self.to_dict(context={"pre_transform": False})
p4 = ploting.DemandCarrierWisePerSectorBarPlot("1_Ref", "Demand by Carriers")
p4.plot()
p5 = ploting.DemandCarrierWisePerSectorAreaPlot("1_Ref", "Demand by Carriers")
p5.plot()
p6 = ploting.DemandDrillDownSectorServiceBarPlot("1_Ref", "Demand by Services")
c6 = p6.plot()
c6
/tmp/ipykernel_76033/3593158079.py:2: UserWarning: Automatically deduplicated selection parameter with identical configuration. If you want independent parameters, explicitly name them differently (e.g., name='param1', name='param2'). See https://github.com/vega/altair/issues/3891
  c6 = p6.plot()
/home/vikrant/usr/local/rumiviz/lib/python3.13/site-packages/altair/vegalite/v6/api.py:3801: UserWarning: Automatically deduplicated selection parameter with identical configuration. If you want independent parameters, explicitly name them differently (e.g., name='param1', name='param2'). See https://github.com/vega/altair/issues/3891
  dct = self.to_dict(context={"pre_transform": False})
p7 = ploting.DemandDrillDownSectorServiceAreaPlot("1_Ref", "Demand by Services")
p7.plot()
/tmp/ipykernel_76033/755507195.py:2: UserWarning: Automatically deduplicated selection parameter with identical configuration. If you want independent parameters, explicitly name them differently (e.g., name='param1', name='param2'). See https://github.com/vega/altair/issues/3891
  p7.plot()
/home/vikrant/usr/local/rumiviz/lib/python3.13/site-packages/altair/vegalite/v6/api.py:3801: UserWarning: Automatically deduplicated selection parameter with identical configuration. If you want independent parameters, explicitly name them differently (e.g., name='param1', name='param2'). See https://github.com/vega/altair/issues/3891
  dct = self.to_dict(context={"pre_transform": False})
p8 = ploting.DemandServiceWisePerSectorAreaPlot("1_Ref", "Demand by Services")
p8.plot()
p9 = ploting.DemandServiceWisePerSectorBarPlot("1_Ref", "Demand by Services")
p9.plot()