Skip to content

Instantly share code, notes, and snippets.

@ColCarroll
Created December 22, 2017 16:30
Show Gist options
  • Save ColCarroll/658c25edb114d815fe05aa4fb6689253 to your computer and use it in GitHub Desktop.
Save ColCarroll/658c25edb114d815fe05aa4fb6689253 to your computer and use it in GitHub Desktop.
This is data from PyPI, using the bigquery sql:
wk yr file_version num
37 2016 3.0.rc1 1437
38 2016 3.0.rc1 500
39 2016 3.0.rc1 603
40 2016 3.0.rc1 625
41 2016 3.0.rc1 333
41 2016 3.0rc2 1387
42 2016 3.0rc2 603
42 2016 3.0.rc1 160
43 2016 3.0rc2 592
43 2016 3.0.rc1 86
44 2016 3.0.rc1 159
44 2016 3.0rc2 425
45 2016 3.0rc2 389
45 2016 3.0.rc1 199
46 2016 3.0.rc1 235
46 2016 3.0rc2 435
47 2016 3.0rc2 404
47 2016 3.0.rc1 128
48 2016 3.0.rc1 110
48 2016 3.0rc2 462
49 2016 3.0rc2 422
49 2016 3.0.rc1 219
49 2016 3.0rc4 654
50 2016 3.0rc4 502
50 2016 3.0.rc1 130
50 2016 3.0rc2 103
51 2016 3.0rc2 78
51 2016 3.0.rc1 72
51 2016 3.0rc4 491
52 2016 3.0rc2 72
52 2016 3.0.rc1 74
52 2016 3.0rc4 332
53 2016 3.0rc4 287
53 2016 3.0rc2 45
53 2016 3.0.rc1 35
1 2017 3.0rc4 89
1 2017 3.0rc2 77
1 2017 3.0rc6 1019
1 2017 3.0rc5 604
1 2017 3.0.rc1 70
2 2017 3.0 1120
2 2017 3.0rc6 135
2 2017 3.0rc2 82
2 2017 3.0.rc1 90
2 2017 3.0rc5 68
2 2017 3.0rc4 41
3 2017 3.0rc2 85
3 2017 3.0.rc1 90
3 2017 3.0rc5 60
3 2017 3.0rc4 49
3 2017 3.0rc6 58
3 2017 3.0 619
4 2017 3.0rc5 39
4 2017 3.0rc6 38
4 2017 3.0 658
4 2017 3.0.rc1 86
4 2017 3.0rc4 34
4 2017 3.0rc2 72
5 2017 3.0rc2 55
5 2017 3.0rc5 37
5 2017 3.0rc4 36
5 2017 3.0rc6 40
5 2017 3.0.rc1 71
5 2017 3.0 1271
6 2017 3.0rc4 52
6 2017 3.0 1863
6 2017 3.0rc2 99
6 2017 3.0.rc1 130
6 2017 3.0rc5 52
6 2017 3.0rc6 53
7 2017 3.0 1936
7 2017 3.0rc2 70
7 2017 3.0rc5 42
7 2017 3.0rc4 42
7 2017 3.0.rc1 94
7 2017 3.0rc6 43
8 2017 3.0rc5 37
8 2017 3.0rc4 35
8 2017 3.0.rc1 81
8 2017 3.0rc6 43
8 2017 3.0 1193
8 2017 3.0rc2 76
9 2017 3.0.rc1 87
9 2017 3.0rc5 35
9 2017 3.0rc4 38
9 2017 3.0rc2 73
9 2017 3.0rc6 34
9 2017 3.0 1204
10 2017 3.0rc6 29
10 2017 3.0rc5 27
10 2017 3.0 653
10 2017 3.0.rc1 56
10 2017 3.0rc4 25
10 2017 3.0rc2 49
11 2017 3.0 762
11 2017 3.0.rc1 152
11 2017 3.1rc2 457
11 2017 3.0rc5 61
11 2017 3.1rc1 338
11 2017 3.0rc6 68
11 2017 3.0rc2 119
11 2017 3.0rc4 84
12 2017 3.0rc5 43
12 2017 3.0.rc1 93
12 2017 3.0rc4 41
12 2017 3.1rc1 98
12 2017 3.0rc2 87
12 2017 3.0rc6 45
12 2017 3.0 746
12 2017 3.1rc2 193
13 2017 3.1rc2 141
13 2017 3.0rc5 59
13 2017 3.1rc3 535
13 2017 3.0rc4 59
13 2017 3.0.rc1 131
13 2017 3.0rc6 58
13 2017 3.1rc1 94
13 2017 3.0rc2 108
13 2017 3.0 747
14 2017 3.0rc6 26
14 2017 3.0rc2 73
14 2017 3.0 653
14 2017 3.1rc2 66
14 2017 3.0.rc1 72
14 2017 3.1rc3 157
14 2017 3.0rc5 26
14 2017 3.1rc1 37
14 2017 3.0rc4 27
15 2017 3.0rc4 48
15 2017 3.0 617
15 2017 3.0rc6 48
15 2017 3.0rc2 91
15 2017 3.1rc2 88
15 2017 3.1rc1 51
15 2017 3.1rc3 103
15 2017 3.0.rc1 103
15 2017 3.0rc5 50
16 2017 3.0rc4 27
16 2017 3.1rc1 28
16 2017 3.0 945
16 2017 3.0rc5 29
16 2017 3.0.rc1 55
16 2017 3.0rc6 25
16 2017 3.1rc3 77
16 2017 3.1rc2 50
16 2017 3.0rc2 48
17 2017 3.0rc2 63
17 2017 3.0rc5 21
17 2017 3.0 746
17 2017 3.1rc3 71
17 2017 3.1rc1 32
17 2017 3.0rc6 20
17 2017 3.0rc4 21
17 2017 3.0.rc1 50
17 2017 3.1rc2 38
18 2017 3.0rc6 25
18 2017 3.0rc4 25
18 2017 3.1rc2 42
18 2017 3.0 767
18 2017 3.1rc3 52
18 2017 3.0rc2 55
18 2017 3.0.rc1 65
18 2017 3.0rc5 26
18 2017 3.1rc1 26
19 2017 3.1rc2 46
19 2017 3.0rc4 31
19 2017 3.1rc3 62
19 2017 3.0rc5 29
19 2017 3.0.rc1 71
19 2017 3.1rc1 22
19 2017 3.0rc6 28
19 2017 3.0 718
19 2017 3.0rc2 59
20 2017 3.0rc6 24
20 2017 3.0rc5 22
20 2017 3.1rc2 25
20 2017 3.1rc3 67
20 2017 3.0rc2 38
20 2017 3.1rc1 20
20 2017 3.0rc4 21
20 2017 3.0.rc1 48
20 2017 3.0 1021
21 2017 3.0rc6 10
21 2017 3.0 776
21 2017 3.1rc1 16
21 2017 3.1rc3 33
21 2017 3.0rc2 19
21 2017 3.0rc5 10
21 2017 3.0rc4 8
21 2017 3.1rc2 17
21 2017 3.0.rc1 19
22 2017 3.0rc2 38
22 2017 3.0rc6 19
22 2017 3.0rc5 19
22 2017 3.1rc2 24
22 2017 3.1rc1 19
22 2017 3.0 495
22 2017 3.1rc3 41
22 2017 3.0rc4 20
22 2017 3.0.rc1 45
23 2017 3.1rc1 22
23 2017 3.0rc4 20
23 2017 3.1rc3 59
23 2017 3.0rc5 23
23 2017 3.0rc2 42
23 2017 3.0rc6 23
23 2017 3.0.rc1 52
23 2017 3.0 501
23 2017 3.1rc2 26
24 2017 3.0rc6 27
24 2017 3.0rc4 29
24 2017 3.1rc2 34
24 2017 3.0rc5 30
24 2017 3.1rc3 61
24 2017 3.1rc1 22
24 2017 3.0 538
24 2017 3.0rc2 52
24 2017 3.0.rc1 83
25 2017 3.1rc2 31
25 2017 3.0 961
25 2017 3.1rc1 16
25 2017 3.0rc5 30
25 2017 3.0rc2 55
25 2017 3.0rc4 29
25 2017 3.0rc6 28
25 2017 3.0.rc1 76
25 2017 3.1rc3 84
26 2017 3.1rc3 44
26 2017 3.0rc6 36
26 2017 3.1rc1 21
26 2017 3.0rc5 31
26 2017 3.0rc4 31
26 2017 3.0rc2 61
26 2017 3.0.rc1 79
26 2017 3.0 203
26 2017 3.1rc2 39
26 2017 3.1 1812
27 2017 3.0rc2 68
27 2017 3.0.rc1 86
27 2017 3.1rc2 38
27 2017 3.0rc6 31
27 2017 3.1rc3 38
27 2017 3.1rc1 23
27 2017 3.0 294
27 2017 3.0rc5 33
27 2017 3.1 1069
27 2017 3.0rc4 33
28 2017 3.1rc3 42
28 2017 3.0rc4 30
28 2017 3.1 1254
28 2017 3.0rc6 28
28 2017 3.0rc5 29
28 2017 3.1rc1 24
28 2017 3.1rc2 31
28 2017 3.0.rc1 67
28 2017 3.0rc2 57
28 2017 3.0 105
29 2017 3.0rc6 23
29 2017 3.1rc2 23
29 2017 3.0.rc1 61
29 2017 3.0 74
29 2017 3.0rc2 45
29 2017 3.1rc3 26
29 2017 3.1rc1 18
29 2017 3.0rc4 23
29 2017 3.0rc5 22
29 2017 3.1 698
30 2017 3.0rc6 16
30 2017 3.0rc5 18
30 2017 3.0.rc1 47
30 2017 3.1 701
30 2017 3.1rc3 34
30 2017 3.0rc4 18
30 2017 3.0 49
30 2017 3.1rc1 13
30 2017 3.1rc2 19
30 2017 3.0rc2 30
31 2017 3.0 44
31 2017 3.0.rc1 23
31 2017 3.0rc4 7
31 2017 3.1 1101
31 2017 3.0rc5 10
31 2017 3.0rc6 8
31 2017 3.1rc1 4
31 2017 3.1rc2 11
31 2017 3.1rc3 14
31 2017 3.0rc2 24
32 2017 3.0rc4 16
32 2017 3.1rc1 8
32 2017 3.0rc2 30
32 2017 3.1 1084
32 2017 3.0.rc1 41
32 2017 3.1rc3 20
32 2017 3.0 40
32 2017 3.1rc2 19
32 2017 3.0rc5 17
32 2017 3.0rc6 16
33 2017 3.0.rc1 65
33 2017 3.0rc5 23
33 2017 3.1rc2 32
33 2017 3.0 61
33 2017 3.0rc4 28
33 2017 3.1rc3 29
33 2017 3.0rc2 54
33 2017 3.0rc6 25
33 2017 3.1rc1 13
33 2017 3.1 1072
34 2017 3.0 59
34 2017 3.0rc4 27
34 2017 3.0rc6 28
34 2017 3.0.rc1 69
34 2017 3.0rc2 59
34 2017 3.0rc5 29
34 2017 3.1 1812
34 2017 3.1rc2 35
34 2017 3.1rc1 15
34 2017 3.1rc3 32
35 2017 3.0rc4 32
35 2017 3.0rc2 67
35 2017 3.0rc6 33
35 2017 3.1rc1 14
35 2017 3.1rc3 34
35 2017 3.1 1234
35 2017 3.0 49
35 2017 3.0.rc1 83
35 2017 3.1rc2 32
35 2017 3.0rc5 25
36 2017 3.0rc2 42
36 2017 3.0 52
36 2017 3.1 1078
36 2017 3.1rc1 11
36 2017 3.0rc4 24
36 2017 3.0rc6 23
36 2017 3.0.rc1 51
36 2017 3.0rc5 22
36 2017 3.1rc3 29
36 2017 3.1rc2 21
37 2017 3.0rc4 27
37 2017 3.1 1161
37 2017 3.1rc1 15
37 2017 3.1rc2 27
37 2017 3.1rc3 29
37 2017 3.0rc2 50
37 2017 3.0 61
37 2017 3.0.rc1 64
37 2017 3.0rc5 24
37 2017 3.0rc6 24
38 2017 3.1 1360
38 2017 3.1rc2 32
38 2017 3.0rc5 30
38 2017 3.0rc6 29
38 2017 3.1rc1 15
38 2017 3.0 107
38 2017 3.0.rc1 71
38 2017 3.0rc2 66
38 2017 3.1rc3 30
38 2017 3.0rc4 34
39 2017 3.1rc3 31
39 2017 3.0 71
39 2017 3.1rc1 14
39 2017 3.1 1489
39 2017 3.0.rc1 54
39 2017 3.1rc2 27
39 2017 3.0rc2 47
39 2017 3.0rc6 23
39 2017 3.0rc4 20
39 2017 3.0rc5 20
40 2017 3.1 1313
40 2017 3.0 36
40 2017 3.0rc6 15
40 2017 3.0.rc1 37
40 2017 3.2rc1 367
40 2017 3.0rc4 22
40 2017 3.1rc1 7
40 2017 3.0rc2 28
40 2017 3.0rc5 13
40 2017 3.1rc2 16
40 2017 3.1rc3 14
41 2017 3.1 512
41 2017 3.0rc6 26
41 2017 3.0 55
41 2017 3.0.rc1 63
41 2017 3.2rc1 88
41 2017 3.1rc2 28
41 2017 3.1rc1 11
41 2017 3.2 987
41 2017 3.1rc3 26
41 2017 3.0rc4 28
41 2017 3.0rc2 53
41 2017 3.0rc5 27
42 2017 3.1rc3 22
42 2017 3.1 115
42 2017 3.0.rc1 48
42 2017 3.1rc2 20
42 2017 3.0rc6 23
42 2017 3.0rc4 23
42 2017 3.2 1049
42 2017 3.0 47
42 2017 3.0rc2 45
42 2017 3.1rc1 10
42 2017 3.0rc5 21
42 2017 3.2rc1 38
43 2017 3.0rc2 47
43 2017 3.2 1178
43 2017 3.1rc3 25
43 2017 3.2rc1 49
43 2017 3.0.rc1 59
43 2017 3.1rc1 15
43 2017 3.0rc5 17
43 2017 3.1rc2 25
43 2017 3.0 73
43 2017 3.0rc4 21
43 2017 3.1 100
43 2017 3.0rc6 23
44 2017 3.0 76
44 2017 3.0rc4 25
44 2017 3.2rc1 46
44 2017 3.1rc1 14
44 2017 3.1rc2 27
44 2017 3.0.rc1 71
44 2017 3.0rc2 57
44 2017 3.2 1235
44 2017 3.1rc3 28
44 2017 3.1 119
44 2017 3.0rc5 26
44 2017 3.0rc6 28
45 2017 3.0rc4 17
45 2017 3.0rc5 17
45 2017 3.0.rc1 39
45 2017 3.1rc2 21
45 2017 3.2 1195
45 2017 3.2rc1 29
45 2017 3.1rc3 23
45 2017 3.0rc6 17
45 2017 3.1rc1 10
45 2017 3.1 96
45 2017 3.0 92
45 2017 3.0rc2 43
46 2017 3.1rc2 24
46 2017 3.0rc2 50
46 2017 3.1rc3 35
46 2017 3.0rc4 24
46 2017 3.0 52
46 2017 3.0rc6 24
46 2017 3.2 893
46 2017 3.0.rc1 60
46 2017 3.2rc1 31
46 2017 3.0rc5 24
46 2017 3.1rc1 12
46 2017 3.1 96
47 2017 3.0 86
47 2017 3.1 84
47 2017 3.0rc5 26
47 2017 3.2 1027
47 2017 3.0.rc1 57
47 2017 3.1rc3 31
47 2017 3.0rc2 54
47 2017 3.0rc4 25
47 2017 3.2rc1 26
47 2017 3.0rc6 25
47 2017 3.1rc2 25
47 2017 3.1rc1 13
48 2017 3.1rc1 12
48 2017 3.0rc2 39
48 2017 3.2rc1 28
48 2017 3.1 94
48 2017 3.1rc3 24
48 2017 3.0rc4 17
48 2017 3.0rc5 20
48 2017 3.2 968
48 2017 3.1rc2 20
48 2017 3.0rc6 18
48 2017 3.0 51
48 2017 3.0.rc1 54
49 2017 3.1rc1 9
49 2017 3.0 29
49 2017 3.2 1093
49 2017 3.0rc4 23
49 2017 3.1rc2 23
49 2017 3.0rc5 16
49 2017 3.0rc6 17
49 2017 3.2rc1 22
49 2017 3.1rc3 22
49 2017 3.1 303
49 2017 3.0rc2 49
49 2017 3.0.rc1 36
50 2017 3.0 55
50 2017 3.0rc6 29
50 2017 3.0rc5 29
50 2017 3.1rc3 36
50 2017 3.0.rc1 85
50 2017 3.1rc2 30
50 2017 3.2 903
50 2017 3.0rc4 35
50 2017 3.1 449
50 2017 3.0rc2 68
50 2017 3.2rc1 34
50 2017 3.1rc1 14
51 2017 3.0.rc1 39
51 2017 3.0rc6 18
51 2017 3.0rc2 36
51 2017 3.2 790
51 2017 3.0rc4 19
51 2017 3.0rc5 17
51 2017 3.0 80
51 2017 3.1 485
51 2017 3.1rc1 10
51 2017 3.1rc2 18
51 2017 3.2rc1 25
51 2017 3.1rc3 19
@ColCarroll
Copy link
Author

Plot with, for example,

%matplotlib inline
import pandas as pd
from datetime import datetime
import matplotlib.pyplot as plt

df = pd.read_csv("pymc3_usage.csv")
df['date'] = df.apply(lambda r: datetime.strptime(str(r.yr) + '-' + str(r.wk) + '-0', '%Y-%W-%w'), axis=1)
df.set_index('date', inplace=True)

df.groupby('file_version').num.plot(legend=True, figsize=(18, 12));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment