diff --git a/soa-api/src/soa/models/covid_model_bcn.py b/soa-api/src/soa/models/covid_model_bcn.py index 1874041..39cdc11 100644 --- a/soa-api/src/soa/models/covid_model_bcn.py +++ b/soa-api/src/soa/models/covid_model_bcn.py @@ -3,6 +3,7 @@ # Copyright 2020 Luis Blazquez Miñambres (@luisblazquezm), Miguel Cabezas Puerto (@MiguelCabezasPuerto), Óscar Sánchez Juanes (@oscarsanchezj) and Francisco Pinto-Santos (@gandalfran) # See LICENSE for details. +import json import datetime import requests diff --git a/soa-web-app/vue-web/src/components/BarcelonaCovidCasesChart.vue b/soa-web-app/vue-web/src/components/BarcelonaCovidCasesChart.vue index 7006447..d531e90 100644 --- a/soa-web-app/vue-web/src/components/BarcelonaCovidCasesChart.vue +++ b/soa-web-app/vue-web/src/components/BarcelonaCovidCasesChart.vue @@ -93,10 +93,9 @@ export default { // filter data var targetdate = new Date() - targetdate.setDate(targetdate.getDate() - 1); + targetdate.setMonth(targetdate.getMonth() - 2); mappedData = mappedData.filter(function(e){ - return true; - //return (e.date >= targetdate); + return (e.date >= targetdate); }) var geojsonSeries = this.seriesToGeoJson(mappedData); diff --git a/soa-web-app/vue-web/src/components/BarcelonaCovidDeathsChart.vue b/soa-web-app/vue-web/src/components/BarcelonaCovidDeathsChart.vue index b0adbb6..378f22b 100644 --- a/soa-web-app/vue-web/src/components/BarcelonaCovidDeathsChart.vue +++ b/soa-web-app/vue-web/src/components/BarcelonaCovidDeathsChart.vue @@ -93,10 +93,9 @@ export default { // filter data var targetdate = new Date() - targetdate.setDate(targetdate.getDate() - 1); + targetdate.setMonth(targetdate.getMonth() - 2); mappedData = mappedData.filter(function(e){ - return true; - //return (e.date >= targetdate); + return (e.date >= targetdate); }) var geojsonSeries = this.seriesToGeoJson(mappedData);