Code Monkey home page Code Monkey logo

covid-19-map's Introduction

COVID-19 Map

Web-based map showing confirmed cases, potential cases and vulnerable populations in Canada based on publicly available data and data from https://flatten.ca.

Important Details

  • Scripts were moved to flatten-scripts.
  • Any changes to the stagging branch are automatically pushed to https://flatten-staging-271921.web.app/. Any changes to master are automatically pushed to https://flatten.ca.
  • All contributions should be made on a new branch and a pull request to staging should be made.
  • Use the Issues tabs to keep track of bugs, improvements and more. Use the Projects tab to keep track of work!

Prerequisites

Setting up

  1. Ask Martin to create you a flatten Google account and give you read permissions to the storage (so you can load data on the map).

  2. Copy over the content from deployment/firebase.staging.json into a new file in your root directory called firebase.json. Do not commit this new file (it should be automatically ignored).

  3. Run firebase login. Use your flatten credentials. If you're already logged in you might need to run firebase logout.

  4. Run firebase use --add flatten-staging-271921. To set the project.

Running the app

  • Run firebase serve and go to the indicated URL (usually localhost:5000).

  • If firebase serve gives you an authentication error you might need to run firebase logout and firebase login.

  • To display the real data run firebase serve --project flatten-271620.

Internal Notes

Data format

Check the README at https://github.com/staadecker/flatten-scripts for the data format.

Setting up Firebase Storage for the first time

This only needs to be done once per project, so don't worry about it.

To allow the frontend of the map to read from the cloud storage buckets (storing the data), you will need to set the origin policy to allow reading of the cloud storage buckets. Add the following to a file called cors.json:

    [
      {
    "origin": ["*"],
    "method": ["GET"],
    "maxAgeSeconds": 3600
  }
]

then run gsutil cors set cors.json gs://flatten-staging-271921.appspot.com

You need to ensure that the firebase rules on the bucket are set up to allow reading of the files externally.

covid-19-map's People

Contributors

staadecker avatar arthurallshire avatar arazd avatar surya-krishnan avatar hy-chen avatar rhubarbwu avatar n-ivan avatar raschamp7 avatar william-wen avatar

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.