Comments (1)
Some additional info on how the generator was made.
I wrote this script to generate the scenarios.json file that we have in our repository.
import {scenarioNames, getScenario} from "../src/components/Main/state/getScenario"
import {ageDistributionNames, getAgeDistribution} from "../src/components/Main/state/getAgeDistribution"
import {scenarioNames as severityNames, getSeverityDistribution} from "../src/components/Main/state/getSeverityDistribution"
import {serialize} from "../src/components/Main/state/serialization/serialize"
import fs from 'fs';
let ageDistributionNamesSet: Set<string> = new Set(ageDistributionNames);
let commonNames = scenarioNames.filter(x => ageDistributionNamesSet.has(x));
let severityDefault = severityNames[0];
let supportedPresets: { [id: string]: any } = {};
commonNames.forEach((countryName) => {
let countryData = {
scenario: getScenario(countryName),
scenarioName: countryName,
ageDistribution: getAgeDistribution(countryName),
ageDistributionName: countryName,
severity: getSeverityDistribution(severityDefault),
severityName: severityDefault,
};
//delete all interventions
countryData.scenario.mitigation.mitigationIntervals = [];
const serialized = serialize(countryData);
supportedPresets[countryName] = JSON.parse(serialized);
}
);
fs.writeFile('scenarios.json', JSON.stringify(supportedPresets), function (err) {
if (err) return console.log(err);
console.log('Scenario configs written to scenarios.json');
});
It is entirely possible all that has to be done to fix the incompatibility is to regenerate the scenarios.json. Its possible neherlabs added some parameter here or there.
It looks like the imports moved into the io folder: https://github.com/neherlab/covid19_scenarios/tree/b27f596dd26f3d4666718cbfa430db4007d8f88a/src/io so its possible that just by fixing that it might work. At a glance the actual serialization did not change.
from covid.
Related Issues (20)
- Add Messaging Targeting Pharma Companies, IGOs, Govts for Paid Consulting, while being Oxford-aware HOT 3
- Change the text on the banner that lives at the top of the "models", "mitigation scenarios" and "mitigation" pages
- Improve uncertainty visualization on /calc page
- For small screen sizes (e.g. mobile phone portrait width), remove the sliders (or otherwise fix the UX) on the "Mitigation Calculator" Page
- Improve display of the "Country Rt Estimates" page
- Calculate latest data for countermeasures plot
- Upload .csv with R estimates to the webpage
- Revert coloring in mitigation calculator
- Improve the short-term models
- Show logscale in short term forecast
- Use new data to prepare GLEAMviz model view
- Display the results of GLEAM in the model view
- Distinguish between extrapolated values in the NPI model view
- Gather data from different sources for NPI model HOT 1
- Improvements for GLEAM and NPI before publishing
- UI Improvements before publishing
- Add NPI activation triggers to Gleam simulations HOT 1
- Gleamviz install on Linux
- BUG: Channel selection not preserved in web menu HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from covid.