It was a bit messy keeping track of the vector with a pair (optional language and prevalence percentage), and then figuring out the language colour while in the display function. I prefer constructing a LanguageSummary struct for each language, which contains information about prevalence, colour, and the language information itself.
It was a bit messy keeping track of the vector with a pair (optional language and prevalence percentage), and then figuring out the language colour while in the display function. I prefer constructing a
LanguageSummary
struct for each language, which contains information about prevalence, colour, and the language information itself.