Skip to content

Commit 7ba8914

Browse files
author
geekshe
committed
Dev density map and social updates
1 parent 35db994 commit 7ba8914

13 files changed

+128
-2149
lines changed

graph.json

-1,330
This file was deleted.

mashery.csv

-233
This file was deleted.

mashery_clean.csv

-229
This file was deleted.

mashery_sm.csv

-7
This file was deleted.

miserables.json

-337
This file was deleted.

server.py

+7
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ def social():
109109
return render_template("social.html", my_tweets=my_tweets, klout_score=klout_score)
110110

111111

112+
@app.route('/map')
113+
def map():
114+
"""Show developer locations world wide."""
115+
116+
# Render the map
117+
return render_template("map.html")
118+
112119
# @app.route('/d3')
113120
# def show_apps_customers():
114121
# """Show relationship of apps to their customers and vice versa."""

static/css/styles.css

+14-9
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ body {
2222
}
2323

2424
.rightnav {
25-
float: right;
25+
float: right;
2626
}
2727

2828
#wrapper {
2929
width: 80%;
30-
height: 100px;
31-
margin: 0;
32-
padding: 10px;
33-
border: 1px;
34-
border-style: solid;
35-
border-radius: 25px;
30+
height: 100px;
31+
margin: 0;
32+
padding: 10px;
33+
border: 1px;
34+
border-style: solid;
35+
border-radius: 25px;
3636
}
3737

3838
#status-icon {
@@ -49,8 +49,13 @@ body {
4949
}
5050

5151
.PieChart {
52-
height: 200px;
53-
margin-left: 0;
52+
height: 200px;
53+
margin-left: 0;
54+
}
55+
56+
a i {
57+
color:#FFF;
58+
text-decoration: none;
5459
}
5560

5661
@-webkit-keyframes heartbeat{

static/js/dev_density.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/base.html

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
</li>
4747
<li><a href="/social">Outreach</a>
4848
</li>
49+
<li><a href="/map">Dev Map</a>
50+
</li>
4951
</ul>
5052
</div>
5153
<!--/.nav-collapse -->

templates/env.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<h1>API Calls by Volume</h1>
1919

20-
<h2>Ecommerce API (staging)</h2>
20+
<h2>Ecommerce API (production)</h2>
2121
<div class="row">
2222
<!-- /.col-lg-6 -->
2323
<div class="col-lg-6">

templates/homepage.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h1>Developer Program Pulse</h1>
1212
<div class="row">
1313
<div class="col-xs-3">
1414
<!-- Status icon -->
15-
<i class="fa {{ overall_status['status_icon'] }} fa-5x"></i>
15+
<a href="/bubble"><i class="fa {{ overall_status['status_icon'] }} fa-5x"></i></a>
1616
</div>
1717
<div class="col-xs-9 text-right">
1818
<div class="huge">{{ overall_status['rating'] }}/10</div>
@@ -38,7 +38,7 @@ <h1>Developer Program Pulse</h1>
3838
<div class="row">
3939
<div class="col-xs-3">
4040
<!-- Status icon -->
41-
<i class="fa {{ performance_status['status_icon'] }} fa-5x"></i>
41+
<a href="/env"><i class="fa {{ performance_status['status_icon'] }} fa-5x"></i></a>
4242
</div>
4343
<div class="col-xs-9 text-right">
4444
<div class="huge">{{ performance_status['rating'] }}/10</div>
@@ -64,7 +64,7 @@ <h1>Developer Program Pulse</h1>
6464
<div class="row">
6565
<div class="col-xs-3">
6666
<!-- Status icon -->
67-
<i class="fa {{ outreach_status['status_icon'] }} fa-5x"></i>
67+
<a href="/social"><i class="fa {{ outreach_status['status_icon'] }} fa-5x"></i></a>
6868
</div>
6969
<div class="col-xs-9 text-right">
7070
<div class="huge">{{ outreach_status['rating'] }}/10</div>

templates/map.html

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{% extends 'base.html' %}
2+
{% block content %}
3+
4+
<link href="https://cdnjs.cloudflare.com/ajax/libs/jqvmap/1.5.1/jqvmap.css" media="screen" rel="stylesheet" type="text/css">
5+
<!-- jQuery -->
6+
<link rel="stylesheet" href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
7+
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
8+
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
9+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqvmap/1.5.1/jquery.vmap.js"></script>
10+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqvmap/1.5.1/maps/jquery.vmap.world.js" charset="utf-8"></script>
11+
<script type="text/javascript" src="/static/js/dev_density.js"></script>
12+
13+
<script type="text/javascript">
14+
jQuery(document).ready(function() {
15+
jQuery('#vmap').vectorMap({
16+
map: 'world_en',
17+
backgroundColor: '#ffffff',
18+
color: '#cccccc',
19+
hoverOpacity: 0.7,
20+
selectedColor: '#666666',
21+
enableZoom: true,
22+
showTooltip: true,
23+
scaleColors: ['#afd69a', '#478227'],
24+
values: dev_density,
25+
normalizeFunction: 'polynomial'
26+
});
27+
});
28+
</script>
29+
30+
<h1>Developer Locations</h1>
31+
32+
33+
<div id="vmap" style="width: 600px; height: 400px;"></div>
34+
35+
36+
{% endblock %}

templates/social.html

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{% extends 'base.html' %}
2+
{% block content %}
3+
4+
<!-- jQuery -->
5+
<link rel="stylesheet" href="http://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
6+
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
7+
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
8+
9+
10+
<h1>Outreach</h1>
11+
12+
13+
<h2>Klout</h2>
14+
15+
<div class="row">
16+
<!-- /.col-lg-4 -->
17+
<div class="col-lg-4">
18+
<div class="panel panel-default">
19+
<div class="panel-heading">
20+
Klout Score
21+
</div>
22+
<!-- /.panel-heading -->
23+
<div class="panel-body">
24+
<p>
25+
{{ '%0.1f' % klout_score |float }}
26+
</p>
27+
<!-- /.panel-body -->
28+
</div>
29+
<!-- /.panel -->
30+
</div>
31+
</div>
32+
</div>
33+
34+
35+
<h2>Tweets</h2>
36+
37+
{% for tweet in my_tweets %}
38+
<div class="row">
39+
<!-- /.col-lg-4 -->
40+
<div class="col-lg-4">
41+
<div class="panel panel-default">
42+
<div class="panel-heading">
43+
Tweet ID: {% if tweet is defined %}{{tweet.id}}{% endif %}
44+
</div>
45+
<!-- /.panel-heading -->
46+
<div class="panel-body">
47+
<p>
48+
{{ tweet.text }}
49+
<br>
50+
<strong>@{{ tweet.user.screen_name }}</strong>
51+
| <a href="https://www.twitter.com/{{tweet.user.screen_name}}/status/{{tweet.id}}">link</a>
52+
<br>
53+
{{tweet.created_at|strftime}}
54+
</p>
55+
<!-- /.panel-body -->
56+
</div>
57+
<!-- /.panel -->
58+
</div>
59+
</div>
60+
</div>
61+
{% endfor %}
62+
63+
64+
{% endblock %}

0 commit comments

Comments
 (0)