Implementation of data analysis

Plus first version of resulting formula
Fix bug with shields coming from IITC