Media news data processing of Key Performance Indicators that will be included in reports that evaluate how the COVID global sanitary crisis affects the tourism sector in balearic islands.
const moment = require('moment');
var week_ago_date = moment().subtract(7,'d').format('YYYY-MM-DD');
console.log("Generating KPI's for " + week_ago_date)
To resolve 2:
Add contexts in Mongo. Production/development modes can be controlled as an argument (covid-tourism-twitter-reporting likewise)
To execute main.js in production is necessary to:
To resolve 1 use:
const moment = require('moment'); var week_ago_date = moment().subtract(7,'d').format('YYYY-MM-DD'); console.log("Generating KPI's for " + week_ago_date)
To resolve 2:
Add contexts in Mongo. Production/development modes can be controlled as an argument (covid-tourism-twitter-reporting likewise)
const path = require('path').resolve(__dirname, '..'); const argv = require('yargs').argv // ---------------------------------------------------- // Read arguments // ---------------------------------------------------- if (argv.date) week_ago_date = argv.date
if (argv.mode) { var output_path = path + '/files/output/twitter/covid_tourism' } else { var output_path = '/data-mongo/files/output/twitter/covid_tourism' } console.log("Output path: " + output_path)
To resolve 3 code (under development) in covid-tourism-twitter-reporting