Skip to content

Commit

Permalink
add 2025 to hmda platform
Browse files Browse the repository at this point in the history
  • Loading branch information
kgudel committed Sep 16, 2024
1 parent 78740a8 commit 6f07fb4
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 4 deletions.
26 changes: 24 additions & 2 deletions common/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ hmda {

rules {
yearly-filing {
years-allowed = "2018,2019,2020,2021,2022,2023,2024"
years-allowed = "2018,2019,2020,2021,2022,2023,2024,2025"
years-allowed = ${?RULES_YEARLY_FILING_YEARS_ALLOWED}
}

Expand Down Expand Up @@ -179,6 +179,20 @@ hmda {
edits.descriptions.filename = ${?EDIT_DESCRIPTIONS_FILENAME_2024}
year = 2024
}
2024Quarter {
ts.length = 15
lar.length = 110
edits.descriptions.filename = "2025QuarterlyEditsDescriptions.txt"
edits.descriptions.filename = ${?EDIT_DESCRIPTIONS_FILENAME_2025_Q}
year = 2024
}
2024 {
ts.length = 15
lar.length = 110
edits.descriptions.filename = "2025EditsDescriptions.txt"
edits.descriptions.filename = ${?EDIT_DESCRIPTIONS_FILENAME_2025}
year = 2024
}
}

census {
Expand Down Expand Up @@ -209,7 +223,11 @@ hmda {
}
2024 {
filename = "ffiec_census_2024.txt"
filename = ${?2023_CENSUS_FILENAME}
filename = ${?2024_CENSUS_FILENAME}
}
2025 {
filename = "ffiec_census_2024.txt"
filename = ${?2024_CENSUS_FILENAME}
}
}
}
Expand Down Expand Up @@ -243,6 +261,10 @@ hmda {
fields.filename = "FullCountyLoanLimitList2024.txt"
fields.filename = ${?COUNTY_LOAN_LIMIT_FILENAME_2024}
}
2025 {
fields.filename = "FullCountyLoanLimitList2024.txt"
fields.filename = ${?COUNTY_LOAN_LIMIT_FILENAME_2024}
}
}

kafka {
Expand Down
13 changes: 12 additions & 1 deletion common/src/main/scala/hmda/census/records/CensusRecords.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ object CensusRecords {
private val censusFileName2022 = config.getString("hmda.census.fields.2022.filename")
private val censusFileName2023 = config.getString("hmda.census.fields.2023.filename")
private val censusFileName2024 = config.getString("hmda.census.fields.2024.filename")
private val censusFileName2025 = config.getString("hmda.census.fields.2025.filename")


val (
Expand Down Expand Up @@ -81,11 +82,17 @@ object CensusRecords {
indexedSmallCounty2023: Map[String, Census]
) = getCensus(censusFileName2023)

val (
val (
indexedTract2024: Map[String, Census],
indexedCounty2024: Map[String, Census],
indexedSmallCounty2024: Map[String, Census]
) = getCensus(censusFileName2024)

val (
indexedTract2025: Map[String, Census],
indexedCounty2025: Map[String, Census],
indexedSmallCounty2025: Map[String, Census]
) = getCensus(censusFileName2025)

def yearTractMap(year: Int): Map[String, Census] = {
year match {
Expand All @@ -103,6 +110,8 @@ object CensusRecords {
indexedTract2023
case 2024 =>
indexedTract2024
case 2025 =>
indexedTract2025
case _ =>
indexedTract2024
}
Expand All @@ -124,6 +133,8 @@ object CensusRecords {
indexedCounty2023
case 2024 =>
indexedCounty2024
case 2025 =>
indexedCounty2025
case _ =>
indexedCounty2024
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ object EditDescriptionLookup {
config.getString("hmda.filing.2024Quarter.edits.descriptions.filename")
val editDescriptionFileName2024 =
config.getString("hmda.filing.2024.edits.descriptions.filename")
val editDescriptionFileName2025Quarter =
config.getString("hmda.filing.2025Quarter.edits.descriptions.filename")
val editDescriptionFileName2025 =
config.getString("hmda.filing.2025.edits.descriptions.filename")
def editDescriptionList(file: Iterable[String]): Iterable[EditDescription] =
file
.drop(1)
Expand All @@ -59,6 +63,8 @@ object EditDescriptionLookup {
val editDescriptionLines2023 = fileLines(s"/$editDescriptionFileName2023")
val editDescriptionLines2024Quarter = fileLines(s"/$editDescriptionFileName2024Quarter")
val editDescriptionLines2024 = fileLines(s"/$editDescriptionFileName2024")
val editDescriptionLines2025Quarter = fileLines(s"/$editDescriptionFileName2025Quarter")
val editDescriptionLines2025 = fileLines(s"/$editDescriptionFileName2025")


val editDescriptionMap2018 = editDescriptionMap(editDescriptionLines2018)
Expand All @@ -73,6 +79,8 @@ object EditDescriptionLookup {
val editDescriptionMap2023 = editDescriptionMap(editDescriptionLines2023)
val editDescriptionMap2024Quarter = editDescriptionMap(editDescriptionLines2024Quarter)
val editDescriptionMap2024 = editDescriptionMap(editDescriptionLines2024)
val editDescriptionMap2025Quarter = editDescriptionMap(editDescriptionLines2025Quarter)
val editDescriptionMap2025 = editDescriptionMap(editDescriptionLines2025)


def mapForPeriod(period: Period): Map[String, EditDescription] =
Expand All @@ -89,6 +97,8 @@ object EditDescriptionLookup {
case Period(2023, None) => editDescriptionMap2023
case Period(2024, Some(_)) => editDescriptionMap2024Quarter
case Period(2024, None) => editDescriptionMap2024
case Period(2025, Some(_)) => editDescriptionMap2025Quarter
case Period(2025, None) => editDescriptionMap2025
case _ => editDescriptionMap2021
}

Expand Down
8 changes: 7 additions & 1 deletion hmda/src/main/scala/hmda/validation/engine/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ package object engine {
case (2023, None) => TsEngine2023
case (2024, Some(_)) => TsEngine2024Q
case (2024, None) => TsEngine2024
case (2025, Some(_)) => TsEngine2025Q
case (2025, None) => TsEngine2025

case _ => TsEngine2022 // TODO: determine what engine to pick if the user enters a year that is not covered
}
Expand All @@ -36,6 +38,8 @@ package object engine {
case (2023, None) => TsLarEngine2023
case (2024, Some(_)) => TsLarEngine2024Q
case (2024, None) => TsLarEngine2024
case (2025, Some(_)) => TsLarEngine2025Q
case (2025, None) => TsLarEngine2025
case _ =>
TsLarEngine2022 // TODO: determine what engine to pick if the user enters a year that is not covered
}
Expand All @@ -53,7 +57,9 @@ package object engine {
case (2023, Some(_)) => LarEngine2023Q
case (2023, None) => LarEngine2023
case (2024, Some(_)) => LarEngine2024Q
case (2024, None) => LarEngine2024
case (2024, None) => LarEngine2024
case (2025, Some(_)) => LarEngine2025Q
case (2025, None) => LarEngine2025
case _ =>
LarEngine2022 // TODO: determine what engine to pick if the user enters a year that is not covered
}
Expand Down

0 comments on commit 6f07fb4

Please sign in to comment.