-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from guerda/feat_genre_heatmap
feat: add genre heatmap
- Loading branch information
Showing
4 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<title>Albums - Beets Statistics</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="stylesheet" href="{{ url_for('static', path='main.css') }}" /> | ||
</head> | ||
<body> | ||
{% include 'navigation.html' %} | ||
<content> | ||
<h2>Genre Decade Heatmap</h2> | ||
<table> | ||
<tr> | ||
<th>Genre</th> | ||
{% for decade in decades %} | ||
<th>{{ decade }} | ||
{% endfor %} | ||
</tr> | ||
{% for genre in heatmap %} | ||
<tr> | ||
<td>{{ genre }}</td> | ||
{% for decade in heatmap[genre]|sort %} | ||
<td><div style="background-color: rgba(0,200,50, {{ heatmap[genre][decade] / max_genre_count }}); padding: 0.15em; margin: 0.1em; border-radius: 3px; width: 4em; display:inline;" | ||
title="{{decade}} {{heatmap[genre][decade]}} {{genre}};"> | ||
{{ heatmap[genre][decade] }}</div></td> | ||
{% endfor %} | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</content> | ||
{% include 'footer.html' %} | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters