Pandas is a Python Analysis package. In this case we use data from UK EU Referendum. The data is [here][Pandas plotting].
Big Data Analysis with Pandas - EU Ref |
Data
The data used is [here]
id,Region,Area_Code,Area,Electorate,Pct_Turnout,Votes_Cast,Remain,Leave,5 GCEs or more 70,North East,E06000001,Hartlepool,70341,65.59,46134,30.4,69.6,35.3 71,North East,E06000002,Middlesbrough,94612,64.89,61393,34.5,65.5,34.1 72,North East,E06000003,Redcar and Cleveland,103529,70.26,72741,33.8,66.2,29 73,North East,E06000004,Stockton-on-Tees,141486,71,100460,38.3,61.7,31.2 74,North East,E06000005,Darlington,77662,71.07,55195,43.8,56.2,43.5 78,North West,E06000006,Halton,95289,68.26,65047,42.6,57.4,45.6 79,North West,E06000007,Warrington,157042,73.36,115205,45.7,54.3,34.2 81,North West,E06000008,Blackburn with Darwen,100117,65.33,65408,43.7,56.3,39 82,North West,E06000009,Blackpool,102354,65.42,66959,32.5,67.5,25.6 83,Yorkshire and The Humber,E06000010,"Kingston upon Hull, City of",180230,62.94,113436,32.4,67.6,34 84,Yorkshire and The Humber,E06000011,East Riding of Yorkshire,266047,74.81,199036,39.6,60.4,36.9 85,Yorkshire and The Humber,E06000012,North East Lincolnshire,116302,67.94,79011,30.1,69.9,32.2 86,Yorkshire and The Humber,E06000013,North Lincolnshire,123611,71.92,88906,33.7,66.3,26 87,Yorkshire and The Humber,E06000014,York,155157,70.69,109681,58,42,40 88,East Midlands,E06000015,Derby,171246,70.53,120772,42.8,57.2,28 89,East Midlands,E06000016,Leicester,213819,65.15,139307,51.1,48.9,39 90,East Midlands,E06000017,Rutland,29390,78.2,22984,49.4,50.6,33.3 91,East Midlands,E06000018,Nottingham,195394,61.82,120791,49.2,50.8,33.1 92,West Midlands,E06000019,"Herefordshire, County of",138247,78.36,108336,40.8,59.2,31.3 93,West Midlands,E06000020,Telford and Wrekin,124338,72.15,89704,36.8,63.2,30.7 95,West Midlands,E06000021,Stoke-on-Trent,179010,65.74,117674,30.6,69.4,29.9 96,South West,E06000022,Bath and North East Somerset,136522,77.13,105300,57.9,42.1,27.5 97,South West,E06000023,"Bristol, City of",312465,73.17,228646,61.7,38.3,28.2 98,South West,E06000024,North Somerset,160860,77.47,124622,47.8,52.2,33.5 99,South West,E06000025,South Gloucestershire,207793,76.24,158427,47.3,52.7,28.1 102,South West,E06000026,Plymouth,186989,71.41,133523,40.1,59.9,35.3 103,South West,E06000027,Torbay,102961,73.69,75868,36.8,63.2,38.8 104,South West,E06000028,Bournemouth,132752,69.3,91997,45.1,54.9,30.1 105,South West,E06000029,Poole,113421,75.38,85493,41.8,58.2,35.2 106,South West,E06000030,Swindon,148960,75.9,113060,45.3,54.7,33.9 108,East,E06000031,Peterborough,120892,72.35,87469,39.1,60.9,27.8 109,East,E06000032,Luton,127612,66.31,84616,43.5,56.5,44 112,East,E06000033,Southend-on-Sea,128856,72.9,93939,41.9,58.1,26.6 113,East,E06000034,Thurrock,109897,72.75,79950,27.7,72.3,31 114,South East,E06000035,Medway,192524,72.18,138973,35.9,64.1,35.3 115,South East,E06000036,Bracknell Forest,85298,76.11,64922,46.1,53.9,39.2 116,South East,E06000037,West Berkshire,116757,79.95,93345,51.8,48.2,25.8 117,South East,E06000038,Reading,103172,72.53,74826,58,42,35.5 118,South East,E06000039,Slough,87873,62.13,54598,45.7,54.3,44.3 119,South East,E06000040,Windsor and Maidenhead,102665,79.73,81855,53.9,46.1,47.8 120,South East,E06000041,Wokingham,121891,80.03,97551,56.7,43.3,32.1 121,South East,E06000042,Milton Keynes,177211,73.66,130534,48.6,51.4,41.2 122,South East,E06000043,Brighton and Hove,198293,74.05,146829,68.6,31.4,31.1 123,South East,E06000044,Portsmouth,140517,70.3,98786,41.9,58.1,23.6 124,South East,E06000045,Southampton,158171,68.14,107775,46.2,53.8,35.8 125,South East,E06000046,Isle of Wight,109844,72.31,79430,38.1,61.9,28.9 75,North East,E06000047,County Durham,389507,68.69,267546,42.5,57.5,37.9 77,North West,E06000049,Cheshire East,285957,77.36,221229,48.8,51.2,27.9 80,North West,E06000050,Cheshire West and Chester,259878,74.51,193633,49.3,50.7,30.6 94,West Midlands,E06000051,Shropshire,236788,77.42,183323,43.1,56.9,31.8 100,South West,E06000052,Cornwall,419755,77.05,323442,43.5,56.5,33.9 107,South West,E06000054,Wiltshire,366555,78.87,289102,47.5,52.5,31.8 110,East,E06000055,Bedford,119530,72.06,86135,48.2,51.8,36.1 111,East,E06000056,Central Bedfordshire,204004,77.89,158894,43.9,56.1,27.7 180,South East,E07000004,Aylesbury Vale,136235,78.46,106895,49.5,50.5,27.4 181,South East,E07000005,Chiltern,70185,83.57,58651,55,45,37.8 182,South East,E07000006,South Bucks,52194,78.08,40755,49.3,50.7,48.6 183,South East,E07000007,Wycombe,125260,75.74,94869,52,48,36.3 184,East,E07000008,Cambridge,80108,72.22,57852,73.8,26.2,33.3 185,East,E07000009,East Cambridgeshire,62435,77.08,48124,49.1,50.9,35.8 186,East,E07000010,Fenland,71447,73.69,52649,28.6,71.4,28.1 187,East,E07000011,Huntingdonshire,128486,77.82,99990,45.8,54.2,31.8 188,East,E07000012,South Cambridgeshire,114830,81.21,93250,60.2,39.8,32.2 189,North West,E07000026,Allerdale,74426,72.92,54268,41.4,58.6,31 190,North West,E07000027,Barrow-in-Furness,53194,67.87,36101,39.4,60.6,28.8 191,North West,E07000028,Carlisle,80124,74.54,59721,39.9,60.1,21.3 192,North West,E07000029,Copeland,54206,70.06,37975,38,62,15.4 193,North West,E07000030,Eden,41872,75.82,31746,46.7,53.3,28.1 194,North West,E07000031,South Lakeland,81948,79.78,65375,52.9,47.1,28.3 195,East Midlands,E07000032,Amber Valley,96760,76.34,73864,39.7,60.3,32.7 196,East Midlands,E07000033,Bolsover,58063,72.33,41999,29.2,70.8,31.4 197,East Midlands,E07000034,Chesterfield,79905,71.92,57470,40,60,37.2 198,East Midlands,E07000035,Derbyshire Dales,57075,81.92,46756,48.4,51.6,25.6 199,East Midlands,E07000036,Erewash,87596,75.99,66566,38.8,61.2,37 200,East Midlands,E07000037,High Peak,72487,75.69,54864,49.5,50.5,30.6 201,East Midlands,E07000038,North East Derbyshire,78855,75.25,59341,37.2,62.8,31.1 202,East Midlands,E07000039,South Derbyshire,73856,76.8,56718,39.6,60.4,21.5 203,South West,E07000040,East Devon,112527,78.94,88831,45.9,54.1,29.3 204,South West,E07000041,Exeter,86417,73.91,63867,55.3,44.7,37.6 205,South West,E07000042,Mid Devon,60532,79.38,48049,46.7,53.3,45.3 206,South West,E07000043,North Devon,75548,76.85,58056,43,57,28.4 207,South West,E07000044,South Hams,69121,80.27,55485,52.9,47.1,40 208,South West,E07000045,Teignbridge,103740,79.4,82369,46.1,53.9,35.6 209,South West,E07000046,Torridge,52881,78.41,41462,39.2,60.8,24.7 210,South West,E07000047,West Devon,43823,81.26,35612,46.8,53.2,22.5 211,South West,E07000048,Christchurch,39176,79.3,31066,41.2,58.8,32.7 212,South West,E07000049,East Dorset,71966,81.33,58530,42.4,57.6,29.2 213,South West,E07000050,North Dorset,52980,79.71,42228,43.6,56.4,32.8 214,South West,E07000051,Purbeck,36418,78.91,28736,40.9,59.1,24.3 215,South West,E07000052,West Dorset,82071,79.49,65237,49,51,30.3 216,South West,E07000053,Weymouth and Portland,50442,75.87,38271,39,61,40.3 217,South East,E07000061,Eastbourne,71726,74.73,53598,42.7,57.3,39.2 218,South East,E07000062,Hastings,61957,71.64,44387,45.1,54.9,23.9 219,South East,E07000063,Lewes,76428,77.89,59531,52.1,47.9,34.7 220,South East,E07000064,Rother,72755,79.33,57715,41.5,58.5,35.8 221,South East,E07000065,Wealden,121141,80.03,96944,45.5,54.5,30.1 222,East,E07000066,Basildon,132771,73.86,98062,31.4,68.6,36.8 223,East,E07000067,Braintree,112562,76.67,86303,38.9,61.1,27.5 224,East,E07000068,Brentwood,58777,79.5,46725,40.8,59.2,35.5 225,East,E07000069,Castle Point,68860,75.38,51909,27.3,72.7,34.4 226,East,E07000070,Chelmsford,129971,77.6,100852,47.2,52.8,33.6 227,East,E07000071,Colchester,127520,75.11,95782,46.4,53.6,37.9 228,East,E07000072,Epping Forest,100016,76.89,76900,37.3,62.7,45.7 229,East,E07000073,Harlow,59124,73.56,43489,31.9,68.1,33.6 230,East,E07000074,Maldon,49073,79.17,38850,37.4,62.6,38.7 231,East,E07000075,Rochford,66589,78.81,52479,33.4,66.6,24.1 232,East,E07000076,Tendring,111167,74.4,82703,30.5,69.5,37.7 233,East,E07000077,Uttlesford,64735,80.28,51972,49.3,50.7,27.3 234,South West,E07000078,Cheltenham,87060,75.88,66057,56.2,43.8,36.4 235,South West,E07000079,Cotswold,68734,79.8,54847,51.1,48.9,34 236,South West,E07000080,Forest of Dean,66705,77.47,51677,41.4,58.6,36.3 237,South West,E07000081,Gloucester,89661,72.06,64606,41.5,58.5,28.9 238,South West,E07000082,Stroud,92631,80.03,74128,54.6,45.4,41.1 239,South West,E07000083,Tewkesbury,67831,79.15,53686,46.8,53.2,24.1 240,South East,E07000084,Basingstoke and Deane,128677,78.02,100395,48.1,51.9,25.1 241,South East,E07000085,East Hampshire,90588,81.65,73967,50.5,49.5,33.3 242,South East,E07000086,Eastleigh,97280,78.28,76148,47.5,52.5,40 243,South East,E07000087,Fareham,90175,79.59,71772,44.9,55.1,30.9 244,South East,E07000088,Gosport,62781,73.51,46150,36.1,63.9,17.8 245,South East,E07000089,Hart,69946,82.67,57827,52.4,47.6,45.5 246,South East,E07000090,Havant,95366,74.1,70670,37.6,62.4,21.1 247,South East,E07000091,New Forest,141061,79.25,111786,42.2,57.8,31.1 248,South East,E07000092,Rushmoor,65790,74.18,48800,41.8,58.2,24.7 249,South East,E07000093,Test Valley,94559,79.65,75316,48.1,51.9,25.3 250,South East,E07000094,Winchester,89595,81.26,72801,58.9,41.1,35.3 251,East,E07000095,Broxbourne,68997,73.78,50907,33.7,66.3,33.3 252,East,E07000096,Dacorum,108965,79.21,86307,49.3,50.7,25.8 254,East,E07000098,Hertsmere,73295,76.62,56159,49.2,50.8,31 255,East,E07000099,North Hertfordshire,99316,78.27,77737,54.4,45.6,41.1 258,East,E07000102,Three Rivers,67380,78.5,52896,48.7,51.3,37.5 259,East,E07000103,Watford,65060,71.68,46635,49.7,50.3,44.1 261,South East,E07000105,Ashford,90516,77.14,69827,40.6,59.4,28.8 262,South East,E07000106,Canterbury,109399,75.05,82105,49,51,28.2 263,South East,E07000107,Dartford,73951,75.57,55883,35.8,64.2,39.3 264,South East,E07000108,Dover,85011,76.53,65057,37.8,62.2,23.9 265,South East,E07000109,Gravesham,72808,74.93,54553,34.6,65.4,30.8 266,South East,E07000110,Maidstone,117298,76.02,89173,41.2,58.8,36.5 267,South East,E07000111,Sevenoaks,87253,80.68,70393,45.6,54.4,40.9 268,South East,E07000112,Shepway,80879,75,60659,37.8,62.2,36.6 269,South East,E07000113,Swale,102209,74.27,75913,37.5,62.5,24.2 270,South East,E07000114,Thanet,99108,72.8,72146,36.2,63.8,37.3 271,South East,E07000115,Tonbridge and Malling,93019,79.62,74066,44.3,55.7,40.9 272,South East,E07000116,Tunbridge Wells,82181,79.14,65039,54.9,45.1,31.8 273,North West,E07000117,Burnley,64461,67.25,43350,33.4,66.6,24 274,North West,E07000118,Chorley,84159,75.52,63560,43.2,56.8,36 275,North West,E07000119,Fylde,61174,75.57,46227,43,57,29.1 276,North West,E07000120,Hyndburn,62042,64.74,40168,33.8,66.2,29.7 277,North West,E07000121,Lancaster,100567,72.69,73098,48.9,51.1,30.4 278,North West,E07000122,Pendle,64534,70.33,45388,36.8,63.2,32.9 279,North West,E07000123,Preston,94284,68.72,64794,46.7,53.3,34.5 280,North West,E07000124,Ribble Valley,46148,79.02,36466,43.6,56.4,23.1 281,North West,E07000125,Rossendale,52750,72.43,38205,39.3,60.7,28.9 282,North West,E07000126,South Ribble,84573,75.38,63755,41.4,58.6,30 283,North West,E07000127,West Lancashire,85834,74.47,63918,44.7,55.3,36.9 284,North West,E07000128,Wyre,84471,74.61,63028,36.2,63.8,39.6 285,East Midlands,E07000129,Blaby,73832,76.54,56512,40.5,59.5,37.3 286,East Midlands,E07000130,Charnwood,133780,70.46,94257,46.2,53.8,24.6 287,East Midlands,E07000131,Harborough,67420,81.44,54910,49.3,50.7,34.9 288,East Midlands,E07000132,Hinckley and Bosworth,85305,76.8,65516,39.7,60.3,26 289,East Midlands,E07000133,Melton,37273,81.36,30327,41.9,58.1,33.3 290,East Midlands,E07000134,North West Leicestershire,73944,77.95,57638,39.3,60.7,20.2 291,East Midlands,E07000135,Oadby and Wigston,42684,73.77,31489,45.4,54.6,41.7 292,East Midlands,E07000136,Boston,39363,77.27,30416,24.4,75.6,29.3 293,East Midlands,E07000137,East Lindsey,107009,74.93,80178,29.3,70.7,44.8 294,East Midlands,E07000138,Lincoln,63351,69.34,43928,43.1,56.9,25.9 295,East Midlands,E07000139,North Kesteven,86468,78.4,67791,37.7,62.3,31.9 296,East Midlands,E07000140,South Holland,65701,75.37,49518,26.4,73.6,39.2 297,East Midlands,E07000141,South Kesteven,105457,78.25,82523,40.1,59.9,27.7 298,East Midlands,E07000142,West Lindsey,73499,74.53,54781,38.2,61.8,20.6 299,East,E07000143,Breckland,98989,74.34,73593,35.8,64.2,26.3 300,East,E07000144,Broadland,99254,78.37,77781,45.6,54.4,36.6 301,East,E07000145,Great Yarmouth,72634,69.06,50158,28.5,71.5,25.7 302,East,E07000146,King's Lynn and West Norfolk,113884,74.75,85128,33.6,66.4,28.1 303,East,E07000147,North Norfolk,83065,76.84,63829,41.1,58.9,29.4 304,East,E07000148,Norwich,96091,69.12,66422,56.2,43.8,20.8 305,East,E07000149,South Norfolk,102395,78.54,80418,48.3,51.7,31.3 306,East Midlands,E07000150,Corby,43313,74.1,32097,35.8,64.2,36.2 307,East Midlands,E07000151,Daventry,61004,81.01,49420,41.4,58.6,32.9 308,East Midlands,E07000152,East Northamptonshire,68334,76.99,52607,41.2,58.8,24.3 309,East Midlands,E07000153,Kettering,70570,76.43,53940,39,61,24.2 310,East Midlands,E07000154,Northampton,144948,72.68,105354,41.6,58.4,31.5 311,East Midlands,E07000155,South Northamptonshire,71309,79.46,56664,45.7,54.3,46.5 312,East Midlands,E07000156,Wellingborough,54572,75.46,41178,37.6,62.4,33.6 313,Yorkshire and The Humber,E07000163,Craven,44320,81.02,35907,47.2,52.8,45.8 314,Yorkshire and The Humber,E07000164,Hambleton,70133,78.45,55016,46.3,53.7,31.8 315,Yorkshire and The Humber,E07000165,Harrogate,119987,78.89,94653,51,49,45.3 316,Yorkshire and The Humber,E07000166,Richmondshire,36794,75.15,27652,43.2,56.8,32.4 317,Yorkshire and The Humber,E07000167,Ryedale,41529,77.22,32069,44.7,55.3,41.2 318,Yorkshire and The Humber,E07000168,Scarborough,82900,73.03,60539,38,62,33.1 319,Yorkshire and The Humber,E07000169,Selby,65278,79.1,51636,40.8,59.2,30.8 320,East Midlands,E07000170,Ashfield,91916,72.83,66946,30.2,69.8,36.1 321,East Midlands,E07000171,Bassetlaw,85547,74.82,64003,32.2,67.8,48.6 322,East Midlands,E07000172,Broxtowe,83593,78.32,65468,45.4,54.6,36.8 323,East Midlands,E07000173,Gedling,88298,76.6,67635,44.4,55.6,38.6 324,East Midlands,E07000174,Mansfield,77624,72.62,56370,29.1,70.9,26.2 325,East Midlands,E07000175,Newark and Sherwood,87338,76.86,67128,39.6,60.4,28.1 326,East Midlands,E07000176,Rushcliffe,86401,81.56,70470,57.6,42.4,44.9 327,South East,E07000177,Cherwell,108342,75.6,81908,49.7,50.3,37.3 328,South East,E07000178,Oxford,97331,72.34,70411,70.3,29.7,27.4 329,South East,E07000179,South Oxfordshire,104231,80.75,84167,55,45,25 330,South East,E07000180,Vale of White Horse,94487,81.18,76706,56.7,43.3,29.3 331,South East,E07000181,West Oxfordshire,82441,79.72,65719,53.7,46.3,31 332,South West,E07000187,Mendip,85068,77.01,65509,51.1,48.9,29.8 333,South West,E07000188,Sedgemoor,89714,76.3,68450,38.8,61.2,30.2 334,South West,E07000189,South Somerset,126495,78.69,99535,42.8,57.2,30.8 335,South West,E07000190,Taunton Deane,84164,78.16,65786,47.1,52.9,39.6 336,South West,E07000191,West Somerset,27478,79.17,21753,39.4,60.6,23.1 337,West Midlands,E07000192,Cannock Chase,75010,71.47,53607,31.1,68.9,33.9 338,West Midlands,E07000193,East Staffordshire,83558,74.39,62161,36.8,63.2,37.2 339,West Midlands,E07000194,Lichfield,80369,78.78,63318,41.2,58.8,39.6 340,West Midlands,E07000195,Newcastle-under-Lyme,92816,74.3,68966,37,63,42.2 341,West Midlands,E07000196,South Staffordshire,85777,77.81,66739,35.2,64.8,32.9 342,West Midlands,E07000197,Stafford,99612,77.83,77527,44,56,33 343,West Midlands,E07000198,Staffordshire Moorlands,79347,75.36,59793,35.3,64.7,38.5 344,West Midlands,E07000199,Tamworth,56825,74.18,42151,32.5,67.5,30.3 345,East,E07000200,Babergh,70628,78.26,55272,45.8,54.2,24.1 346,East,E07000201,Forest Heath,38527,72.62,27977,35,65,37.1 347,East,E07000202,Ipswich,91574,72.51,66400,41.7,58.3,25.9 348,East,E07000203,Mid Suffolk,78325,78.16,61222,44.8,55.2,39.7 349,East,E07000204,St Edmundsbury,81148,76.72,62255,43.4,56.6,30.9 350,East,E07000205,Suffolk Coastal,98195,80.68,79226,47,53,26 351,East,E07000206,Waveney,90391,72.67,65687,37.1,62.9,23.4 352,South East,E07000207,Elmbridge,98613,78.14,77058,59.5,40.5,38.2 353,South East,E07000208,Epsom and Ewell,56382,80.42,45343,52.1,47.9,43.2 354,South East,E07000209,Guildford,102209,76.96,78657,56.2,43.8,37 355,South East,E07000210,Mole Valley,66730,82.17,54829,53.1,46.9,40.5 356,South East,E07000211,Reigate and Banstead,103731,78.28,81200,49.5,50.5,38.4 357,South East,E07000212,Runnymede,58272,76.07,44326,45.7,54.3,53.3 358,South East,E07000213,Spelthorne,72674,77.93,56638,39.7,60.3,29.7 359,South East,E07000214,Surrey Heath,65569,79.81,52330,49,51,34.9 360,South East,E07000215,Tandridge,64044,80.36,51466,47.2,52.8,36.6 361,South East,E07000216,Waverley,92291,82.35,75999,58.4,41.6,42.1 362,South East,E07000217,Woking,71313,77.49,55261,56.2,43.8,44.6 363,West Midlands,E07000218,North Warwickshire,49790,76.27,37975,33.1,66.9,34.9 364,West Midlands,E07000219,Nuneaton and Bedworth,93978,74.35,69876,34,66,27.7 365,West Midlands,E07000220,Rugby,74137,79.03,58593,43.3,56.7,37.3 366,West Midlands,E07000221,Stratford-on-Avon,98014,80.82,79217,48.4,51.6,38.2 367,West Midlands,E07000222,Warwick,103099,79.22,81680,58.8,41.2,37.7 368,South East,E07000223,Adur,48755,76.4,37251,45.4,54.6,36.7 369,South East,E07000224,Arun,117138,77.86,91199,37.5,62.5,25.3 370,South East,E07000225,Chichester,91659,77.91,71407,49.1,50.9,30.6 371,South East,E07000226,Crawley,73575,73.24,53884,41.6,58.4,41 372,South East,E07000227,Horsham,104270,81.65,85132,51.5,48.5,43.5 373,South East,E07000228,Mid Sussex,108416,80.79,87588,53.1,46.9,23.3 374,South East,E07000229,Worthing,81384,75.46,61416,47,53,29.1 375,West Midlands,E07000234,Bromsgrove,74170,79.35,58855,44.6,55.4,39.2 376,West Midlands,E07000235,Malvern Hills,60217,80.61,48538,47.8,52.2,18.2 377,West Midlands,E07000236,Redditch,61038,75.22,45912,37.7,62.3,54.3 378,West Midlands,E07000237,Worcester,73516,73.85,54290,46.3,53.7,36.6 379,West Midlands,E07000238,Wychavon,94497,80.88,76425,42.1,57.9,17.3 380,West Midlands,E07000239,Wyre Forest,77878,74.05,57666,36.9,63.1,29.5 34,North West,E08000001,Bolton,197109,70.1,138180,41.7,58.3,39.8 35,North West,E08000002,Bury,141600,71.43,101144,45.9,54.1,44 36,North West,E08000003,Manchester,338064,59.77,202067,60.4,39.6,40.2 37,North West,E08000004,Oldham,158084,68,107493,39.1,60.9,40.2 38,North West,E08000005,Rochdale,156621,65.97,103319,39.9,60.1,38.6 39,North West,E08000006,Salford,173668,63.3,109926,43.2,56.8,36.7 40,North West,E08000007,Stockport,221162,73.97,163584,52.3,47.7,33 41,North West,E08000008,Tameside,168047,66.06,111016,38.9,61.1,38.2 42,North West,E08000009,Trafford,165294,75.86,125400,57.7,42.3,39.8 43,North West,E08000010,Wigan,235982,69.23,163381,36.1,63.9,35.4 44,North West,E08000011,Knowsley,111647,63.54,70937,48.4,51.6,29.4 45,North West,E08000012,Liverpool,317924,64.08,203728,58.2,41.8,33.9 46,North West,E08000013,St. Helens,136096,68.86,93721,42,58,30.9 47,North West,E08000014,Sefton,206298,71.73,147970,51.9,48.1,36.6 48,North West,E08000015,Wirral,242568,70.96,172137,51.7,48.3,37.3 49,Yorkshire and The Humber,E08000016,Barnsley,175809,69.95,122972,31.7,68.3,22.5 50,Yorkshire and The Humber,E08000017,Doncaster,217432,69.56,151246,31,69,29.4 51,Yorkshire and The Humber,E08000018,Rotherham,197623,69.56,137470,32.1,67.9,34.7 52,Yorkshire and The Humber,E08000019,Sheffield,396406,67.34,266951,49,51,30.5 54,North East,E08000021,Newcastle upon Tyne,190735,67.67,129072,50.7,49.3,33.6 55,North East,E08000022,North Tyneside,156993,72.3,113507,46.6,53.4,44.8 56,North East,E08000023,South Tyneside,115893,68.27,79117,38,62,39 57,North East,E08000024,Sunderland,207221,64.86,134400,38.7,61.3,32.8 58,West Midlands,E08000025,Birmingham,707293,63.81,451316,49.6,50.4,46.7 59,West Midlands,E08000026,Coventry,221389,69.21,153234,44.4,55.6,36.3 60,West Midlands,E08000027,Dudley,244516,71.71,175333,32.4,67.6,31.6 61,West Midlands,E08000028,Sandwell,221429,66.58,147418,33.3,66.7,39.7 62,West Midlands,E08000029,Solihull,160425,76.06,122020,43.8,56.2,44.8 63,West Midlands,E08000030,Walsall,194729,69.68,135685,32.1,67.9,33.3 64,West Midlands,E08000031,Wolverhampton,174760,67.54,118037,37.4,62.6,43 65,Yorkshire and The Humber,E08000032,Bradford,342817,66.72,228727,45.8,54.2,35.6 66,Yorkshire and The Humber,E08000033,Calderdale,149195,71.05,106004,44.3,55.7,34.5 67,Yorkshire and The Humber,E08000034,Kirklees,307081,70.8,217428,45.3,54.7,42.6 68,Yorkshire and The Humber,E08000035,Leeds,543033,71.39,387677,50.3,49.7,30.8 69,Yorkshire and The Humber,E08000036,Wakefield,246096,71.17,175155,33.6,66.4,40.2 53,North East,E08000037,Gateshead,145866,70.62,103007,43.2,56.8,35.9 2,London,E09000002,Barking and Dagenham,115812,63.85,73941,37.6,62.4,40.2 3,London,E09000003,Barnet,223467,72.14,161218,62.2,37.8,54.6 4,London,E09000004,Bexley,170779,75.28,128570,37,63,38 5,London,E09000005,Brent,186793,65.14,121671,59.7,40.3,49.1 6,London,E09000006,Bromley,231473,78.87,182570,50.6,49.4,49.1 7,London,E09000007,Camden,145425,65.52,95281,74.9,25.1,47.9 8,London,E09000008,Croydon,245349,69.81,171289,54.3,45.7,49.1 9,London,E09000009,Ealing,212991,70.08,149268,60.4,39.6,48.4 10,London,E09000010,Enfield,198387,69.09,137056,55.8,44.2,43.8 11,London,E09000011,Greenwich,168967,69.52,117470,55.6,44.4,50.2 12,London,E09000012,Hackney,163284,65.18,106422,78.5,21.5,54.2 13,London,E09000013,Hammersmith and Fulham,114863,69.95,80347,70,30,53.2 14,London,E09000014,Haringey,150098,70.64,106032,75.6,24.4,53.1 15,London,E09000015,Harrow,162397,72.26,117352,54.6,45.4,51.9 16,London,E09000016,Havering,183082,76.02,139175,30.3,69.7,42 17,London,E09000017,Hillingdon,193033,68.99,133170,43.6,56.4,45 18,London,E09000018,Hounslow,165050,69.8,115208,51.1,48.9,47.2 19,London,E09000019,Islington,144514,70.39,101723,75.2,24.8,53.2 21,London,E09000021,Kingston upon Thames,108838,78.4,85330,61.6,38.4,37.5 22,London,E09000022,Lambeth,210800,67.44,142162,78.6,21.4,57.1 23,London,E09000023,Lewisham,197514,63.1,124637,69.9,30.1,42.5 24,London,E09000024,Merton,136352,73.49,100207,62.9,37.1,45.2 25,London,E09000025,Newham,176985,59.25,104864,52.8,47.2,50.7 26,London,E09000026,Redbridge,189843,67.63,128397,54,46,54.6 27,London,E09000027,Richmond upon Thames,132632,82.09,108876,69.3,30.7,38.9 28,London,E09000028,Southwark,195875,66.2,129677,72.8,27.2,60.4 29,London,E09000029,Sutton,140288,76.01,106633,46.3,53.7,42.8 30,London,E09000030,Tower Hamlets,167820,64.6,108420,67.5,32.5,59.4 31,London,E09000031,Waltham Forest,162983,66.69,108689,59.1,40.9,47.9 32,London,E09000032,Wandsworth,219521,71.98,158018,75,25,45.8 33,London,E09000033,Westminster,120524,64.99,78325,69,31,61.8
Code
An outline of the code is:
import numpy as np import pandas as pd import sys import statsmodels.api as sm