Skip to content

Commit 877f667

Browse files
committed
Dropbox files have moved so added -L to follow redirect. Last two example are broken so commented out for now
1 parent 1bb3bb0 commit 877f667

File tree

2 files changed

+28
-20
lines changed

2 files changed

+28
-20
lines changed

examples/downloaddata.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
mkdir data
1+
#!/usr/bin/env bash
2+
3+
if [ ! -d data ]; then
4+
mkdir data
5+
fi
26
cd data
3-
curl https://dl.dropbox.com/sh/jjeubxlxuqkzkeq/5W6zkUZXww/million.txt?dl=1 > million.txt
4-
curl https://dl.dropbox.com/s/yuxlaj8okcjta9t/exp.txt?dl=1 > exp.txt
5-
curl https://dl.dropbox.com/s/cbf5skx34grlwy6/lower48.txt?dl=1 > lower48.txt
6-
curl https://dl.dropbox.com/s/gsu2y9vqnx5ps5i/texas.txt?dl=1 > texas.txt
7-
curl https://dl.dropbox.com/s/4zws1nbamorcy9z/x_test.txt?dl=1 > x_test.txt
8-
curl https://dl.dropbox.com/s/mlt4gfqr6n24kxj/y_test.txt?dl=1 > y_test.txt
97

8+
curl -L 'https://dl.dropbox.com/sh/jjeubxlxuqkzkeq/5W6zkUZXww/million.txt?dl=1' > million.txt
9+
curl -L 'https://dl.dropbox.com/s/yuxlaj8okcjta9t/exp.txt?dl=1' > exp.txt
10+
curl -L 'https://dl.dropbox.com/s/cbf5skx34grlwy6/lower48.txt?dl=1' > lower48.txt
11+
curl -L 'https://dl.dropbox.com/s/gsu2y9vqnx5ps5i/texas.txt?dl=1' > texas.txt
12+
curl -L 'https://dl.dropbox.com/s/4zws1nbamorcy9z/x_test.txt?dl=1' > x_test.txt
13+
curl -L 'https://dl.dropbox.com/s/mlt4gfqr6n24kxj/y_test.txt?dl=1' > y_test.txt

examples/sample.sh

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
1-
echo plotting coordinates
1+
#!/usr/bin/env bash
22

3+
if [ ! -d data ]; then
4+
echo 'downloading data'
5+
./downloaddata.sh
6+
fi
7+
8+
echo 'plotting coordinates'
39
scatter --file ./data/texas.txt
410

5-
echo with x and y coords
11+
echo 'with x and y coords'
612
scatter -x ./data/x_test.txt -y ./data/y_test.txt
713

8-
echo plotting a histogram
14+
echo 'plotting a histogram'
915
hist --file ./data/exp.txt
1016

11-
echo with colors
17+
echo 'with colors'
1218
hist --file ./data/exp.txt --colour blue
1319

14-
echo changing the shape of the point
20+
echo 'changing the shape of the point'
1521
hist --file ./data/exp.txt --pch .
1622

17-
echo using stdin
18-
curl https://dl.dropbox.com/u/49171662/example.txt | hist
19-
20-
echo getting data from a webpage
21-
curl http://www.baseball-reference.com/ \
22-
| grep -o -E "[$]([0-9]+)" | grep -o -E "[0-9]+" \
23-
| hist -b 20 -t "Baseball Payrolls" --height 20 --pch "*"
24-
23+
#echo 'using stdin'
24+
#curl -sL https://dl.dropbox.com/u/49171662/example.txt | hist
2525

26+
#echo 'getting data from a webpage'
27+
#curl -s 'http://www.baseball-reference.com' |
28+
#grep -o -E '[$][0-9]+' | grep -o -E '[0-9]+' |
29+
#hist -b 20 -t 'Baseball Payrolls' --height 20 --pch '*'

0 commit comments

Comments
 (0)