In the first decades of the 20th century, political actors diagnosed the incubation of a crisis in the Chilean schooling process. Low rates of enrollment, literacy, and attendance, inefficiency in the use of resources, poverty, and a reduced number of schools were the main factors explaining the crisis. As a response, the Law on Compulsory Primary Education, considering mandatory for children between 6 and 14 years old to attend any school for at least four years, was passed in 1920. Using data from Censuses of the Republic of Chile from 1920 and 1930, reports of the Ministry of Justice, the Ministry of Education, and the Statistical Yearbooks between 1895 and 1930, we apply machine learning techniques (clustering and decision trees) to assess the impact of this law on the Chilean schooling process between 1920 and 1930. We conclude that the law had a positive impact on the schooling indicators in this period. Even though it did not overcome the differences between urban and rural zones, it brought about a general improvement of the schooling process and a more efficient use of resources and infrastructure in both big urban centers and small-urban and rural zones, thereby managing the so-called crisis of the Republic.