Abstract. Quantitative mapping of minerals in rock thin sections delivers data on mineral abundance, size, and spatial arrangement that are useful for many geoscience and engineering disciplines. Although automated methods for mapping mineralogy exist, these are often expensive, associated with proprietary software, or require programming skills, which limits their usage. Here we present a free, open-source method for automated mineralogy mapping from energy dispersive spectroscopy (EDS) scans of rock thin sections. This method uses a random forest machine learning image classification algorithm within the QGIS geographic information system and Orfeo Toolbox, which are both free and open source. To demonstrate the utility of this method, we apply it to 14 rock thin sections from the well-studied Rio Blanco tonalite lithology of Puerto Rico. Measurements of mineral abundance inferred from our method compare favourably to previous measurements of mineral abundance inferred from X-ray diffraction and point counts on thin sections. The model-generated mineral maps agree with independent, manually-delineated mineral maps at a mean rate of 95 %, with accuracies as high as 96 % for the most abundant phase (plagioclase) and as low as 72 % for the least abundant phase (apatite) in these samples. We show that the default random forest hyperparameters in Orfeo Toolbox yielded high accuracy in the model-generated mineral maps, and we demonstrate how users can determine the sensitivity of the mineral maps to hyperparameter values and input features. These results show that this method can be used to generate accurate maps of major mineral phases in rock thin sections using entirely free and open-source applications.