Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 131 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# These settings are for any web project

# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto eol=lf

#
# The above will handle all files NOT found below
#

#
## These files are text and should be normalized (Convert crlf => lf)
#

# source code
*.php text
*.css text
*.sass text
*.scss text
*.less text
*.styl text
*.js text
*.ts text
*.coffee text
*.json text
*.htm text
*.html text
*.xml text
*.txt text
*.ini text
*.inc text
*.pl text
*.rb text
*.py text
*.scm text
*.sql text
*.sh text eof=LF
*.bat text
*.R text

# templates
*.hbt text
*.jade text
*.haml text
*.hbs text
*.dot text
*.tmpl text
*.phtml text

# server config
.htaccess text

# git config
.gitattributes text
.gitignore text

# code analysis config
.jshintrc text
.jscsrc text
.jshintignore text
.csslintrc text

# misc config
*.yaml text
*.yml text
*.editorconfig text
*.toml text

# build config
*.npmignore text
*.bowerrc text
*.prettierignore text
Dockerfile text eof=LF

# Heroku
Procfile text
.slugignore text

# Documentation
*.md text
LICENSE text
AUTHORS text


#
## These files are binary and should be left untouched
#

# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.pyc binary
*.pdf binary

# Source files
# ============
*.pxd text
*.py text
*.py3 text
*.pyw text
*.pyx text
*.sh text eol=lf
*.json text

# Binary files
# ============
*.db binary
*.p binary
*.pkl binary
*.pyc binary
*.pyd binary
*.pyo binary

# Note: .db, .p, and .pkl files are associated
# with the python modules ``pickle``, ``dbm.*``,
# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
# (among others).
*.rda binary
16 changes: 9 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
on:
push:
paths: # run only when an Rmd file changes
- '**.Rmd'
- 'environment.yml'
- '.github/workflows/ci.yaml'
- "**.Rmd"
- "environment.yml"
- ".github/workflows/ci.yaml"

name: ci

Expand All @@ -17,7 +17,7 @@ jobs:
fetch-depth: 3
- name: Cache Conda
uses: actions/cache@v1
with:
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda6-${{ hashFiles('environment.yml') }}
restore-keys: |
Expand Down Expand Up @@ -50,20 +50,22 @@ jobs:
restore-keys: |
${{ runner.os }}-blogdown2-
- name: Build site
shell: bash -l {0}
shell: bash -l {0}
run: |
npm run build:blog

- uses: actions/setup-node@v1
with:
node-version: '12'
node-version: "12"
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- name: Lint
run: npm run lint
- name: Build
run: npm run build

Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/ci_fast.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
on:
push:
paths-ignore: # don't run the fast version when an Rmd file changes
- '**.Rmd'
- 'environment.yml'
- '.github/workflows/ci.yaml'
- "**.Rmd"
- "environment.yml"
- ".github/workflows/ci.yaml"

name: ci_fast

Expand All @@ -14,18 +14,20 @@ jobs:
- uses: actions/checkout@v2
with:
# submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 3 # Fetch all history for .GitInfo and .Lastmod
fetch-depth: 3 # Fetch all history for .GitInfo and .Lastmod

- uses: actions/setup-node@v1
with:
node-version: '12'
node-version: "12"
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- name: Lint
run: npm run lint
- name: Build
run: npm run build

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/public
/resources/_gen
*.exe
/.vscode
/blogdown
/.Rhistory
*_cache
Expand Down
26 changes: 26 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
*.toml
*.jpg
*.png
*.rda
*.rdx
*.RData
*.svg
/blogdown
/.htaccess
/.Rhistory
.gitignore
.prettierignore
/.gitattributes
/LICENSE
/package-lock.json
/content/blog/**/*.html
/static
/public
/Dockerfile
/resources
/assets
*.woff
*.ttf
*.woff2
*.R
*.xml
20 changes: 20 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
printWidth: 120,
semi: true,
trailingComma: "es5",

