-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API #817
Comments
Hi Sacha @sachadray, Thanks for the question! TLDR: Contributions welcome! :) C19S is a purely client-side application, all compute is happening in your browser. No servers involved (other than AWS S3 bucket). There's no official API, and there's no current 3rd party API that we are aware of. People asked about it time to time #117, and we discussed it a bit and concluded that we will offload this to community, due to lack of engineering resources. Bruno has started a little spin-off here: #304, people got excited, but then noone really contributed anything and that quickly died off. If you want to try something yourself still, here is a few pointers:
So if you have time and forces, contributions are welcome! :) |
Hi Ivan @ivan-aksamentov , Thanks so much for the detailed response! I have tried using the CLI as suggested, but I am getting an error message (see below). It was initially working 7 days ago when I started playing around with it, so I am wondering if something has changed since then? The command lines I executed are the following: ^^^^^
Any pointers for what I might be doing wrong would be appreciated! |
@sachadray I cannot reproduce that. To remove the possibility or my environment influencing the results, I made a clean Docker container with the latest LTS version of Node.js (14.15.1), ran the same exact commands and it works fine. I realized you don't need to run the whole Here is how I tested (click to expand)docker run --rm -it node:14.15.1 bash -c 'set -x \
&& apt-get update -y -qq \
&& apt-get install -y -qq git \
&& git clone --recursive https://github.com/neherlab/covid19_scenarios \
&& cd covid19_scenarios \
&& echo "{\"data\":{\"epidemiological\":{\"hospitalStayDays\":3,\"icuStayDays\":14,\"infectiousPeriodDays\":3,\"latencyDays\":3,\"overflowSeverity\":2,\"peakMonth\":0,\"r0\":{\"begin\":4.08,\"end\":4.98},\"seasonalForcing\":0},\"mitigation\":{\"mitigationIntervals\":[{\"color\":\"#cccccc\",\"name\":\"Intervention 1\",\"timeRange\":{\"begin\":\"2020-03-24T00:00:00.000Z\",\"end\":\"2020-09-01T00:00:00.000Z\"},\"transmissionReduction\":{\"begin\":73.8,\"end\":84.2}}]},\"population\":{\"ageDistributionName\":\"United States of America\",\"caseCountsName\":\"United States of America\",\"hospitalBeds\":798288,\"icuBeds\":49499,\"importsPerDay\":0.1,\"initialNumberOfCases\":1,\"populationServed\":327167434},\"simulation\":{\"numberStochasticRuns\":15,\"simulationTimeRange\":{\"begin\":\"2020-02-08T00:00:00.000Z\",\"end\":\"2020-08-31T00:00:00.000Z\"}}},\"name\":\"United States of America\"}" >scenario.json \
&& cat scenario.json \
&& cp .env.example .env \
&& yarn install \
&& yarn schema:totypes \
&& yarn cli --scenario=scenario.json --out=out.json \
&& cat out.json \
'
I suspect maybe you are using older Node.js version? What does If you have a possibility to run in container, definitely try that, to avoid debugging your local environment. Is what you posted the entire error message? It seems to be truncated. In particular, what file and line the Syntax error is pointing to? P.S. That example in CLI readme is a bit 'dated. Although it seems to be running without errors, so, fine for testing, I guess. But for serious operations you better use something that looks more like the current data: src/assets/data. |
Thank you so much Ivan, it works now using your code! I am not sure what went wrong. It is now working with both yarn dev and yarn schema:totypes. My node version is v14.15.1, and the error message is complete, I just replaced the path with relative path to the github folder. Many thanks again! This project is a fantastic public good. |
Hi,
I am planning to run multiple scenarios based on the distribution of input parameters. The idea is to understand the contribution of each parameter individually on the trajectory of the disease.
My limitation so far is that I need to manually enter values using the web interface. Does there exist an up-to-date API that takes input parameters and return results as CSV files?
Sacha
The text was updated successfully, but these errors were encountered: