It is easy to classify based on lower or higher than median like developed or developing countries, but I do not know what should I do if the index varies by time such as WGI index
There are various ways of how to achieve that, without knowing the purpose of this classification it is hard to say what is the best way how to do that.
However, a simple and a straightforward way of achieving that would be as follows:
- Calculate mean or median value value of the index - this will give you single time invariant average value for the index.
- Once you assigned each country some time invariant value classify them according to that, so for example country with rule of law above 75th percentile can be classified as countries with "very strong rule of law", in between 50th and 75 percentile as "strong rule of law", countries in between 25th and 50th percentile as "weak rule of law" countries with values between 0th and 25th percentile as countries with very weak rule of law.
In addition, there is no reason why you cannot classify the countries dynamically, if you do not have too many years you can have separate classification for each year, or you can just visualize it as time series. Again unless you provide some details of what this is for it is hard to give a specific recommendation.