Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mcallaghan
mcallaghan / README.md
Created January 31, 2017 10:05
Mendeley Library

Mendeley Library

@mcallaghan
mcallaghan / 2010_results.csv
Last active August 29, 2015 14:15
Support for UKIP and Immigration Levels
Order No. Seat Candidate Party Vote pcntVote Sitting Member Elected Winner % Majority % Turnout Change Lab->C, % swing C->LD, % swing Lab->LD, % swing Holder-> Winner
1 1 Aberavon Francis, Hywel Lab 16,073 51.92 * * Lab 35.66 60.95 - 6.1 -0.8 5.3 2
2 1 Aberavon Davies, Keith LD 5,034 16.26 Lab 35.66 60.95 - 6.1 -0.8 5.3 3
3 1 Aberavon Jones, Caroline C 4,411 14 Lab 36 61 - 6 -1 5 4
4 1 Aberavon Nicholls-Jones, Paul PC 2,198 7 Lab 36 61 - 6 -1 5
5 1 Aberavon Edwards, Kevin BNP 1,276 4.12 Lab 35.66 60.95 - 6.1 -0.8 5.3
6 1 Aberavon Tutton, Andrew Ind 919 2.97 Lab 35.66 60.95 - 6.1 -0.8 5.3
7 1 Aberavon Beany, Captain Bean 558 1.8 Lab 35.66 60.95 - 6.1 -0.8 5.3
8 1 Aberavon Callan, Joe UKIP 489 1.58 Lab 35.66 60.95 - 6.1 -0.8 5.3
9 2 Aberconwy Bebb, Guto C 10,734 36 * C 11 67 C gain from Lab 8 -3 4
@mcallaghan
mcallaghan / README.md
Last active October 19, 2015 17:18
Labour supply responses in an economy of one individual

#Labour supply responses in an economy of one individual This gist uses d3 to visualise labour supply responses to changes in wages, taxes, transfers or preferences (or their concavity) given a choice of working any whole number of hours between 0 and 80

The utility function is given by ((consumption*consumption preference)^consumption concavity)+((leisure*leisure preference)^leisure concavity) where consumption preference + leisure preference = 1.

The indifference curve is drawn through all combinations of consumption and leisure where utility is equal to the maximum utility obtainable on the budget line.

@mcallaghan
mcallaghan / README.md
Last active November 20, 2015 11:00
World Map Using World Bank API

##World Map Using World Bank API A World map made with D3.js that displays WDI data accessed using the World Bank API View

@mcallaghan
mcallaghan / README.md
Last active January 13, 2016 14:53
Country Codes

#Country Codes This uses the CIA World Factbook compendium of country codes to convert one type of code to another easily and programmatically. The table on this website was converted into JSON format on 20/11/2014.

As an example, enter the input code type, a code, and the output code type (separated by commas) above. Choose between the following options (Case sensitive)

- name
- GEC
- ISO_ALPHA_2
- ISO_ALPHA_3