Initial commit of app
This commit is contained in:
parent
8a6bf57cef
commit
7affb6db3d
8 changed files with 11870 additions and 89 deletions
14
README.md
14
README.md
|
|
@ -11,7 +11,7 @@ This project will be using the Kaggle
|
|||
|----|---------|-------------------|--------------------------|------------|---------------------------|--------------------------|------------------|--------------------------|---------------|---------------------------------|-----------------|--------------------------------------------|-------------------|-----------------------------|----------------------|------------------------|------------------------------------------------------------------|------------------------------------------------------|------------------------|------------|-----------|------------------|------------|--------------|--------------------------|--------------|----------------|------------------------|
|
||||
| 0 | Color | James Cameron | 723 | 178 | 0 | 855 | Joel David Moore | 1000 | 7.60506e+08 | Action/Adventure/Fantasy/Sci-Fi | CCH Pounder | Avatar | 886204 | 4834 | Wes Studi | 0 | avatar/future/marine/native/paraplegic | http://www.imdb.com/title/tt0499549/?ref_=fn_tt_tt_1 | 3054 | English | USA | PG-13 | 2.37e+08 | 2009 | 936 | 7.9 | 1.78 | 33000 |
|
||||
| 1 | Color | Gore Verbinski | 302 | 169 | 563 | 1000 | Orlando Bloom | 40000 | 3.09404e+08 | Action/Adventure/Fantasy | Johnny Depp | Pirates of the Caribbean- At World's End | 471220 | 48350 | Jack Davenport | 0 | goddess/marriage ceremony/marriage proposal/pirate/singapore | http://www.imdb.com/title/tt0449088/?ref_=fn_tt_tt_1 | 1238 | English | USA | PG-13 | 3e+08 | 2007 | 5000 | 7.1 | 2.35 | 0 |
|
||||
| 2 | Color | Sam Mendes | 602 | 148 | 0 | 161 | Rory Kinnear | 11000 | 2.00074e+08 | Action/Adventure/Thriller | Christoph Waltz | Spectre | 275868 | 11700 | Stephanie Sigman | 1 | bomb|espionage/sequel/spy/terrorist | http://www.imdb.com/title/tt2379713/?ref_=fn_tt_tt_1 | 994 | English | UK | PG-13 | 2.45e+08 | 2015 | 393 | 6.8 | 2.35 | 85000 |
|
||||
| 2 | Color | Sam Mendes | 602 | 148 | 0 | 161 | Rory Kinnear | 11000 | 2.00074e+08 | Action/Adventure/Thriller | Christoph Waltz | Spectre | 275868 | 11700 | Stephanie Sigman | 1 | bomb/espionage/sequel/spy/terrorist | http://www.imdb.com/title/tt2379713/?ref_=fn_tt_tt_1 | 994 | English | UK | PG-13 | 2.45e+08 | 2015 | 393 | 6.8 | 2.35 | 85000 |
|
||||
| 3 | Color | Christopher Nolan | 813 | 164 | 22000 | 23000 | Christian Bale | 27000 | 4.48131e+08 | Action/Thriller | Tom Hardy | The Dark Knight Rises | 1144337 | 106759 | Joseph Gordon-Levitt | 0 | deception/imprisonment/lawlessness/police officer/terrorist plot | http://www.imdb.com/title/tt1345836/?ref_=fn_tt_tt_1 | 2701 | English | USA | PG-13 | 2.5e+08 | 2012 | 23000 | 8.5 | 2.35 | 164000 |
|
||||
| 4 | nan | Doug Walker | nan | nan | 131 | nan | Rob Walker | 131 | nan | Documentary | Doug Walker | Star Wars: Episode VII - The Force Awakens | 8 | 143 | nan | 0 | nan | http://www.imdb.com/title/tt5289954/?ref_=fn_tt_tt_1 | nan | nan | nan | nan | nan | nan | 12 | 7.1 | nan | 0 |
|
||||
|
||||
|
|
@ -43,3 +43,15 @@ This is the wireframe that the team has been given to replicate in python using
|
|||
|
||||

