This code implements an estimation of “political trouble” in a given year in a given country by machine learning methods.