Skip to content

Commit c1b17e1

Browse files
authored
Merge pull request #110 from cmu-delphi/release/v2.1.9
Release v2.1.9
2 parents 4b3f036 + 139190a commit c1b17e1

File tree

5 files changed

+23
-16
lines changed

5 files changed

+23
-16
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "www-epivis",
3-
"version": "2.1.8",
3+
"version": "2.1.9",
44
"private": true,
55
"license": "MIT",
66
"description": "",
@@ -24,7 +24,7 @@
2424
"start": "rollup -c -w",
2525
"server": "sirv public --no-clear --port 8080",
2626
"validate": "svelte-check",
27-
"lint": "eslint src --ext .ts,.js,.svelte && prettier --check \"**/*\"",
27+
"lint": "eslint src --ext .ts,.js,.svelte && (prettier --check \"**/*\" || (prettier --write \"**/*\" ; git diff ; false))",
2828
"fix": "eslint src --ext .ts,.js,.svelte --fix && prettier --write \"**/*\"",
2929
"prepare": "husky install",
3030
"prepack": "npm run build",

src/api/EpiData.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import DataSet, { DataGroup } from '../data/DataSet';
2323
import EpiDate from '../data/EpiDate';
2424
import EpiPoint from '../data/EpiPoint';
2525
import { get } from 'svelte/store';
26-
import { expandedDataGroups } from '../store';
26+
import { apiKey, expandedDataGroups, storeApiKeys } from '../store';
2727

2828
// import DataSet from "../data/DataSet";
2929
// import EpiDate from "../data/EpiDate";
@@ -260,6 +260,12 @@ export function importCOVIDcast({
260260
api_key: string;
261261
}): Promise<DataGroup | null> {
262262
const title = `[API] COVIDcast: ${data_source}:${signal} (${geo_type}:${geo_value})`;
263+
if (!api_key && get(storeApiKeys)) {
264+
// if no API key was passed to this method, but we have a saved one, use it...
265+
// this gets around access control and rate limiting when using an epivis "shared"
266+
// link (an URL-encoded signal list, processed through `deriveLinkDefaults`).
267+
api_key = get(apiKey);
268+
}
263269
return loadDataSet(
264270
title,
265271
'covidcast',

src/components/dialogs/ImportAPIDialog.svelte

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,17 @@
6666
ILINet (aka FluView) (source:
6767
<a target="_blank" href="https://gis.cdc.gov/grasp/fluview/fluportaldashboard.html">cdc.gov</a>)
6868
</label>
69+
<label
70+
><input
71+
class="uk-radio"
72+
type="radio"
73+
name="dataSource"
74+
bind:group={$formSelections.dataSource}
75+
value="covidcast"
76+
/>
77+
Delphi Indicators (aka COVIDcast) (source:
78+
<a target="_blank" href="https://delphi.cmu.edu/">delphi.cmu.edu</a>)</label
79+
>
6980
<label
7081
><input
7182
class="uk-radio"
@@ -165,16 +176,6 @@
165176
/>
166177
Delphi Nowcast (source: <a target="_blank" href="https://delphi.cmu.edu/">delphi.cmu.edu</a>)</label
167178
>
168-
<label
169-
><input
170-
class="uk-radio"
171-
type="radio"
172-
name="dataSource"
173-
bind:group={$formSelections.dataSource}
174-
value="covidcast"
175-
/>
176-
Delphi COVIDcast (source: <a target="_blank" href="https://delphi.cmu.edu/">delphi.cmu.edu</a>)</label
177-
>
178179
<label
179180
><input
180181
class="uk-radio"

src/data/data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,6 @@ export const firstEpiWeek = {
392392
export const firstDate = {
393393
twitter: 20111201,
394394
wiki: 20071209,
395-
covidcast: 20200101,
395+
covidcast: 20170815,
396396
covid_hosp: 20200101,
397397
};

0 commit comments

Comments
 (0)