-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraph_configs.py
126 lines (102 loc) · 3.88 KB
/
graph_configs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
from plot_words import line_plot
from constants import SHORT_N_WORDS
from graph import Graph
from query_functions import just_words
from query import data
# HOMEPAGE
HOMEPAGE_BBC_1 = Graph(db = "bbc",
filename = "homepage_bbc_1",
days = 7,
words = ['manchester', 'london'],
colour = ['red', 'blue'],
period=4)
HOMEPAGE_NYT_1 = Graph(db = "nyt",
filename = "homepage_nyt_1",
days = 7,
words = just_words(data("nyt", "ever"))[:SHORT_N_WORDS],
period = 4)
# BBC
BBC_TODAY_1 = Graph(db = "bbc",
filename = "bbc_today_1",
days = 7,
words = ['conservative', 'labour'],
colour = ['blue', 'red'],
period = 4)
BBC_TODAY_2 = Graph(db = "bbc",
filename = "bbc_today_2",
days = 14,
words = ['attack', 'bomb', 'threat', 'terror'])
BBC_WEEK_1 = Graph(db = "bbc",
filename = 'bbc_week_1',
days = 7,
words = just_words(data("bbc", "since", "week"))[:SHORT_N_WORDS])
BBC_WEEK_2 = Graph(db = "bbc",
filename = 'bbc_week_2',
days = 7,
words = ['corbyn', 'may'],
colour = ['red', 'blue'])
BBC_MONTH_1 = Graph(db = "bbc",
filename = 'bbc_month_1',
days = 7,
words = just_words(data("bbc", "since", "month"))[:SHORT_N_WORDS],
period = 4)
BBC_MONTH_2 = Graph(db = "bbc",
filename = 'bbc_month_2',
days = 7,
words = ["death", "dead", "murder", "killed"],
period=4)
BBC_EVER_1 = Graph(db = "bbc",
filename = "bbc_ever_1",
days = 7,
words = just_words(data("bbc", "ever"))[:SHORT_N_WORDS],
period = 4)
BBC_EVER_2 = Graph(db = "bbc",
filename = "bbc_ever_2",
days = 7,
words = ["london", "manchester", "birmingham", "liverpool", "newcastle"],
period = 4)
# NYT
NYT_TODAY_1 = Graph(db = "nyt",
filename = 'nyt_today_1',
days = 7,
words = ['trump', 'ivanka', 'kushner', 'melania'],
period = 4)
NYT_TODAY_2 = Graph(db = "nyt",
filename = 'nyt_today_2',
days = 7,
words = ['fbi', 'comey', 'russia', 'investigation'],
period = 4)
NYT_WEEK_1 = Graph(db = "nyt",
filename = 'nyt_week_1',
days = 7,
words = just_words(data("nyt", "since", "week"))[:SHORT_N_WORDS])
NYT_MONTH_1 = Graph(db = "nyt",
filename = 'nyt_month_1',
days = 7,
words = just_words(data("nyt", "since", "month"))[:SHORT_N_WORDS],
period = 4)
NYT_EVER_1 = Graph(db = "nyt",
filename = 'nyt_ever_1',
days = 7,
words = just_words(data("nyt", "ever"))[:SHORT_N_WORDS],
period = 4)
GRAPHS_IN_USE = [HOMEPAGE_BBC_1,
HOMEPAGE_NYT_1,
BBC_TODAY_1,
BBC_TODAY_2,
BBC_WEEK_1,
BBC_WEEK_2,
BBC_MONTH_1,
BBC_MONTH_2,
BBC_EVER_1,
BBC_EVER_2,
NYT_TODAY_1,
NYT_TODAY_2,
NYT_WEEK_1,
NYT_MONTH_1,
NYT_EVER_1]
def main():
for graph in GRAPHS_IN_USE:
line_plot(graph)
if __name__ == '__main__':
main()