overrides: [
{
files: ["*.html"],
options: {
parser: "go-template",
},
},
{
files: ["*.Rmd"],
options: {
parser: "markdown",
},
},
],
};
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode"]
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.formatOnSave": true,
"editor.trimAutoWhitespace": false,
"editor.formatOnPaste": true,
"editor.formatOnSaveMode": "modifications",
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ This site is based on [Hugo](https://gohugo.io).
#### Commands

1. run `npm start` to create a development Hugo server
1. run `npm build` to build a minified build in `/public`
1. run `npm run format` to run prettier and format files
1. run `npm run build` to build a minified build in `/public`

### Blog Editor

Expand All @@ -38,9 +39,11 @@ In order to convert the Rmd files to HTML files for Hugo you also need to:
- `local=TRUE` similar to `-D` to process draft files
- `run_hugo=FALSE` to manually run hugo
- `build_rmd=TRUE` force a (re)build of the Rmd pages
1. Alternatively, run `npm run build:blog`
1. Run Hugo server as usual

blogdown also has an integrated server `blogdown::serve_site()` which will render RMarkdown files on the fly and does a similar thing as `hugo server -D`
blogdown also has an integrated server `blogdown::serve_site()` which will render RMarkdown files on the fly and does a similar thing as `hugo server -D`.
A shortcut is available through `npm run start:blog`.

#### Adding a new blog post

Expand Down
2 changes: 1 addition & 1 deletion _output.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
blogdown::html_page:
# force svglite device, since cairo is a mess
dev: "svglite"
dev: svglite
6 changes: 3 additions & 3 deletions content/about/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Public health authorities (federal, state, local), fellow researchers (working o

- Since March 2020, we've created and maintained the [nation's largest public repository of diverse, geographically-detailed, real-time indicators of COVID-19 activity]({{< relref "covidcast" >}}) in the U.S. Our indicators cover every rung of the [severity pyramid](https://docs.google.com/presentation/d/1jvIycxDRMEIozKIowv2UyvSqZyF5y6jR8EAXUEK22D4/edit?usp=sharing), and they're freely available through a [public API]({{< apiref "api/covidcast.html" >}}).

- Several of the underlying data sources (on which these indicators are built) would not exist or be publicly available without our efforts. This includes:
- Several of the underlying data sources (on which these indicators are built) would not exist or be publicly available without our efforts. This includes:

* A massive [national daily survey]({{< relref "surveys">}}) we're running in [partnership with Facebook](https://covid-survey.dataforgood.fb.com/survey_and_map_data.html). This has reached over 12 million Americans since April, providing real-time insights into, e.g., [self-reported symptoms]({{< relref "2020-08-26-fb-survey#whats-in-the-survey" >}}), [mask wearing]({{< relref "2020-10-06-survey-wave-4.html#mask-wearing" >}}), [testing]({{< relref "2020-10-06-survey-wave-4#testing" >}}), and contacts, all broken down by various demographics.
- A massive [national daily survey]({{< relref "surveys">}}) we're running in [partnership with Facebook](https://covid-survey.dataforgood.fb.com/survey_and_map_data.html). This has reached over 12 million Americans since April, providing real-time insights into, e.g., [self-reported symptoms]({{< relref "2020-08-26-fb-survey#whats-in-the-survey" >}}), [mask wearing]({{< relref "2020-10-06-survey-wave-4.html#mask-wearing" >}}), [testing]({{< relref "2020-10-06-survey-wave-4#testing" >}}), and contacts, all broken down by various demographics.

* An enormous database of de-identified medical insurance claims, covering more than half the US population, made possible through health system partners including Change Healthcare. We use this to produce a new [syndromic COVID-19 indicator based on doctor visits]({{< relref "2020-10-14-dv-signal" >}}), and other indicators based on hospitalizations and ICU admissions.
- An enormous database of de-identified medical insurance claims, covering more than half the US population, made possible through health system partners including Change Healthcare. We use this to produce a new [syndromic COVID-19 indicator based on doctor visits]({{< relref "2020-10-14-dv-signal" >}}), and other indicators based on hospitalizations and ICU admissions.

- Since April 2020, we've been supporting and advising the CDC in their community-driven COVID-19 forecasting effort, which includes [creating and evaluating an ensemble forecast]({{< relref "2020-09-21-forecast-demo" >}}) from the 70+ forecasts under submission that serves as the basis for the [CDC's official COVID-19 forecast communications](https://www.cdc.gov/coronavirus/2019-ncov/covid-data/forecasting-us.html). We also contribute our own short-term forecasts of COVID-19 cases and deaths, which can be found in the [COVID-19 Forecast Hub](https://covid19forecasthub.org).
Loading