Sorry, something went wrong. Please let the owner know, and go to the home page.
KeyError: u'Tampa%20Bay%20Buccaneers'See technical details
Traceback (most recent call last): File "/mnt/gramener/vis/tornado/web.py", line 1332, in _execute result = method(*self.path_args, **self.path_kwargs) File "/mnt/gramener/vis/gramex.py", line 557, in get static_url=lambda url: self.hash_url(url, path), File "/mnt/gramener/vis/vis.py", line 537, in viz2 return gen(**params) File "/mnt/gramener/vis/vis.py", line 285, in gen result = generate(**params) File "/mnt/gramener/vis/tornado/template.py", line 279, in generate return execute() File "/mnt/gramener/apps/playground/nfl/index_html.generated.py", line 112, in _tt_execute _tt_tmp = insights.ix[current_team]['insight'] # /mnt/gramener/apps/playground/nfl/index.html:58 File "/mnt/gramener/anaconda/lib/python2.7/site-packages/pandas/core/indexing.py", line 122, in __getitem__ return self._getitem_axis(key, axis=axis) File "/mnt/gramener/anaconda/lib/python2.7/site-packages/pandas/core/indexing.py", line 1116, in _getitem_axis return self._get_label(key, axis=axis) File "/mnt/gramener/anaconda/lib/python2.7/site-packages/pandas/core/indexing.py", line 140, in _get_label return self.obj._xs(label, axis=axis) File "/mnt/gramener/anaconda/lib/python2.7/site-packages/pandas/core/generic.py", line 2984, in xs loc = self.index.get_loc(key) File "/mnt/gramener/anaconda/lib/python2.7/site-packages/pandas/core/indexes/base.py", line 3065, in get_loc return self._engine.get_loc(self._maybe_cast_indexer(key)) File "pandas/_libs/index.pyx", line 140, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 162, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 1492, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 1500, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: u'Tampa%20Bay%20Buccaneers'
1 def _tt_execute(): # /mnt/gramener/apps/playground/nfl/index.html:0 2 _tt_buffer = [] # /mnt/gramener/apps/playground/nfl/index.html:0 3 _tt_append = _tt_buffer.append # /mnt/gramener/apps/playground/nfl/index.html:0 4 5 from urllib import quote # /mnt/gramener/apps/playground/nfl/index.html:2 6 title = 'Every Touchdown of NFL 2015' # /mnt/gramener/apps/playground/nfl/index.html:3 7 data = pd.read_csv('data.csv') # /mnt/gramener/apps/playground/nfl/index.html:4 8 insights = pd.read_csv('insights.csv') # /mnt/gramener/apps/playground/nfl/index.html:5 9 insights = insights.set_index('team') # /mnt/gramener/apps/playground/nfl/index.html:6 10 list_of_teams = list(data['scoring team2'].unique()) # /mnt/gramener/apps/playground/nfl/index.html:7 11 data['new time'] = pd.to_datetime(data['time']) # /mnt/gramener/apps/playground/nfl/index.html:8 12 data['date'] = pd.to_datetime(data['date']) # /mnt/gramener/apps/playground/nfl/index.html:9 13 data['date'] = data['date'].apply(lambda x: x.strftime('%d %b %Y')) # /mnt/gramener/apps/playground/nfl/index.html:10 14 15 reference = pd.read_csv('index-and-teams.csv') # /mnt/gramener/apps/playground/nfl/index.html:12 16 reference['date'] = pd.to_datetime(reference['date']) # /mnt/gramener/apps/playground/nfl/index.html:13 17 current_team = args.get('team', ['Atlanta Falcons'])[0] # /mnt/gramener/apps/playground/nfl/index.html:14 18 reference = reference[(reference['Winner'] == current_team) | (reference['Loser'] == current_team) ] # /mnt/gramener/apps/playground/nfl/index.html:15 19 data = data[data['index'].isin(reference['index'].values)] # /mnt/gramener/apps/playground/nfl/index.html:16 20 reference = reference.set_index('index') # /mnt/gramener/apps/playground/nfl/index.html:17 21 score_types = ['pass', 'field goal', 'rush', 'punt', 'fumble', 'interception', 'kickoff', 'safety', 'other'] # /mnt/gramener/apps/playground/nfl/index.html:18 22 score_colors = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#bcbd22', '#aec7e8'] # /mnt/gramener/apps/playground/nfl/index.html:19 23 score_dict = dict(zip(score_types,score_colors)) # /mnt/gramener/apps/playground/nfl/index.html:20 24 time_dict = {'1st':0, '2nd':15, '3rd':30, '4th':45, 'OT':60} # /mnt/gramener/apps/playground/nfl/index.html:21 25 def ordinal(n): # /mnt/gramener/apps/playground/nfl/index.html:22 26 if 10 <= n % 100 < 20: # /mnt/gramener/apps/playground/nfl/index.html:23 27 return str(n) + 'th' # /mnt/gramener/apps/playground/nfl/index.html:24 28 else: # /mnt/gramener/apps/playground/nfl/index.html:25 29 return str(n) + {1 : 'st', 2 : 'nd', 3 : 'rd'}.get(n % 10, "th") # /mnt/gramener/apps/playground/nfl/index.html:26 30 31 T('snippets.html', DB=DB, static_url=static_url) # /mnt/gramener/apps/playground/nfl/index.html:28 32 33 _tt_append('\n') # /mnt/gramener/apps/playground/nfl/index.html:30 34 url = handler.request.protocol + '://' + handler.request.host + '/playground' + handler.request.uri # /mnt/gramener/apps/playground/nfl/index.html:30 35 _tt_append('\n') # /mnt/gramener/apps/playground/nfl/index.html:31 36 share = title # /mnt/gramener/apps/playground/nfl/index.html:31 37 _tt_append('\n') # /mnt/gramener/apps/playground/nfl/index.html:32 38 desc = 'A visual analysis of every score made by every team during the NFL 2015 regular season.' # /mnt/gramener/apps/playground/nfl/index.html:32 39 _tt_append('\n') # /mnt/gramener/apps/playground/nfl/index.html:33 40 share_image = 'nfl2015.png' # /mnt/gramener/apps/playground/nfl/index.html:33 41 _tt_append('\n') # /mnt/gramener/apps/playground/nfl/index.html:34 42 image_share_url = 'https://gramener.com/playground/nfl/images/' # /mnt/gramener/apps/playground/nfl/index.html:34 43 _tt_append('\n<!DOCTYPE html><html lang="en">\n<head>\n ') # /mnt/gramener/apps/playground/nfl/index.html:37 44 _tt_tmp = Block.run('header', title=title) # /mnt/gramener/apps/playground/nfl/index.html:37 45 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:37 46 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:37 47 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:37 48 _tt_append('\n <meta name="twitter:card" content="summary_large_image">\n <meta name="twitter:site" content="@gramener">\n <meta property="og:title" content="') # /mnt/gramener/apps/playground/nfl/index.html:40 49 _tt_tmp = share # /mnt/gramener/apps/playground/nfl/index.html:40 50 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:40 51 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:40 52 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:40 53 _tt_append('">\n <meta property="og:description" content="') # /mnt/gramener/apps/playground/nfl/index.html:41 54 _tt_tmp = desc # /mnt/gramener/apps/playground/nfl/index.html:41 55 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:41 56 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:41 57 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:41 58 _tt_append('">\n <meta property="og:image" content="') # /mnt/gramener/apps/playground/nfl/index.html:42 59 _tt_tmp = image_share_url # /mnt/gramener/apps/playground/nfl/index.html:42 60 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:42 61 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:42 62 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:42 63 _tt_tmp = share_image # /mnt/gramener/apps/playground/nfl/index.html:42 64 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:42 65 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:42 66 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:42 67 _tt_append('">\n <meta name="twitter:image" content="') # /mnt/gramener/apps/playground/nfl/index.html:43 68 _tt_tmp = image_share_url # /mnt/gramener/apps/playground/nfl/index.html:43 69 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:43 70 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:43 71 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:43 72 _tt_tmp = share_image # /mnt/gramener/apps/playground/nfl/index.html:43 73 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:43 74 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:43 75 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:43 76 _tt_append('">\n <meta property="og:url" content="') # /mnt/gramener/apps/playground/nfl/index.html:44 77 _tt_tmp = url # /mnt/gramener/apps/playground/nfl/index.html:44 78 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:44 79 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:44 80 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:44 81 _tt_append('">\n <meta name="twitter:title" content="') # /mnt/gramener/apps/playground/nfl/index.html:45 82 _tt_tmp = share # /mnt/gramener/apps/playground/nfl/index.html:45 83 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:45 84 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:45 85 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:45 86 _tt_append('">\n <meta name="twitter:description" content="') # /mnt/gramener/apps/playground/nfl/index.html:46 87 _tt_tmp = desc # /mnt/gramener/apps/playground/nfl/index.html:46 88 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:46 89 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:46 90 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:46 91 _tt_append('">\n <meta name="twitter:url" content="') # /mnt/gramener/apps/playground/nfl/index.html:47 92 _tt_tmp = url # /mnt/gramener/apps/playground/nfl/index.html:47 93 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:47 94 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:47 95 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:47 96 _tt_append('"/>\n</head><body>\n<div class="se-pre-con"></div>\n') # /mnt/gramener/apps/playground/nfl/index.html:50 97 _tt_tmp = Block.run('navbar', title=title, logo='logo.png', filter=filter, teamchoices=list_of_teams, args=args, handler=handler) # /mnt/gramener/apps/playground/nfl/index.html:50 98 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:50 99 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:50 100 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:50 101 _tt_append('\n\n<div class="container" style="margin-top:70px">\n\n <!-- Row 1: Two columns of equal width ================================ -->\n <div class="row">\n <div class="col-md-6">\n <p> This is a visual analysis of every score made by the <span style="font-weight:bold">') # /mnt/gramener/apps/playground/nfl/index.html:57 102 _tt_tmp = current_team.title() # /mnt/gramener/apps/playground/nfl/index.html:57 103 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:57 104 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:57 105 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:57 106 _tt_append('</span> and their opponents during the NFL 2015 regular season. </p>\n <p>The <span style="font-weight:bold">') # /mnt/gramener/apps/playground/nfl/index.html:58 107 _tt_tmp = current_team # /mnt/gramener/apps/playground/nfl/index.html:58 108 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:58 109 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:58 110 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:58 111 _tt_append('</span> ') # /mnt/gramener/apps/playground/nfl/index.html:58 112 _tt_tmp = insights.ix[current_team]['insight'] # /mnt/gramener/apps/playground/nfl/index.html:58 113 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:58 114 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:58 115 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:58 116 _tt_append(' </p>\n \n\n \n </div>\n <div class="col-md-6">\n <p> Analysis and visuals by <a href="http://www.pro-football-reference.com/" target="_blank">GRAMENER.COM</a> </p>\n <p style="font-size:9px"> Data Courtesy: <a href="http://www.pro-football-reference.com/" target="_blank">pro-football-reference</a> </p>\n<p style="font-size:9px"> Images Courtesy: <a href="http://espn.go.com/" target="_blank">espn.go.com</a></p>\n\n <p style="margin-top:-20px"> <span class="pushdown"> <a class="social-media-icon" href="https://twitter.com/share?text=') # /mnt/gramener/apps/playground/nfl/index.html:68 117 _tt_tmp = quote(share + ' via @gramener') # /mnt/gramener/apps/playground/nfl/index.html:68 118 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:68 119 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:68 120 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:68 121 _tt_append('&url=') # /mnt/gramener/apps/playground/nfl/index.html:68 122 _tt_tmp = quote(url) # /mnt/gramener/apps/playground/nfl/index.html:68 123 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:68 124 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:68 125 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:68 126 _tt_append('" target="_blank" title="Share on Twitter">') # /mnt/gramener/apps/playground/nfl/index.html:68 127 _tt_tmp = SVG('icons.svg', icon='iconmelon.flat.twitter1', width=20, height=20) # /mnt/gramener/apps/playground/nfl/index.html:68 128 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:68 129 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:68 130 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:68 131 _tt_append('</a> </span>\n <span class="pipe color-red">|</span>\n <span class="pushdown"> <a class="social-media-icon" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=') # /mnt/gramener/apps/playground/nfl/index.html:70 132 _tt_tmp = quote(url) # /mnt/gramener/apps/playground/nfl/index.html:70 133 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:70 134 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:70 135 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:70 136 _tt_append('" title="Share on Facebook">') # /mnt/gramener/apps/playground/nfl/index.html:70 137 _tt_tmp = SVG('icons.svg', icon='iconmelon.flat.facebook1', width=20, height=20) # /mnt/gramener/apps/playground/nfl/index.html:70 138 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:70 139 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:70 140 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:70 141 _tt_append('</a> </span>\n <span class="pipe color-red">|</span>\n <span class="pushdown"> <a class="social-media-icon" target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&url=') # /mnt/gramener/apps/playground/nfl/index.html:72 142 _tt_tmp = quote(url) # /mnt/gramener/apps/playground/nfl/index.html:72 143 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:72 144 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:72 145 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:72 146 _tt_append('&title=') # /mnt/gramener/apps/playground/nfl/index.html:72 147 _tt_tmp = quote(share) # /mnt/gramener/apps/playground/nfl/index.html:72 148 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:72 149 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:72 150 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:72 151 _tt_append('&summary=') # /mnt/gramener/apps/playground/nfl/index.html:72 152 _tt_tmp = desc # /mnt/gramener/apps/playground/nfl/index.html:72 153 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:72 154 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:72 155 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:72 156 _tt_append('&source=') # /mnt/gramener/apps/playground/nfl/index.html:72 157 _tt_tmp = quote('https://gramener.com/') # /mnt/gramener/apps/playground/nfl/index.html:72 158 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:72 159 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:72 160 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:72 161 _tt_append('" title="Share on Linkedin">') # /mnt/gramener/apps/playground/nfl/index.html:72 162 _tt_tmp = SVG('icons.svg', icon='iconmelon.flat.linkedin', width=20, height=20) # /mnt/gramener/apps/playground/nfl/index.html:72 163 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:72 164 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:72 165 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:72 166 _tt_append('</a> </span>\n <span class="pipe color-red">|</span>\n <span class="reddit-pushdown"> <a href="//www.reddit.com/submit" target="_blank" onclick="window.location = \'//www.reddit.com/submit?url=\' + encodeURIComponent(window.location); return false">') # /mnt/gramener/apps/playground/nfl/index.html:74 167 _tt_tmp = SVG('icons.svg', icon='appbar.social.reddit', width=42, height=42) # /mnt/gramener/apps/playground/nfl/index.html:74 168 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:74 169 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:74 170 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:74 171 _tt_append('</a> </span>\n</p>\n\n </div>\n </div>\n <div class="row">\n \n <div class="col-md-6"> \n <h4> <img src="') # /mnt/gramener/apps/playground/nfl/index.html:82 172 _tt_tmp = static_url('images/' + insights.ix[current_team]['logo'] + '.png') # /mnt/gramener/apps/playground/nfl/index.html:82 173 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:82 174 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:82 175 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:82 176 _tt_append('" width="40" height="40"/> ') # /mnt/gramener/apps/playground/nfl/index.html:82 177 _tt_tmp = current_team.title() # /mnt/gramener/apps/playground/nfl/index.html:82 178 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:82 179 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:82 180 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:82 181 _tt_append('</h4>\n \n ') # /mnt/gramener/apps/playground/nfl/index.html:84 182 boxmax = data.groupby(['scoring team2', 'quarter-edited', 'event.1']).count()['event'].ix[current_team].max() # /mnt/gramener/apps/playground/nfl/index.html:84 183 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:85 184 boxmaxopp = data.groupby(['opposition', 'quarter-edited', 'event.1']).count()['event'].ix[current_team].max() # /mnt/gramener/apps/playground/nfl/index.html:85 185 _tt_append('\n <p style="font-size:10px;margin-top:5px"> Touchdowns (passes, rushes) & field goals in the regular season: </p>\n <svg width="450" height="150">\n ') # /mnt/gramener/apps/playground/nfl/index.html:88 186 sc_xpos, sc_ypos = 70, 50 # /mnt/gramener/apps/playground/nfl/index.html:88 187 _tt_append('\n <text x="135" y="20" style="font-size:11px">FOR</text>\n <text x="330" y="20" style="font-size:11px">AGAINST</text>\n ') # /mnt/gramener/apps/playground/nfl/index.html:91 188 for s, st in enumerate(score_types[0:3]): # /mnt/gramener/apps/playground/nfl/index.html:91 189 _tt_append('\n <text x="') # /mnt/gramener/apps/playground/nfl/index.html:92 190 _tt_tmp = sc_xpos - 70 # /mnt/gramener/apps/playground/nfl/index.html:92 191 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:92 192 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:92 193 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:92 194 _tt_append('" y="') # /mnt/gramener/apps/playground/nfl/index.html:92 195 _tt_tmp = sc_ypos + 5 # /mnt/gramener/apps/playground/nfl/index.html:92 196 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:92 197 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:92 198 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:92 199 _tt_append('">') # /mnt/gramener/apps/playground/nfl/index.html:92 200 _tt_tmp = st.title() # /mnt/gramener/apps/playground/nfl/index.html:92 201 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:92 202 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:92 203 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:92 204 _tt_append('</text>\n ') # /mnt/gramener/apps/playground/nfl/index.html:93 205 if s == 0: # /mnt/gramener/apps/playground/nfl/index.html:93 206 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:94 207 qtlab_xpos = 75 # /mnt/gramener/apps/playground/nfl/index.html:94 208 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:95 209 for qt in ['1st', '2nd', '3rd', '4th']: # /mnt/gramener/apps/playground/nfl/index.html:95 210 _tt_append('\n <text x="') # /mnt/gramener/apps/playground/nfl/index.html:96 211 _tt_tmp = qtlab_xpos - 5 # /mnt/gramener/apps/playground/nfl/index.html:96 212 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:96 213 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:96 214 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:96 215 _tt_append('" y="') # /mnt/gramener/apps/playground/nfl/index.html:96 216 _tt_tmp = sc_ypos - 15 # /mnt/gramener/apps/playground/nfl/index.html:96 217 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:96 218 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:96 219 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:96 220 _tt_append('" style="font-size:8px">') # /mnt/gramener/apps/playground/nfl/index.html:96 221 _tt_tmp = qt # /mnt/gramener/apps/playground/nfl/index.html:96 222 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:96 223 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:96 224 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:96 225 _tt_append(' qtr</text>\n ') # /mnt/gramener/apps/playground/nfl/index.html:97 226 qtlab_xpos = qtlab_xpos + 40 # /mnt/gramener/apps/playground/nfl/index.html:97 227 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:98 228 pass # /mnt/gramener/apps/playground/nfl/index.html:95 229 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:99 230 pass # /mnt/gramener/apps/playground/nfl/index.html:93 231 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:100 232 for qt in ['1st', '2nd', '3rd', '4th']: # /mnt/gramener/apps/playground/nfl/index.html:100 233 _tt_append(' \n ') # /mnt/gramener/apps/playground/nfl/index.html:101 234 try: # /mnt/gramener/apps/playground/nfl/index.html:101 235 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:102 236 boxval= data.groupby(['scoring team2', 'quarter-edited', 'event.1']).count()['event'].ix[current_team][qt][st] # /mnt/gramener/apps/playground/nfl/index.html:102 237 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:103 238 boxcolor = _color.gradient(float(boxval)/float(boxmax),_color.Greys) # /mnt/gramener/apps/playground/nfl/index.html:103 239 _tt_append('\n <g>\n <rect x="') # /mnt/gramener/apps/playground/nfl/index.html:105 240 _tt_tmp = sc_xpos # /mnt/gramener/apps/playground/nfl/index.html:105 241 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:105 242 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:105 243 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:105 244 _tt_append('" y="') # /mnt/gramener/apps/playground/nfl/index.html:105 245 _tt_tmp = sc_ypos - 10 # /mnt/gramener/apps/playground/nfl/index.html:105 246 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:105 247 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:105 248 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:105 249 _tt_append('" width="30" height="24" style="fill:') # /mnt/gramener/apps/playground/nfl/index.html:105 250 _tt_tmp = boxcolor # /mnt/gramener/apps/playground/nfl/index.html:105 251 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:105 252 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:105 253 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:105 254 _tt_append('"> </rect>\n <text x="') # /mnt/gramener/apps/playground/nfl/index.html:106 255 _tt_tmp = sc_xpos + 19 # /mnt/gramener/apps/playground/nfl/index.html:106 256 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:106 257 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:106 258 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:106 259 _tt_append('" y="') # /mnt/gramener/apps/playground/nfl/index.html:106 260 _tt_tmp = sc_ypos + 5 # /mnt/gramener/apps/playground/nfl/index.html:106 261 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:106 262 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:106 263 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:106 264 _tt_append('" style="font-size:10.5px;fill:') # /mnt/gramener/apps/playground/nfl/index.html:106 265 _tt_tmp = _color.contrast(boxcolor) # /mnt/gramener/apps/playground/nfl/index.html:106 266 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:106 267 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:106 268 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:106 269 _tt_append('" text-anchor="end">') # /mnt/gramener/apps/playground/nfl/index.html:106 270 _tt_tmp = boxval # /mnt/gramener/apps/playground/nfl/index.html:106 271 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:106 272 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:106 273 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:106 274 _tt_append('</text>\n </g>\n ') # /mnt/gramener/apps/playground/nfl/index.html:108 275 pass # /mnt/gramener/apps/playground/nfl/index.html:108 276 except: # /mnt/gramener/apps/playground/nfl/index.html:108 277 _tt_append('\n <g>\n <rect x="') # /mnt/gramener/apps/playground/nfl/index.html:110 278 _tt_tmp = sc_xpos # /mnt/gramener/apps/playground/nfl/index.html:110 279 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:110 280 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:110 281 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:110 282 _tt_append('" y="') # /mnt/gramener/apps/playground/nfl/index.html:110 283 _tt_tmp = sc_ypos - 10 # /mnt/gramener/apps/playground/nfl/index.html:110 284 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:110 285 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:110 286 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:110 287 _tt_append('" width="30" height="24" style="fill:white"> </rect>\n <text x="') # /mnt/gramener/apps/playground/nfl/index.html:111 288 _tt_tmp = sc_xpos + 19 # /mnt/gramener/apps/playground/nfl/index.html:111 289 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:111 290 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:111 291 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:111 292 _tt_append('" y="') # /mnt/gramener/apps/playground/nfl/index.html:111 293 _tt_tmp = sc_ypos + 5 # /mnt/gramener/apps/playground/nfl/index.html:111 294 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:111 295 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:111 296 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:111 297 _tt_append('" style="font-size:10.5px" text-anchor="end">0</text>\n </g>\n ') # /mnt/gramener/apps/playground/nfl/index.html:113 298 pass # /mnt/gramener/apps/playground/nfl/index.html:101 299 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:114 300 sc_xpos = sc_xpos + 40 # /mnt/gramener/apps/playground/nfl/index.html:114 301 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:115 302 pass # /mnt/gramener/apps/playground/nfl/index.html:100 303 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:116 304 sc_ypos = sc_ypos + 30 # /mnt/gramener/apps/playground/nfl/index.html:116 305 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:117 306 sc_xpos = 70 # /mnt/gramener/apps/playground/nfl/index.html:117 307 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:118 308 pass # /mnt/gramener/apps/playground/nfl/index.html:91 309 _tt_append('\n\n ') # /mnt/gramener/apps/playground/nfl/index.html:120 310 sc_xpos, sc_ypos = 270, 50 # /mnt/gramener/apps/playground/nfl/index.html:120 311 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:121 312 for s, st in enumerate(score_types[0:3]): # /mnt/gramener/apps/playground/nfl/index.html:121 313 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:122 314 if s == 0: # /mnt/gramener/apps/playground/nfl/index.html:122 315 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:123 316 qtlab_xpos = 275 # /mnt/gramener/apps/playground/nfl/index.html:123 317 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:124 318 for qt in ['1st', '2nd', '3rd', '4th']: # /mnt/gramener/apps/playground/nfl/index.html:124 319 _tt_append('\n <text x="') # /mnt/gramener/apps/playground/nfl/index.html:125 320 _tt_tmp = qtlab_xpos - 5 # /mnt/gramener/apps/playground/nfl/index.html:125 321 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:125 322 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:125 323 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:125 324 _tt_append('" y="') # /mnt/gramener/apps/playground/nfl/index.html:125 325 _tt_tmp = sc_ypos - 15 # /mnt/gramener/apps/playground/nfl/index.html:125 326 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:125 327 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:125 328 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:125 329 _tt_append('" style="font-size:8px">') # /mnt/gramener/apps/playground/nfl/index.html:125 330 _tt_tmp = qt # /mnt/gramener/apps/playground/nfl/index.html:125 331 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:125 332 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:125 333 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:125 334 _tt_append(' qtr</text>\n ') # /mnt/gramener/apps/playground/nfl/index.html:126 335 qtlab_xpos = qtlab_xpos + 40 # /mnt/gramener/apps/playground/nfl/index.html:126 336 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:127 337 pass # /mnt/gramener/apps/playground/nfl/index.html:124 338 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:128 339 pass # /mnt/gramener/apps/playground/nfl/index.html:122 340 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:129 341 for qt in ['1st', '2nd', '3rd', '4th']: # /mnt/gramener/apps/playground/nfl/index.html:129 342 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:130 343 try: # /mnt/gramener/apps/playground/nfl/index.html:130 344 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:131 345 boxval= data.groupby(['opposition', 'quarter-edited', 'event.1']).count()['event'].ix[current_team][qt][st] # /mnt/gramener/apps/playground/nfl/index.html:131 346 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:132 347 boxcoloropp = _color.gradient(float(boxval)/float(boxmax),_color.Greys) # /mnt/gramener/apps/playground/nfl/index.html:132 348 _tt_append('\n <g>\n <rect x="') # /mnt/gramener/apps/playground/nfl/index.html:134 349 _tt_tmp = sc_xpos # /mnt/gramener/apps/playground/nfl/index.html:134 350 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:134 351 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:134 352 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:134 353 _tt_append('" y="') # /mnt/gramener/apps/playground/nfl/index.html:134 354 _tt_tmp = sc_ypos - 10 # /mnt/gramener/apps/playground/nfl/index.html:134 355 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:134 356 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:134 357 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:134 358 _tt_append('" width="30" height="24" style="fill:') # /mnt/gramener/apps/playground/nfl/index.html:134 359 _tt_tmp = boxcoloropp # /mnt/gramener/apps/playground/nfl/index.html:134 360 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:134 361 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:134 362 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:134 363 _tt_append('"> </rect>\n <text x="') # /mnt/gramener/apps/playground/nfl/index.html:135 364 _tt_tmp = sc_xpos + 19 # /mnt/gramener/apps/playground/nfl/index.html:135 365 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:135 366 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:135 367 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:135 368 _tt_append('" y="') # /mnt/gramener/apps/playground/nfl/index.html:135 369 _tt_tmp = sc_ypos + 5 # /mnt/gramener/apps/playground/nfl/index.html:135 370 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:135 371 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:135 372 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:135 373 _tt_append('" style="font-size:10.5px;fill:') # /mnt/gramener/apps/playground/nfl/index.html:135 374 _tt_tmp = _color.contrast(boxcoloropp) # /mnt/gramener/apps/playground/nfl/index.html:135 375 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:135 376 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:135 377 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:135 378 _tt_append('" text-anchor="end">') # /mnt/gramener/apps/playground/nfl/index.html:135 379 _tt_tmp = boxval # /mnt/gramener/apps/playground/nfl/index.html:135 380 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:135 381 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:135 382 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:135 383 _tt_append('</text>\n </g>\n \n ') # /mnt/gramener/apps/playground/nfl/index.html:138 384 pass # /mnt/gramener/apps/playground/nfl/index.html:138 385 except: # /mnt/gramener/apps/playground/nfl/index.html:138 386 _tt_append('\n <g>\n <rect x="') # /mnt/gramener/apps/playground/nfl/index.html:140 387 _tt_tmp = sc_xpos # /mnt/gramener/apps/playground/nfl/index.html:140 388 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:140 389 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:140 390 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:140 391 _tt_append('" y="') # /mnt/gramener/apps/playground/nfl/index.html:140 392 _tt_tmp = sc_ypos - 10 # /mnt/gramener/apps/playground/nfl/index.html:140 393 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:140 394 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:140 395 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:140 396 _tt_append('" width="30" height="24" style="fill:white"> </rect>\n <text x="') # /mnt/gramener/apps/playground/nfl/index.html:141 397 _tt_tmp = sc_xpos + 19 # /mnt/gramener/apps/playground/nfl/index.html:141 398 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:141 399 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:141 400 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:141 401 _tt_append('" y="') # /mnt/gramener/apps/playground/nfl/index.html:141 402 _tt_tmp = sc_ypos + 5 # /mnt/gramener/apps/playground/nfl/index.html:141 403 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:141 404 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:141 405 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:141 406 _tt_append('" style="font-size:10.5px" text-anchor="end">0</text>\n </g>\n\n ') # /mnt/gramener/apps/playground/nfl/index.html:144 407 pass # /mnt/gramener/apps/playground/nfl/index.html:130 408 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:145 409 sc_xpos = sc_xpos + 40 # /mnt/gramener/apps/playground/nfl/index.html:145 410 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:146 411 pass # /mnt/gramener/apps/playground/nfl/index.html:129 412 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:147 413 sc_ypos = sc_ypos + 30 # /mnt/gramener/apps/playground/nfl/index.html:147 414 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:148 415 sc_xpos = 270 # /mnt/gramener/apps/playground/nfl/index.html:148 416 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:149 417 pass # /mnt/gramener/apps/playground/nfl/index.html:121 418 _tt_append('\n </svg>\n </div>\n <div class="col-md-6">\n <h4 style="margin-top:16px">Select a team</h4>\n <p style="font-size:10px;margin-top:23.5px"> Click on a team\'s logo to view scoring trends. </p>\n <div>\n ') # /mnt/gramener/apps/playground/nfl/index.html:156 419 for image in insights.index: # /mnt/gramener/apps/playground/nfl/index.html:156 420 _tt_append('\n <a href="?team=') # /mnt/gramener/apps/playground/nfl/index.html:157 421 _tt_tmp = image # /mnt/gramener/apps/playground/nfl/index.html:157 422 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:157 423 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:157 424 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:157 425 _tt_append('"><img border="5" src="') # /mnt/gramener/apps/playground/nfl/index.html:157 426 _tt_tmp = static_url('images/' + insights.ix[image]['logo'] + '.png') # /mnt/gramener/apps/playground/nfl/index.html:157 427 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:157 428 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:157 429 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:157 430 _tt_append('" data-title="') # /mnt/gramener/apps/playground/nfl/index.html:157 431 _tt_tmp = image # /mnt/gramener/apps/playground/nfl/index.html:157 432 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:157 433 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:157 434 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:157 435 _tt_append('" width="40" height="40" /></a>\n ') # /mnt/gramener/apps/playground/nfl/index.html:158 436 pass # /mnt/gramener/apps/playground/nfl/index.html:156 437 _tt_append('\n </div>\n \n \n </div>\n </div>\n <div class="row">\n <!-- First chart .................................................... -->\n <div class="col-md-12">\n <p>Each circle represents a score made during the game.</p>\n <p>To view more info about the score hover over a circle.</p>\n <p> \n ') # /mnt/gramener/apps/playground/nfl/index.html:170 438 for sc in score_types: # /mnt/gramener/apps/playground/nfl/index.html:170 439 _tt_append('\n <span class="badge" style="background-color:') # /mnt/gramener/apps/playground/nfl/index.html:171 440 _tt_tmp = score_dict[sc] # /mnt/gramener/apps/playground/nfl/index.html:171 441 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:171 442 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:171 443 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:171 444 _tt_append(';color:') # /mnt/gramener/apps/playground/nfl/index.html:171 445 _tt_tmp = _color.contrast(score_dict[sc]) # /mnt/gramener/apps/playground/nfl/index.html:171 446 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:171 447 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:171 448 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:171 449 _tt_append('">') # /mnt/gramener/apps/playground/nfl/index.html:171 450 _tt_tmp = sc.title() # /mnt/gramener/apps/playground/nfl/index.html:171 451 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:171 452 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:171 453 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:171 454 _tt_append('</span>\n ') # /mnt/gramener/apps/playground/nfl/index.html:172 455 pass # /mnt/gramener/apps/playground/nfl/index.html:170 456 _tt_append('\n </p>\n <table class="table">\n <thead>\n <tr>\n <th></th>\n </tr>\n </thead>\n <tbody>\n ') # /mnt/gramener/apps/playground/nfl/index.html:181 457 for i, g in enumerate(reference.index): # /mnt/gramener/apps/playground/nfl/index.html:181 458 _tt_append('\n \t') # /mnt/gramener/apps/playground/nfl/index.html:182 459 this_team = data.ix[data.groupby(['index']).groups[g]] # /mnt/gramener/apps/playground/nfl/index.html:182 460 _tt_append('\n \t') # /mnt/gramener/apps/playground/nfl/index.html:183 461 selected_team = this_team[this_team['scoring team2'] == current_team] # /mnt/gramener/apps/playground/nfl/index.html:183 462 _tt_append('\n \t') # /mnt/gramener/apps/playground/nfl/index.html:184 463 the_other_team = this_team[~this_team['scoring team2'].isin([current_team])] # /mnt/gramener/apps/playground/nfl/index.html:184 464 _tt_append('\n \t') # /mnt/gramener/apps/playground/nfl/index.html:185 465 opponent_team = list(set([reference.ix[g]['team1'], reference.ix[g]['team2']]) - set([current_team.split(' ')[-1]])) # /mnt/gramener/apps/playground/nfl/index.html:185 466 _tt_append('\n \t') # /mnt/gramener/apps/playground/nfl/index.html:186 467 labx_pos = 5 # /mnt/gramener/apps/playground/nfl/index.html:186 468 _tt_append('\n \t') # /mnt/gramener/apps/playground/nfl/index.html:187 469 match_date = reference.ix[g]['date'].strftime('%d %b %Y') # /mnt/gramener/apps/playground/nfl/index.html:187 470 _tt_append('\n \t<tr>\n \t<td>\n \t<svg width="500" height="50" viewBox="0 0 500 50">\n \t') # /mnt/gramener/apps/playground/nfl/index.html:191 471 move_x_by = 135 # /mnt/gramener/apps/playground/nfl/index.html:191 472 _tt_append('\n \t') # /mnt/gramener/apps/playground/nfl/index.html:192 473 increase_size_by = 4 # /mnt/gramener/apps/playground/nfl/index.html:192 474 _tt_append('\n \t') # /mnt/gramener/apps/playground/nfl/index.html:193 475 t_xpos = 6.5 # /mnt/gramener/apps/playground/nfl/index.html:193 476 _tt_append('\n\t ') # /mnt/gramener/apps/playground/nfl/index.html:194 477 for qtr in ['1st', '2nd', '3rd', '4th', 'OT']: # /mnt/gramener/apps/playground/nfl/index.html:194 478 _tt_append('\n\t <text x="') # /mnt/gramener/apps/playground/nfl/index.html:195 479 _tt_tmp = (t_xpos * increase_size_by) + move_x_by # /mnt/gramener/apps/playground/nfl/index.html:195 480 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:195 481 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:195 482 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:195 483 _tt_append('" y="7" style="fill:black;font-size:7.5px">') # /mnt/gramener/apps/playground/nfl/index.html:195 484 _tt_tmp = qtr # /mnt/gramener/apps/playground/nfl/index.html:195 485 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:195 486 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:195 487 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:195 488 _tt_append(' </text>\n\t ') # /mnt/gramener/apps/playground/nfl/index.html:196 489 t_xpos = t_xpos + 15 # /mnt/gramener/apps/playground/nfl/index.html:196 490 _tt_append('\n\t ') # /mnt/gramener/apps/playground/nfl/index.html:197 491 pass # /mnt/gramener/apps/playground/nfl/index.html:194 492 _tt_append('\n\n\t <text x="95" text-anchor="middle" y="15.5" style="fill:black;font-size:9px">') # /mnt/gramener/apps/playground/nfl/index.html:199 493 _tt_tmp = current_team.split(' ')[-1].upper() # /mnt/gramener/apps/playground/nfl/index.html:199 494 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:199 495 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:199 496 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:199 497 _tt_append('</text>\n\t <text x="95" text-anchor="middle" y="23.5" style="fill:black;font-size:7px">vs</text>\n\t <text x="30" text-anchor="middle" y="24.5" style="fill:black;font-size:9px">') # /mnt/gramener/apps/playground/nfl/index.html:201 498 _tt_tmp = match_date # /mnt/gramener/apps/playground/nfl/index.html:201 499 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:201 500 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:201 501 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:201 502 _tt_append('</text>\n\t <text x="95" text-anchor="middle" y="34.5" style="fill:black;font-size:9px">') # /mnt/gramener/apps/playground/nfl/index.html:202 503 _tt_tmp = opponent_team[0].upper() # /mnt/gramener/apps/playground/nfl/index.html:202 504 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:202 505 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:202 506 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:202 507 _tt_append('</text>\n\t \n\t \n \t<line stroke-dasharray="0.9" x1="') # /mnt/gramener/apps/playground/nfl/index.html:205 508 _tt_tmp = move_x_by # /mnt/gramener/apps/playground/nfl/index.html:205 509 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:205 510 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:205 511 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:205 512 _tt_append('" y1="22.5" x2="') # /mnt/gramener/apps/playground/nfl/index.html:205 513 _tt_tmp = move_x_by + 300 # /mnt/gramener/apps/playground/nfl/index.html:205 514 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:205 515 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:205 516 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:205 517 _tt_append('" y2="22.5" style="stroke:#000000;stroke-width:0.9" />\n \t') # /mnt/gramener/apps/playground/nfl/index.html:206 518 line_xpos = 33.5 # /mnt/gramener/apps/playground/nfl/index.html:206 519 _tt_append('\n \t') # /mnt/gramener/apps/playground/nfl/index.html:207 520 for l in range(6): # /mnt/gramener/apps/playground/nfl/index.html:207 521 _tt_append('\n \t<line stroke-dasharray="0.9" x1="') # /mnt/gramener/apps/playground/nfl/index.html:208 522 _tt_tmp = line_xpos * increase_size_by # /mnt/gramener/apps/playground/nfl/index.html:208 523 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:208 524 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:208 525 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:208 526 _tt_append('" y1="10" x2="') # /mnt/gramener/apps/playground/nfl/index.html:208 527 _tt_tmp = line_xpos * increase_size_by # /mnt/gramener/apps/playground/nfl/index.html:208 528 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:208 529 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:208 530 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:208 531 _tt_append('" y2="35" style="stroke:#000000;stroke-width:') # /mnt/gramener/apps/playground/nfl/index.html:208 532 _tt_tmp = 1.5 if l in [0,4,5] else 0.45 # /mnt/gramener/apps/playground/nfl/index.html:208 533 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:208 534 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:208 535 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:208 536 _tt_append('" />\n \t') # /mnt/gramener/apps/playground/nfl/index.html:209 537 line_xpos = line_xpos + 15 # /mnt/gramener/apps/playground/nfl/index.html:209 538 _tt_append('\n \t') # /mnt/gramener/apps/playground/nfl/index.html:210 539 pass # /mnt/gramener/apps/playground/nfl/index.html:207 540 _tt_append('\n \t') # /mnt/gramener/apps/playground/nfl/index.html:211 541 for i, meta in selected_team.iterrows(): # /mnt/gramener/apps/playground/nfl/index.html:211 542 _tt_append('\n \t\t') # /mnt/gramener/apps/playground/nfl/index.html:212 543 sel_team_xpos = meta['new time'].hour + time_dict[meta['quarter-edited']] # /mnt/gramener/apps/playground/nfl/index.html:212 544 _tt_append('\n \t\t<circle cx="') # /mnt/gramener/apps/playground/nfl/index.html:213 545 _tt_tmp = (sel_team_xpos * increase_size_by) + move_x_by # /mnt/gramener/apps/playground/nfl/index.html:213 546 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:213 547 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:213 548 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:213 549 _tt_append('" cy="15" fill="') # /mnt/gramener/apps/playground/nfl/index.html:213 550 _tt_tmp = score_dict[meta['event.1']] # /mnt/gramener/apps/playground/nfl/index.html:213 551 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:213 552 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:213 553 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:213 554 _tt_append('" r="5" title="') # /mnt/gramener/apps/playground/nfl/index.html:213 555 _tt_tmp = ordinal(meta['new time'].hour + 1) # /mnt/gramener/apps/playground/nfl/index.html:213 556 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:213 557 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:213 558 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:213 559 _tt_append(' minute - ') # /mnt/gramener/apps/playground/nfl/index.html:213 560 _tt_tmp = 'Overtime' if meta['quarter-edited'] == 'OT' else meta['quarter-edited'] + ' quarter' # /mnt/gramener/apps/playground/nfl/index.html:213 561 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:213 562 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:213 563 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:213 564 _tt_append(' : ') # /mnt/gramener/apps/playground/nfl/index.html:213 565 _tt_tmp = meta['event'] # /mnt/gramener/apps/playground/nfl/index.html:213 566 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:213 567 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:213 568 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:213 569 _tt_append('" />\n\n \t') # /mnt/gramener/apps/playground/nfl/index.html:215 570 pass # /mnt/gramener/apps/playground/nfl/index.html:211 571 _tt_append('\n \t') # /mnt/gramener/apps/playground/nfl/index.html:216 572 for i, meta in the_other_team.iterrows(): # /mnt/gramener/apps/playground/nfl/index.html:216 573 _tt_append('\n \t\t') # /mnt/gramener/apps/playground/nfl/index.html:217 574 sel_team_xpos = meta['new time'].hour + time_dict[meta['quarter-edited']] # /mnt/gramener/apps/playground/nfl/index.html:217 575 _tt_append('\n \t\t<circle cx="') # /mnt/gramener/apps/playground/nfl/index.html:218 576 _tt_tmp = (sel_team_xpos * increase_size_by) + move_x_by # /mnt/gramener/apps/playground/nfl/index.html:218 577 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:218 578 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:218 579 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:218 580 _tt_append('" cy="30" fill="') # /mnt/gramener/apps/playground/nfl/index.html:218 581 _tt_tmp = score_dict[meta['event.1']] # /mnt/gramener/apps/playground/nfl/index.html:218 582 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:218 583 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:218 584 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:218 585 _tt_append('" r="5" title="') # /mnt/gramener/apps/playground/nfl/index.html:218 586 _tt_tmp = ordinal(meta['new time'].hour + 1) # /mnt/gramener/apps/playground/nfl/index.html:218 587 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:218 588 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:218 589 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:218 590 _tt_append(' minute - ') # /mnt/gramener/apps/playground/nfl/index.html:218 591 _tt_tmp = 'Overtime' if meta['quarter-edited'] == 'OT' else meta['quarter-edited'] + ' quarter' # /mnt/gramener/apps/playground/nfl/index.html:218 592 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:218 593 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:218 594 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:218 595 _tt_append(' : ') # /mnt/gramener/apps/playground/nfl/index.html:218 596 _tt_tmp = meta['event'] # /mnt/gramener/apps/playground/nfl/index.html:218 597 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:218 598 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:218 599 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:218 600 _tt_append('"/>\n \t') # /mnt/gramener/apps/playground/nfl/index.html:219 601 pass # /mnt/gramener/apps/playground/nfl/index.html:216 602 _tt_append('\n\n \t<text x="470" y="20" style="fill:black;font-size:9px">') # /mnt/gramener/apps/playground/nfl/index.html:221 603 _tt_tmp = 'W' if current_team == reference.ix[g]['Winner'] else 'L' # /mnt/gramener/apps/playground/nfl/index.html:221 604 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:221 605 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:221 606 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:221 607 _tt_append('</text>\n ') # /mnt/gramener/apps/playground/nfl/index.html:222 608 loserpts = reference.ix[g]['Loser Pts'] # /mnt/gramener/apps/playground/nfl/index.html:222 609 _tt_append('\n ') # /mnt/gramener/apps/playground/nfl/index.html:223 610 winnerpts = reference.ix[g]['Winner Pts'] # /mnt/gramener/apps/playground/nfl/index.html:223 611 _tt_append('\n \t') # /mnt/gramener/apps/playground/nfl/index.html:224 612 if current_team == reference.ix[g]['Winner']: # /mnt/gramener/apps/playground/nfl/index.html:224 613 _tt_append('\n \t\n \t<text text-anchor="end" x="458.5" y="18" style="fill:black;font-size:9px">') # /mnt/gramener/apps/playground/nfl/index.html:226 614 _tt_tmp = winnerpts # /mnt/gramener/apps/playground/nfl/index.html:226 615 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:226 616 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:226 617 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:226 618 _tt_append('</text>\n \t<text text-anchor="end" x="458.5" y="35" style="fill:black;font-size:9px">') # /mnt/gramener/apps/playground/nfl/index.html:227 619 _tt_tmp = loserpts # /mnt/gramener/apps/playground/nfl/index.html:227 620 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:227 621 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:227 622 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:227 623 _tt_append('</text>\n \t') # /mnt/gramener/apps/playground/nfl/index.html:228 624 pass # /mnt/gramener/apps/playground/nfl/index.html:228 625 else: # /mnt/gramener/apps/playground/nfl/index.html:228 626 _tt_append('\n \t<text text-anchor="end" x="458.5" y="18" style="fill:black;font-size:9px">') # /mnt/gramener/apps/playground/nfl/index.html:229 627 _tt_tmp = loserpts # /mnt/gramener/apps/playground/nfl/index.html:229 628 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:229 629 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:229 630 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:229 631 _tt_append('</text>\n \t<text text-anchor="end" x="458.5" y="35" style="fill:black;font-size:9px">') # /mnt/gramener/apps/playground/nfl/index.html:230 632 _tt_tmp = winnerpts # /mnt/gramener/apps/playground/nfl/index.html:230 633 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:230 634 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:230 635 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:230 636 _tt_append('</text>\n \t') # /mnt/gramener/apps/playground/nfl/index.html:231 637 pass # /mnt/gramener/apps/playground/nfl/index.html:224 638 _tt_append('\n \t<line stroke-dasharray="0.9" x1="450" y1="22.5" x2="460" y2="22.5" style="stroke:#000000;stroke-width:0.9" />\n \t</svg>\n \t\n \t</td>\n \t</tr>\n\t') # /mnt/gramener/apps/playground/nfl/index.html:237 639 pass # /mnt/gramener/apps/playground/nfl/index.html:181 640 _tt_append('\n\t</tbody>\n\t</table>\n </div>\n \n </div><!-- .row -->\n\n \n</div><!-- .container -->\n\n') # /mnt/gramener/apps/playground/nfl/index.html:247 641 _tt_tmp = Block.run('footer', handler=handler, share='Every Touchdown of NFL 2015') # /mnt/gramener/apps/playground/nfl/index.html:247 642 if isinstance(_tt_tmp, _tt_string_types): _tt_tmp = _tt_utf8(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:247 643 else: _tt_tmp = _tt_utf8(str(_tt_tmp)) # /mnt/gramener/apps/playground/nfl/index.html:247 644 _tt_append(_tt_tmp) # /mnt/gramener/apps/playground/nfl/index.html:247 645 _tt_append('\n<script>\n //paste this code under head tag or in a seperate js file.\n // Wait for window load\n $(window).load(function() {\n // Animate loader off screen\n $(".se-pre-con").fadeOut("slow");;\n });\n</script>\n</body></html>\n') # /mnt/gramener/apps/playground/nfl/index.html:257 646 return _tt_utf8('').join(_tt_buffer) # /mnt/gramener/apps/playground/nfl/index.html:0