Skip to content

Commit

Permalink
added jesse viz
Browse files Browse the repository at this point in the history
  • Loading branch information
jesshart committed Jun 13, 2020
1 parent 66b591e commit d0443e2
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 3 deletions.
4 changes: 4 additions & 0 deletions pet_pals/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ def viz2():
def viz3():
return render_template("viz-3.html")

@app.route("/viz-4")
def viz4():
return render_template("viz-4.html")


if __name__ == "__main__":
app.run(debug=True)
3 changes: 2 additions & 1 deletion pet_pals/templates/viz-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
<li><a href="/">Home</a></li>
<li class="active"><a href="viz-1">Quality</a></li>
<li><a href="viz-2">Retail</a></li>
<li><a href="viz-3">Variety</a></li>
<li><a href="viz-3">Brazil</a></li>
<li><a href="viz-4">Type</a></li>
</ul>
</div>
</nav>
Expand Down
4 changes: 3 additions & 1 deletion pet_pals/templates/viz-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
<li><a href="/">Home</a></li>
<li><a href="viz-1">Quality</a></li>
<li class="active"><a href="viz-2">Retail</a></li>
<li><a href="viz-3">Variety</a></li>
<li><a href="viz-3">Brazil</a></li>
<li><a href="viz-4">Type</a></li>
</ul>
</div>
</nav>
Expand All @@ -51,6 +52,7 @@
function initViz() {
var containerDiv = document.getElementById("vizContainer"),
// "https://public.tableau.com/views/Pricetogrowerscomparedtoqualityofcoffee/Dashboard1"
// https://public.tableau.com/views/CoffeePricesImportCountryv_s_ExportCountryunitlb/Dashboard1
url = "https://public.tableau.com/views/CoffeePricesImportCountryv_s_ExportCountry/Dashboard1"
options = {
hideTabs: true,
Expand Down
3 changes: 2 additions & 1 deletion pet_pals/templates/viz-3.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
<li><a href="/">Home</a></li>
<li><a href="viz-1">Quality</a></li>
<li><a href="viz-2">Retail</a></li>
<li class="active"><a href="viz-3">Variety</a></li>
<li class="active"><a href="viz-3">Brazil</a></li>
<li><a href="viz-4">Type</a></li>
</ul>
</div>
</nav>
Expand Down
71 changes: 71 additions & 0 deletions pet_pals/templates/viz-4.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Project 2</title>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">

<script src="https://public.tableau.com/javascripts/api/tableau-2.min.js"></script>

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script>
<link rel="stylesheet" href="../static/css/style.css">
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static', filename='css/style.css') }}">


<body onload="initViz();">

<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Datte Viz: Project 2</a>
</div>
<ul class="nav navbar-nav">
<li><a href="/">Home</a></li>
<li><a href="viz-1">Quality</a></li>
<li><a href="viz-2">Retail</a></li>
<li><a href="viz-3">Brazil</a></li>
<li class="active"><a href="viz-4">Type</a></li>
</ul>
</div>
</nav>

<div class="jumbotron">
<div class="container">
<div class="row align-items-center">
<div class="col-md-auto" id="vizContainer"></div>
<div class="col">

</div>
</div>
</div>
</div>

<script>
function initViz() {
var containerDiv = document.getElementById("vizContainer"),
url = "https://public.tableau.com/shared/Y67WMT8F3"
options = {
hideTabs: true,
onFirstInteractive: function() {
console.log("Run this code when the viz has finished loading.");
}
};
// Create a viz object and embed it in the container div.
var viz = new tableau.Viz(containerDiv, url, options);
}
</script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>

</body>

</html>

0 comments on commit d0443e2

Please sign in to comment.