Not-found caches: add powiaty

sql-rework
Tomasz Golinski 2020-09-06 19:51:14 +02:00
rodzic 5e7a4a8a4b
commit 15b7949559
1 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -321,6 +321,7 @@ int main(int argc, char** argv) {
for (auto& i : cc) {
if (i.type != "Moving" && i.type != "Own" && (!exclude_quiz || i.type != "Quiz")) {
fcc.push_back(&i);
poland.locate(i);
}
}
}
@ -771,12 +772,13 @@ int main(int argc, char** argv) {
std::cout << "Still <span class=\"value\">" << cc.size() << "</span> caches to be found...<br>\n";
std::cout << "</div>\n";
show_nested_histogram(fcc, &Cache::region, &Cache::subregion, "Regions", 1);
std::map<std::string, int> region_found_count;
for (auto el : cc)
region_found_count[el.region]++;
for (auto el : fcc)
region_found_count[el->region]++;
for (auto& i : region_count)
i.second = region_found_count[i.first] * 100 / i.second;
show_histogram(region_found_count, "Regions", 1);
show_histogram(region_count, "Percentage", 1);
}