This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[+] Running 1/1 | |
✔ Container dbt-pipeline Started 20.1s | |
[dbt-docker] /usr/src ➤ dbt seed && dbt run --full-refresh | |
20:59:58 Running with dbt=1.7.13 | |
21:00:02 Registered adapter: snowflake=1.7.2 | |
21:00:05 Unable to do partial parsing because profile has changed | |
21:01:56 Found 290 models, 1240 tests, 3 seeds, 1 operation, 101 sources, 0 exposures, 0 metrics, 1686 macros, 0 groups, 0 semantic models | |
21:01:56 | |
21:01:59 | |
21:01:59 Running 1 on-run-start hook |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(tidycensus) | |
#install your acs api key | |
#census_api_key(YOUR_KEY, install=T) | |
pops <- get_acs(geography = "county", | |
variables = c("B19013_001", | |
"B01002_001", | |
"B01003_001","B01001_002", #sex, male | |
"B01001A_001", #swhite | |
"B15003_001","B15003_017",#education, HS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TEMP FUNCTION | |
loess(x ARRAY<FLOAT64>, | |
y ARRAY<FLOAT64>) | |
RETURNS STRUCT<x ARRAY<FLOAT64>, | |
y ARRAY<FLOAT64>, | |
pred ARRAY<FLOAT64>> | |
LANGUAGE js AS """ | |
//adapted from https://gist.github.com/avibryant/1151823 | |
//adapted from the LoessInterpolator in org.apache.commons.math | |
//turtles on turles. Matches R pretty damn close: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if needed, uncomment out the follow lines and install R packages: | |
# install.packages("dplyr") | |
# install.packages("poliscidata") | |
# install.packages("covidregionaldata") | |
library(dplyr) | |
library(poliscidata) | |
library(covidregionaldata) | |
library(plotly) | |
#get regional covid stats |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(ggplot) | |
library(plotly) | |
#fake data | |
dat = data.frame(x = c(1,2,3), rev = c(10,20,30), upper = c(15,25,35), lower = c(5,15,25)) | |
#create a plot | |
p1 = dat %>% | |
ggplot(aes(x = x, | |
y=rev,ymin=lower,ymax=upper)) + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="app"> | |
<pre> | |
Smoothing <input type="range" min="0" max="0.25" step="0.01" v-model="options.line.smoothing"> <span v-html="options.line.smoothing"></span><br> | |
Flattening <input type="range" min="0" max="1" step="0.01" v-model="options.line.flattening"> <span v-html="options.line.flattening"></span></pre> | |
<div class="container" ref="container"> | |
<svg-chart :datasets="datasets" :options="options" :svg="svg"></svg-chart> | |
</div> | |
</div> | |
<div> |