I try to analyze data from covid19 in Spain. I examine the variation of people hospitalized by covid19. We use data from the Spanish government download from here
I used data from hospitalized people because the data from detected cases depend on the number of tests, and the number of deaths can vary according to the criteria used.
- Coronavirus.ipynb .- Jupyter notebook
- main.py .- Process data /Google cloud function
- index.html .- Web page displays graph create with main.py
You can see the data update daily in link
- Create project
gcloud projects create PROJECT_ID
- Export credentials
export GOOGLE_APPLICATION_CREDENTIALS="./covid19-jota-59ba6be5c3d7.json"
- Create bucket
gsutil mb gs://[BUCKET_NAME]/
- Test local
python main.py
- Deploy function
gcloud functions deploy do_calc --trigger-topic HOSPITALICED_CALC --runtime python37
- Test in cloud
gcloud functions call do_calc --data='{"message": "Hello World!"}'
- Create google cloud scheduler that send a pub/sub topic named HOSPITALICED_CALC
- Upload web page
gsutil cp index.html gs://covid19-jota/
gsutil cp -r css/ gs://covid19-jota/