Skip to content

Commit f96130a

Browse files
committed
docs: remove coffeescript move to new endpoints
1 parent 6a80069 commit f96130a

32 files changed

+113
-314
lines changed

docs/api/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Please note that our `endpoint` parameters were previously referenced as `source
7070

7171
# The API
7272

73-
The base URL is: https://delphi.cmu.edu/epidata/api.php
73+
The base URL is: https://delphi.cmu.edu/epidata/
7474

7575
## Specifying Epiweeks, Dates, and Lists
7676

@@ -154,7 +154,7 @@ The parameters available for each source are documented in each linked source-sp
154154
# Example URLs
155155

156156
### FluView on 2015w01 (national)
157-
https://delphi.cmu.edu/epidata/api.php?endpoint=fluview&regions=nat&epiweeks=201501
157+
https://delphi.cmu.edu/epidata/fluview/?regions=nat&epiweeks=201501
158158

159159
```json
160160
{
@@ -184,7 +184,7 @@ https://delphi.cmu.edu/epidata/api.php?endpoint=fluview&regions=nat&epiweeks=201
184184
```
185185

186186
### Wikipedia Access article "influenza" on 2020w01
187-
https://delphi.cmu.edu/epidata/api.php?endpoint=wiki&language=en&articles=influenza&epiweeks=202001
187+
https://delphi.cmu.edu/epidata/wiki/?language=en&articles=influenza&epiweeks=202001
188188

189189
```json
190190
{

docs/api/afhsb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ General topics not specific to any particular endpoint are discussed in the
1919

2020
# The API
2121

22-
The base URL is: https://delphi.cmu.edu/epidata/api.php
22+
The base URL is: https://delphi.cmu.edu/epidata/afhsb/
2323

2424
See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
2525

docs/api/cdc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ General topics not specific to any particular endpoint are discussed in the
1919

2020
# The API
2121

22-
The base URL is: https://delphi.cmu.edu/epidata/api.php
22+
The base URL is: https://delphi.cmu.edu/epidata/cdc/
2323

2424
See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
2525

docs/api/client_libraries.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ nav_order: 1
77
# Epidata API Client Libraries.
88

99
Epidata clients are available for
10-
[CoffeeScript](https://github.com/cmu-delphi/delphi-epidata/blob/master/src/client/delphi_epidata.coffee),
1110
[JavaScript](https://github.com/cmu-delphi/delphi-epidata/blob/master/src/client/delphi_epidata.js),
1211
[Python](https://github.com/cmu-delphi/delphi-epidata/blob/master/src/client/delphi_epidata.py),
1312
and
@@ -18,29 +17,16 @@ Surveillance Streams from Facebook Survey CLI for county 06001 and days
1817

1918
For anyone looking for COVIDCast data, please visit our [COVIDCast Libraries](covidcast_clients.md).
2019

21-
### CoffeeScript (in Node.js)
22-
23-
````coffeescript
24-
# Import
25-
{Epidata} = require('./delphi_epidata')
26-
# Fetch data
27-
callback = (result, message, epidata) ->
28-
console.log(result, message, epidata?.length)
29-
Epidata.covidcast(callback, 'fb-survey', 'smoothed_cli', 'day', 'county', [20200401, Epidata.range(20200405, 20200414)], '06001')
30-
````
31-
3220
### JavaScript (in a web browser)
3321

3422
````html
3523
<!-- Imports -->
36-
<script src="jquery.js"></script>
3724
<script src="delphi_epidata.js"></script>
3825
<!-- Fetch data -->
3926
<script>
40-
var callback = function(result, message, epidata) {
41-
console.log(result, message, epidata != null ? epidata.length : void 0);
42-
};
43-
Epidata.covidcast(callback, 'fb-survey', 'smoothed_cli', 'day', 'county', [20200401, Epidata.range(20200405, 20200414)], '06001');
27+
EpidataAsync.covidcast('fb-survey', 'smoothed_cli', 'day', 'county', [20200401, Epidata.range(20200405, 20200414)], '06001').then((res) => {
28+
console.log(res.result, res.message, res.epidata != null ? res.epidata.length : 0);
29+
});
4430
</script>
4531
````
4632

docs/api/covid_hosp.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ parent: Epidata API (Other Diseases)
66
# COVID-19 Hospitalization by State
77

88
This data source is a mirror of the "COVID-19 Reported Patient Impact and
9-
Hospital Capacity by State Timeseries" and "COVID-19 Reported Patient Impact and
9+
Hospital Capacity by State Timeseries" and "COVID-19 Reported Patient Impact and
1010
Hospital Capacity by State" datasets provided by the US Department of
1111
Health & Human Services via healthdata.gov. The latter provides more frequent updates,
1212
so it is combined with the former to create a single dataset which is as recent as possible.
1313

1414
For more information, see the
1515
[official description and data dictionary at healthdata.gov](https://healthdata.gov/Hospital/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/g62h-syeh)
16-
for "COVID-19 Reported Patient Impact and Hospital Capacity by State Timeseries,"
16+
for "COVID-19 Reported Patient Impact and Hospital Capacity by State Timeseries,"
1717
as well as the [official description](https://healthdata.gov/dataset/COVID-19-Reported-Patient-Impact-and-Hospital-Capa/6xf2-c3ie)
1818
for "COVID-19 Reported Patient Impact and Hospital Capacity by State."
1919

@@ -70,7 +70,7 @@ If `issues` is not specified, then the most recent issue is used by default.
7070
# Example URLs
7171

7272
### MA on 2020-05-10 (per most recent issue)
73-
https://delphi.cmu.edu/epidata/api.php?endpoint=covid_hosp&states=MA&dates=20200510
73+
https://delphi.cmu.edu/epidata/covid_hosp/?states=MA&dates=20200510
7474

7575
```json
7676
{
@@ -141,7 +141,7 @@ https://delphi.cmu.edu/epidata/api.php?endpoint=covid_hosp&states=MA&dates=20200
141141

142142
# Code Samples
143143

144-
Libraries are available for [CoffeeScript](../../src/client/delphi_epidata.coffee), [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
144+
Libraries are available for [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
145145
The following sample shows how to import the library and fetch MA on 2020-05-10
146146
(per most recent issue).
147147

docs/api/covid_hosp_facility.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ HHS. New versions are expected to be published roughly weekly.
3030

3131
# The API
3232

33-
The base URL is: https://delphi.cmu.edu/epidata/api.php
33+
The base URL is: https://delphi.cmu.edu/epidata/covid_hosp_facility/
3434

3535
See [this documentation](README.md) for details on specifying locations and dates.
3636

@@ -80,7 +80,7 @@ has been renamed here for clarity.
8080
# Example URLs
8181

8282
### Moses Taylor Hospital (Scranton, PA) on the first collection week of December 2020 (per most recent issue)
83-
https://delphi.cmu.edu/epidata/api.php?source=covid_hosp_facility&hospital_pks=390119&collection_weeks=20201201-20201207
83+
https://delphi.cmu.edu/epidata/covid_hosp_facility/?hospital_pks=390119&collection_weeks=20201201-20201207
8484

8585
```json
8686
{
@@ -190,7 +190,7 @@ https://delphi.cmu.edu/epidata/api.php?source=covid_hosp_facility&hospital_pks=3
190190

191191
# Code Samples
192192

193-
Libraries are available for [CoffeeScript](../../src/client/delphi_epidata.coffee), [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
193+
Libraries are available for [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
194194
The following sample shows how to import the library and fetch Moses Taylor
195195
Hospital (Scranton, PA) on the first collection week of December 2020 (per most
196196
recent issue).

docs/api/covid_hosp_facility_lookup.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This data source provides metadata about healthcare facilities in the US.
3030

3131
# The API
3232

33-
The base URL is: https://delphi.cmu.edu/epidata/api.php?source=covid_hosp_facility_lookup
33+
The base URL is: https://delphi.cmu.edu/epidata/covid_hosp_facility_lookup/
3434

3535
See [this documentation](README.md) for details on specifying locations and dates.
3636

@@ -61,7 +61,7 @@ supported.
6161
# Example URLs
6262

6363
### Lookup facilities in the city of Southlake (TX)
64-
https://delphi.cmu.edu/epidata/api.php?source=covid_hosp_facility_lookup&city=southlake
64+
https://delphi.cmu.edu/epidata/covid_hosp_facility_lookup/?city=southlake
6565

6666
```json
6767
{
@@ -99,7 +99,7 @@ https://delphi.cmu.edu/epidata/api.php?source=covid_hosp_facility_lookup&city=so
9999

100100
# Code Samples
101101

102-
Libraries are available for [CoffeeScript](../../src/client/delphi_epidata.coffee), [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
102+
Libraries are available for [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
103103
The following sample shows how to import the library and fetch facilities in
104104
the city of Southlake (TX).
105105

docs/api/covidcast_meta.md

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ geographic levels at which they are reported.
1313

1414
## The API
1515

16-
The base URL is: https://api.covidcast.cmu.edu/epidata/api.php
16+
The base URL is: https://api.covidcast.cmu.edu/epidata/
1717

1818
See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
1919

@@ -45,7 +45,7 @@ None required.
4545

4646
## Example URLs
4747

48-
https://api.covidcast.cmu.edu/epidata/api.php?endpoint=covidcast_meta
48+
https://api.covidcast.cmu.edu/epidata/covidcast_meta/
4949

5050
```json
5151
{
@@ -73,32 +73,19 @@ https://api.covidcast.cmu.edu/epidata/api.php?endpoint=covidcast_meta
7373

7474
## Code Samples
7575

76-
Libraries are available for [CoffeeScript](../../src/client/delphi_epidata.coffee), [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
76+
Libraries are available for [JavaScript](../../src/client/delphi_epidata.js), [Python](../../src/client/delphi_epidata.py), and [R](../../src/client/delphi_epidata.R).
7777
The following samples show how to import the library and fetch Delphi's COVID-19 Surveillance Streams metadata.
7878

79-
### CoffeeScript (in Node.js)
80-
81-
````coffeescript
82-
# Import
83-
{Epidata} = require('./delphi_epidata')
84-
# Fetch data
85-
callback = (result, message, epidata) ->
86-
console.log(result, message, epidata?.length)
87-
Epidata.covidcast_meta(callback)
88-
````
89-
9079
### JavaScript (in a web browser)
9180

9281
````html
9382
<!-- Imports -->
94-
<script src="jquery.js"></script>
9583
<script src="delphi_epidata.js"></script>
9684
<!-- Fetch data -->
9785
<script>
98-
var callback = function(result, message, epidata) {
99-
console.log(result, message, epidata != null ? epidata.length : void 0);
100-
};
101-
Epidata.covidcast_meta(callback);
86+
EpidataAsync.covidcast_meta().then((res) => {
87+
console.log(res.result, res.message, res.epidata != null ? res.epidata.length : 0);
88+
});
10289
</script>
10390
````
10491

docs/api/delphi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ General topics not specific to any particular endpoint are discussed in the
1919

2020
# The API
2121

22-
The base URL is: https://delphi.cmu.edu/epidata/api.php
22+
The base URL is: https://delphi.cmu.edu/epidata/delphi/
2323

2424
See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
2525

@@ -58,7 +58,7 @@ See [this documentation](README.md) for details on specifying epiweeks, dates, a
5858
# Example URLs
5959

6060
### Delphi on 2020w01 (EC)
61-
https://delphi.cmu.edu/epidata/api.php?endpoint=delphi&system=ec&epiweek=202001
61+
https://delphi.cmu.edu/epidata/delphi/?system=ec&epiweek=202001
6262

6363
```json
6464
{

docs/api/dengue_nowcast.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ General topics not specific to any particular endpoint are discussed in the
2020

2121
# The API
2222

23-
The base URL is: https://delphi.cmu.edu/epidata/api.php
23+
The base URL is: https://delphi.cmu.edu/epidata/dengue_nowcast/
2424

2525
See [this documentation](README.md) for details on specifying epiweeks, dates, and lists.
2626

0 commit comments

Comments
 (0)