From c9178cabb0be8369a929d6baef656402e8c1f5b2 Mon Sep 17 00:00:00 2001
From: ChrisSheng97
Date: Fri, 24 Apr 2020 16:06:31 -0400
Subject: [PATCH 01/61] add FAQs
---
site/FAQ.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/site/FAQ.php b/site/FAQ.php
index 5892e5d..1a206b4 100644
--- a/site/FAQ.php
+++ b/site/FAQ.php
@@ -78,6 +78,52 @@
another project (not crowdsourced) we are forecasting future
demand on hospitals.
+
+
+
+
+
+ 5. “Can you only see your score if you’re one of the top 10? / Can you see more than just last weeks forecast? I’m having trouble figuring out if my prior forecasts were any good. "
+
+
+
+ Answer: Unfortunately we can only show the top 10 scores. However, your own score each week is always sent you you in the email you receive the following week.
+
+
+
+
+
+
+ 6. “I only have an iPhone. I do not have a computer to work on. Should I withdraw from the study or is there a way I can use my iPhone? "
+
+
+
+ Answer: Unfortunately we do not yet have a way to support smooth participation by phone.
+
+
+
+
+
+
+ 7. “On forecasting methodologies: Would you like us to forecast the following week, two weeks out, or the rest of the dates on the graph? Do you want us to use a method we can communicate to others? Do you want us to use a statistical method or just look at the data in the context of what you know from public information?"
+
+
+
+ Answer: Please forecast the rest of the time period shown on the Crowdcast display. You may use any method you wish, including qualitative reasoning and personal judgement, using whatever data you have and anything else that you believe is relevant. Your goal is to be as accurate as possible, regardless of the method you use.
+
+
+
+
+
+
+ 8. “On forecasting assumptions: Now that there is a pandemic, people are being asked to self-isolate if they have symptoms, instead of seeing a doctor, because of shortage of testing. Would you have to take that into consideration when making your forecasts? (i.e. it would be lower then you may predict because of lack of doctor’s visits, and lack of testing). Is it based on what I see around my area? People sheltering or using social distancing base not doing those things?"
+
+
+
+ Answer: You should take into account all considerations that you believe are relevant to what will eventually be measured and reported in the location for which you are forecasting.
+
+
+
Date: Fri, 24 Apr 2020 16:13:38 -0500
Subject: [PATCH 02/61] restore development-specific configuration
- deploy to dev paths
- restrict access to known users
- use dev database on localhost
---
deploy.json | 18 +++++++++---------
site/.htaccess | 8 ++++++++
site/common/settings.php | 2 +-
3 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/deploy.json b/deploy.json
index ffdf95a..288fbd3 100644
--- a/deploy.json
+++ b/deploy.json
@@ -7,42 +7,42 @@
{
"type": "move",
"src": "site/.htaccess",
- "dst": "/var/www/html/crowdcast/.htaccess",
+ "dst": "/var/www/html/cc-test/.htaccess",
"add-header-comment": false
},
"// service worker",
{
"type": "move",
"src": "site/sw.js",
- "dst": "/var/www/html/crowdcast/sw.js",
+ "dst": "/var/www/html/cc-test/sw.js",
"add-header-comment": true
},
"// web sources",
{
"type": "move",
"src": "site/",
- "dst": "/var/www/html/crowdcast/",
+ "dst": "/var/www/html/cc-test/",
"match": "^.*\\.php$",
"add-header-comment": true
},
{
"type": "move",
"src": "site/common/",
- "dst": "/var/www/html/crowdcast/common/",
+ "dst": "/var/www/html/cc-test/common/",
"match": "^.*\\.php$",
"add-header-comment": true
},
{
"type": "move",
"src": "site/css/",
- "dst": "/var/www/html/crowdcast/css/",
+ "dst": "/var/www/html/cc-test/css/",
"match": "^.*\\.(css|php)$",
"add-header-comment": true
},
{
"type": "move",
"src": "site/js/",
- "dst": "/var/www/html/crowdcast/js/",
+ "dst": "/var/www/html/cc-test/js/",
"match": "^.*\\.js$",
"add-header-comment": true
},
@@ -51,21 +51,21 @@
{
"type": "move",
"src": "site/images/flags/",
- "dst": "/var/www/html/crowdcast/images/flags/",
+ "dst": "/var/www/html/cc-test/images/flags/",
"match": "^.*\\.png$"
},
"// tutorials",
{
"type": "move",
"src": "site/images/",
- "dst": "/var/www/html/crowdcast/images/",
+ "dst": "/var/www/html/cc-test/images/",
"match": "^.*\\.(gif|mp4)$"
},
"// benchmark data",
{
"type":"move",
"src":"site/data/",
- "dst":"/var/www/html/crowdcast/data/",
+ "dst":"/var/www/html/cc-test/data/",
"match":"^.*\\.csv$"
}
]
diff --git a/site/.htaccess b/site/.htaccess
index 61f4952..4c2fc5b 100644
--- a/site/.htaccess
+++ b/site/.htaccess
@@ -1,5 +1,13 @@
RewriteEngine On
+## Resrtict access to known users ##
+AuthType Basic
+AuthName "Restricted Site: Crowdcast"
+AuthBasicProvider file
+AuthUserFile /var/www/passwords
+Require user cctest
+## Resrtict access to known users ##
+
## Compress Files ##
diff --git a/site/common/settings.php b/site/common/settings.php
index e6c84ee..ce2b3b2 100644
--- a/site/common/settings.php
+++ b/site/common/settings.php
@@ -1,7 +1,7 @@
Date: Fri, 24 Apr 2020 16:14:38 -0500
Subject: [PATCH 03/61] update dev readme
---
README.md | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 06bb328..f3533f2 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,17 @@
# Status
-[](#)
+[](#)
# About
-The Crowdcast website for collecting flu forecasts.
+This is the **development** version of the website.
-The site is live at:
-- https://delphi.cmu.edu/crowdcast
+1. it is generally safe to make changes here at any time, as they will not
+affect the production environment
+2. changes should be merged from this branch into
+[the prod branch](https://github.com/cmu-delphi/www-epicast/tree/prod),
+except for production-specific configuration
-A live demo is available at http://demo.epicast.net/ (User ID is `00000000`)
+See
+[the master branch README.md](https://github.com/cmu-delphi/www-epicast/blob/master/README.md)
+for more information.
From ad0a87a88eef540cd50c221da21e838548d61886 Mon Sep 17 00:00:00 2001
From: undefx
Date: Fri, 24 Apr 2020 18:24:43 -0500
Subject: [PATCH 04/61] use dev branch badge
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index f3533f2..b7d0a11 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Status
-[](#)
+[](#)
# About
From 4c40cbd87987169c303aa802d49b609008c44f7c Mon Sep 17 00:00:00 2001
From: undefx
Date: Fri, 24 Apr 2020 21:23:30 -0500
Subject: [PATCH 05/61] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index b7d0a11..e964d80 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Status
-[](#)
+[](#)
# About
From e46227a87bf8b6260844da1b8026001aa9ba3cb3 Mon Sep 17 00:00:00 2001
From: undefx
Date: Fri, 24 Apr 2020 21:26:13 -0500
Subject: [PATCH 06/61] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index e964d80..b7d0a11 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Status
-[](#)
+[](#)
# About
From e3e92bf5e7bfe07bb51b0370e7ed26438d409201 Mon Sep 17 00:00:00 2001
From: undefx
Date: Tue, 28 Apr 2020 12:46:20 -0500
Subject: [PATCH 07/61] launch without forcing https
- enables local development over http
---
site/launch.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/site/launch.php b/site/launch.php
index cb82fea..af4d1ca 100644
--- a/site/launch.php
+++ b/site/launch.php
@@ -25,7 +25,12 @@
if($path !== '/') {
$path .= '/';
}
-$location = 'https://' . $_SERVER['HTTP_HOST'] . $path . $location; # TODO: Can we let the https rewrite handle this?
+if (stripos($_SERVER['SERVER_PROTOCOL'],'https') === 0) {
+ $protocol = 'https://';
+} else {
+ $protocol = 'http://';
+}
+$location = $protocol . $_SERVER['HTTP_HOST'] . $path . $location; # TODO: Can we let the https rewrite handle this?
header("Location: {$location}");
?>
From a55767d4a671f32daa3de47c63cf268014198522 Mon Sep 17 00:00:00 2001
From: undefx
Date: Tue, 28 Apr 2020 12:47:31 -0500
Subject: [PATCH 08/61] don't lookup nowcast, as it is unused
- don't get the nowcast from the database as it's not used anyway
- the nowcast should be taken from the epidata api, rather than reading
from the database directly
---
site/forecast.php | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/site/forecast.php b/site/forecast.php
index 954b039..32cdc1d 100644
--- a/site/forecast.php
+++ b/site/forecast.php
@@ -93,7 +93,7 @@
$seasonStart = 201936;
//Nowcast (may or may not be available)
-getNowcast($dbh, $output, addEpiweeks($currentWeek, 1), $regionID);
+// getNowcast($dbh, $output, addEpiweeks($currentWeek, 1), $regionID);
if(getPreference($output, 'skip_instructions', 'int') !== 1) {
?>
@@ -124,7 +124,7 @@
History
-
+
@@ -327,7 +327,7 @@ function loader(sidebarTitle,rid,parent,whitelist) {
}
// check for new season
- var si = Math.floor(epidata[i].epiweek / 100);
+ var si = Math.floor(epidata[i].epiweek / 100);
if (modweek < seasonDefn[0]) si = si - 1;
// whitelist: don't create an extra new season for 2009-2010 week 201036-40
if (season<0 || (season != si && (!whitelist || si in whitelist))) {
@@ -335,11 +335,11 @@ function loader(sidebarTitle,rid,parent,whitelist) {
season = si;
module.season[season] = {start:i,year:season,label:season==2009?(season+" pandemic"):season,color:getStyle(rid,season).color,current:season==currentSeason};
// the templating engine needs a list, so we make a list
- module.seasons[mi++] = module.season[season];
+ module.seasons[mi++] = module.season[season];
}
}
module.season[season].end = epidata.length-1;
-
+
curves[rid] = module;
$(parent).append($(Mustache.render(document.getElementById('sidebar_template').innerHTML, module)));
toggleAllSeasons(rid);
From 6f657a8fa601fa594d391af8a34f22eefa2a3759 Mon Sep 17 00:00:00 2001
From: undefx
Date: Tue, 28 Apr 2020 12:50:57 -0500
Subject: [PATCH 09/61] use delphi-hosted epidata library
- include in header as this will be used across several pages in the
near future
- remove outdated local copy of the library
- use hosted version as this will always be up-to-date with the epidata
api
---
site/common/header.php | 1 +
site/forecast.php | 1 -
site/js/delphi_epidata.js | 453 --------------------------------------
3 files changed, 1 insertion(+), 454 deletions(-)
delete mode 100644 site/js/delphi_epidata.js
diff --git a/site/common/header.php b/site/common/header.php
index 27d1d96..792cafe 100644
--- a/site/common/header.php
+++ b/site/common/header.php
@@ -20,6 +20,7 @@
+