Each pymrio core system object contains a field 'meta' which stores meta data as well as changes to the MRIO system. This data is stored as json file in the root of a saved MRIO data and accessible through the attribute '.meta':
In [31]:
import pymrio
io = pymrio.load_test()
In [32]:
io.meta
Out[32]:
In [33]:
io.meta('Loaded the pymrio test sytem')
We can now do several steps to modify the system, for example:
In [34]:
io.calc_all()
io.aggregate(region_agg = 'global')
Out[34]:
In [35]:
io.meta
Out[35]:
Notes can added at any time:
In [36]:
io.meta.note('First round of calculations finished')
In [37]:
io.meta
Out[37]:
In addition, all file io operations are recorde in the meta data:
In [38]:
io.save_all('/tmp/foo')
Out[38]:
In [39]:
io_new = pymrio.load_all('/tmp/foo')
In [40]:
io_new.meta
Out[40]:
The top level meta data can be changed as well. These changes will also be recorded in the history:
In [41]:
io_new.meta.change_meta('Version', 'v2')
In [42]:
io_new.meta
Out[42]:
To get the full history list, use:
In [43]:
io_new.meta.history
Out[43]:
This can be restricted to one of the history types by:
In [44]:
io_new.meta.modification_history
Out[44]:
or
In [45]:
io_new.meta.note_history
Out[45]: