File tree Expand file tree Collapse file tree 6 files changed +10
-7
lines changed Expand file tree Collapse file tree 6 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ function deriveMetaSensors(metadata: EpiDataMetaSourceInfo[]): {
136
136
m . format === 'per100k' ? 'per 100k' : m . format === 'percent' ? 'per 100' : units [ m . format ] || units . raw ,
137
137
colorScale : colorScales [ m . high_values_are ] ,
138
138
vegaColorScale : vegaColorScales [ m . high_values_are ] ,
139
- useExtendedColorScale : isCasesSignal ( key ) ,
139
+ extendedColorScale : isCasesSignal ( key ) ,
140
140
links : sm . link . map ( ( d ) => `<a href="${ d . href } ">${ d . alt } </a>` ) ,
141
141
credits : credits ,
142
142
formatValue : formatter [ m . format ] || formatter . raw ,
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ export interface Sensor {
68
68
readonly signalTooltip : string ; // short text description
69
69
readonly colorScale : ( this : void , v : number ) => string ;
70
70
readonly vegaColorScale : string ;
71
- readonly useExtendedColorScale : boolean ;
71
+ readonly extendedColorScale : boolean ;
72
72
73
73
readonly links : readonly string [ ] ; // more information links
74
74
readonly credits ?: string ; // credit text
@@ -134,7 +134,7 @@ export function ensureSensorStructure(sensor: Partial<Sensor> & { name: string;
134
134
signalTooltip : sensor . signalTooltip || 'No description available' ,
135
135
colorScale : colorScales [ highValuesAre ] ,
136
136
vegaColorScale : vegaColorScales [ highValuesAre ] ,
137
- useExtendedColorScale : isCasesSignal ( key ) ,
137
+ extendedColorScale : isCasesSignal ( key ) ,
138
138
139
139
links : [ ] ,
140
140
credits : 'We are happy for you to use this data in products and publications.' ,
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export interface SensorConfig {
14
14
signal : string ;
15
15
signalTooltip : string ;
16
16
description : string ;
17
+ extendedColorScale ?: boolean ;
17
18
18
19
unit ?: string ;
19
20
unitShort ?: string ;
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ Name: COVID Cases
78
78
Id: jhu-csse
79
79
Signal: confirmed_7dav_incidence_prop
80
80
Highlight: [default]
81
+ ExtendedColorScale: true
81
82
82
83
83
84
SignalTooltip: Newly reported COVID-19 cases per 100,000 people, based on data from Johns Hopkins University
@@ -88,6 +89,7 @@ Description: This data shows the number of COVID-19 confirmed cases newly report
88
89
Name: COVID Hospital Admissions
89
90
Id: hhs
90
91
Signal: confirmed_admissions_covid_1d_prop_7dav
92
+ ExtendedColorScale: true
91
93
92
94
93
95
SignalTooltip: Confirmed COVID-19 hospital admissions per 100,000 people
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ export class SensorParam {
166
166
}
167
167
168
168
vegaSchemeDomain ( level : RegionLevel = 'county' ) : { domain : [ number , number ] ; scheme : string ; domainMid ?: number } {
169
- if ( ! this . value . useExtendedColorScale ) {
169
+ if ( ! this . value . extendedColorScale ) {
170
170
return {
171
171
domain : this . domain ( level ) ,
172
172
scheme : this . value . vegaColorScale ,
@@ -181,12 +181,12 @@ export class SensorParam {
181
181
}
182
182
183
183
createValueScale ( level : RegionLevel = 'county' ) : ( v : number ) => number {
184
- const domain = this . domain ( level , this . value . useExtendedColorScale ) ;
184
+ const domain = this . domain ( level , this . value . extendedColorScale ) ;
185
185
return scaleLinear ( ) . domain ( [ domain [ 0 ] , domain [ domain . length - 1 ] ] ) ;
186
186
}
187
187
188
188
createColorScale ( level : RegionLevel = 'county' ) : ( v : number ) => string {
189
- const extended = this . value . useExtendedColorScale ;
189
+ const extended = this . value . extendedColorScale ;
190
190
const domain = this . domain ( level , extended ) ;
191
191
if ( ! extended ) {
192
192
return scaleSequential ( this . value . colorScale ) . domain ( domain ) . clamp ( true ) ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Category: Symptoms
29
29
Question: |
30
30
Do you personally know someone in your local community who has COVID-like symptoms?
31
31
Signal: smoothed_whh_cmnty_cli
32
- AddedInWave: 1
32
+ AddedInWave: 2
33
33
34
34
35
35
---
You can’t perform that action at this time.
0 commit comments