Skip to content

Commit

Permalink
CLDR-17884 Style updates
Browse files Browse the repository at this point in the history
  • Loading branch information
conradarcturus committed Aug 15, 2024
1 parent 78146cb commit 46b2c58
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ private static void showCountryData(String country) {
}

/**
* Gets the percent of people that can read in a particular country
* Values are in the range 0 to 100
* Gets the percent of people that can read in a particular country. Values are in the range 0
* to 100
*/
public static Double getLiteracy(String country) {
return firstNonZero(
Expand Down Expand Up @@ -282,7 +282,7 @@ private static void loadFactbookInfo(String filename, final Counter2<String> fac
@Override
public boolean handle(String line) {
String[] pieces = splitCommaSeparated(line);
String countryName = FactbookLine.CountryName.get(pieces);
String countryName = FactbookLine.CountryName.get(pieces);
if (countryName.equals("name")) {
return false;
}
Expand Down Expand Up @@ -398,7 +398,9 @@ public boolean handle(String line) {
return false;
}
code = code.toUpperCase(Locale.ENGLISH);
String valueString = FBLiteracy.Percent.get(pieces).trim(); // Values are in the range 0 to 100
String valueString =
FBLiteracy.Percent.get(pieces)
.trim(); // Values are in the range 0 to 100
double percent = Double.parseDouble(valueString);
factbook_literacy.put(code, percent);
if (ADD_POP) {
Expand Down Expand Up @@ -524,7 +526,10 @@ static List<Pair<String, Double>> getUnLiteracy(Output<Boolean> hadErr) throws I
continue;
}
double total = literate + illiterate;
double percent = ((double) literate) * 100 / total; // Multiply by 100 to put values in range 0 to 100
double percent =
((double) literate)
* 100
/ total; // Multiply by 100 to put values in range 0 to 100
result.add(Pair.of(code, percent));
}
if (result.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ private void handleRecord() {
final Long new_value = getLongValue();
final Long old_value = pa.perLiteracy.put(literacy, new_value);
if (old_value != null) {
// Suriname is known to include duplicate records, 1 normal and 1 "Excluding the institutional population"
// Suriname is known to include duplicate records, 1 normal and 1 "Excluding the
// institutional population"
// Resolve this by taking higher value
if (country.equals("Suriname")) {
pa.perLiteracy.put(literacy, Math.max(old_value, new_value));
Expand Down

0 comments on commit 46b2c58

Please sign in to comment.