|
||||
|
||||
|
||||
## Time Investment
|
||||
|
||||
* **5 min** ETL
|
||||
* initial creation(modified personal file)
|
||||
* **5 min** settings.py
|
||||
* 5 minute (modified personal file)
|
||||
* **20 min** setup initial layout.html, index, and first two "story".html pages
|
||||
* found decent bootstrap layout template online
|
||||
* first time following the Flask Active button tutorial
|
||||
* http://jinja.pocoo.org/docs/2.9/tricks/
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
39
src/pyDataVizDay.py
Normal file
39
src/pyDataVizDay.py
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
"""
|
||||
PyDataVizDay
|
||||
|
||||
A python implementation of the Data Viz Day visualization built from the Kaggle
|
||||
IMDB 5000 Movie Dataset.
|
||||
|
||||
"""
|
||||
|
||||
from flask import Flask
|
||||
from flask import request, render_template, make_response, jsonify
|
||||
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
return render_template('index.html', body='Hello')
|
||||
|
||||
@app.route('/investor')
|
||||
def investor():
|
||||
return render_template('investor.html', body='Hello Investor')
|
||||
|
||||
@app.route('/enthusiast')
|
||||
def enthusiast():
|
||||
return render_template('enthusiast.html', body='Hello Enthusiast')
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import argparse
|
||||
parser = argparse.ArgumentParser(description='pyDataVizDay')
|
||||
parser.add_argument('--port', default='5000')
|
||||
parser.add_argument('--debug', dest='debug', action='store_true')
|
||||
parser.add_argument('--no_debug', dest='debug', action='store_false')
|
||||
parser.set_defaults(debug=False)
|
||||
args = parser.parse_args()
|
||||
# webbrowser.open('http://' + str(host) + ':' + str(port) + '/')
|
||||
app.run(debug=args.debug, host='0.0.0.0', port=int(args.port))
|
||||
2
src/templates/enthusiast.html
Normal file
2
src/templates/enthusiast.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{% extends "layout.html" %}
|
||||
{% set active_page = "enthusiast" %}
|
||||
2
src/templates/index.html
Normal file
2
src/templates/index.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{% extends "layout.html" %}
|
||||
{% set active_page = "index" %}
|
||||
2
src/templates/investor.html
Normal file
2
src/templates/investor.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{% extends "layout.html" %}
|
||||
{% set active_page = "investor" %}
|
||||
40
src/templates/layout.html
Normal file
40
src/templates/layout.html
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{{ title }}</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{% set navigation_bar = [
|
||||
('/investor', 'investor', 'Investor'),
|
||||
('/enthusiast', 'enthusiast', 'Enthusiast'),
|
||||
] -%}
|
||||
{% set active_page = active_page|default('index') -%}
|
||||
|
||||
<nav class="navbar navbar-inverse">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
|
||||
</button>
|
||||
<a class="navbar-brand" href="/">pyDataVizDay</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="myNavbar">
|
||||
<ul class="nav navbar-nav">
|
||||
{% for href, id, caption in navigation_bar %}
|
||||
<li{% if id == active_page %} class="active"{% endif%}>
|
||||
<a href="{{ href|e }}">{{ caption|e }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
{{ body }}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
32
src/templates/pyDataVizDay.py
Normal file
32
src/templates/pyDataVizDay.py
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
"""
|
||||
PyDataVizDay
|
||||
|
||||
A python implementation of the Data Viz Day visualization built from the Kaggle
|
||||
IMDB 5000 Movie Dataset.
|
||||
|
||||
"""
|
||||
|
||||
from flask import Flask
|
||||
from flask import request, render_template, make_response, jsonify
|
||||
|
||||
|
||||
app = Flask(__name__):
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
return render_template('index.html', body='Hello')
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
import argparse
|
||||
parser = argparse.ArgumentParser(description='pyDataVizDay')
|
||||
parser.add_argument('--port', default='5000')
|
||||
parser.add_argument('--debug', dest='debug', action='store_true')
|
||||
parser.add_argument('--no_debug', dest='debug', action='store_false')
|
||||
parser.set_defaults(debug=False)
|
||||
args = parser.parse_args()
|
||||
host = socket.gethostbyname(socket.gethostname())
|
||||
# webbrowser.open('http://' + str(host) + ':' + str(port) + '/')
|
||||
app.run(debug=args.debug, host=str(host), port=int(args.port))
|
||||
Loading…
Add table
Add a link
Reference in a new issue