Closed mlt39 closed 3 years ago
Sorry for the delay in replying - leave followed by running a major conference.
I've taken a look and the issue is because your data files had errors.
In description.json
you need to use zero-indexing for the column numbers, e.g.
"lookup_columns" : {"code":0, "name":1}
And then for lookup.dat
you need to use commas to separate out the columns, e.g.
lad17cd, lad17nm
E06000001, Hartlepool
E06000002, Middlesbrough
You can see the error messages if you run the metawards executable directly, e.g.
metawards -d 2011Data
if you are overwriting the 2011Data. I don't recommend this. Instead, I recommend that you create a new directory, e.g. TestData, which is in the same directory as 2011Data, and then copy the files into there. You can then use this data by passing in the name of the directory, e.g.
metawards -d TestData
In general though, I don't recommend that you write data files like this. These files are very picky as they are in a legacy format. We have a much nicer way now of creating models. This is a Python or R API that lets you build the model programmatically. There are checks included to help prevent these kinds of errors, and the model is then written to JSON as a single file, thereby making it a lot more robust.
This is described in the quick start guide (https://metawards.org/quickstart/01_R.html#creating-the-wards-network for R and https://metawards.org/quickstart/01_python.html#creating-the-wards-network for Python). It is also described in more detail in the tutorial (https://metawards.org/tutorial/index_part08.html), plus we have full docs of the API (https://metawards.org/api/index_api_MetaWards.html#metawards.Wards - you are looking for Ward
, Wards
etc.)
Closing as no activity and the issue is predominantly a data formatting problem in the input files. Please feel free to reopen if there is anything you want to add.
Hi, I'm trying to create a custom network by creating network files as detailed here: https://metawards.org/fileformats/network.html I have tried a very simple 2-node network, but model runs terminate with no error during the "Building the network" stage.
To reproduce
results = mw.run(model='simple', disease=flu, output="output", force_overwrite_output=1, additional=10)
However running the example networks e.g. "2011Data" work:
results = mw.run(model='2011Data', disease=flu, output="output", force_overwrite_output=1, additional=10)
but once I edit the network, e.g. directly edit the 2011Data files to reduce it to a simple 2-node network, building the network terminates again.Environment: