[WIP] Implement growth assessment using WHO indicators #80
@ -321,6 +321,8 @@ defmodule Growth.Indicators.Download do
|
||||
end
|
||||
|
||||
def save(data, measurement) do
|
||||
File.write("priv/growth/indicators/#{measurement}.csv", data)
|
||||
:wabanex
|
||||
|> Application.app_dir(["priv", "growth", "indicators", "#{measurement}.csv"])
|
||||
|> File.write(data)
|
||||
end
|
||||
end
|
||||
|
@ -66,7 +66,8 @@ defmodule Growth.Indicators.Load do
|
||||
def all do
|
||||
Logger.debug("load growth indicators")
|
||||
|
||||
"priv/growth/indicators/*.csv"
|
||||
:wabanex
|
||||
|> Application.app_dir(["priv", "growth", "indicators", "*.csv"])
|
||||
|> Path.wildcard()
|
||||
|> Enum.map(&create_ets_from_filename/1)
|
||||
|> Enum.map(&Task.async(__MODULE__, :load_measure, [&1]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user