Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
fd6e578
feat: start with indicator correlation section
sgratzl Mar 25, 2021
ea62e82
Merge remote-tracking branch 'origin/dev' into sgratzl/indicatorcorre…
sgratzl Mar 30, 2021
ca35a18
feat: start with correlation mode
sgratzl Mar 30, 2021
9ae43bf
feat: prepare new page
sgratzl Mar 30, 2021
7b2aaa1
Add correlation metrics to the table
tildechris Mar 30, 2021
643e58e
Handle reactive updates.
tildechris Mar 30, 2021
99363cf
Indicator Correlations Page - initial version
dlaliberte Mar 30, 2021
5373723
Silence errors
dlaliberte Mar 30, 2021
0e2f920
Readability and slight asymptotic improvement.
tildechris Mar 31, 2021
94a0795
Add indicator history, using SensorCard, broken for secondary.
dlaliberte Mar 31, 2021
bd30a0c
Silence warnings.
dlaliberte Mar 31, 2021
9ad42f9
Replace SensorCard with HistoryLineChart
dlaliberte Mar 31, 2021
1cfe6fe
Side-by-side HistoryLineChart
dlaliberte Mar 31, 2021
5f56dfa
Extra whitespace (br) before HistoryLineCharts
dlaliberte Mar 31, 2021
5d33d61
Handle not enough coverage case.
tildechris Mar 31, 2021
2d6b8ff
Use find instead of filter for pulling one value.
tildechris Mar 31, 2021
731d8d3
Merge pull request #877 from cmu-delphi/add-correlation-table
tildechris Mar 31, 2021
aa0403e
Cleanup
dlaliberte Mar 31, 2021
e490789
more cleanup.
dlaliberte Mar 31, 2021
0e613ab
Merge remote-tracking branch 'origin/dev' into dlaliberte/correlation5
sgratzl Mar 31, 2021
cdd0074
Merge remote-tracking branch 'origin/sgratzl/indicatorcorrelation' in…
sgratzl Mar 31, 2021
5972102
style: tune correlation table
sgratzl Mar 31, 2021
63ddaba
Remove snake smoothing.
dlaliberte Mar 31, 2021
0469f93
Merge remote-tracking branch 'origin/dlaliberte/correlation5' into sg…
sgratzl Mar 31, 2021
08a6f7b
Replace slider small charts with lag vs r^2
dlaliberte Mar 31, 2021
1feaa9c
Merge branch 'dlaliberte/correlation5' of github.com:cmu-delphi/www-c…
sgratzl Mar 31, 2021
b480a7d
Merge branch 'sgratzl/correlation5_update' into dlaliberte/correlation5
sgratzl Mar 31, 2021
399599f
Merge remote-tracking branch 'origin/dev' into dlaliberte/correlation5
sgratzl Mar 31, 2021
aee5735
style: tune correlation table
sgratzl Apr 1, 2021
56b9653
refacotr: restructure correlation mode
sgratzl Apr 1, 2021
fe20afe
feat: customize historylinechart
sgratzl Apr 1, 2021
f1b6b92
style: tune lag chart
sgratzl Apr 1, 2021
802f761
refactor: change correlation chart
sgratzl Apr 1, 2021
35108d1
feat: add rescale y
sgratzl Apr 1, 2021
432111f
refactor: extract common spec
sgratzl Apr 1, 2021
e065f58
feat: add warning banner alert helper
sgratzl Apr 1, 2021
6771c4e
feat: incorporate lag in line charts by manipulating the domain
sgratzl Apr 1, 2021
141f9f3
feat: add tooltip to correlation plot
sgratzl Apr 1, 2021
0ad4833
feat: move lag to store/params
sgratzl Apr 1, 2021
6162e9c
feat: support download menu
sgratzl Apr 1, 2021
0030d15
feat: improve indicator selector
sgratzl Apr 1, 2021
58d8bca
feat: prepare for about section
sgratzl Apr 1, 2021
ed0b39b
feat: interactive lag chart
sgratzl Apr 1, 2021
581a03c
refactor: split correlation from utils
sgratzl Apr 1, 2021
bfc13f3
feat: add label hint to indicator dropdown
sgratzl Apr 2, 2021
e52e81b
feat: also label for search region
sgratzl Apr 2, 2021
719e88a
feat: extend correlation computation with more data
sgratzl Apr 2, 2021
4e1c8bb
feat: sortable correlation table
sgratzl Apr 2, 2021
885143c
feat: add more details to correlation metric
sgratzl Apr 2, 2021
e7eea14
style: use two significant digits
sgratzl Apr 2, 2021
cdbd836
Merge remote-tracking branch 'origin/dev' into dlaliberte/correlation5
sgratzl Apr 2, 2021
c3b34f6
style: tune landing page for correlation
sgratzl Apr 2, 2021
8e3815f
feat: add correlation table docs
sgratzl Apr 2, 2021
cc87e76
feat: add about text to correlation page
sgratzl Apr 2, 2021
c99abeb
refactor: improve correlation chart lag computation
sgratzl Apr 2, 2021
2134cd3
refactor: use computed lag data in correlation chart
sgratzl Apr 2, 2021
605354f
feat: use hover for lag chart
sgratzl Apr 2, 2021
620fb21
style: fix raw bar hist not using color
sgratzl Apr 5, 2021
9e6dcef
Merge remote-tracking branch 'origin/dev' into dlaliberte/correlation5
sgratzl Apr 9, 2021
4fdc638
feat: update correlation texts
sgratzl Apr 9, 2021
9e3fbc6
feat: better correlation chart title
sgratzl Apr 9, 2021
decc3e6
fix: correlation tooltip not shown
sgratzl Apr 9, 2021
82b6989
fix: trigger a resort upon data loading
sgratzl Apr 9, 2021
f1ccc62
Merge remote-tracking branch 'origin/dev' into dlaliberte/correlation5
sgratzl Apr 12, 2021
161b4af
fix: merge error
sgratzl Apr 12, 2021
015bf42
refactor: about section details
sgratzl Apr 12, 2021
c51e94e
style: smaller correlation chart size
sgratzl Apr 12, 2021
1c1b8e8
feat: unify correlation domains
sgratzl Apr 12, 2021
d497560
refactor: use computed lag info
sgratzl Apr 12, 2021
69aaf27
Merge branch 'dev' into dlaliberte/correlation5
sgratzl Apr 12, 2021
d927b0d
fix: adapt merge changes
sgratzl Apr 12, 2021
ff385d7
style: move about texts adapt help text
sgratzl Apr 12, 2021
81d1b95
style: update correlation text
sgratzl Apr 15, 2021
22696ea
style: some direct label changes
sgratzl Apr 15, 2021
ab82c51
refactor: invert lag meaning
sgratzl Apr 15, 2021
ab145db
feat: better default correlation comparison
sgratzl Apr 15, 2021
d197a3d
fix: correlation chart domains
sgratzl Apr 15, 2021
7b0db8f
test: fix due to reversion of lag
sgratzl Apr 15, 2021
ad04991
fix: small polishing
sgratzl Apr 15, 2021
1b41405
style: tune lag chart title
sgratzl Apr 15, 2021
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
21,832 changes: 21,810 additions & 22 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"d3-time": "^2.0.0",
"d3-time-format": "^3.0.0",
"dirty-reprojectors": "0.0.2",
"eslint": "^7.22.0",
"eslint": "^7.23.0",
"eslint-plugin-cypress": "^2.11.2",
"eslint-plugin-svelte3": "^3.1.2",
"file-loader": "^6.2.0",
Expand All @@ -97,12 +97,12 @@
"marked": "^2.0.1",
"mini-css-extract-plugin": "^1.3.9",
"node-fetch": "^2.6.1",
"regression": "^2.0.1",
"nouislider": "^14.6.4",
"prettier": "^2.2.1",
"prettier-plugin-svelte": "^2.2.0",
"raw-loader": "^4.0.2",
"regenerator-runtime": "^0.13.7",
"regression": "^2.0.1",
"resize-observer-polyfill": "^1.5.1",
"sass": "^1.32.8",
"sass-loader": "^11.0.1",
Expand Down
15 changes: 15 additions & 0 deletions src/components/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@
class:modern
on:click={onContainerClick}
>
{#if title && modern}
<div class="search-label">{title}</div>
{/if}
{#if !multiple}
<span class="uk-search-icon search-icon" class:modern data-uk-icon="icon: {icon}" />
<input
Expand Down Expand Up @@ -548,4 +551,16 @@
padding-top: 4px;
padding-bottom: 4px;
}

.search-label {
font-size: 0.75rem;
line-height: 1;
position: absolute;
top: -0.6rem;
left: 24px;
background: white;
font-weight: 400;
border-radius: 3px;
padding: 2px;
}
</style>
9 changes: 4 additions & 5 deletions src/components/Vega.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,11 @@
Object.entries(signals).forEach(([key, v]) => {
const obj = { name: key };
const existing = spec.signals.find((d) => d.name === key);
if (v == null || ['string', 'number', 'boolean'].includes(typeof v) || v instanceof Date || Array.isArray(v)) {
// assume it is a value
obj.value = v;
} else {
if (typeof v === 'function') {
// mixing the whole object
Object.assign(obj, typeof v === 'function' ? v(existing) : v);
Object.assign(obj, v(existing));
} else {
obj.value = v;
}
if (existing) {
Object.assign(existing, obj);
Expand Down
2 changes: 1 addition & 1 deletion src/components/tooltipUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function createVegaTooltipAdapter(svelteComponent, initialExtraProps = {}
// hide tooltip for null, undefined, or empty string values,
// or when the item's datum.value is null.
const datum = resolveDatum(item);
if (value == null || value === '' || datum.value == null) {
if (value == null || value === '' || (datum.value == null && datum.x == null && datum.y == null)) {
if (isClickingTooltip(event)) {
// ignore
return;
Expand Down
3 changes: 3 additions & 0 deletions src/components/vegaFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Error, expressionFunction, projection } from 'vega';
import { geoAlbersUsaTerritories } from 'geo-albers-usa-territories';
import { fitExtent, fitSize, fitWidth, fitHeight } from 'd3-geo/src/projection/fit.js';
import { timeDay } from 'd3-time';
import { lagToOffset } from '../data/correlationUtils';

function patchedAlbersUsaTerritories() {
// see https://github.com/stamen/geo-albers-usa-territories/pull/8/files
Expand Down Expand Up @@ -54,6 +55,8 @@ export function cachedNumber(datum, params) {
expressionFunction('cachedTime', cachedTime);
expressionFunction('cachedNumber', cachedNumber);

expressionFunction('lagToOffset', lagToOffset);

/**
* @param {string | HTMLElement} root
* @param {import('vega-embed').VisualizationSpec | string} spec
Expand Down
Loading