GithubHelp home page GithubHelp logo

Comments (7)

r-s-rai avatar r-s-rai commented on May 26, 2024

Hello,

Would it be possible to schedule a meeting about how you want the data implemented? My group and I were thinking about using an Amazon S3 bucket to store the data, but we wanted to coordinate with you guys since you'll be the ones in charge of the S3 bucket and managing it.

from covid19_scenarios.

rneher avatar rneher commented on May 26, 2024

sure, let's discuss. How about tomorrow (Thu) late afternoon CEST, morning East Coast?

from covid19_scenarios.

r-s-rai avatar r-s-rai commented on May 26, 2024

from covid19_scenarios.

ivan-aksamentov avatar ivan-aksamentov commented on May 26, 2024

@r-s-rai Hello, sorry for missing the call.

I've setup a S3 bucket + cloudfront distribution + domain.

So the data is ready to be fetched from:
https://data.covid19-scenarios.org/ageDistribution.json
https://data.covid19-scenarios.org/scenarios.json
https://data.covid19-scenarios.org/caseCounts.json
https://data.covid19-scenarios.org/severityDistributions.json

This is just the contents of the src/assets/data directory.
If you replace the corresponding imports in src/io/defaults/get* with fetches (e.g. using axios) this should do the trick.

CORS is enabled in both S3 and Cloudfront. However preflight (OPTIONS) requests will probably not work. So keep that in mind.

Note however that this simple solution would introduce all kinds of new issues:

  • what if data schema needs to be changed? (like in #743) Developers cannot just modify the files on the bucket, because it will take down the production site.
  • previously data was guaranteed to be always there, in the bundle. Now fetch can fail for any reason and this will require additional plumbing to mitigate.
  • requests are now done in series: first the bundle, then the data. If we proceed with #743 the request chain will only become longer. Each request introduces additional latency.

So the entire adventure is probably more complicated than swapping the imports with requests.

Okay, sounds bad, but are there any other alternatives? I don't know.
So why don't you give it a try and we will see where it goes.
Please open a (draft) pull request early on to keep the discussion going.

Let me know if you have any questions or if you encounter any problems (especially with the AWS setup).

cc @rneher

from covid19_scenarios.

rneher avatar rneher commented on May 26, 2024

@r-s-rai -- as you see in Ivan's comments above, the operation turns out to be slightly trickier than anticipated. We suggest starting first with just replacing bundling of the jsons by fetching. from there, one could then move towards fetching the case counts one-by-one.

from covid19_scenarios.

r-s-rai avatar r-s-rai commented on May 26, 2024

Hello Ivan,

Would it be possible to schedule a meeting with you sometime soon to discuss the code?

Thank you,

Rohan Rai

from covid19_scenarios.

DaveedaKinG avatar DaveedaKinG commented on May 26, 2024

Hello Rai

I think it’ll be a really nice idea to discuss
With you on this

thanks

DaveedaKinG

from covid19_scenarios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.