[wdmmg-discuss] First stab at a web API (fwd)

Alistair Turnbull apt1002 at goose.minworks.co.uk
Tue Apr 13 10:40:10 UTC 2010


I talked to Dave Boyce again about the aggregator API on Wednesday, and 
some more requirements fell out. Dave made the list of use-cases below. 
These are requests that the flash layer needs to make to the server. I can 
see the following new requirements:

  - Filter results by key/value (e.g. function='health').

  - Divide by a date-dependent value (e.g. express per capita).

  - Multiply by a date-dependent value (e.g. express in 1990 pounds).

  - Express as deviation from the mean. This could be done inside the 
dashboard, if not for the previous two requirements.

  - Store will have to hold population and inflation data. This will 
require minor changes to the data model.

I have created tickets for these and for the requirements identified last 
week. You can view them and comment on them in the usual place:

 	http://knowledgeforge.net/okfn/tasks/query?status=assigned&status=new&status=reopened&component=projects.wdmmg&order=priority

The relevant tickets are #273, #303, #304, #305, #306 and #307.

 	Alistair

---------- Forwarded message ----------
Date: Wed, 7 Apr 2010 17:11:06 +0200
From: Dave Boyce <dave at iconomical.com>
To: Alistair Turnbull <apt1002 at mupsych.org>
Subject: Re: [wdmmg-discuss] First stab at a web API


Simplest if I document the kinds of queries that are being done in the 
current prototype, since you can probably work out the patterns better 
that way.

1. Spending by all top-level functions, aggregate all locations, for a 
single year. Actual spending values.

2. Spending by single top-level function and next two sub-levels, 
aggregate all locations, single year. Actual spending values.

3. Spending by top-level funding, aggregate all locations, all available 
years. Actual spending values, spending in real terms, spending as %gdp.

4. Total aggregate spending, aggregate all locations, all available years. 
Actual spending values, spending in real terms, spending as %gdp.

5. Spending by function and sub-function. Aggregate all regions, or a 
single region. Actual spending values.

6. Spending by function and all sub-functions. All regions. Actual 
spending, spending by capita.

7. Spending by all top-level functions, all regions. Actual spending, 
spending by capita, spending per capita indexed (% deviation from national 
average).

8. Spending by all top-level functions, single region. Actual spending, 
spending by capita, spending per capita indexed (% deviation from national 
average).




Useful data links:

http://www.scotland.gov.uk/Publications/2009/06/18101733/0
Government Expenditure and Revenue Scotland 2007-2008

http://www.scotland.gov.uk/Topics/Statistics/Browse/Local-Government-Finance/PubScottishLGFStats
Excel documents of Scottish local government finance data

http://www.statistics.gov.uk/geography/downloads/presadminannexb.pdf
Area and population: UK by Countries and, within England, Government Office Regions (PDF)

http://www.statistics.gov.uk/statbase/Product.asp?vlnk=15106
Population estimates for UK, England and Wales, Scotland and Northern Ireland - current datasets

http://www.statistics.gov.uk/statbase/Product.asp?vlnk=14651
Annual regional household income news release, article and tables from Regional Accounts for English regions, Scotland, Wales and Northern Ireland.

http://www.hmrc.gov.uk/stats/income_tax/menu.htm
Income tax statistics and distributions - shows income distribution in different areas. Brilliant for personalization

http://www.statistics.gov.uk/geography/maps.asp
UK Map Collection, shows administrative regions, and health administration geography.


 	- Dave






More information about the openspending mailing list