[WIP] Implement growth assessment using WHO indicators #80
@ -34,6 +34,8 @@ defmodule Growth.Indicators.Load do
|
|||||||
|
|
||||||
use Task
|
use Task
|
||||||
|
|
||||||
|
require Logger
|
||||||
|
|
||||||
alias Growth.Score
|
alias Growth.Score
|
||||||
|
|
||||||
@measure_to_score [
|
@measure_to_score [
|
||||||
@ -62,6 +64,8 @@ defmodule Growth.Indicators.Load do
|
|||||||
Load indicators csv files into their own ets tables.
|
Load indicators csv files into their own ets tables.
|
||||||
"""
|
"""
|
||||||
def all do
|
def all do
|
||||||
|
Logger.debug("load growth indicators")
|
||||||
|
|
||||||
"priv/growth/indicators/*.csv"
|
"priv/growth/indicators/*.csv"
|
||||||
|> Path.wildcard()
|
|> Path.wildcard()
|
||||||
|> Enum.map(&create_ets_from_filename/1)
|
|> Enum.map(&create_ets_from_filename/1)
|
||||||
@ -107,6 +111,8 @@ defmodule Growth.Indicators.Load do
|
|||||||
Read, convert, and load a measure/filename into the proper ets table.
|
Read, convert, and load a measure/filename into the proper ets table.
|
||||||
"""
|
"""
|
||||||
def load_measure({measure, filename}) do
|
def load_measure({measure, filename}) do
|
||||||
|
Logger.debug("load data from #{filename} into #{measure}")
|
||||||
|
|
||||||
filename
|
filename
|
||||||
|> read()
|
|> read()
|
||||||
|> convert()
|
|> convert()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user