Web-based map showing confirmed cases, potential cases and vulnerable populations in Canada based on publicly available data and data from https://flatten.ca.
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).
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).
Run firebase login
. Use your flatten credentials. If you're already logged in you might need to run firebase logout
.
Run firebase use --add flatten-staging-271921
. To set the project.
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
.
Check the README at https://github.com/staadecker/flatten-scripts for the data format.
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.