urban-analytics / ramp-ua Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://urban-analytics.github.io/RAMP-UA/
License: MIT License
Home Page: https://urban-analytics.github.io/RAMP-UA/
License: MIT License
Assign 'virtual' commuting locations for each individual based on occupation. I.e. all accountants go to one virtual account office etc.
Implement update_current_risk
function
python microsim/microsim_model.py -npf
Causes:
Not reading a parameters file
Traceback (most recent call last):
File "microsim/microsim_model.py", line 1619, in <module>
run_script()
File "/Users/nick/opt/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/nick/opt/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/nick/opt/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/nick/opt/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "microsim/microsim_model.py", line 1552, in run_script
print(f"Running model with the following parameters:\n"
UnboundLocalError: local variable 'calibration_params' referenced before assignment
There are lots of stubs in test_microsim_model
that need writing
Occupation / Industry will be provided by Karyn. Then check individual's occupations and assign all individuals who do the same occupation to the same 'Location' (i.e. similar to them all going to the same Retail venue).
Currently in microsim_model.run_script()
there are checks that the parameter combinations make sense. DO these in a function and also check the relevant ones in the Microsim
constructor in case someone calls the constructor directly (rather than going through run_script
.
In pyCharm: code -> inspect code
Test it, but especially it uses 'HID' which I don't think uniquely identifies a house any more
Testing out the microsim/microsim_model.py
from master branch (commit d2d00af) on Windows leads to a rpy2
error.
$ python microsim/microsim_model.py
Traceback (most recent call last):
File "microsim/microsim_model.py", line 15, in
from r_interface import RInterface
File "C:\Users\medacola\Code\forks\RAMP-UA\microsim\r_interface.py", line 3, in
import rpy2.rinterface
File "C:\Users\medacola\AppData\Local\Continuum\anaconda3\envs\ramp-ua\lib\site-packages\rpy2\rinterface.py", line 6, in
from rpy2.rinterface_lib import openrlib
File "C:\Users\medacola\AppData\Local\Continuum\anaconda3\envs\ramp-ua\lib\site-packages\rpy2\rinterface_lib\openrlib.py", line 44, in
rlib = _dlopen_rlib(R_HOME)
File "C:\Users\medacola\AppData\Local\Continuum\anaconda3\envs\ramp-ua\lib\site-packages\rpy2\rinterface_lib\openrlib.py", line 37, in _dlopen_rlib
rlib = ffi.dlopen(lib_path)
OSError: cannot load library 'C:\Users\medacola\AppData\Local\Continuum\anaconda3\envs\ramp-ua\lib\R\bin\x64\R.dll': error 0x7e
This look like it can't see R installed within the conda environment.
On windows 10 via git-bash:
conda activate ramp-ua
cd RAMP-UA
python microsim/microsim_model.py
I've previously created the conda environment using the environment.yml
and pulled in data using git lfs checkout
.
It's an R library we need. But can't be installed with the rest through conda install r-janitor
. So needs to be installed manually using R install.packages('janotor')
Comprehensive assessment of sensitiviy to different parameters throughout the model
After the extensive changes to the code most of the tests don't work now. I think the problems are:
1 - the test_microsim
object gets manipulated by a number of different functions which will interferre with each other. maybe need to copy it first?
2 - some of the fields (e.g. PID, HID) are not longer present int he dataframe, and some of the individuals will have changed (e.g. not the same people in the same houses any more
These are weird because they assume old column names are present (e..g PID and HID rather than ID and House_ID), which means they cannot be run once the TU&H data have been attached and the column names change.
Read 'time activity' data (dummy for now) to add columns for how people spend doing activities. I.e. Microsim.attach_time_use_data
function
$ python microsim/microsim_model.py
C:\Users\medacola\AppData\Local\Continuum\anaconda3\envs\ramp-ua\lib\site-packages\rpy2\robjects\pandas2ri.py:17: FutureWarning: pandas.core.index is deprecated and will be removed i
n a future version. The public classes are available in the top-level namespace.
from pandas.core.index import Index as PandasIndex
Reading parameters file: ./model_parameters/default.yml. Any other command-line arguments are being ignored
Running model with the following parameters:
Parameters file: ./model_parameters/default.yml
Number of iterations: 10
Data dir: devon_data
Outputting results?: True
Debug mode?: False
Number of repetitions: 1
Lockdown from file? : True
Calibration parameters: {'hazard_multiplier_presymptomatic': 1.0, 'hazard_multiplier_asymptomatic': 1.0, 'hazard_multiplier_symptomatic': 1.0, 'risk_multiplier': 1.0}
Reading time use and health data ...
microsim/microsim_model.py:440: UserWarning: There are 6 / 695308 non-unique individuals.
warnings.warn(f"There are {len(tuh)-len(set(unique_individuals))} / {len(tuh)} non-unique individuals.")
microsim/microsim_model.py:489: UserWarning: 32 people > 18y/o go to school, but they are not being assigned to a primary or secondary school (so their schooling is ignored at the mo
ment
warnings.warn(f"{len(adults_in_school)} people > 18y/o go to school, but they are not being assigned to a "
microsim/microsim_model.py:500: UserWarning: There are 0 households with more than 10 people in them. This covers 0 people. These households are being removed.
warnings.warn(f"There are {len(large_house_idx)} households with more than 10 people in them. This covers "
... finished reading TU&H data. There are 695308 individuals in 346343 houses over 107 MSOAs
Reading retail flow data for Devon...
... read 106990.0 flows from 107 areas.
Assigning individual flows for Retail: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 107/107 [00:05<00:00, 20.01it/s]
Reading school flow data for Devon...
... finished reading school flows.
Assigning individual flows for PrimarySchool: 100%|████████████████████████████████████████████████████████████████████████████████████████████████| 107/107 [00:05<00:00, 18.29it/s]
Assigning individual flows for SecondarySchool: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 107/107 [00:07<00:00, 14.87it/s]
Assigning work venues ...
C:\Users\medacola\AppData\Local\Continuum\anaconda3\envs\ramp-ua\lib\site-packages\rpy2\robjects\pandas2ri.py:17: FutureWarning: pandas.core.index is deprecated and will be removed i
n a future version. The public classes are available in the top-level namespace.
from pandas.core.index import Index as PandasIndex
C:\Users\medacola\AppData\Local\Continuum\anaconda3\envs\ramp-ua\lib\site-packages\rpy2\robjects\pandas2ri.py:17: FutureWarning: pandas.core.index is deprecated and will be removed i
n a future version. The public classes are available in the top-level namespace.
from pandas.core.index import Index as PandasIndex
C:\Users\medacola\AppData\Local\Continuum\anaconda3\envs\ramp-ua\lib\site-packages\rpy2\robjects\pandas2ri.py:17: FutureWarning: pandas.core.index is deprecated and will be removed i
n a future version. The public classes are available in the top-level namespace.
from pandas.core.index import Index as PandasIndex
C:\Users\medacola\AppData\Local\Continuum\anaconda3\envs\ramp-ua\lib\site-packages\rpy2\robjects\pandas2ri.py:17: FutureWarning: pandas.core.index is deprecated and will be removed i
n a future version. The public classes are available in the top-level namespace.
from pandas.core.index import Index as PandasIndex
Rounding all durations: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:02<00:00, 1.72it/s]
Reading time activity multiplier data...
... finished initialisation.
Saving initial models for analysis ...
Initialising R interface. Loading R scripts in C:\Users\medacola\Code\forks\RAMP-UA\R\py_int.
package is up-to-date devel version
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Iteration: 1
Applying regular (google mobility) multiplier 0.9305173110479441
Updating danger associated with visiting each venue
Home activity
Retail activity
PrimarySchool activity
SecondarySchool activity
Work activity
Calculating new disease status...[1] "R timestep: 1"
[1] "First day seeded"
[1] "0 individuals with risk above 5"
[1] "betas calculated"
[1] "probabilities calculated"
[1] "cases assigned"
[1] "PHE cases 10"
[1] "model cases 0"
[1] "Adjusted PHE cases 10"
[1] "w is 0"
[1] "infection and recovery lengths assigned"
[1] "individuals removed"
[1] "updating infection lengths"
Traceback (most recent call last):
File "microsim/microsim_model.py", line 1619, in <module>
File "C:\Users\medacola\AppData\Local\Continuum\anaconda3\envs\ramp-ua\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "C:\Users\medacola\AppData\Local\Continuum\anaconda3\envs\ramp-ua\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "C:\Users\medacola\AppData\Local\Continuum\anaconda3\envs\ramp-ua\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\medacola\AppData\Local\Continuum\anaconda3\envs\ramp-ua\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "microsim/microsim_model.py", line 1595, in run_script
File "microsim/microsim_model.py", line 1452, in run
File "microsim/microsim_model.py", line 1433, in step
File "microsim/microsim_model.py", line 1306, in calculate_new_disease_status
File "C:\Users\medacola\Code\forks\RAMP-UA\microsim\r_interface.py", line 62, in calculate_disease_status
assert len(r_df) == len(individuals)
AssertionError
Windows 10, within ramp-ua conda environment, calling microsim/microsim_model.py
At the moment all indivduals in an area share the same flows. These need to be broken down by individual characteristics. E.g. children of correct age go to primary/seconary school (adults will have no flows to secondary schools). I think we will need two activity locations, primary schools and secondary schools (at the moment just have 'schools')
I added a big explanation about how to add activies. Could you read through the stuff in Microsim.__init_()
to see if it makes sense? If someone else was to help us with the code, do you think the process is clear enough?
Create a multiplier for locations that increases/decreases the infectiveness of the place. E.g. we could make PrimarySchool locations less infective.
At the moment there is a Microsim._make_a_copy
function that resets the random seed and then calls copy.deepcopy
. Implement this properly by overridding __deepcopy__
In microsim_model.py
around line 1378 I think there is some code that looks a bit repetitative, could this be put into a function?
Check that the dummy data have been read in correctly. E.g. check the number of individuals is
accurate, that they link to households correctly, that they have the right flows to the right
destinations and the right durations etc.
Do this in test_microsim()
There are some dummy data avialbale that can test the model. See test_microsim()
and test_step(test_microsim)
in test_microsimulation_model.py
. Now need to write some tests/checks to make sure that population that is created and stepped correctly
Sorry that my first message back is about a bug! Any idea what might be causing this? I have pulled the latest of master
after merging pull request #76 and have updated my R libraries
Saving initial models for analysis ...
Initialising R interface. Loading R scripts in /Users/nick/gp/RAMP-UA/R/py_int.
R[write to console]: Error: Failed to install 'unknown package' from GitHub:
HTTP error 404.
No commit found for the ref no_ff
Did you spell the repo owner (`Urban-Analytics`) and repo name (`rampuaR`) correctly?
- If spelling is correct, check that you have the required permissions to access the repo.
Error trying to start R: Error: Failed to install 'unknown package' from GitHub:
HTTP error 404.
No commit found for the ref no_ff
Did you spell the repo owner (`Urban-Analytics`) and repo name (`rampuaR`) correctly?
- If spelling is correct, check that you have the required permissions to access the repo.
. Libraries probably need installing. Look in the file'R/py_int/covid_run.R' to see which libraries are needed.
Traceback (most recent call last):
File "microsim/microsim_model.py", line 1619, in <module>
run_script()
File "/Users/nick/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/nick/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/nick/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/nick/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "microsim/microsim_model.py", line 1595, in run_script
m.run(iterations)
File "microsim/microsim_model.py", line 1447, in run
self.r_int = RInterface(self.r_script_dir)
File "/Users/nick/gp/RAMP-UA/microsim/r_interface.py", line 35, in __init__
raise e
File "/Users/nick/gp/RAMP-UA/microsim/r_interface.py", line 27, in __init__
R.source("covid_run.R")
File "/Users/nick/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/rpy2/robjects/functions.py", line 198, in __call__
.__call__(*args, **kwargs))
File "/Users/nick/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/rpy2/robjects/functions.py", line 125, in __call__
res = super(Function, self).__call__(*new_args, **new_kwargs)
File "/Users/nick/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/rpy2/rinterface_lib/conversion.py", line 44, in _
cdata = function(*args, **kwargs)
File "/Users/nick/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/rpy2/rinterface.py", line 621, in __call__
raise embedded.RRuntimeError(_rinterface._geterrmessage())
rpy2.rinterface_lib.embedded.RRuntimeError: Error: Failed to install 'unknown package' from GitHub:
HTTP error 404.
No commit found for the ref no_ff
Did you spell the repo owner (`Urban-Analytics`) and repo name (`rampuaR`) correctly?
- If spelling is correct, check that you have the required permissions to access the repo.
The R/py_int
directory has alot going on in it and from as far as I can tell the most important bits are output/
and covid_run.R
.
It'd be great if we could do the following:
run_status
as much as possible into smaller functions with tests so we can better try and isolate problemsFiles to decide on:
covid_run_py.R
.Rhistory
(unless this has something super important in there we should remove this)covid_status_functions.R
- is this now in rampuaR
?devon_cases.RDS
- if this is essential we should move it to a data directorygam_fitted_PHE_cases.RDS
- same as abovegoogle_mobility_all_LAD.R
- is this now in rampuaR
?initialize_and_helper_functions.R
- is this now in rampuaR
?lockdown_multiplier.R
- is this now in rampuaR
?msoa_danger_fn.csv
- same as RDS files aboveplotting_new_cases.R
- is this now in rampuaR
?Thoughts welcome!
This will ensure that they are created equally, have the same columns (e.g. 'x_Flows', 'x_Venues') and can do some error checking
Edit step()
so that the model runs for 2 weeks in 'pre-lockdown' mode then for 2 weeks in 'post-lockdown' mode. After lockdown then use mobility data to esimate changes in time use (see #15)
In the PR #56 I moved the file test_analysis.py
into the tests/ directory.
This is the consistent cause of the test suite failing so i'm going to create an issue on this to keep track of what we're doing about it.
I've tagged in @nickmalleson and @nnelissen as i'd like your input on whether this file is a test file (and so we can update it to pass) or if its an artefact of when you were informally testing stuff (and so it can be removed from the repo).
I'm attempting to troubleshoot #79 but have found a discrepancy in the working devon data and dummy data. New devon data appears to include an extra age
column.
Could we update the dummy data file here to include this column to help me troubleshoot.
I'm not sure how it was created but if its just a simple subsetting operation I'm happy to do it but want to check with @nickmalleson first.
@Sparrow0hawk When running more than 1 set (I think parameter repetitions), seems to want to re-use existing directory from previous repetition? Full error below:
Iteration 3 took 118.96s
Model finished running (iterations: 4)
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/natalie/anaconda3/envs/ramp-ua/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/natalie/anaconda3/envs/ramp-ua/lib/python3.7/multiprocessing/pool.py", line 47, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "microsim/microsim_model.py", line 1658, in _run_multicore
return m.run(iter)
File "microsim/microsim_model.py", line 1497, in run
self._init_output()
File "microsim/microsim_model.py", line 1129, in _init_output
self.output_dir = Microsim._find_new_directory(os.path.join(self.DATA_DIR, "output"))
File "microsim/microsim_model.py", line 299, in _find_new_directory
raise e
File "microsim/microsim_model.py", line 296, in _find_new_directory
os.mkdir(results_subdir)
FileExistsError: [Errno 17] File exists: '/home/natalie/Documents/RAMP-UA/devon_data/output/2'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "microsim/microsim_model.py", line 1662, in
run_script()
File "/home/natalie/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/home/natalie/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/natalie/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/natalie/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "microsim/microsim_model.py", line 1650, in run_script
pool.starmap(_run_multicore, zip(models, iters))
File "/home/natalie/anaconda3/envs/ramp-ua/lib/python3.7/multiprocessing/pool.py", line 276, in starmap
return self._map_async(func, iterable, starmapstar, chunksize).get()
File "/home/natalie/anaconda3/envs/ramp-ua/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
File "/home/natalie/anaconda3/envs/ramp-ua/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/home/natalie/anaconda3/envs/ramp-ua/lib/python3.7/multiprocessing/pool.py", line 47, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "microsim/microsim_model.py", line 1658, in _run_multicore
return m.run(iter)
File "microsim/microsim_model.py", line 1497, in run
self._init_output()
File "microsim/microsim_model.py", line 1129, in _init_output
self.output_dir = Microsim._find_new_directory(os.path.join(self.DATA_DIR, "output"))
File "microsim/microsim_model.py", line 299, in _find_new_directory
raise e
File "microsim/microsim_model.py", line 296, in _find_new_directory
os.mkdir(results_subdir)
FileExistsError: [Errno 17] File exists: '/home/natalie/Documents/RAMP-UA/devon_data/output/2'
Prelimiary lockdown scenario is just to adjust all time use for all people to be roughly equivalent to the changes observed in Google Mobility Reports (prior to doing something more neuanced). Do #16 first.
At the moment I have hard coded columns like 'x_Flows', 'x_Venues', (where x = 'Retail', 'School', etc.). Define these strings formally somewhere e.g. in the ColumnNames
class.
At the moment the model writes the pickle files after every step. See microsim_model.py
around line 1421. Is this necessary? Could it just do it at the end?
If there are any old files in microsim
directory could you get rid of them?
Karyn provided national time-used data for the different activities. In lieu of more comprehensive time-use data, use these national numbers.
update_venue_danger
When individuals are assigned to locations the flows should be normalised so that, for each individual, they sum to 1
At the moment pschool
makes people go to primary and secondary school. Need to adjust appropriately according to age.
Rather than just calibrating against total cases, we should also look at distributions by age, over space, by workplace, etc. We might be able to get the absolute numbers of cases right, but need to make sure the right people are being infected in the right places as well.
Already have household data from the microsim. Turn this into a 'Location' dataset in a simliar way to Retail. Note: all flows will be 100% to one Location (where ID == HID)
retail_name = "Retail" # How to refer to this in data frame columns etc.
stores, stores_flows = Microsim.read_retail_flows_data(self.study_msoas) # (list of shops and a flow matrix)
Microsim.check_sim_flows(stores, stores_flows)
# Assign Retail
self.individuals = Microsim.add_individual_flows(retail_name, self.individuals, stores_flows)
self.activity_locations[retail_name] = ActivityLocation(retail_name, stores, stores_flows)
Need to separate primary and secondary school duration. At the moment everyone is given the same duration, 'pschool', which means that children will be assigned a PrimarySchool duration and seconary school duration, regardless of their age.
I think the only way round this is to make two new columns - 'pschool_primary' and 'pschool_seconary', and set these to either 'pschool' or 0 depending on the age of the child.
See the commenrs around # Assign Schools
in `Microsim.init().
At the moment just have 'schools'. Will need different flows for primary and secondary.
Tests start to run but now fail on test_random
. Something i'll create a new issue for.
def test_random():
"""
Checks that random classes are produce different (or the same!) numbers when they should do
:return:
"""
m1 = Microsim(**microsim_args, read_data=False)
m2 = Microsim(**microsim_args, random_seed=2.0, read_data=False)
m3 = Microsim(**microsim_args, random_seed=2.0, read_data=False)# Genrate a random number from each model. The second two numbers should be the same r1, r2, r3 = [_get_rand(x) for x in [m1, m2, m3]] assert r1 != r2 assert r2 == r3 # Check that this still happens even if they are executed in pools. # Create a large number of microsims and check that all random numbers are unique pool = multiprocessing.Pool() m = [Microsim(**microsim_args, read_data=False) for _ in range(10000)] r = pool.map(_get_rand, m)
assert len(r) == len(set(r))
E assert 10000 == 409
E + where 10000 = len([0.008873069293537483, 0.008873069293537483, 0.008873069293537483, 0.008873069293537483, 0.008873069293537483, 0.008873069293537483, ...])
E + and 409 = len({0.0004759783146218721, 0.0010528736536226102, 0.008873069293537483, 0.009529687314436819, 0.011380324399635655, 0.012347288919539401, ...})
E + where {0.0004759783146218721, 0.0010528736536226102, 0.008873069293537483, 0.009529687314436819, 0.011380324399635655, 0.012347288919539401, ...} = set([0.008873069293537483, 0.008873069293537483, 0.008873069293537483, 0.008873069293537483, 0.008873069293537483, 0.008873069293537483, ...])
On Windows 10 with git bash:
conda activate ramp-ua
pytest
Reproduced within GitHub actions Windows test runner (https://github.com/Urban-Analytics/RAMP-UA/actions/runs/189880378)
Allow to save the current state of the model (e.g. the individuals dataframe, locations dataframes, etc) and reload. Should make it possible to speed things up (don't need to reload and analyse raw text files) and good practice for repeatability.
Thought I'd try creating an issue rather than emailing. @nnelissen & @Sparrow0hawk I've included you mostly for info.
@spoonerf & @jabrams23 I've added hazards multipliers that people give to the shops etc. once they have the disease, and also included a risk multiplier (we could have more of these in the future to model the impacts of some people being more likely to contract the disease than others).
In the default.yml
file there is now:
microsim_calibration:
# These multiply the amount of hazard that individuals pass on to shops etc:
hazard_multiplier_presymptomatic: 1.0
hazard_multiplier_asymptomatic: 1.0
hazard_multiplier_symptomatic: 1.0
# This multiplies the risk received as individuals visit shops etc.
risk_multiplier: 1.0
The changes are on my branch (dev_NM
): f967e1c
I've checked that the parameters get read in properly, which is fine, but I haven't been able to test it though because I am getting a problem with the libraries; see #69
If these multipliers aren't urgent then I can sort them out when I get back from holiday in 10 days. But if you want them sooner could you try running my branch to see if they work? Let me know if they don't and I can probably have a look at it while I'm off.
Hi both,
I'm getting this error, any ideas? I think I'm missing a package, but am not sure which one. I have noticed that the following new packages have been added to environment.yml
:
R[write to console]: Error in c("rampuaR", ) : argument 2 is empty
Error trying to start R: Error in c("rampuaR", ) : argument 2 is empty
. Libraries probably need installing. Look in the file'R/py_int/covid_run.R' to see which libraries are needed.
Traceback (most recent call last):
File "microsim/microsim_model.py", line 1619, in <module>
run_script()
File "/Users/nick/opt/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/nick/opt/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/nick/opt/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/nick/opt/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "microsim/microsim_model.py", line 1595, in run_script
m.run(iterations)
File "microsim/microsim_model.py", line 1447, in run
self.r_int = RInterface(self.r_script_dir)
File "/Users/nick/research_not_syncd/git_projects/RAMP-UA/microsim/r_interface.py", line 35, in __init__
raise e
File "/Users/nick/research_not_syncd/git_projects/RAMP-UA/microsim/r_interface.py", line 27, in __init__
R.source("covid_run.R")
File "/Users/nick/opt/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/rpy2/robjects/functions.py", line 198, in __call__
.__call__(*args, **kwargs))
File "/Users/nick/opt/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/rpy2/robjects/functions.py", line 125, in __call__
res = super(Function, self).__call__(*new_args, **new_kwargs)
File "/Users/nick/opt/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/rpy2/rinterface_lib/conversion.py", line 44, in _
cdata = function(*args, **kwargs)
File "/Users/nick/opt/anaconda3/envs/ramp-ua/lib/python3.7/site-packages/rpy2/rinterface.py", line 621, in __call__
raise embedded.RRuntimeError(_rinterface._geterrmessage())
rpy2.rinterface_lib.embedded.RRuntimeError: Error in c("rampuaR", ) : argument 2 is empty
Karyn has made new data for Devon. Read these and attach them to the existing individuals.
I.e. run the model for n (small number) of iterations and then show how to show (e..g) who the most at risk individuals are, where they work, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.