In [99]:
using DataFrames
using Datetime
using Gadfly


Warning: using Datetime.datetime in module Main conflicts with an existing identifier.
Warning: using Datetime.date in module Main conflicts with an existing identifier.
Warning: using Datetime.month in module Main conflicts with an existing identifier.
Warning: using Datetime.day in module Main conflicts with an existing identifier.
Warning: using Datetime.DateTime in module Main conflicts with an existing identifier.

In [115]:
#Let's get some data
#This URL contains daily closing transaction prices for a Bitcoin - US dollar exchange market
download("https://blockchain.info/charts/market-price?showDataPoints=false&timespan=&show_header=true&daysAverageString=1&scale=0&format=csv&address=", 
"market-price.csv")


  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10594    0 10594    0     0  10280      0 --:--:--  0:00:01 --:--:-- 10285
Out[115]:
"market-price.csv"

In [123]:
#Now load this into a DataFrame, specifying the column labels manually.
bitcoin_prices = readtable("market-price.csv", colnames=["date", "USD"])


Out[123]:
dateUSD
124/01/2013 18:15:0519.18999
225/01/2013 18:15:0518.8348
326/01/2013 18:15:0517.61926
427/01/2013 18:15:0517.99999
528/01/2013 18:15:0518.45
629/01/2013 18:15:0519.8
730/01/2013 18:15:0519.7
831/01/2013 18:15:0521.43
901/02/2013 18:15:0521.3
1002/02/2013 18:15:0521.1
1103/02/2013 18:15:0520.68
1204/02/2013 18:15:0521.05
1305/02/2013 18:15:0520.79
1406/02/2013 18:15:0521.3339
1507/02/2013 18:15:0522.15
1608/02/2013 18:15:0522.15
1709/02/2013 18:15:0522.91881
1810/02/2013 18:15:0523.47287
1911/02/2013 18:15:0523.92002
2012/02/2013 18:15:0524.8084
2113/02/2013 18:15:0525.44947
2214/02/2013 18:15:0525.10187
2315/02/2013 18:15:0526.96794
2416/02/2013 18:15:0527.14766
2517/02/2013 18:15:0526.69557
2618/02/2013 18:15:0526.62055
2719/02/2013 18:15:0527.80907
2820/02/2013 18:15:0529.35363
2921/02/2013 18:15:0529.66494
3022/02/2013 18:15:0530.36198
3123/02/2013 18:15:0529.48604
3224/02/2013 18:15:0529.67859
3325/02/2013 18:15:0529.94685
3426/02/2013 18:15:0530.76361
3527/02/2013 18:15:0531.12813
3628/02/2013 18:15:0532.60091
3701/03/2013 18:15:0533.51413
3802/03/2013 18:15:0534.15486
3903/03/2013 18:15:0534.07332
4004/03/2013 18:15:0534.92435
4105/03/2013 18:15:0538.56574
4206/03/2013 18:15:0544.2658
4307/03/2013 18:15:0542.5578
4408/03/2013 18:15:0542.48205
4509/03/2013 18:15:0544.87112
4610/03/2013 18:15:0547.05404
4711/03/2013 18:15:0546.99204
4812/03/2013 18:15:0544.0596
4913/03/2013 18:15:0545.69083
5014/03/2013 18:15:0547.28937
5115/03/2013 18:15:0547.13189
5216/03/2013 18:15:0546.82327
5317/03/2013 18:15:0547.33354
5418/03/2013 18:15:0547.5382
5519/03/2013 18:15:0552.76516
5620/03/2013 18:15:0560.00443
5721/03/2013 18:15:0566.98106
5822/03/2013 18:15:0572.00271
5923/03/2013 18:15:0565.34818
6024/03/2013 18:15:0565.07712
6125/03/2013 18:15:0573.29676
6226/03/2013 18:15:0576.59216
6327/03/2013 18:15:0583.31407
6428/03/2013 18:15:0591.48657
6529/03/2013 18:15:0587.70095
6630/03/2013 18:15:0590.4329
6731/03/2013 18:15:0592.47568
6801/04/2013 18:15:0597.5172
6902/04/2013 18:15:05104.79261
7003/04/2013 18:15:05126.30169
7104/04/2013 18:15:05128.37969
7205/04/2013 18:15:05136.41291
7306/04/2013 18:15:05142.34668
7407/04/2013 18:15:05151.24731
7508/04/2013 18:15:05176.92779
7609/04/2013 18:15:05201.34118
7710/04/2013 18:15:05237.56729
7811/04/2013 18:15:05159.82983
7912/04/2013 18:15:0583.66403
8013/04/2013 18:15:05106.76121
8114/04/2013 18:15:05110.34214
8215/04/2013 18:15:05110.34214
8316/04/2013 18:15:05110.34214
8417/04/2013 18:15:0579.94208
8518/04/2013 18:15:0592.1943
8619/04/2013 18:15:05115.26996
8720/04/2013 18:15:05119.87748
8821/04/2013 18:15:05125.37954
8922/04/2013 18:15:05120.94339
9023/04/2013 18:15:05130.14464
9124/04/2013 18:15:05149.92694
9225/04/2013 18:15:05153.06395
9326/04/2013 18:15:05135.2309
9427/04/2013 18:15:05134.98345
9528/04/2013 18:15:05130.58545
9629/04/2013 18:15:05140.37754
9730/04/2013 18:15:05142.23439
9801/05/2013 18:15:05131.876
9902/05/2013 18:15:05110.05182
10003/05/2013 18:15:0595.00099
10104/05/2013 18:15:05102.08299
10205/05/2013 18:15:05113.08898
10306/05/2013 18:15:05119.70893
10407/05/2013 18:15:05108.51747
10508/05/2013 18:15:05111.78448
10609/05/2013 18:15:05112.92582
10710/05/2013 18:15:05117.1565
10811/05/2013 18:15:05116.78895
10912/05/2013 18:15:05114.93561
11013/05/2013 18:15:05116.44916
11115/05/2013 18:15:05111.55342
11216/05/2013 18:15:05114.42047
11317/05/2013 18:15:05119.49063
11418/05/2013 18:15:05123.41201
11519/05/2013 18:15:05122.70054
11620/05/2013 18:15:05122.10098
11721/05/2013 18:15:05122.1923
11822/05/2013 18:15:05122.72872
11923/05/2013 18:15:05124.53269
12024/05/2013 18:15:05128.3434
12125/05/2013 18:15:05131.70002
12226/05/2013 18:15:05133.14468
12327/05/2013 18:15:05134.00382
12428/05/2013 18:15:05128.13203
12529/05/2013 18:15:05129.04421
12630/05/2013 18:15:05131.12181
12731/05/2013 18:15:05128.5057
12801/06/2013 18:15:05128.37584
12902/06/2013 18:15:05122.46257
13003/06/2013 18:15:05119.09414
13104/06/2013 18:15:05121.48543
13205/06/2013 18:15:05121.20351
13306/06/2013 18:15:05121.4591
13407/06/2013 18:15:05114.36365
13508/06/2013 18:15:05109.82333
13609/06/2013 18:15:0596.83872
13710/06/2013 18:15:05103.29267
13811/06/2013 18:15:05106.2615
13912/06/2013 18:15:05109.12762
14013/06/2013 18:15:05108.94413
14114/06/2013 18:15:05102.35923
14215/06/2013 18:15:05100.63417
14316/06/2013 18:15:05100.16352
14417/06/2013 18:15:05100.7685
14518/06/2013 18:15:05106.25666
14619/06/2013 18:15:05107.54956
14720/06/2013 18:15:05110.32526
14821/06/2013 18:15:05111.10195
14922/06/2013 18:15:05108.92411
15023/06/2013 18:15:05107.79626
15124/06/2013 18:15:05104.25029
15225/06/2013 18:15:05104.16325
15326/06/2013 18:15:05103.76724
15427/06/2013 18:15:05103.27516
15528/06/2013 18:15:0598.90943
15629/06/2013 18:15:0596.0465
15730/06/2013 18:15:0596.07098
15801/07/2013 18:15:0594.35016
15902/07/2013 18:15:0589.56544
16003/07/2013 18:15:0587.02898
16104/07/2013 18:15:0578.97113
16205/07/2013 18:15:0574.25453
16306/07/2013 18:15:0569.70287
16407/07/2013 18:15:0569.02786
16508/07/2013 18:15:0575.87392
16609/07/2013 18:15:0575.56044
16710/07/2013 18:15:0577.2335
16811/07/2013 18:15:0585.52658
16912/07/2013 18:15:0596.10023
17013/07/2013 18:15:0592.57212
17114/07/2013 18:15:0596.17577
17215/07/2013 18:15:0597.19351
17316/07/2013 18:15:0598.47207
17417/07/2013 18:15:0598.10521
17518/07/2013 18:15:0591.31361
17619/07/2013 18:15:0590.70776
17720/07/2013 18:15:0592.54151
17821/07/2013 18:15:0589.95843
17922/07/2013 18:15:0590.80899
18023/07/2013 18:15:0593.68958
18124/07/2013 18:15:0594.30117
18225/07/2013 18:15:0595.42348
18326/07/2013 18:15:0596.44437
18427/07/2013 18:15:0594.71152
18528/07/2013 18:15:0596.64393
18629/07/2013 18:15:05100.22914
18730/07/2013 18:15:05101.71264
18801/08/2013 18:15:05106.13525
18902/08/2013 18:15:05104.62145
19003/08/2013 18:15:05103.79108
19104/08/2013 18:15:05104.50441
19205/08/2013 18:15:05106.13903
19306/08/2013 18:15:05106.54382
19407/08/2013 18:15:05106.06197
19508/08/2013 18:15:05103.52903
19609/08/2013 18:15:05103.4481
19711/08/2013 18:15:05103.66512
19812/08/2013 18:15:05104.49856
19914/08/2013 18:15:05111.46537
20015/08/2013 18:15:05111.75481
20116/08/2013 18:15:05109.87746
20217/08/2013 18:15:05110.67226
20318/08/2013 18:15:05113.38927
20419/08/2013 18:15:05118.10597
20520/08/2013 18:15:05119.97866
20621/08/2013 18:15:05122.16599
20722/08/2013 18:15:05122.50085
20823/08/2013 18:15:05120.45979
20924/08/2013 18:15:05119.04343
21025/08/2013 18:15:05120.76731
21126/08/2013 18:15:05121.87772
21227/08/2013 18:15:05127.18842
21328/08/2013 18:15:05129.98599
21430/08/2013 18:15:05134.92093
21531/08/2013 18:15:05140.39747
21602/09/2013 18:15:05145.33931
21703/09/2013 18:15:05145.01891
21804/09/2013 18:15:05143.99611
21905/09/2013 18:15:05133.57982
22006/09/2013 18:15:05131.94775
22107/09/2013 18:15:05126.10718
22208/09/2013 18:15:05127.218
22309/09/2013 18:15:05128.96113
22410/09/2013 18:15:05133.19442
22511/09/2013 18:15:05133.93903
22612/09/2013 18:15:05140.76378
22713/09/2013 18:15:05141.62301
22814/09/2013 18:15:05140.27874
22915/09/2013 18:15:05137.41171
23016/09/2013 18:15:05139.54818
23117/09/2013 18:15:05139.11795
23218/09/2013 18:15:05140.10618
23319/09/2013 18:15:05138.83326
23420/09/2013 18:15:05134.91019
23521/09/2013 18:15:05134.22792
23622/09/2013 18:15:05132.90102
23723/09/2013 18:15:05133.61771
23824/09/2013 18:15:05133.69101
23925/09/2013 18:15:05136.06683
24026/09/2013 18:15:05136.10723
24127/09/2013 18:15:05137.75911
24228/09/2013 18:15:05139.72007
24329/09/2013 18:15:05143.53453
24430/09/2013 18:15:05142.73791
24501/10/2013 18:15:05141.62903
24602/10/2013 18:15:05128.25736
24703/10/2013 18:15:05125.00449
24804/10/2013 18:15:05133.59297
24905/10/2013 18:15:05137.38172
25006/10/2013 18:15:05136.21887
25107/10/2013 18:15:05137.10394
25208/10/2013 18:15:05136.73281
25309/10/2013 18:15:05138.85832
25410/10/2013 18:15:05140.21331
25511/10/2013 18:15:05140.64634
25612/10/2013 18:15:05141.42238
25713/10/2013 18:15:05143.33601
25814/10/2013 18:15:05149.41995
25915/10/2013 18:15:05152.25552
26016/10/2013 18:15:05157.2206
26117/10/2013 18:15:05153.40576
26218/10/2013 18:15:05160.62448
26319/10/2013 18:15:05178.48081
26420/10/2013 18:15:05181.53101
26521/10/2013 18:15:05190.64537
26622/10/2013 18:15:05197.99909
26723/10/2013 18:15:05209.09625
26824/10/2013 18:15:05208.6843
26925/10/2013 18:15:05192.95
27026/10/2013 18:15:05191.72586
27127/10/2013 18:15:05193.52916
27228/10/2013 18:15:05204.73768
27329/10/2013 18:15:05209.06107
27430/10/2013 18:15:05213.5504
27531/10/2013 18:15:05208.79511
27601/11/2013 18:15:05212.81266
27702/11/2013 18:15:05212.8422
27803/11/2013 18:15:05215.43336
27904/11/2013 18:15:05226.16464
28005/11/2013 18:15:05242.89802
28106/11/2013 18:15:05256.58395
28207/11/2013 18:15:05297.46876
28308/11/2013 18:15:05323.71571
28409/11/2013 18:15:05367.83843
28510/11/2013 18:15:05333.73778
28611/11/2013 18:15:05338.92009
28712/11/2013 18:15:05375.9822
28813/11/2013 18:15:05393.87295
28914/11/2013 18:15:05429.94114
29015/11/2013 18:15:05437.49844
29116/11/2013 18:15:05446.00754
29217/11/2013 18:15:05486.64872
29318/11/2013 18:15:05579.41604
29419/11/2013 18:15:05710.06617
29520/11/2013 18:15:05576.45034
29621/11/2013 18:15:05650.38315
29722/11/2013 18:15:05742.15764
29823/11/2013 18:15:05824.11905
29924/11/2013 18:15:05809.16756
30025/11/2013 18:15:05809.69932
30126/11/2013 18:15:05847.37691
30227/11/2013 18:15:05972.21835
30328/11/2013 18:15:051086.50818
30429/11/2013 18:15:051159.00182
30530/11/2013 18:15:051203.4184
30601/12/2013 18:15:051150.08882
30702/12/2013 18:15:051024.7252
30803/12/2013 18:15:051107.06561
30904/12/2013 18:15:051170.46278
31005/12/2013 18:15:051091.62121
31106/12/2013 18:15:051042.7746
31207/12/2013 18:15:05767.77696
31308/12/2013 18:15:05726.58623
31409/12/2013 18:15:05863.79314
31510/12/2013 18:15:05935.89805
31611/12/2013 18:15:05979.61901
31712/12/2013 18:15:05889.63983
31813/12/2013 18:15:05930.79973
31914/12/2013 18:15:05911.20089
32015/12/2013 18:15:05874.93158
32116/12/2013 18:15:05868.14062
32217/12/2013 18:15:05744.5032
32318/12/2013 18:15:05584.0669
32419/12/2013 18:15:05620.42169
32520/12/2013 18:15:05724.59597
32621/12/2013 18:15:05660.98483
32722/12/2013 18:15:05659.59835
32823/12/2013 18:15:05662.33077
32924/12/2013 18:15:05698.43107
33025/12/2013 18:15:05696.82096
33126/12/2013 18:15:05749.74441
33227/12/2013 18:15:05804.04208
33328/12/2013 18:15:05772.1559
33429/12/2013 18:15:05752.76039
33530/12/2013 18:15:05795.20293
33631/12/2013 18:15:05799.47647
33701/01/2014 18:15:05807.8695
33802/01/2014 18:15:05817.77549
33903/01/2014 18:15:05862.98983
34004/01/2014 18:15:05890.91951
34105/01/2014 18:15:05954.12001
34206/01/2014 18:15:051026.49375
34307/01/2014 18:15:051005.67499
34408/01/2014 18:15:05924.35554
34509/01/2014 18:15:05927.11829
34610/01/2014 18:15:05918.41811
34711/01/2014 18:15:05970.5116
34812/01/2014 18:15:05975.3575
34913/01/2014 18:15:05921.11375
35014/01/2014 18:15:05921.79259
35115/01/2014 18:15:05947.41573
35216/01/2014 18:15:05936.95456
35317/01/2014 18:15:05905.4817
35418/01/2014 18:15:05900.41257
35519/01/2014 18:15:05922.87441
35620/01/2014 18:15:05952.30412
35721/01/2014 18:15:05962.80889
35822/01/2014 23:14:53952.16873

In [123]:
#Due to a technical limitation in plotting, we need to convert the date to
#fractional years. This will be fixed soon!
parsedate(x)=((Datetime.dt2string(Datetime.DateTimeFormat("dd/MM/yyyy hh:mm:ss"), x)
  - Datetime.dt2string(Datetime.DateTimeFormat("dd/MM/yyyy hh:mm:ss"), "01/01/2009 00:00:00"))
  /(365.242*86400000))+2009
bitcoin_prices["date"] = map(parsedate, bitcoin_prices["date"]);

In [131]:
plot(x=bitcoin_prices["date"], y=bitcoin_prices["USD"],
    Guide.XLabel("Year"), Guide.YLabel("B⃦/US\$"),
    Geom.line)


Out[131]: