<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Where Does My Money Go</title>
	<atom:link href="http://wheredoesmymoneygo.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://wheredoesmymoneygo.org</link>
	<description>Showing you where your taxes get spent</description>
	<lastBuildDate>Sat, 28 Jan 2012 16:07:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Open Spending Meeting Minutes 2011-02-10</title>
		<link>http://wheredoesmymoneygo.org/2011/02/15/open-spending-meeting-minutes-2011-02-10/</link>
		<comments>http://wheredoesmymoneygo.org/2011/02/15/open-spending-meeting-minutes-2011-02-10/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 19:15:04 +0000</pubDate>
		<dc:creator>Rufus Pollock</dc:creator>
				<category><![CDATA[Meetings]]></category>

		<guid isPermaLink="false">http://wheredoesmymoneygo.org/?p=1295</guid>
		<description><![CDATA[Participants Rufus Pollock Friedrich Lindenberg Stefan Wehrmeyer Nadia El imam Stefan marsiske Agenda Previous meetings: http://wdmmg.okfnpad.org/meetings Updates Becoming OpenSpending http://okfnpad.org/openspending http://wiki.openspending.org/Status_2011-02-10 Currently interested countries, cities, places Immediate tasks Why is it hard to get data &#8230; Because gov have it &#8230; <a href="http://wheredoesmymoneygo.org/2011/02/15/open-spending-meeting-minutes-2011-02-10/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Participants</h2>

<ul>
<li>Rufus Pollock</li>
<li>Friedrich Lindenberg</li>
<li>Stefan Wehrmeyer</li>
<li>Nadia El imam</li>
<li>Stefan marsiske</li>
</ul>

<h2>Agenda</h2>

<ul>
<li>Previous meetings: <a href="http://wdmmg.okfnpad.org/meetings">http://wdmmg.okfnpad.org/meetings</a></li>
<li>Updates</li>
<li>Becoming OpenSpending

<ul>
<li><a href="http://okfnpad.org/openspending">http://okfnpad.org/openspending</a></li>
<li><a href="http://wiki.openspending.org/Status_2011-02-10">http://wiki.openspending.org/Status_2011-02-10</a></li>
</ul></li>
<li>Currently interested countries, cities, places</li>
<li>Immediate tasks</li>
<li>Why is it hard to get data &#8230;

<ul>
<li>Because gov have it internally and don&#8217;t want to / not interested in giving it out</li>
</ul></li>
</ul>

<h3>Updates</h3>

<p>Friedrich</p>

<ul>
<li>converted the whole system to mongodb</li>
<li>new aggregator system

<ul>
<li>performance</li>
<li>reified aggregations &#8211; i.e. aggregations (the bubbles) are now real things in the system</li>
</ul></li>
<li>load eu, fts</li>
<li>new view system &#8211; bespoke views

<ul>
<li>treemaps</li>
</ul></li>
</ul>

<p>Stef: got uk 25k spending data working, looked at needlebase</p>

<p>Stefan:</p>

<ul>
<li>refactored js explorer http://rufuspollock.org/wdmmg/explorer.html</li>
<li>UX -> looking at front page (Merge http://data.wheredoesmymoneygo.org/ and http://wheredoesmymonegyo.org/ and http://offenerhaushalt.org/) http://wiki.okfn.org/p/Where_Does_My_Money_Go</li>
<li>flagging system</li>
</ul>

<h3>NEXT STEPS:</h3>

<h4>Identify theme questions, questions we are interested in having answered</h4>

<ol>
<li><p>Use: http://ask.wheredoesmymoneygo.org/</p></li>
<li><p>Examples questions</p>

<ul>
<li>Little money to many small actors,  versus big actors</li>
<li>Energy policy (lisa evans) </li>
</ul></li>
<li><p>Pursue them using the site, ask others interested in answering the same question and engage them into hunting down answers, finding datasets, research</p></li>
<li><p>Blog about the experience of trying to do this.</p></li>
<li><p>Find out what&#8217;s hard &amp; engage others in discussing why that is the case</p></li>
<li><p>Announce on the discuss list and document process from start to end</p>

<ul>
<li>Announce the challenge &#8211; make sure you establish value system ( this is not a witchhunt)</li>
<li>Story</li>
<li>Openspending, wheredoesmymoneygo, mailinglist, </li>
<li>Format for blogs &amp; findings ( encourage people to look for info themselves)</li>
</ul></li>
</ol>

<h4>Find out how users navigate the site</h4>

<h3>Generality versus Specificity</h3>

<p>Generality and specificify</p>

<ul>
<li>Generality is important for the model</li>
<li>Specificity is important for presentation</li>
</ul>

<h3>Where do we spend time</h3>

<ul>
<li>Visualization</li>
<li>Analytics</li>
<li>Community</li>
<li>UX</li>
<li><p>Acquisition</p></li>
<li><p>Usability/Theming/Layout +1 (FL)</p>

<ul>
<li>Front page</li>
<li>Call to action</li>
<li>Treemap</li>
<li>Navigation</li>
<li>Search: entry &amp; dimensions</li>
</ul></li>
<li><p>Content prodution, analysis</p></li>
<li><p>Community</p>

<ul>
<li>Meetings +1 (stef)</li>
<li>Data from different countries</li>
<li>Blogging / Tweeting</li>
</ul></li>
<li><p>Load more data</p>

<ul>
<li>ourselves</li>
<li>enable other people +1 (stef)</li>
</ul></li>
<li><p>Small way to contribute site (interesting)</p></li>
<li><p>Technical foundation</p>

<ul>
<li>Proper ORM, maybe use general API controller library <img src='http://wheredoesmymoneygo.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>Controller code to model</li>
<li>de-Wordpress-ify?</li>
</ul></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://wheredoesmymoneygo.org/2011/02/15/open-spending-meeting-minutes-2011-02-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving to Mongo: Where Does My Money Go&#8217;s new back-end</title>
		<link>http://wheredoesmymoneygo.org/2011/02/14/moving-to-mongo-where-does-my-money-gos-new-back-end/</link>
		<comments>http://wheredoesmymoneygo.org/2011/02/14/moving-to-mongo-where-does-my-money-gos-new-back-end/#comments</comments>
		<pubDate>Mon, 14 Feb 2011 19:23:48 +0000</pubDate>
		<dc:creator>Friedrich Lindenberg</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://wheredoesmymoneygo.org/?p=1290</guid>
		<description><![CDATA[If there was a coder&#8217;s lesson in last November&#8217;s release of UK departmental spending above 25k, it was this: while there is already a lot of financial information available at the moment, the number of sources is set to grow &#8230; <a href="http://wheredoesmymoneygo.org/2011/02/14/moving-to-mongo-where-does-my-money-gos-new-back-end/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If there was a coder&#8217;s lesson in last November&#8217;s release of UK departmental spending above 25k, it was this: while there is already a lot of financial information available at the moment, the number of sources is set to grow rapidly &#8211; with many local and state governments not only in the UK but all over the world opening their books to an interested public.</p>

<p>For us this poses an interesting problem: how can we create a platform for exposing those records in a way that is easy to use for citizens, easy to extend by anyone to hold new, ever-larger datasets and that supports new modes of exploration and visualization?</p>

<p><strong>Dropping schema</strong></p>

<p>For us, this question had to first be answered in the <a href="http://data.wheredoesmymoneygo.org/">back-end data store</a> of Where Does My Money Go. Originally, the site <a href="http://wiki.okfn.org/p/Where_Does_My_Money_Go/Store">was based on a relational emulation of a star schema database</a>. That is, we had a central list of facts (financial records) to which we attached several dimensions (such as the spender and recipient, the affected region or their classification under various schemes) stored in key-value tables. While this allowed us to keep data of different schemata with their associated metadata in a single relational DB, it was both hard to load data into that model and to query the resulting structure.</p>

<p>To replace the existing database, two approaches initially seemed viable: using an RDF triple store or a schema-less NoSQL database. While the RDF route would allow storing a nice graph structure of transactions, spenders and recipients, I was left unsatisfied <a href="http://lists.okfn.org/pipermail/wdmmg-discuss/2010-December/000763.html">both by the complexity of the modelling and query methods involved in the RDF stack and the maturity of the available tool chain for Python</a>. Using MongoDB, on the other hand, a running prototype was up and running within two days.</p>

<p>In the resulting MongoDB solution, we&#8217;re now using an extremely simple structure to store the data: a largely denormalized, nested collection of payment entries. Each entry contains an abridged representation of the spender and recipient involved, as well as any applicable classifications, such as the COFOG code for UK state spending. This way, we can query the collection using a wide range of criteria. Retrieving, for example, European Commission commitments to companies in the UK that are part of EURATOM can be done with a trivial query:</p>

<blockquote>{
&#8220;dataset.name&#8221;: &#8220;fts&#8221;,
&#8220;to.country&#8221;: &#8220;United Kingdom&#8221;,
&#8220;article.title&#8221;: /euratom/
}</blockquote>

<p>We also decided to create addition collections to explicitly represent the entities and classifiers involved in the entries: While entities are representations of the spenders and recipients of spending, classifiers correspond to the function and programme codes used to distinguish different types of spending. Each of those items was made adressable in the application to allow for detailed research, annotation and visualization of each involved department, company, or any government function.</p>

<p><strong>Aggregating</strong></p>

<p>While individual spending items can contain interesting information or be relevant to the research of journalists, most of the interesting questions are only answered when we start adding up data: How much is spent on Education in my country? How much does the EU spend on biomedical research?</p>

<p>These questions are only answered by aggregating spending. As calculating such aggregates on the fly is a costly thing to do, we&#8217;ve now started to pre-aggregate revenue and spending for certain programmes. For this, we&#8217;re generating synthetic spending records that express the sum of various underlying data. Aggregation allows us to include a large variety of aggregate figures into pages, allowing for nice visualizations in almost arbitrary places, for example entity and classifier pages.</p>

<p><strong>Data, lots of data</strong></p>

<p>Having upgraded the core of WDMMG, we&#8217;re now in a position to easily load a wide variety of different data sources. To explore and test this, we&#8217;ve started importing whatever financial we can get our hands on. Some of the exciting new data sources include the <a href="http://data.wheredoesmymoneygo.org/entity/EU27">European</a>, <a href="http://bmf.wheredoesmymoneygo.org/">German</a>, <a href="http://data.wheredoesmymoneygo.org/dataset/israel">Israeli</a> state and <a href="http://datagartneriet.no/">Bergen</a> local budgets. Comparing the EU and German budget, one can discover clear signs of a fierce rivalry to create the most incomprehensible and bureaucratic document on the planet &#8211; both are therefore nice tests for our new system.</p>

<ul>
    <li>The European Commission&#8217;s <a href="http://ec.europa.eu/beneficiaries/fts/index_en.htm">Financial Transparency System</a>, a large database of anyone who has been promised money by the EC.</li>
    <li>The German <a href="http://foerderportal.bund.de/foekat/jsp/StartAction.do">Förderkatalog</a>, a national database of federal research grants from the 1960s to today.</li>
</ul>

<p>With all those data sources, we&#8217;re now able to find the same entities as spenders and recipients in various places. As we learn to associate the money flows, our database is going to turn into a Facebook of government funds recipients, connecting the dots between local, state and trans-national spending.</p>

<p>Including more state budgets and spending records from all around the world, for example the UK local government spending that is being released in many places, will provide for a better picture of where to money goes, while improvements to out UI over the next weeks will help to invite others to explore, annotate and collaboratively understand ever more about how government works.</p>
]]></content:encoded>
			<wfw:commentRss>http://wheredoesmymoneygo.org/2011/02/14/moving-to-mongo-where-does-my-money-gos-new-back-end/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Finally Some Answers on Where My Money Goes</title>
		<link>http://wheredoesmymoneygo.org/2011/02/04/finally-some-answers-on-where-my-money-goes/</link>
		<comments>http://wheredoesmymoneygo.org/2011/02/04/finally-some-answers-on-where-my-money-goes/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 18:42:59 +0000</pubDate>
		<dc:creator>lisa</dc:creator>
				<category><![CDATA[Where Does My Money Go]]></category>

		<guid isPermaLink="false">http://wheredoesmymoneygo.org/?p=1281</guid>
		<description><![CDATA[It&#8217;s an innocent enough question: what does the government spend money on? Now, I&#8217;m not an accountant and I&#8217;m not a statistician and personally I don&#8217;t have a political axe to grind, I just want some answers to this question &#8230; <a href="http://wheredoesmymoneygo.org/2011/02/04/finally-some-answers-on-where-my-money-goes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s an innocent enough question:</p>

<p><strong>what does the government spend money on?</strong></p>

<p>Now, I&#8217;m not an accountant and I&#8217;m not a statistician and personally I don&#8217;t have a political axe to grind, I just want some answers to this question that make sense.</p>

<p>This attitude gives me a lot of freedom: I don&#8217;t have to get bogged down in any system of understanding spending unless it really helps. But this attitude also gives me a lot of opportunity to look a right idiot, because I&#8217;m effectively feeling my way around this unfamiliar financial and political world, pushing for information that may or may not be useful in the end, asking questions that must seem really stupid to experts.</p>

<p>I think it&#8217;s only fair that I document my fools progress so that other people who might be on a similar mission can be helped along their way.</p>

<p>So, from the beginning to right now, this is what I&#8217;ve found out about government money.</p>

<p>I should add that public spending is making more and more sense to me these days and while I don&#8217;t have all the answers right now,  I do have a vision for the future and some useful stuff to share.</p>

<h2>In the beginning </h2>

<p>When I first thought about government spending I had some vague idea that there would be lists of spending, one for each department or maybe one big list for all of government, showing money in and money out for each department. It would just be a matter of finding these sacred and quite possibly hidden lists. I mean someone in the department must be keeping track of the money in and out, right?</p>

<p>The people at <a href="http://wheredoesmymoneygo.org/">Where Does My Money Go?</a> had something that matched my idea of a list of spending. The list they found on the <a href="http://www.hm-treasury.gov.uk/pespub_pesa10.htm">Treasury website</a> showed different government departments and how much they had spent on certain types of public services. I helped to interpret this and the team went on to make this <a href="http://blog.mrmeyer.com/?p=9258">colourful interactive display</a>.</p>

<p>The beauty of this display is allows drilling down into the details of the spending. This is a relatively new technology and lends itself to spending data nicely, it makes those lists accessible and it doesn&#8217;t feel like work to look through them they way it does to look into a spreadsheet.</p>

<p>But we quickly found that the list we had used raised more questions than it answered. We only had spending for certain departments, nothing in detail on local councils, and the only details we had were in these <a href="http://unstats.un.org/unsd/cr/registry/regcst.asp?Cl=4">odd sounding categories</a> of spending that were designed to allow comparisons between UN countries.</p>

<p>I had a feeling that there must be more detail that we weren&#8217;t getting, but where was it?</p>

<p>Therein&#8217; I pestered the heck out of the poor folks at the Treasury about where these spending lists are stored and what else is stored there.</p>

<p>The short answer is that it was all stored in something aptly called <a href="http://www.hm-treasury.gov.uk/psr_coins_data.htm">COINS</a>, which is a database for frequently revised budgets and something else that is really, really interesting and that I&#8217;ll come back to shortly.</p>

<h2>A moment of clarity</h2>

<p>While I was looking at this spending it slowly dawned on me that just looking at money in and out isn&#8217;t the full story of the way public money is managed. For one thing the lists of money in and out, on their own, soon become unwieldy and make it hard for people to answer questions about public spending.</p>

<p>For another thing, Governments don&#8217;t just receive and spend money, their wealth is also made up of the things they own like buildings, roads and also determined by the money they owe &#8212; the debts as we all know too well.</p>

<p>This is when I found out that accountants have elegant ways to deal with all of this financial jumble.</p>

<p>Let me explain accountancy in the terms I&#8217;ve come to understand it.</p>

<p>There are three main figures to consider.</p>

<p>Let&#8217;s split the finances of an organisation into either 1) something it is owed or owns and 2) something it owes to someone else. That is two of the 3 main figures explained already.</p>

<p>Just these two figures can give us a simple but important measure of how healthy the finances are. Hypothetically if the organisation received everything it was owed and then sold off everything it has and used that to pay off all its debts, how much would be left? What is left is our third figure. This is what all the people who invested in the organisation would be left with for their return on their investment.</p>

<p>For the mathematically minded this can be expressed at:</p>

<p>1 &#8211; 2 = 3 
or 
owed and owned &#8211; debts = return to investors</p>

<p>We should find that if we sum the amount of money that people invest and the profit the organisation makes, the result is equal to the third figure.</p>

<p>Just to put this into context for the case where the organisation is a council or government body, the investors are the taxpayers and the bond buyers.</p>

<p>Another way of looking at these three figures is that organisation is ultimately balancing the money it has for its activities and the money it receives and borrows to make its activities happen. So it balances what it owns and is owed (figure 1) with its debts and investments and profits (figures 2 and 3).</p>

<p>For the mathematically minded that is:</p>

<p>2 + 3 = 1
or 
investment and profits + debts = owned and owed</p>

<p>just a rearrangement of first expression.</p>

<p>If you ever heard of double entry book-keeping then keeping this equation equal is basically it: accounting for what is produced with what is needed to produce it.</p>

<p>There&#8217;s lots more to accounting than this, obviously, but I hope I&#8217;ve conveyed that this way of categorising financial information is neat and yields useful information.</p>

<h2>Here&#8217;s the killer</h2>

<p>You might ask: wouldn&#8217;t it be ideal if each publicly funded body published their accounts under these categories so we can understand their financial health?</p>

<p>It turns out that the government have been producing <a href="http://archive.treasury.gov.uk/docs/2001/rab30_03.html">resource accounts</a> for every department and every local authority for years, and this is the killer: in 2001, yes, 10 years ago, they even produced <a href="http://archive.treasury.gov.uk/docs/2001/rab_user.html">a guide to interpreting these accounts</a> so that we, the public, can extract all kinds of useful information.</p>

<p>You might ask: wouldn&#8217;t it be ideal if someone collected together all the public accounts? Even better if they summed the accounts into one set by eliminating all double counting where public bodies exchange money between themselves.</p>

<p>It seems that at the same time as the resource accounts started to emerge in the early 2000s, the Treasury started to run something called &#8216;Whole of Government Accounts&#8217;. It brings together, or consolidates, all the resource accounts of pretty much every public body into one set of resource accounts. What a perfect way to categorise all public spending at a high level.</p>

<p>Guess where Whole of Government Accounts is stored? In COINS. Disappointingly when COINS was published all of the <a href="http://www.guardian.co.uk/news/datablog/2010/jul/14/whole-government-accounts-coins-data">Whole of Government Accounts was removed</a>. The Treasury plan to publish the first ever version of Whole of Government Accounts this spring.</p>

<h2>The vision for the future</h2>

<p>The government is currently publishing more spending information than any of their predecessors. We have all central government spending <a href="http://data.gov.uk/search/apachesolr_search/25k">over £25,000</a> and soon we&#8217;ll have all local government spending <a href="http://www.communities.gov.uk/localgovernment/transparency/localgovernmentexpenditure/">over £500</a>.</p>

<p>How do we make some sense out of all this spending data?</p>

<p>Lots of information can be made manageable if it can be categorised well.</p>

<p>I&#8217;m interested in using the categorisation system in the resource accounts. According to the <a href="http://archive.treasury.gov.uk/docs/2001/rab_intro.html">introduction to resource accounts</a>, it is possible to calculate departmental costs ranging from staff wages to money spent on programmes with their own objectives, as well as lots of useful information about assets and liabilities (what I referred to as figures 1 and 2 above).</p>

<p>I believe using this accounting system and allowing a user to &#8216;drill down&#8217;, as they currently do in Where Does My Money Go?, from this high level organised system into the details of the spending will give &#8216;accountability&#8217; to the accounts.</p>

<p>There are many difficulties in data compatibility between the resource accounts and the lists of transactions that are currently being published, but I think with some iterations of the data being published, these difficulties could be overcome.</p>

<p>What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://wheredoesmymoneygo.org/2011/02/04/finally-some-answers-on-where-my-money-goes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to find *the money* in COINS linked data</title>
		<link>http://wheredoesmymoneygo.org/2010/12/08/how-to-find-the-money-in-coins-linked-data/</link>
		<comments>http://wheredoesmymoneygo.org/2010/12/08/how-to-find-the-money-in-coins-linked-data/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 16:17:33 +0000</pubDate>
		<dc:creator>psychemedia</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[#openuk]]></category>
		<category><![CDATA[armchair auditor]]></category>
		<category><![CDATA[COINS]]></category>
		<category><![CDATA[datastore]]></category>
		<category><![CDATA[finance]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[linked data]]></category>
		<category><![CDATA[money]]></category>
		<category><![CDATA[opendata]]></category>
		<category><![CDATA[opengov]]></category>
		<category><![CDATA[queries]]></category>
		<category><![CDATA[SPARQL]]></category>

		<guid isPermaLink="false">http://wheredoesmymoneygo.org/?p=1207</guid>
		<description><![CDATA[When I went In at the deep end: getting started with COINS Linked Data, I didn&#8217;t actually manage to find any of the money; that is, I couldn&#8217;t work out a SPARQL query that would actually return any spending amounts. &#8230; <a href="http://wheredoesmymoneygo.org/2010/12/08/how-to-find-the-money-in-coins-linked-data/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When I went <a href="http://wheredoesmymoneygo.org/2010/11/26/in-at-the-deep-end-how-to-get-started-with-coins-linked-data/">In at the deep end: getting started with COINS Linked Data</a>, I didn&#8217;t actually manage to find any of the money; that is, I couldn&#8217;t work out a <a href="https://secure.wikimedia.org/wikipedia/en/wiki/SPARQL">SPARQL</a> query that would actually return any spending amounts. But after a little bit more digging, I struck gold&#8230;!</p>

<p>Before we get to the money, though, it&#8217;s worth just doing a little simplification on the way we write the queries. Looking at an example query such as:</p>

<p><em>PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;<br/>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;</em></p>

<p><em>SELECT distinct ?deptCode ?deptName WHERE {<br/>
?dept &lt;http://finance.data.gov.uk/dsd/coins/dimension/departmentCode&gt; ?deptCode.<br/>
?deptCode rdfs:comment ?deptName.<br/>
} LIMIT 20</em></p>

<p>The query comes in two parts: one or more PREFIX statements, and then a SELECT statement which actually constructs the query.</p>

<p>Rather than cluttering the body of the query (the SELECT part) with long URL identifiers in angle brackets, we can define a PREFIX to make things a little easier to read. So for example, in the above query, we can replace <em>&lt;http://finance.data.gov.uk/dsd/coins/dimension/departmentCode&gt;</em> with something like <em>coins-dimension:departmentCode</em> if we first define <em>PREFIX coins-dimension: &lt;http://finance.data.gov.uk/dsd/coins/dimension/department&gt;</em></p>

<p>Now, when the query engine sees <em>coins-dimension:</em> in the SELECT part of the query, it knows to replace the whole phrae with a string constructed by appending the bit after the colon on to the end of whatever is inside the angle brackets in the PREFIX definition. Got that?!;-) (At least, I <em>think</em> that&#8217;s how it works?!)</p>

<p>Here&#8217;s the re-written query:</p>

<p><em>PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;<br/>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;<br/>
PREFIX coins-dimension: &lt;http://finance.data.gov.uk/dsd/coins/dimension/&gt;</em></p>

<p><em>SELECT distinct ?deptCode ?deptName WHERE {<br/>
?dept coins-dimension:departmentCode ?deptCode.<br/>
?deptCode rdfs:comment ?deptName.<br/>
} LIMIT 20</em></p>

<p>(You should be able to just copy and paste it into the SPARQL query box at <a href="http://openuplabs.tso.co.uk/sparql/gov-coins">http://openuplabs.tso.co.uk/sparql/gov-coins</a>)</p>

<p>So, now we can go looking for the money <img src='http://wheredoesmymoneygo.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>

<p>(Just a quick note before we go any further though&#8230; crafting a query to get exactly what you want seems to be non-trivial&#8230; the following notes should be seen as work in progress, fumbling attempts on the way to writing a proper query on the COINS Linked Data store. I think it&#8217;ll take another post from someone who knows what they&#8217;re doing with COINS to write a properly meaningful query&#8230;)</p>

<p>A key relation for finding the cash appears to be:
<em>&lt;http://finance.data.gov.uk/dsd/coins/measure/amount&gt;</em></p>

<p>If we define:
<em>PREFIX coins-measure: &lt;http://finance.data.gov.uk/dsd/coins/measure/&gt;</em>
then we can more easily refer to <em>coins-measure:amount</em>. Here&#8217;s an example query that looks for a handful of programmes that BIS appears to have spent cash on. (Amount terms are thousands of pounds, I think?)</p>

<p><em>PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;<br/>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;<br/>
PREFIX coins-dimension: &lt;http://finance.data.gov.uk/dsd/coins/dimension/&gt;<br/>
PREFIX coins-measure: &lt;http://finance.data.gov.uk/dsd/coins/measure/&gt;<br/>
PREFIX coins-attr: &lt;http://finance.data.gov.uk/dsd/coins/attribute/&gt;<br/>
PREFIX coins-def:  &lt;http://finance.data.gov.uk/def/coins/data-type/&gt;</em></p>

<p><em>SELECT ?deptCode ?objectGroupCode ?objectGroupDesc ?amount WHERE {<br/>
?transaction coins-dimension:departmentCode ?deptCode.<br/>
?transaction coins-dimension:dataType coins-def:outturn.<br/>
?deptCode rdfs:comment &apos;Department for Business Innovation and Skills&apos;.<br/>
?transaction coins-attr:programmeObjectGroupCode ?objectGroupCode.<br/>
?objectGroupCode rdfs:comment ?objectGroupDesc.<br/>
?transaction coins-measure:amount ?amount .<br/>
} LIMIT 5</em></p>

<p>So <em>coins-measure:amount</em> is what you need <img src='http://wheredoesmymoneygo.org/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<p>But what does the amount <em>actually</em> refer to? Reading through the <a href="http://www.hm-treasury.gov.uk/d/coins_guidance.pdf">COINS</a> guidance suggests that we actually need a few more settings.</p>

<ul>
<li><em>budget boundary</em>: of the form <em>coins-attr:budgetBoundary ?boundary. ?boundary rdfs:label ?boundaryLabel.</em></li>
<li><em>resource capital</em>: of the form <em>coins-attr:resourceCapital ?resCapital. ?resCapital rdfs:label ?resCapitalLabel</em></li>
<li><em>data type (i.e. whether the amount is an outturn)</em>: using <em>coins-dimension:dataType &lt;http://finance.data.gov.uk/def/coins/data-type/outturn&gt;</em>. Note that there may also be a data subtype, such as whether an outturn has been approved (<em>coins-dimension:dataSubtype</em>)</li>
<li>the <em>accounting period</em>: I <strong>think</strong> date range arguments take the form: <em> &lt;http://purl.org/linked-data/sdmx/2009/dimension#refPeriod&gt; &lt;http://finance.data.gov.uk/def/coins/time/2009-10&gt;</em>.</li>
</ul>

<p>Putting this all together, we can come up with a query along the lines of:</p>

<p><em>PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;<br/>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;<br/>
PREFIX coins-dimension: &lt;http://finance.data.gov.uk/dsd/coins/dimension/&gt;<br/>
PREFIX coins-measure: &lt;http://finance.data.gov.uk/dsd/coins/measure/&gt;<br/>
PREFIX coins-attr: &lt;http://finance.data.gov.uk/dsd/coins/attribute/&gt;<br/>
PREFIX coins-def:  &lt;http://finance.data.gov.uk/def/coins/data-type/&gt;</em></p>

<p><em>SELECT ?boundaryLabel ?resCapitalLabel ?subType ?objectGroupDesc ?amount WHERE {<br/>
?transaction coins-dimension:departmentCode ?deptCode.<br/>
?transaction  &lt;http://purl.org/linked-data/sdmx/2009/dimension#refPeriod&gt; &lt;http://finance.data.gov.uk/def/coins/time/2009-10&gt;.<br/>
?transaction coins-dimension:dataType coins-def:outturn.<br/>
?deptCode rdfs:comment &apos;Department for Business Innovation and Skills&apos;.<br/>
?transaction coins-attr:programmeObjectGroupCode ?objectGroupCode.<br/>
?objectGroupCode rdfs:comment ?objectGroupDesc.<br/>
?transaction coins-measure:amount ?amount .<br/>
?transaction coins-attr:budgetBoundary ?boundary. ?boundary rdfs:label ?boundaryLabel.<br/>
?transaction coins-attr:resourceCapital ?resCapital. ?resCapital rdfs:label ?resCapitalLabel.<br/>
?transaction coins-dimension:dataSubtype ?subType.
} LIMIT 5</em></p>

<p>&#8230;which is a query that works, although I&#8217;m not sure how meaningful it is or what it actually says. (Interpretations in the comments, please <img src='http://wheredoesmymoneygo.org/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>

<p><strong>So what do we learn?
</strong></p>

<ul>
    <li>Writing queries on the COINS Linked Data is non-trivial: you need a good understanding of both SPARQL and COINS.</li>
<li>Exact/meaningful queries need qualifying along all sorts of dimensions (I&#8217;m not even sure if the above query is complete, or whether additional constraints/caveats need applying to turn it into a meaningful query).</li>
<li>When writing &#8220;exemplar&#8221;, parameterised queries, it would be useful to be able to:
- comment them liberally; (can comments be added into the middle of a SPARQL query?)
- identify the <em>essential</em>, &#8220;do not remove&#8221; elements, without which the query is, to all intents and purposes, rendered meaningless.</li>
</ul>

<p>It&#8217;s also worth bearing in mind that the version of SPARQL supported by the COINS Linked Datastore does not support aggregation functions &#8211; which means you can&#8217;t query for transactions across departments and return totals for each department. Instead, you&#8217;d have to return all the transactions and then total them somewhere else. (For a related discussion on this, see @jenit&#8217;s <a href="http://www.jenitennison.com/blog/node/127">SPARQL &amp; Visualisation Frustrations: Aggregation and Projection</a>.)</p>

<p>For the moment then, accessing COINS Linked Data is probably not recommended for the armchair auditor&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://wheredoesmymoneygo.org/2010/12/08/how-to-find-the-money-in-coins-linked-data/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Where Does My Money Go? Phase 2: A Review, And Some Next Steps</title>
		<link>http://wheredoesmymoneygo.org/2010/12/01/where-does-my-money-go-phase-2-a-review-and-some-next-steps/</link>
		<comments>http://wheredoesmymoneygo.org/2010/12/01/where-does-my-money-go-phase-2-a-review-and-some-next-steps/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 16:09:06 +0000</pubDate>
		<dc:creator>Anna PS</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Releases]]></category>
		<category><![CDATA[Where Does My Money Go]]></category>

		<guid isPermaLink="false">http://wheredoesmymoneygo.org/?p=1220</guid>
		<description><![CDATA[We&#8217;re pleased to announce that Phase 2 of the Where Does My Money Go project is now complete. This has involved a huge amount of work, completely rebuilding the application from the ground up &#8211; from the datastore to the &#8230; <a href="http://wheredoesmymoneygo.org/2010/12/01/where-does-my-money-go-phase-2-a-review-and-some-next-steps/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re pleased to announce that Phase 2 of the Where Does My Money Go project is now complete.</p>

<p>This has involved a huge amount of work, completely rebuilding the application from the ground up &#8211; from the <a href="http://data.wheredoesmymoneygo.org/">datastore</a> to the <a href="http://wheredoesmymoneygo.org/dashboard/">dashboard</a>.</p>

<p>Some highlights:</p>

<ul>
    <li>A complete reworking of the <strong>interactive dashboard</strong>, with a new version of our flagship <a href="http://wheredoesmymoneygo.org/dashboard/#year=2009&amp;focus=TOTAL&amp;view=uk-bubble-chart">financial bubbles visualisation</a>, and new ways to comment on and share what you find.</li>
    <li>An <a href="http://wheredoesmymoneygo.org/dashboard/#yearlyTax=4096.043996333639&amp;code=null&amp;income=10000&amp;view=daily-bread">interactive tax calculator</a>, showing <strong>where your taxes get spent</strong>.</li>
    <li>A <strong>clean new design</strong> for the <a href="http://wheredoesmymoneygo.org/">whole site</a>.</li>
        <li>An <strong>updated and improved <a href="http://data.wheredoesmymoneygo.org">datastore</a></strong> with lots of new features including a richer domain model, faceted searching, and integrated graphs.</li>
        <li><strong>Boxfresh new data</strong>, with UK government spending up till 2009 (2011 if you count projections!).</li>
         <li>A <strong>new <a href="http://ask.wheredoesmymoneygo.org/">Q&#038;A forum</a></strong> where you can ask and answer questions related to spending and where your tax goes.</li>
</ul>

<p>Next comes phase 3 &#8211; and we discuss what that means for Where Does My Money Go below.</p>

<h3>A new look for financial bubbles</h3>

<p>Our flagship visualisation shows UK government spending by area, using a clicky, bouncy, zoomy bubble diagram that&#8217;s fun to play with.</p>

<p>Our first version was very simple: the latest version builds on the full expertise of design house <a href="http://iconomical.com/">Iconomical</a> and David McCandless of <a href="http://www.informationisbeautiful.net/">Information is Beautiful</a>. Here are the results:</p>

<p><a href="http://wheredoesmymoneygo.org/dashboard/"><img src="http://wheredoesmymoneygo.okfn.org/files/2010/12/bubble-view-640.jpg" alt="" width="640" /></a></p>

<p>Shiny! It&#8217;s fresher and cleaner, with friendly icons, designed by David (himself a bit of an icon in the visualisation field).</p>

<p>Unlike the first version, which was standalone Flash, the visualisation is now part of a webpage, and each view of the data has its own unique URL.</p>

<p>So it&#8217;s now easier to share and comment on spending, using social media. If you&#8217;re interested in, say, the fact that last year the UK spent four times as much on &#8216;old age&#8217; as on &#8216;family &amp; children&#8217;&#8230;</p>

<p><a href="http://wheredoesmymoneygo.org/dashboard/#year=2009&amp;focus=10&amp;view=uk-bubble-chart"><img title="Bubble diagram with focus on health" src="http://wheredoesmymoneygo.okfn.org/files/2010/12/old-age-view-640.jpg" alt="" width="640" /></a></p>

<p>&#8230; you can now leave comments on this view of the data, or share the view in Twitter and Facebook. Coming soon: the ability to embed the visualisation in your own page, in an iframe.</p>

<p>Our <a href="http://wheredoesmymoneygo.org/dashboard/#year=2009&amp;focus=TOTAL&amp;view=uk-bubble-chart">regional</a> and <a href="http://wheredoesmymoneygo.org/dashboard/#longTermSpending=actual&amp;functionSpending=actual&amp;view=long-term">time-series</a> visualisations stay in place, also with social links and unique URLs: and finally, you can also now <a href="http://wheredoesmymoneygo.org/dashboard/#region1=Yorkshire-and-the-Humber&amp;year=2009&amp;region2=West-Midlands&amp;spending=indexed&amp;view=comparatron-a">compare regional differences</a> in spending.</p>

<p>And finally, a small but significant change. You can now navigate from the visualisation to the underlying data. This will become more useful as the data UI improves &#8211; but I&#8217;m getting ahead of myself.</p>

<h3>Where your tax gets spent: Daily Bread</h3>

<p>One of the original aims for Where Does My Money Go was to make government spending feel more real and more personal.</p>

<p>We decided that one of the best ways to achieve this would be through <strong>tax</strong>. This is because tax is universal, and all too easy to evaluate in real terms.</p>

<p>To paraphrase, rather tastelessly: a million pounds is a statistic, but ten pounds is a pizza.</p>

<p>There are plenty of politically motivated tax calculators out there, but we realised that Where Does My Money Go could do something unique. We could show you, in an elegant, non-partisan way, how much of your daily tax goes to health, how much to education, how much to defence.</p>

<p>Again, Iconomical and David brought their wizardry to bear, and here&#8217;s the results.</p>

<p><a href="http://wheredoesmymoneygo.org/dashboard/#yearlyTax=4096.043996333639&#038;code=null&#038;income=10000&#038;view=daily-bread"><img src="http://wheredoesmymoneygo.okfn.org/files/2010/12/daily-bread-view-640.jpg" alt="" width="640" /></a></p>

<p>How did we calculate the tax numbers? Following <a href="http://ask.wheredoesmymoneygo.org/questions/37/total-tax-paid-as-a-function-of-income-and-other-variables">discussion on our Ask site</a>, we used <a href="http://www.statistics.gov.uk/CCI/article.asp?ID=2440">Treasury figures</a> for the total tax paid by households in each income decile, including indirect taxes like VAT and fuel duty.</p>

<p>When you enter your income, we figure out which decile you&#8217;re in, and then your tax proportionally. This calculation (with more details) is available through our API.</p>

<p>Obviously, there&#8217;s some handwaving here: individuals are different from households; VAT will vary with what you buy; and precise allocation of spending is always metaphorical.</p>

<p>But we believe this is about as meaningful as these things get. We work out how much tax you pay to central government: and we know where central government revenues (which are almost entirely tax) go.</p>

<p>Again, you can link to individual views of the data: here&#8217;s the breakdown for <a href="http://wheredoesmymoneygo.org/dashboard/#yearlyTax=47714.0294039707&amp;code=null&amp;income=144544&amp;view=daily-bread">someone who earns £144,000 a year</a>, slightly more than David Cameron.</p>

<h3>Data updates</h3>

<p>We&#8217;ve also made some substantial improvements to the <a href="http://data.wheredoesmymoneygo.org">datastore</a>. These include:</p>

<ul>
<li><strong>Search</strong>: You can now <a href="http://data.wheredoesmymoneygo.org/search">search all the data</a> in the datastore, for a supplier name or phrase, and get results quickly. And you can refine your search results quickly for a particular supplier &#8211; see the screenshot below.</li>
<li><strong>Payments visualised over time</strong>: For each search result and each supplier, we also show a graph of payments over time. The screenshot below shows payments to Capita.</li>
<li><strong>Data</strong>: We&#8217;ve loaded the latest Treasury data (<a href="http://www.hm-treasury.gov.uk/pesa2010_section4.htm">CRA 2010</a>), which shows actual spending up until 2009. A few weeks ago, we also added <a href="http://wheredoesmymoneygo.org/2010/11/19/how-to-explore-government-spending-over-25000-on-wheredoesmymoneygo/">central government spending over £25k</a>.</li>
<li><strong>Technical improvements</strong>: The datastore now runs off an <a href="http://en.wikipedia.org/wiki/OLAP_cube">OLAP domain model</a> &#8211; and we&#8217;re currently upgrading it even further to use <a href="http://www.mongodb.org/">Mongo</a>. Both increase its power and flexibility.</li>
<li><strong>Comments</strong>: And finally, you can now comment on individual entries in the datastore.</li>
</ul>

<p><img class="aligncenter size-full wp-image-1130" title="capita-payments" src="http://wheredoesmymoneygo.okfn.org/files/2010/11/capita-payments1.png" alt="Payments made to Capita by central government departments" width="667" height="427" /></p>

<p>For those who aren&#8217;t sure what the datastore is &#8211; it&#8217;s the site that drives the visualisations. Currently, that&#8217;s pretty much all it does, but we have ambitions to make it much more usable and powerful.</p>

<h3>What next for WDMMG?</h3>

<p>So, that was phase 2 of Where Does My Money Go. We hope you like it.</p>

<p>What next? Broadly, we know that phase 3 will involve making the site easier to use, and getting more people involved.</p>

<p>Last week, we started to outline the priorities for this phase, and we decided that they included:</p>

<ul>
    <li><em>Datastore</em>: UI improvements so it&#8217;s easier to search the data, and the ability to annotate items of spending with information.</li>
    <li><em>Crowdsourcing</em>: Expanding our potential dataset by allowing users to add spending items.</li>
    <li><em>International work</em>: Working with initiatives in other countries to map budget data, making our tools more resuable in the process.</li>
</ul>

<p>But we need your views, on phase 2, phase 3 and on the future: please <a href="http://lists.okfn.org/mailman/listinfo/wdmmg-discuss">sign up for our discussion list</a> to join the conversation.</p>
]]></content:encoded>
			<wfw:commentRss>http://wheredoesmymoneygo.org/2010/12/01/where-does-my-money-go-phase-2-a-review-and-some-next-steps/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>In at the deep end: how to get started with COINS Linked Data</title>
		<link>http://wheredoesmymoneygo.org/2010/11/26/in-at-the-deep-end-how-to-get-started-with-coins-linked-data/</link>
		<comments>http://wheredoesmymoneygo.org/2010/11/26/in-at-the-deep-end-how-to-get-started-with-coins-linked-data/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 09:23:16 +0000</pubDate>
		<dc:creator>psychemedia</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[#openuk]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[COINS]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[data.gov.uk]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[linked data]]></category>
		<category><![CDATA[opendata]]></category>
		<category><![CDATA[opengov]]></category>
		<category><![CDATA[queries]]></category>
		<category><![CDATA[SPARQL]]></category>

		<guid isPermaLink="false">http://wheredoesmymoneygo.org/?p=1194</guid>
		<description><![CDATA[A tweet today from &#8230; someone?! &#8230; alerted me to the fact that COINS data has just been published as Linked Data over on the TSO Open Up Labs website. The documentation is still in the works, and as yet &#8230; <a href="http://wheredoesmymoneygo.org/2010/11/26/in-at-the-deep-end-how-to-get-started-with-coins-linked-data/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A tweet today from &#8230; someone?! &#8230;  alerted me to the fact that COINS data has just been published as Linked Data over on the <a href="http://openuplabs.tso.co.uk/sparql">TSO Open Up Labs website</a>. The documentation is still in the works, and as yet there aren&#8217;t any example queries available showing how to get started with querying the dataset, so I thought it might be worth trying to pull a few simple queries together to at least providing a jumping off point for exploring the data via the SPARQL interface.</p>

<p>I&#8217;m afraid this is all pretty much in at the deep end, but I&#8217;ve tried to construct queries that you can:
- copy and paste straight into the form on the TSO OpenUpLabs website;
- edit in hopefully obvious places to create your own queries;
- combine together, in part, to create more complex queries.</p>

<p>At the moment, I&#8217;m leaving the money out of it, in favour of just getting a feeling for the structure of the data, and how to interrogate it.</p>

<p>So let&#8217;s get started&#8230;</p>

<p>The following query will generate a list of department codes and the associated department names &#8211; copy and paste it into the form at <a href="http://openuplabs.tso.co.uk/sparql/gov-coins">http://openuplabs.tso.co.uk/sparql/gov-coins</a>, select the &#8220;Plain Text&#8221; output, and hit submit:</p>

<p><em>PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;<br/>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;</em></p>

<p><em>SELECT distinct ?deptCode ?deptName WHERE {<br/>
?dept &lt;http://finance.data.gov.uk/dsd/coins/dimension/departmentCode&gt; ?deptCode.<br/>
?deptCode rdfs:comment ?deptName.<br/>
} LIMIT 20 </em></p>

<p>(For more, or fewer, results, change the <em>LIMIT</em> amount, or remove it altogether.)</p>

<p>After a short delay (?! &#8211; I&#8217;m not sure if I could optimise the query&#8230;? ) the results will come back looking something like this fragment:</p>

<p><em>$deptCode   $deptName<br/>
&lt;http://finance.data.gov.uk/def/coins/department-code/sfo019&gt; &#8220;Serious Fraud Office&#8221;<br/>
&lt;http://finance.data.gov.uk/def/coins/department-code/ilr041&gt; &#8220;HM Revenue and Customs&#8221;<br/>
&lt;http://finance.data.gov.uk/def/coins/department-code/isc034&gt; &#8220;Office of the Immigration Services Commissioner&#8221;</em></p>

<p>To find the code for a particular department, we can try searching around a word that appears in the name of the department we are looking for &#8211; such as &#8220;Business&#8221;:</p>

<p><em>SELECT distinct ?deptCode ?deptName WHERE {<br/>
?dept &lt;http://finance.data.gov.uk/dsd/coins/dimension/departmentCode&gt; ?deptCode.<br/>
?deptCode rdfs:comment ?deptName.<br/>
FILTER (regex(str(?deptName), &apos;Business&apos;))<br/>}</em></p>

<p>The following query returns the names of programmes, and their codes, for the Serious Fraud Office (which has identifier <em>&lt;http://finance.data.gov.uk/def/coins/department-code/sfo019&gt;</em>):</p>

<p><em>PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;<br/>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;<br/></p>

<p>SELECT distinct ?progCode ?progName WHERE {<br/>
?dept &lt;http://finance.data.gov.uk/dsd/coins/dimension/departmentCode&gt; &lt;http://finance.data.gov.uk/def/coins/department-code/sfo019&gt;.<br/>
?dept &lt;http://finance.data.gov.uk/dsd/coins/attribute/programmeObjectGroupCode &gt;  ?progCode.<br/>
?progCode rdfs:comment ?progName.<br/>
} </em></p>

<p>We can also run more refined queries, for example search for projects to do with <em>Nuclear</em> topics in the Department of Energy and Climate Change?</p>

<p><em>PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;<br/>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;</em></p>

<p><em>SELECT distinct ?progCode ?progName WHERE {<br/>
?dept &lt;http://finance.data.gov.uk/dsd/coins/dimension/departmentCode&gt; &lt;http://finance.data.gov.uk/def/coins/department-code/dec066&gt;.<br/>
?dept &lt;http://finance.data.gov.uk/dsd/coins/dimension/programmeObjectCode&gt; ?progCode.
?progCode rdfs:comment ?progName.<br/>
FILTER (regex(str(?progName), &apos;Nuclear&apos;))<br/>
} LIMIT 5</em></p>

<p>Many of the items in COINS involve one department as counterparty to another. So how do we see which other departments are counterparty to the Cabinet Office and on which programmes?</p>

<p><em>PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; <br/>
PREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;</em></p>

<p><em>SELECT distinct  ?v  ?ccLabel ?progName ?progCode WHERE {<br/>
?dept &lt;http://finance.data.gov.uk/dsd/coins/dimension/departmentCode&gt; &lt;http://finance.data.gov.uk/def/coins/department-code/cab010&gt;.<br/>
?dept &lt;http://finance.data.gov.uk/dsd/coins/dimension/programmeObjectCode&gt; ?progCode.<br/>
?progCode rdfs:comment ?progName.<br/>
 ?dept &lt;http://finance.data.gov.uk/dsd/coins/dimension/counterpartyCode&gt; ?v.<br/>
?v rdfs:comment ?ccLabel.<br/>
FILTER (!(?v = &lt;http://finance.data.gov.uk/def/coins/counterparty-code/cpid.na&gt;))<br/>
} limit 20</em></p>

<p>So, now we can start to follow the money&#8230; Only, err, erm, I haven&#8217;t worked out how to find the money yet!</p>
]]></content:encoded>
			<wfw:commentRss>http://wheredoesmymoneygo.org/2010/11/26/in-at-the-deep-end-how-to-get-started-with-coins-linked-data/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Video: a beginners guide to Where Does My Money Go?</title>
		<link>http://wheredoesmymoneygo.org/2010/11/24/video-introducing-where-does-my-money-go/</link>
		<comments>http://wheredoesmymoneygo.org/2010/11/24/video-introducing-where-does-my-money-go/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 14:50:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[introduction]]></category>
		<category><![CDATA[opendata]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[wdmmg]]></category>

		<guid isPermaLink="false">http://wheredoesmymoneygo.org/?p=1188</guid>
		<description><![CDATA[With many thanks to Daniel Dietrich who made this possible.]]></description>
			<content:encoded><![CDATA[<iframe src="http://player.vimeo.com/video/17154981" width="500" height="313" frameborder="0"></iframe>

<p>With many thanks to <a href="http://okfn.de/author/ddie/">Daniel Dietrich</a> who made this possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://wheredoesmymoneygo.org/2010/11/24/video-introducing-where-does-my-money-go/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to explore government spending over £25,000 on Where Does My Money Go</title>
		<link>http://wheredoesmymoneygo.org/2010/11/19/how-to-explore-government-spending-over-25000-on-wheredoesmymoneygo/</link>
		<comments>http://wheredoesmymoneygo.org/2010/11/19/how-to-explore-government-spending-over-25000-on-wheredoesmymoneygo/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 15:09:22 +0000</pubDate>
		<dc:creator>Anna PS</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Where Does My Money Go]]></category>
		<category><![CDATA[#openuk]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[government]]></category>
		<category><![CDATA[opendata]]></category>
		<category><![CDATA[opengov]]></category>
		<category><![CDATA[spending]]></category>
		<category><![CDATA[UK]]></category>
		<category><![CDATA[visualisations]]></category>
		<category><![CDATA[wdmmg]]></category>

		<guid isPermaLink="false">http://wheredoesmymoneygo.org/?p=1034</guid>
		<description><![CDATA[Today, the UK government published its spending items over £25,000. From now on, every month you&#8217;ll be able to see just what each central government department spent, with whom, and when. Exciting stuff &#8211; the current government came to power &#8230; <a href="http://wheredoesmymoneygo.org/2010/11/19/how-to-explore-government-spending-over-25000-on-wheredoesmymoneygo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today, the UK government published its spending items over £25,000. From now on, every month you&#8217;ll be able to see just what each central government department spent, with whom, and when.</p>

<p>Exciting stuff &#8211; the current government came to power promising a new era of open data, and this is probably its most significant release so far. The papers today are full of scandalous tales of <a href="http://www.independent.co.uk/news/uk/home-news/whitehall-files-show-how-public-money-is-spent-2137907.html">£170,000 on bottled mineral water</a>, but the real stories are still buried deep in the data.</p>

<p>Here at Where Does My Money Go, we were lucky enough to be given early access to the data. Rufus and I have spent a few days loading it into our data store, and we&#8217;ve made <a href="http://transparency.number10.gov.uk/money.php">150 raw CSV files</a> and 200,000 spending items into something you can search and explore online.</p>

<p><strong>A map of government spending</strong></p>

<p>So what can you do with the data store?</p>

<p>Firstly, you can simply <strong>search it</strong> &#8211; here&#8217;s <a href="http://data.staging.wheredoesmymoneygo.org/search?q=Atos+Origin&amp;search=Search+Spending"> all payments made to IT supplier Atos Origin</a>, for example. The data begins on 12th May 2010, so we learn that since then, 613 separate payments have been made.</p>

<p>On search results, we calculate the <strong>total spending</strong> for those results, draw a<strong>timeline of payments</strong>, and show <strong>which departments</strong> spent most.</p>

<p>Since outsourcing is clearly the business to be in, let&#8217;s <a href="http://data.wheredoesmymoneygo.org/search?q=capita&amp;search=Search+Spending&amp;dataset=*&amp;facet_1=from">check out Capita</a>:</p>

<p><a rel="attachment wp-att-1130" href="http://wheredoesmymoneygo.org/2010/11/19/how-to-explore-government-spending-over-25000-on-wheredoesmymoneygo/capita-payments-2/"><img class="aligncenter size-full wp-image-1130" title="capita-payments" src="http://wheredoesmymoneygo.okfn.org/files/2010/11/capita-payments1.png" alt="Payments made to Capita by central government departments" width="667" height="427" /></a></p>

<p>Capita has received a remarkable £3.35 billion, just in the five months since May 2010! (To put this in context, we know from our spending visualizations that we spent <a href="http://wheredoesmymoneygo.org/dashboard/#year=2009&amp;focus=09&amp;view=uk-bubble-chart">£5 billion on primary education</a> in the whole of 2009.)</p>

<p>We&#8217;ve also created an individual page for each spending item, showing <strong>all the information</strong> we have about it from the files released today. The Capita figures include a huge <a href="http://data.wheredoesmymoneygo.org/entry/111444">single payment of more than £600 million</a>, so let&#8217;s check that out.</p>

<p><a href="http://wheredoesmymoneygo.org/2010/11/19/how-to-explore-government-spending-over-25000-on-wheredoesmymoneygo/capita-oneoff-2/" rel="attachment wp-att-1133"><img src="http://wheredoesmymoneygo.okfn.org/files/2010/11/capita-oneoff1.png" alt="One-off payment to Capita" title="capita-oneoff" width="506" height="323" class="aligncenter size-full wp-image-1133" /></a></p>

<p>Ah, pensions. As you can see, we&#8217;ve added the ability to make one-click <strong>Freedom of Information requests</strong> about individual items. If you click the button, it&#8217;ll take you straight to a page on <a href="http://www.whatdotheyknow.com/">WhatDoTheyKnow</a>, pre-populated with all the information you need to make an FOI request.</p>

<p>That&#8217;s because spending items by themselves don&#8217;t always tell the whole story. This isn&#8217;t the gold itself: it&#8217;s just a map of where the gold might be.</p>

<p><strong>Here be dragons</strong></p>

<p>This is genuinely exciting data, and it can&#8217;t have been an easy task for the Cabinet Office to get it out of departments &#8211; we&#8217;re thrilled to have it.</p>

<p>Departments are clearly still learning how to release data in standard formats. But the fact that I&#8217;ve just spent an hour writing Python to convert <em>40416</em> into <em>26/8/2010</em> (yay, Excel serial numbers) doesn&#8217;t dim my happiness.</p>

<p>That said, there are some additions and changes we&#8217;d really like to see in future releases.</p>

<ul>
    <li><strong>Unique identifiers</strong>. Suppliers have an exciting variety of names in this data, because different departments call them different things: Arval, Arval UK Ltd, Arval (UK) Ltd&#8230; If the data consistently included unique VAT registration numbers, it would be much easier to analyse, and to link it with other datasets, like <a href="http://companiesopen.org/">Companies Open House</a>. And that&#8217;s where it&#8217;s going to get really interesting.</li>
    <li><strong>Consistent classifications</strong>. The data tells us the general area of spending for each item &#8211; &#8216;Legal Services&#8217; or &#8216;Overseas Subsistence&#8217;. However, these aren&#8217;t used consistently across departments. That&#8217;s why we haven&#8217;t visualized spending in different areas (yet) &#8211; it was just too hard to compare.</li>
    <li><strong>Redaction</strong>. Departments are allowed to remove items that should not be released under the Freedom of Information Act. This is legal and sensible. However, FOIA is vague, and we don&#8217;t know when items have been removed. The Local Public Data Panel <a href="http://data.gov.uk/blog/local-spending-data-guidance">warned councils</a> that redactions should be (a) very rare and (b) justifiable. We think it&#8217;s very important that the Treasury&#8217;s guidance to departments say the same thing.</li>
</ul>

<p><strong>Go forth and explore</strong></p>

<p>So here we have it: (almost) all spending above £25,000, opened up for the first time. Quite a day.</p>

<p>Here at Where Does My Money Go, we think spending data is exciting because it shows us what the big, sprawling, confusing thing called government actually <em>does</em>. Today, finding out got a whole lot easier.</p>

<p>Just browsing the data is instantly intriguing: why are we giving money to <a href="http://data.wheredoesmymoneygo.org/entry/75974">News International</a>? What about <a href="http://data.wheredoesmymoneygo.org/entry/78883">04 Bras Limited</a>? And who even knew there was an <a href="http://data.wheredoesmymoneygo.org/entry/236932">International Potato Center</a>?</p>

<p>But the real power of this data will become clear in the months to come, as developers and researchers &#8211; you? &#8211; start to link it to other information, like the magisterial <a href="http://openlylocal.com/">OpenlyLocal</a> and the exciting <a href="http://whoslobbying.com/">WhosLobbying</a>. Please make use of our <a href="http://data.wheredoesmymoneygo.org/api">API</a> and <a href="http://bitbucket.org/okfn/wdmmg-ext/src/ddd1ca787ae9/wdmmgext/load/department.py">loading scripts</a> to do so.</p>

<p>Finally, we know that our data explorer needs to become clearer and less buggy. We&#8217;ll be working on this in the coming weeks, and if you have any suggestions, please <a href="mailto:wdmmg@okfn.org">get in touch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://wheredoesmymoneygo.org/2010/11/19/how-to-explore-government-spending-over-25000-on-wheredoesmymoneygo/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Government Spending &#8211; Data Explorer</title>
		<link>http://wheredoesmymoneygo.org/2010/11/19/government-spending-data-explorer/</link>
		<comments>http://wheredoesmymoneygo.org/2010/11/19/government-spending-data-explorer/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 11:47:09 +0000</pubDate>
		<dc:creator>psychemedia</dc:creator>
				<category><![CDATA[Data Release]]></category>
		<category><![CDATA[Visualization]]></category>

		<guid isPermaLink="false">http://wheredoesmymoneygo.org/?p=1174</guid>
		<description><![CDATA[A whole swathe of data may now out there, but how can we start to explore it? Here&#8217;s one way, using the Google spreaadsheet versions of the data, at departmental level, as republished on the Guardian DataStore: The application allows &#8230; <a href="http://wheredoesmymoneygo.org/2010/11/19/government-spending-data-explorer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A whole swathe of data may now out there, but how can we start to explore it? <a href="http://ouseful.open.ac.uk/datagovuk/govspending.php?run=true&#038;gsKey=tPdRIE1Dtovo5adgjt_D5rA&#038;gqc=H%2CJ&#038;gqw=J%20%3C%200&#038;gqo=J&#038;gql=&#038;gqg=&#038;dps=Health%20(DOH)">Here&#8217;s one way</a>, using the Google spreaadsheet versions of the data, at departmental level, <a href="http://www.guardian.co.uk/news/datablog/2010/nov/19/government-spending-data?CMP=ouseful_gsdde">as republished on the Guardian DataStore</a>:</p>

<p><a href="http://ouseful.open.ac.uk/datagovuk/govspending.php?run=true&#038;gsKey=tPdRIE1Dtovo5adgjt_D5rA&#038;gqc=H%2CJ&#038;gqw=J%20%3C%200&#038;gqo=J&#038;gql=&#038;gqg=&#038;dps=Health%20(DOH)" title="Photo Sharing"><img src="http://farm5.static.flickr.com/4112/5189525132_c483afd39a.jpg" width="500" height="182" alt="Guardian/gov datastore explorer"/></a></p>

<p><a href="http://ouseful.open.ac.uk/datagovuk/govspending.php?run=true&#038;gsKey=tPdRIE1Dtovo5adgjt_D5rA&#038;gqc=H%2CJ&#038;gqw=J%20%3C%200&#038;gqo=J&#038;gql=&#038;gqg=&#038;dps=Health%20(DOH)">The application</a> allows you to select a departmental spreadsheet and then write queries on it. Queries can be bookmarked (err, most of the time &#8211; <a href="https://gist.github.com/706403">the code</a> is really horrible, and may be a bit flakey&#8230;) and you can also get links straight from Google spreadsheets to CSV and HTML versions of the data returned from your query.</p>

<p>Here are a couple of examples:</p>

<ul><li>Dept of Health: view suppliers and amounts where the amount is negative&#8230; [<a href="http://ouseful.open.ac.uk/datagovuk/govspending.php?run=true&#038;gsKey=tPdRIE1Dtovo5adgjt_D5rA&#038;gqc=H%2CJ&#038;gqw=J%20%3C%200&#038;gqo=J&#038;gql=&#038;gqg=&#038;dps=Health%20(DOH)">try it</a>, <a href="http://spreadsheets.google.com/tq?tqx=out:html&#038;tq=select%20H%2CJ%20where%20J%20%3C%200%20order%20by%20J%20asc&#038;key=tPdRIE1Dtovo5adgjt_D5rA">HTML preview</a>]</li>

<li>Department for International Development: view suppliers and amounts over a million for expense areas containing &#8216;Africa&#8217;; (as well as the free text search &#8216;contains&#8217;, &#8216;matches&#8217; must match exactly) [<a href="http://ouseful.open.ac.uk/datagovuk/govspending.php?run=true&#038;gsKey=0AonYZs4MzlZbdFdjaGVOVFAydm5sUUlTb09JUzFaNXc&#038;gqc=H%2CI%2CK&#038;gqw=H%20contains%20%27Africa%27%20and%20K%20%3E%2010000000&#038;gqo=&#038;gql=&#038;gqg=&#038;dps=International%20Development%20(DFID)">try it</a>, <a href="http://spreadsheets.google.com/tq?tqx=out:html&#038;tq=select%20H%2CI%2CK%20where%20H%20contains%20%27Africa%27%20and%20K%20%3E%2010000000&#038;key=0AonYZs4MzlZbdFdjaGVOVFAydm5sUUlTb09JUzFaNXc">HTML preview</a>]</li></ul>

<p>As well as displaying tabular data, some queries can be visualised using simple chart types. (For example, queries that return two columns, where the first contains a label and the second contains a number can be visualised using a bar or column chart.)</p>

<p>Queries can do basic calculations, summing values in a particular budget area or to a particular supplier for example.</p>

<p>If you find an interesting query, bookmark it and tag it using <em>wdmmg-gde10</em>. I&#8217;ll try to add some of the most interesting queries to the examples.</p>

<p>If you want to run with the idea and write the code properly, please feel free to do so. On my to do list is a tool to search across all the spreadsheets using the same search terms. (As a stop gap, scraperwiki might provide one way of doing this, pulling the CSV from the spreadsheets via auto-generated queries.)</p>
]]></content:encoded>
			<wfw:commentRss>http://wheredoesmymoneygo.org/2010/11/19/government-spending-data-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>25k Departmental Spending Data in the Data Store</title>
		<link>http://wheredoesmymoneygo.org/2010/11/19/25k-departmental-spending-data-in-the-data-store/</link>
		<comments>http://wheredoesmymoneygo.org/2010/11/19/25k-departmental-spending-data-in-the-data-store/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 07:32:19 +0000</pubDate>
		<dc:creator>Rufus Pollock</dc:creator>
				<category><![CDATA[Data Release]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Where Does My Money Go]]></category>

		<guid isPermaLink="false">http://wheredoesmymoneygo.org/?p=1163</guid>
		<description><![CDATA[The UK government has just released details of departmental spending over 25k and it has all been loaded into the data store: 25k Departmental Spending Data in the Where Does My Money Go? Data Store As a sample of the &#8230; <a href="http://wheredoesmymoneygo.org/2010/11/19/25k-departmental-spending-data-in-the-data-store/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The UK government has just released details of <a href="http://data.gov.uk/search/apachesolr_search/?filters=tid:4968">departmental spending over 25k</a> and it has all been loaded into the
<a href="http://data.wheredoesmymoneygo.org/">data store</a>:</p>

<p><a href="http://data.wheredoesmymoneygo.org/search?q=&amp;dataset=departments&amp;facet_1=from">25k Departmental Spending Data in the Where Does  My Money Go? Data Store</a></p>

<p>As a sample of the things you can find here are some examples of what you can find:</p>

<ul>
<li><a href="http://data.wheredoesmymoneygo.org/search?q=capita&amp;search=Search+Spending&amp;dataset=*&amp;facet_1=from">Spending with Capita</a></li>
<li><a href="http://data.wheredoesmymoneygo.org/key/from/value/ministry-of-defence">Spending by the Ministry of Defence</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://wheredoesmymoneygo.org/2010/11/19/25k-departmental-spending-data-in-the-data-store/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

