Permalink
Browse files

getting ready for stealth launch of the site

two primary features implemented, search by name and map browser. the
stealth launch is near.
  • Loading branch information...
1 parent 3e0fd99 commit 485950ca15dfc370359b694da84079fa8dd4b9e2 @claytantor claytantor committed Feb 4, 2013
Showing with 16,987 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +10 −0 README.md
  3. BIN fiveoneoheat/content/510eat_bar.psd
  4. BIN fiveoneoheat/content/510eat_icon.psd
  5. BIN fiveoneoheat/content/510eat_logo.psd
  6. BIN fiveoneoheat/content/icons.psd
  7. BIN fiveoneoheat/content/markers.psd
  8. +8 −0 fiveoneoheat/fiveoneoheat/settings.py
  9. BIN fiveoneoheat/fiveoneoheat/settings.pyc
  10. +75 −0 fiveoneoheat/fiveoneoheat/templates/facility.html
  11. +13 −0 fiveoneoheat/fiveoneoheat/templates/footer.html
  12. +34 −0 fiveoneoheat/fiveoneoheat/templates/head.html
  13. +8 −0 fiveoneoheat/fiveoneoheat/templates/header.html
  14. +52 −0 fiveoneoheat/fiveoneoheat/templates/index.html
  15. +25 −0 fiveoneoheat/fiveoneoheat/templates/map_browse.html
  16. +35 −0 fiveoneoheat/fiveoneoheat/templates/search_name.html
  17. +11 −0 fiveoneoheat/fiveoneoheat/urls.py
  18. BIN fiveoneoheat/fiveoneoheat/urls.pyc
  19. +1 −0 fiveoneoheat/fiveoneoheat/util/__init__.py
  20. +321 −0 fiveoneoheat/fiveoneoheat/util/dataloader.py
  21. +109 −0 fiveoneoheat/fiveoneoheat/views.py
  22. +111 −0 fiveoneoheat/static/css/fiveoneoheat.css
  23. +14,647 −0 fiveoneoheat/static/data/alameda_county_restaurants_inspections_cleaned.json
  24. BIN fiveoneoheat/static/img/fiveoneoheat-icon.png
  25. BIN fiveoneoheat/static/img/fiveoneoheat-logo.png
  26. BIN fiveoneoheat/static/img/fiveoneoheat-topbar.png
  27. BIN fiveoneoheat/static/img/icon-acgov.png
  28. BIN fiveoneoheat/static/img/icon-c4a.png
  29. BIN fiveoneoheat/static/img/icon-claytantor.png
  30. BIN fiveoneoheat/static/img/icon-usc.png
  31. BIN fiveoneoheat/static/img/marker-G-64.png
  32. BIN fiveoneoheat/static/img/marker-G.png
  33. BIN fiveoneoheat/static/img/marker-R-64.png
  34. BIN fiveoneoheat/static/img/marker-R.png
  35. BIN fiveoneoheat/static/img/marker-Y-64.png
  36. BIN fiveoneoheat/static/img/marker-Y.png
  37. BIN fiveoneoheat/static/img/thumb-feature-browse-map.png
  38. BIN fiveoneoheat/static/img/thumb-feature-search-name.png
  39. +81 −0 fiveoneoheat/static/js/FacilityMap.js
  40. +42 −0 fiveoneoheat/static/js/InspectionSearch.js
  41. +169 −0 fiveoneoheat/static/js/MarkersMap.js
  42. +527 −0 fiveoneoheat/static/js/fiveoneoheat.js
  43. +4 −0 fiveoneoheat/static/js/jquery.min.js
  44. +625 −0 fiveoneoheat/static/js/mustache.js
  45. +77 −0 fiveoneoheat/static/json/neighborhoods.json
