-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
194 lines (173 loc) · 8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!DOCTYPE html>
<html>
<head>
<title>CharityViz</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="">
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/2.8.1/d3.v2.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.3.3/underscore-min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.2/backbone-min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.0.3/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0.beta6/handlebars.min.js"></script>
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<script src="js/countrycodes.js"></script>
<script src="js/sparql/sparql.js"></script>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="span8 offset2" style="margin-top:40px">
<h2>Project Widgets</h2>
<hr/>
<h3>Aid Data in Context</h3>
<p>More and more data on aid activities is available in the common <a href="http://www.iatistandard.org">IATI Standard</a>, but to bring that data to life we need to take it from where it sits on the IATI Registry, and put it into context.</p>
<h3>Context widgets, linked data</h3>
Roll your mouse over the links and you should see a pop up of information all about it. We're working to add more information to these pop-ups. The information comes direct from a <a href="http://kasabi.com/dataset/iati">Linked Data version of IATI data</a>, so that more data can be integrated in future.
<ul>
<li>
<a data-iati="44000-P048204">Petroleum Environment Capacity enhancement Project</a>
</li>
<li>
<a data-iati="GB-1-201642-101">Systematic Review Pilot</a>
</li>
<li>
<a data-iati="41AAA-00057337">Global Environment Facility (GEF) Small Grants Programme</a>
</li>
</ul>
<h3>Simple embedding</h3>
<p>To activate the tool simply add the relevant <code>data-iati</code> attribute to an element.</p>
<pre class="prettyprint linenums">
<a data-iati="44000-P048204">
Petroleum Environment Capacity enhancement Project
</a></pre>
<h3>Get involved</h3>
Find <a href="https://github.com/rhoksoton/charityviz/">the source code on GitHub</a> and get involved in developing the project further. Developed as part of RHOK Southampton - June 2012. See our <a href="http://www.rhok.org/solutions/charityviz-making-iati-data-easily-accessible-web-sites">solution page</a> for more information.
</div>
</div>
</div>
<script type="application/x-handlebars-template" id="project-retrieve-sparql-template">
SELECT * WHERE {
activity:{{{ project_id }}} dc:title ?title;
dc:description ?description;
iati:activityWebsiteUrl ?webSite.
OPTIONAL { activity:{{{ project_id }}} iati:recipientCountry ?recipientCountry. }
OPTIONAL {
activity:{{{ project_id }}} iati:contactInfoOrganisation ?contactInfo.
?contactInfo dc:title ?contactTitle;
iati:contactInfoEmail ?contactEmail;
iati:contactInfoPerson ?contactPerson;
iati:contactInfoPhone ?contactPhone;
iati:contactInfoAddress ?contactAddress.
}
}
</script>
<script type="text/x-handlebars-template" id="participant-retrieve-sparql-template">
SELECT ?participantTitle WHERE {
activity:{{{ project_id }}} iati:participatingOrg ?participating.
?participating rdfs:seeAlso ?actualParticipant.
?participating iati:participatingOrgRole "Implementing".
?actualParticipant dc:title ?participantTitle.
}
</script>
<script type="text/x-handlebars-template" id="transaction-retrieve-sparql-template">
SELECT * WHERE {
activity:{{{ project_id }}} iati:transaction ?trans .
?trans iati:value ?value;
iati:valueCurrency ?valueCurrency;
iati:transactionIsoDate ?date;
dc:description ?description;
iati:providerOrg ?providerOrg;
iati:receiverOrg ?receiverOrg.
{
select ?type where {
activity:{{{ project_id }}} iati:transaction ?trans .
?trans iati:transactionType ?txtype .
?txtype skos:prefLabel ?type .
}
}
{
select ?providerTitle where {
activity:{{{ project_id }}} iati:transaction ?trans .
?trans iati:providerOrg ?providerOrg .
?providerOrg dc:title ?providerTitle . } LIMIT 1
}
{
select ?receiverTitle where {
activity:{{{ project_id }}} iati:transaction ?trans .
?trans iati:receiverOrg ?receiverOrg .
?recieverOrg dc:title ?receiverTitle . } LIMIT 1
}
}
</script>
<script type="text/x-handlebars-template" id="project-view-template">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3 class="project-name">{{ title }}<small class="charity-name">{{ organisation }}</small></h3>
</div>
<div class="modal-body">
{{#if address}}
<address>
<strong>{{address.name}}</strong><br>
{{address.address}}<br>
<a href="tel:{{address.phone}}">{{address.phone}}</a><br/>
<a href="mailto:{{address.email}}">{{address.email}}</a>
</address>
{{/if}}
{{#if transactions}}
<table class="table table-striped transactions-table">
<thead>
<tr>
<th>Incoming</th>
<th></th>
<th>Outgoing</th>
</tr>
</thead>
<tbody>
{{#each transactions}}
{{#if this.receiver}}
<tr>
<td class="td0"></td>
<td class="td1"><div class="left-arrow"></div></td>
<td class="td2"><b>{{this.receiver}}</b><br><small>{{this.description}}</small><br/><b>Amount: {{this.amount}}</b></td>
</tr>
{{else}}
<tr>
<td class="td0"><b>{{this.provider}}</b><br><small>{{this.description}}</small><br/><b>Amount: {{this.amount}}</b></td>
<td class="td1"><div class="right-arrow"></div></td>
<td class="td2"></td>
</tr>
{{/if}}
{{/each}}
</tbody>
</table>
{{/if}}
{{#if description}}
<hr/>
<h4>About</h4>
<p>{{ description }}</p>
{{/if}}
</div>
<div class="modal-footer">
<a href="http://data.kasabi.com/dataset/iati/activity/{{id}}.html" target="_blank"><img border="0" src="http://assets.okfn.org/images/ok_buttons/od_80x15_blue.png" /></a>
</div>
</script>
<script type="text/x-handlebars-template" id="project-popover-template">
<div class="map"></div>
{{#if description}}
<div class="popover-content-container">
{{ description }}
</div>
{{/if}}
</script>
<script>
$(function() {
$('[data-iati]').projectViz('http://sparql.aidinfolabs.org/sparql/');
});
</script>
<script src="js/charityviz.js"></script>
</body>
</html>