Skip to content

Commit

Permalink
Changes for review comments
Browse files Browse the repository at this point in the history
Fix some parameter names.
  • Loading branch information
danscales committed Feb 27, 2024
1 parent 9049974 commit 9be55b8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@ object ForestChangeDiagnosticDataLossApproxYearlyTwoCategory {
// There is a breakdown by two levels of categories before the breakdown into
// approx-yearly forest loss.
def fill(
className: String,
className2: String,
categoryName: String,
categoryName2: String,
lossYear: ApproxYear,
areaHa: Double,
noData: List[String] = List("", "Unknown", "Not applicable"),
include: Boolean = true
): ForestChangeDiagnosticDataLossApproxYearlyTwoCategory = {

if (noData.contains(className))
if (noData.contains(categoryName))
ForestChangeDiagnosticDataLossApproxYearlyTwoCategory.empty
else
ForestChangeDiagnosticDataLossApproxYearlyTwoCategory(
Map(
className -> ForestChangeDiagnosticDataLossApproxYearlyCategory
.fill(className2, lossYear, areaHa, include = include)
categoryName -> ForestChangeDiagnosticDataLossApproxYearlyCategory
.fill(categoryName2, lossYear, areaHa, include = include)
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@ object ForestChangeDiagnosticDataLossYearlyTwoCategory {
// There is a breakdown by two levels of categories before the breakdown into
// yearly forest loss.
def fill(
className: String,
className2: String,
categoryName: String,
categoryName2: String,
lossYear: Int,
areaHa: Double,
noData: List[String] = List("", "Unknown", "Not applicable"),
include: Boolean = true
): ForestChangeDiagnosticDataLossYearlyTwoCategory = {

if (noData.contains(className))
if (noData.contains(categoryName))
ForestChangeDiagnosticDataLossYearlyTwoCategory.empty
else
ForestChangeDiagnosticDataLossYearlyTwoCategory(
Map(
className -> ForestChangeDiagnosticDataLossYearlyCategory
.fill(className2, lossYear, areaHa, include = include)
categoryName -> ForestChangeDiagnosticDataLossYearlyCategory
.fill(categoryName2, lossYear, areaHa, include = include)
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ object ForestChangeDiagnosticSummary {
countrySpecificLossYear = ApproxYear(possLoss, false)
countryCode = "BRA"
} else if (braBiomesPresence) {
// braBiomesPresence is not all of Brazil, but we are using it as a proxy
// for pixel being in Brazil. We are also in Brazil if there was prodes
// loss. (We will have a true gfwProCoverage value for Brazil presence soon.)
// braBiomesPresence is all of Brazil, except for a few estuaries and
// other areas along the coastline, so we are using it as a proxy for
// pixel being in Brazil. We are also in Brazil if there was prodes loss.
// (We will aim to have a true gfwProCoverage value for Brazil presence soon.)
countryCode = "BRA"
}
}
Expand Down

0 comments on commit 9be55b8

Please sign in to comment.