Skip to content

HowTo: Calculate indicators from worldstates

mscholl edited this page Oct 27, 2014 · 2 revisions

This article shortly elaborates on the way indicators are actually calculated from worldstates. However, this is a process that is VERY tailored to your specific pilot application I can only outline the principal procedure.

What is an indicator

When talking 'CRISMA' an indicator is simply a numerical value that represents a certain fact about your current 'World State', e.g. the number of dead people because of an earthquake or the flooded area in square meters because of a flooding event. It is an aggregated value that has been calculated from all or parts of the data that you have in your current 'World State'. It is never calculated from several 'World States' thus always reflecting the as-is state of the world. And most important: an indicator is relevant to a decision maker! Decision makers don't want to be confused by details they just want the relevant key data and that is what an indicator is. So you have to find our what is actually relevant key data.

I have the indicators, what now

As soon as your specific pilot knows what are the key data is that the decision maker wants to see you can mediate on how to actually calculate that data from the data you have. So let's assume you have, amongst others, the number of dead people indicator. Further assume that your model works cell-based so the result of model is many cells with many data in them stored in a shape file with a geometry column and a column for victims in that cell. So what you now have to do is to write a piece of code that reads the result shape file, iterates over all the rows and sums up the victims in all the cells. Et voilà, there is your indicator value. Now do whatever you need to do for all the indicators your decision maker wants to decide on and you're good.

Yeah, yeah, I know my principal work, give me gory details on the calculation!

Well, unfortunately I cannot do that without knowing your actual data. However, I can give you as many help as possible! As mentioned before the actual calculation of indicator data has to be done in a dedicated piece of code. Such a piece of code has to be there for every indicator. You can use whatever language you want to implement it. Also it is not important where this code executes! It is only important that it is done every time when a new 'World State' is produced in your application. If you have very simple indicators you could integrate this code in you client application because the client application should know when a new 'World State' is available anyway. If you have more complicated indicators it might come in handy to use a dedicated service for the calculation. There is the Indicators Building Block or more specifically the BasicIndicators reference implementation available. The BasicIndicators is a dedicated WPS that already deals with the ICMM stuff and you can concentrate on the implementation of your indicator code only. However, with additional services come additional overhead and additional points of failure and this component is implemented in python (using pyWPS) which basically limits you to use the python language as well. Now it's up to you what you wanna do ;)

Oh man, why would I go for all the trouble anyway

Well, with your indicators you can enable DSS in your pilot application very easily. And this is why you came here in the first place, didn't you! See for yourself, the DSS is not far away.