Skip to content

Commit 42efe2f

Browse files
author
Nick Grippin
committed
add engine and config
1 parent c452af5 commit 42efe2f

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

publication/src/main/resources/reports-metadata.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ ReportId,Type,ReportTable,Dispositions,Description
22
A52,Aggregate,5-2,Received;Originated;ApprovedButNotAccepted;Denied;Withdrawn;Closed,"Disposition of Applications for Conventional Home-Purchase Loans, 1-to-4 Family and Manufactured Home Dwellings, by Income, Race, and Ethnicity of Applicant"
33
D51,Disclosure,5-1,Received;Originated;ApprovedButNotAccepted;Denied;Withdrawn;Closed,"Disposition of applications for FHA, FSA/RHS, and VA home-purchase loans, 1- to 4-family and manufactured home dwellings, by income, race and ethnicity of applicant"
44
D53,Disclosure,5-3,Received;Originated;ApprovedButNotAccepted;Denied;Withdrawn;Closed,"Disposition of Applications to Refinance Loans on 1-to-4 Family and Manufactured Home Dwellings, by Income, Race, and Ethnicity of Applicant"
5+
N52,Disclosure,5-2,Received;Originated;ApprovedButNotAccepted;Denied;Withdrawn;Closed,"Disposition of applications for conventional home purchase loans on 1-to-4 family and manufactured home dwellings"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package hmda.publication.reports.national
2+
3+
import akka.actor.ActorSystem
4+
import akka.stream.ActorMaterializer
5+
import akka.util.Timeout
6+
import com.typesafe.config.ConfigFactory
7+
import hmda.query.repository.filing.FilingCassandraRepository
8+
9+
import scala.concurrent.Future
10+
import scala.concurrent.duration._
11+
import spray.json._
12+
13+
class NationalAggregateReports (val sys: ActorSystem, val mat: ActorMaterializer) extends FilingCassandraRepository {
14+
override implicit def system: ActorSystem = sys
15+
override implicit def materializer: ActorMaterializer = mat
16+
val config = ConfigFactory.load()
17+
val duration = config.getInt("hmda.actor-lookup-timeout")
18+
implicit val timeout = Timeout(duration.seconds)
19+
20+
val larSource = readData(1000)
21+
22+
def generateReports(fipsCode: Int, respId: String): Future[Unit] = {
23+
24+
val n52F = N52.generate(larSource)
25+
n52F.map { n52 =>
26+
println(n52.toJson.prettyPrint)
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)