View
@@ -4,3 +4,5 @@ fiveoneoheat/.DS_Store
.DS_Store
.idea
+
+fiveoneoheat/static/data/alameda_county_restaurants_inspections_n.csv
View
@@ -12,3 +12,13 @@ What will it do?
* green yellow red filtering
* works with location and senses android and ios for mobile version
* maybe twilio SMS (TBD)
+
+
+Restaurant Grading System
+-------------
+
+Green, Yellow and Red - those are the colors of the placards that will be posted at Alameda County retail food facilities (excluding City of Berkeley) effective July 1, 2012. The grading system is the latest enhancement to the Department's food safety program and will eventually impact the over 6000 food facilities in the County.
+
+Pass (green), Conditional Pass (yellow), and Closed (red) placards will rank the food safety status of food facilities inspected after July 1, 2012. Initially, foodservice operations at restaurants, school cafeterias, healthcare facilities, commissaries, supermarkets and bakeries will receive placards after a routine inspection is conducted. Mobile food and prepackaged facilities will be posted later in the year. The placards are to be posted at or near the entrance of the facility in public view.
+
+http://www.acgov.org/aceh/food/grading.htm
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1,4 +1,8 @@
# Django settings for fiveoneoheat project.
+import os
+PROJECT_DIR = os.path.dirname(__file__)
+here = lambda x: os.path.join(os.path.abspath(os.path.dirname(__file__)), x)
+
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@@ -67,6 +71,8 @@
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
+ os.path.join(PROJECT_DIR, '..', 'static/'),
+
)
# List of finder classes that know how to find static files in
@@ -106,6 +112,7 @@
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
+ os.path.join(os.path.dirname(__file__) , 'templates').replace('\\','/')
)
INSTALLED_APPS = (
@@ -115,6 +122,7 @@
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
+ 'fiveoneoheat'
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
Binary file not shown.
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html>
+{% include "head.html" %}
+<body>
+<script type="text/javascript">
+ $(document).ready(function() {
+ $('#map_area').fooeFacilityMap({
+ endpoint:'{% url map_browse_json %}',
+ location:new google.maps.LatLng({{ facility.location.lat }}, {{ facility.location.lon }}),
+ grade:'{{ facility.document.inspections.0.grade }}',
+ zoom:16,
+ static_url:{{ STATIC_URL }}
+ });
+ });
+</script>
+<div class="container-narrow">
+
+ {% include "header.html" %}
+
+ <hr>
+
+
+ <div class="row-fluid" style="text-align: center; margin-bottom: 10px;">
+ <h1>{{ facility.document.facility_name }}</h1>
+ </div>
+ <div class="row-fluid" style="margin-bottom: 10px;">
+ <div class="item_row"><div class="item_location">
+ <div class="item_name">{{facility.document.facility_name}}</div>
+ <div class="item_address">{{facility.document.address}}</div></div>
+ <div class="item_inspections">{% for inspection in facility.document.inspections %}
+ <div class="item_inspection">
+ <div style="display:inline-block;"><strong>{{inspection.activity_date}}</strong></br><ul>
+ {% for violation in inspection.violation_descriptions %}
+ <li>{{ violation }}</li>
+ {% endfor %}
+ </ul></div>
+ <div class="item_grade-{{inspection.grade}}">&nbsp;</div>
+ </div>
+ {% endfor %}
+ </div>
+ </div>
+
+ </div>
+ <div class="row-fluid" style="text-align: center; margin-bottom: 10px;">
+ <div style="width:100%;height:100%" id="map_area"></div>
+ </div>
+ <div class="row-fluid" style="text-align: center; margin-bottom: 10px;">
+ <div id="disqus_thread"></div>
+ <script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = '510eat-org'; // required: replace example with your forum shortname
+
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+ <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
+
+ </div>
+
+ <hr>
+ {% include "footer.html" %}
+
+
+
+</div> <!-- /container -->
+
+
+
+</body>
+</html>
@@ -0,0 +1,13 @@
+<div class="row-fluid footer" xmlns="http://www.w3.org/1999/html">
+ <div class="span4 footer-inline"><img src="{{ STATIC_URL }}img/icon-acgov.png"/>
+ &nbsp;<a href="http://acgov.org" target="_blank">acgov.org</a>
+ </div>
+ <div class="span4 footer-inline"><img src="{{ STATIC_URL }}img/icon-c4a.png"/>
+ &nbsp;
+ <a href="http://codeforamerica.org" target="_blank">code for america</a>
+ </div>
+ <div class="span4 footer-inline"><img src="{{ STATIC_URL }}img/icon-claytantor.png"/>&nbsp;
+ <a href="https://github.com/claytantor" target="_blank">@claytantor</a>
+ </div>
+</div>
+<div class="row-fluid" style="height: 20px">&nbsp;</div>
@@ -0,0 +1,34 @@
+<head>
+ <meta charset="utf-8">
+ <title>510eat.org</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="">
+
+ <!-- the styles -->
+ <link href='http://fonts.googleapis.com/css?family=Titillium+Web:400,900,600' rel='stylesheet' type='text/css'>
+ <link href="{{STATIC_URL}}css/bootstrap.css" rel="stylesheet">
+ <link href="{{STATIC_URL}}css/bootstrap-responsive.css" rel="stylesheet">
+ <link href="{{STATIC_URL}}css/fiveoneoheat.css" rel="stylesheet">
+
+ <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+
+ <!-- Fav and touch icons -->
+ <link rel="shortcut icon" href="{{STATIC_URL}}img/fiveoneoheat-icon.png">
+ <script src="{{ STATIC_URL }}js/jquery.min.js"></script>
+ <script src="{{ STATIC_URL }}js/bootstrap.min.js"></script>
+ <script src="{{ STATIC_URL }}js/mustache.js"></script>
+
+ <script type="text/javascript"
+ src="https://maps.googleapis.com/maps/api/js?sensor=true&libraries=visualization,geometry"></script>
+ <script type="text/javascript" src="http://maps.stamen.com/js/tile.stamen.js?v1.2.1"></script>
+
+ <script src="{{ STATIC_URL }}js/InspectionSearch.js"></script>
+ <script src="{{ STATIC_URL }}js/MarkersMap.js"></script>
+ <script src="{{ STATIC_URL }}js/FacilityMap.js"></script>
+ <script src="{{ STATIC_URL }}js/fiveoneoheat.js"></script>
+
+</head>
@@ -0,0 +1,8 @@
+<div class="masthead">
+ <ul class="nav nav-pills pull-right">
+ <li class="active"><a href="{% url site_landing %}">Home</a></li>
+ <li><a href="{% url fiveoneoheat.views.search_name %}">Search By Name</a></li>
+ <li><a href="{% url fiveoneoheat.views.map_browse %}">Browse Map</a></li>
+ </ul>
+ <a href="{% url site_landing %}"><img src="{{ STATIC_URL }}img/fiveoneoheat-topbar.png"/></a>
+</div>
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html>
+{% include 'head.html' %}
+<body>
+
+<div class="container-narrow">
+
+ {% include 'header.html' %}
+
+ <hr style="width: 100%;">
+
+ <div class="jumbotron">
+ <div><img src="{{ STATIC_URL }}img/fiveoneoheat-logo.png"/></div>
+ <h1>Does your East Bay eatery make the grade?</h1>
+ <p class="lead">510eat.org is the only website that uses data from the
+ <a href="http://www.acgov.org/aceh/food/grading.htm" target="_new">Alameda County Restaurant Grading System</a>
+ to give you a simple maps and searches of <span class="foo-green">Green</span>,
+ <span class="foo-yellow">Yellow</span> and <span class="foo-red">Red</span> inspection results.</p>
+ </div>
+
+ <hr style="width: 100%;">
+
+ <div class="row-fluid" style="height: 400px;">
+ <div class="span6">
+ <div class="activity_item">
+ <h3>Search By Name</h3>
+ <div><img class="img-polaroid" src="{{ STATIC_URL }}img/thumb-feature-search-name.png"/></div>
+ <p>Enter the name of the restaurant, deli, or market you are interested in and see a simple list of results.</p>
+ <a href="{% url fiveoneoheat.views.search_name %}" class="btn btn-primary">Search Now!</a>
+ </div>
+ </div>
+
+ <div class="span6">
+ <div class="activity_item">
+ <h3>Browse Map</h3>
+ <div><img class="img-polaroid" src="{{ STATIC_URL }}img/thumb-feature-browse-map.png"/></div>
+ <p>See a map of all of Oakland and browse it as you wish, drill down and explore. Recommended for web users.</p>
+ <a href="{% url fiveoneoheat.views.map_browse %}" class="btn btn-primary">Show Map!</a>
+ </div>
+ </div>
+ </div>
+
+ <hr style="width: 100%;">
+
+ {% include 'footer.html' %}
+
+</div> <!-- /container -->
+
+
+
+</body>
+</html>
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+{% include 'head.html' %}
+<script type="text/javascript">
+ $(document).ready(function() {
+ $('#map_area').fooeBrowseMap({
+ endpoint:'{% url map_browse_json %}',
+ location:new google.maps.LatLng(37.811080264089874, -122.26691648086924),
+ zoom:15,
+ static_url:{{ STATIC_URL }}
+ });
+ });
+</script>
+<body>
+
+<div class="container-narrow">
+ {% include 'header.html' %}
+ <div style="width:100%;height:100%" id="map_area"></div>
+
+ <hr>
+ {% include 'footer.html' %}
+</div> <!-- /container -->
+
+</body>
+</html>
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+{% include 'head.html' %}
+<script type="text/javascript">
+ $(document).ready(function() {
+ $('#search_name_area').fooeSearchByNameForm({
+ endpoint:'{% url search_name_json %}'
+ });
+ });
+</script>
+<body>
+<div class="container-narrow">
+
+ {% include 'header.html' %}
+
+ <hr>
+
+ <div class="row-fluid marketing">
+ <div class="span12" style="text-align: center;">
+ <h1>Search By Name</h1>
+ <div id="search_name_area"></div>
+ </div>
+
+ </div>
+
+ <hr>
+
+ {% include 'footer.html' %}
+
+</div> <!-- /container -->
+
+
+
+</body>
+</html>
@@ -14,4 +14,15 @@
# Uncomment the next line to enable the admin:
# url(r'^admin/', include(admin.site.urls)),
+ url(r'^$', 'fiveoneoheat.views.index',name='site_landing'),
+ url(r'^index.html', 'fiveoneoheat.views.index',name='site_landing'),
+ url(r'^search/name.html', 'fiveoneoheat.views.search_name',name='search_name'),
+ url(r'^search/name.json', 'fiveoneoheat.views.search_name_json',name='search_name_json'),
+ url(r'^map/browse.html', 'fiveoneoheat.views.map_browse',name='map_browse'),
+ url(r'^map/browse.json', 'fiveoneoheat.views.map_browse_json',name='map_browse_json'),
+# url(r'^facility.html', 'fiveoneoheat.views.facility',name='facility'),
+
+ #id based urls
+ url(r'^facility/(\w+)/$', 'fiveoneoheat.views.facility_by_id', name='facility_by_id'),
+
)
Binary file not shown.
@@ -0,0 +1 @@
+__author__ = 'claygraham'
Oops, something went wrong.

0 comments on commit 485950c

Please sign in to comment.