Skip to content

Commit

Permalink
uk, scottish frs as artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamstark committed Oct 31, 2024
1 parent 9e72d68 commit 265a8d3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 14 deletions.
19 changes: 14 additions & 5 deletions Artifacts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,25 @@ git-tree-sha1 = "288471b266e4ec933d1c6190c8dd7fc3e82d3f4c"
url = "https://virtual-worlds.biz/artifacts//aux-data.tar.gz"

[exampledata]
git-tree-sha1 = "63b5f38f593fe12aa55d8b7ac18b04673a60fa5f"
git-tree-sha1 = "7853136d3530ea531e4f45a29f8fcef81d08fc1c"
lazy = true

[[exampledata.download]]
sha256 = "9a4a78d23d0ba9ee7ecaa7482716233341219c51e61d8b1fc2cba339bd29a17e"
url = "https://virtual-worlds.biz/artifacts//example_data-v2.tar.gz"
sha256 = "c426f605704bde8c79df3573a4f150512614480aa00f900893accaf75408463c"
url = "https://virtual-worlds.biz/artifacts//exampledata.tar.gz"

[scottish-frs-data]
git-tree-sha1 = "44b5c23bc7203bd782d9aa9f7d9dee8f5434fea5"
git-tree-sha1 = "bd6ce2f1f27907a93676494361bda1aa7fc2e50e"
lazy = true

[[scottish-frs-data.download]]
sha256 = "6032a989eb44d7316d7b75d4e935b594853cca7b6fb02b26ef7b6ed2698601a8"
sha256 = "84bec85c1b034f3997995dcc8aa2b0fd55e890a1cd8b768ca98ca46d84bb85fd"
url = "https://virtual-worlds.biz/artifacts//model-data-scotland-2015-2021.tar.gz"

[uk-frs-data]
git-tree-sha1 = "5816f9889082a215017bd36cb09a9dac38145079"
lazy = true

[[uk-frs-data.download]]
sha256 = "e02d1f704d94611eab385b224546958ee9f37b3d2e484234df18d46f34ce22c2"
url = "https://virtual-worlds.biz/artifacts//model-data-2021-2021.tar.gz"
22 changes: 13 additions & 9 deletions src/ExampleHouseholdGetter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module ExampleHouseholdGetter
using DataFrames
using CSV
using ArgCheck
using Pkg.Artifacts

using ScottishTaxBenefitModel
using .Definitions
Expand Down Expand Up @@ -55,9 +56,9 @@ function initialise(

global KEYMAP
global EXAMPLE_HOUSEHOLDS
tmpsource = settings.data_source # hack to work round datasource being wired in to settings
settings.data_source = ExampleSource
println( "DEF_MODEL_DATA_DIR=|$(Definitions.DEF_MODEL_DATA_DIR)| MODEL_DATA_DIR=|$MODEL_DATA_DIR|")
# tmpsource = settings.data_source # hack to work round datasource being wired in to settings
# settings.data_source = ExampleSource
# println( "DEF_MODEL_DATA_DIR=|$(Definitions.DEF_MODEL_DATA_DIR)| MODEL_DATA_DIR=|$MODEL_DATA_DIR|")
# lazy load cons data if needs be
if settings.indirect_method == matching
ConsumptionData.init( settings )
Expand All @@ -66,13 +67,16 @@ function initialise(
WealthData.init( settings )
end
KEYMAP = Vector{AbstractString}()
ds = example_datasets( settings )


# ds = example_datasets( settings )
# hh_dataset = CSV.File( ds.hhlds, delim='\t' ) |> DataFrame
# people_dataset = CSV.File(ds.people, delim='\t' ) |> DataFrame
@show ds
hh_dataset = HouseholdFromFrame.read_hh( ds.hhlds ) # CSV.File( ds.hhlds ) |> DataFrame
people_dataset = HouseholdFromFrame.read_pers( ds.people ) # CSV.File( ds.people ) |> DataFrame
# @show ds
hh_dataset = HouseholdFromFrame.read_hh(
joinpath(artifact"exampledata","households.tab" ))# CSV.File( ds.hhlds ) |> DataFrame
people_dataset =
HouseholdFromFrame.read_pers(
joinpath(artifact"exampledata","people.tab" )) # CSV.File( ds.people ) |> DataFrame

npeople = size( people_dataset)[1]
nhhlds = size( hh_dataset )[1]
Expand All @@ -91,7 +95,7 @@ function initialise(
EXAMPLE_HOUSEHOLDS[hhf.name] = hh
println( EXAMPLE_HOUSEHOLDS[hhf.name].council )
end
settings.data_source = tmpsource
# settings.data_source = tmpsource
return KEYMAP
end

Expand Down

0 comments on commit 265a8d3

Please sign in to comment.