Finding nearby Michelin restaurants in the UK and Ireland (18.01.2018)

Today I came to an interesting article in Harvard Business Review that mentioned the concept of Michelin stars used to rate restaurants. Since not every restaurant has obtained such a rating, I wondered how easy it is to find ones that are close to someone's current location. As you can see on this map, most such restaurants are located in Europe, but they are so many, that manually obtaining data about them would be a lot of work.

Since I only wanted to show a simple concept, not pretending to be exhaustive, I decided to limit the scope to some restaurants located only in the UK and Ireland, which have been shown on this page.

I selected three points and then ran the computation with the given data below. Ideally, it would have been better to make this interactive by detecting the current location of the visitor in the browser. Unfortunately, the last time I checked, this was said to work only on HTTPS enabled websites where this one doesn't support it. This explains why the starting points were manually chosen.

Below are the data and the sample results obtained:

# http://www.greatbritishchefs.com/michelin-guide-results # name, city, stars, latitude, longitude data = """ Alain Ducasse at The Dorchester;Mayfair, London;3;51.507294;-0.152341 Restaurant Gordon Ramsay;Chelsea, London;3;51.485432;-0.162137 The Araki;Mayfair, London;3;51.511749;-0.140298 The Fat Duck;Bray, Berkshire;3;51.507899;-0.701756 The Waterside Inn;Bray, Berkshire;3;51.509049;-0.699592 Bibendum;London;2;51.493331;-0.168930 Andrew Fairlie at Gleneagles;Auchterarder, Perthshire;2;56.283385;-3.752183 Dinner by Heston Blumenthal (Mandarin Oriental Hyde Park Hotel);Knightsbridge, London;2;51.502161;-0.159964 Gidleigh Park;Devon;2;50.676745;-3.873262 Hélène Darroze at the Connaught;Mayfair, London;2;51.510359;-0.149765 L’Enclume;Cartmel Nr Grange over Sands, Cumbria;2;54.201793;-2.953795 Le Champignon Sauvage;Cheltenham, Gloucestershire;2;51.891484;-2.078976 Le Gavroche;Mayfair, London;2;51.511254;-0.155167 Le Manoir aux Quat’Saisons;Great Milton, Oxfordshire;2;51.716098;-1.091251 Marcus Knightsbridge;London;2;51.502077;-0.156091 Midsummer House;Cambridge, Cambridgeshire;2;52.212088;0.128356 Restaurant Nathan Outlaw;Port Isaac, Cornwall;2;50.594193;-4.828645 Restaurant Patrick Guilbaud;Dublin, Ireland;2;53.338403;-6.253005 Restaurant Sat Bains with Rooms;Nottingham;2;52.925075;-1.167511 Sketch (The Lecture Room & Library);Mayfair, London;2;51.512693;-0.141529 The Greenhouse;Mayfair, London;2;51.507787;-0.149119 The Hand and Flowers;Marlow, Buckinghamshire;2;51.569803;-0.783328 The Ledbury;Notting Hill, London;2;51.516655;-0.200063 The Raby Hunt;Summerhouse, County Durham;2;54.566611;-1.689434 Umu;Mayfair, London;2;51.511398;-0.144351 A Wong;London;1;51.492989;-0.140644 Elystan Street;London;1;51.491771;-0.167765 Lympstone Manor;Exmouth;1;50.640343;-3.418271 The Latymer;Bagshot, Surrey;1;51.356633;-0.709133 Vineet Bhatia London;London;1;51.491606;-0.161447 21212;Edinburgh, Scotland;1;55.956807;-3.180896 Adam's;Birmingham, West Midlands;1;52.479844;-1.901385 Albannach;Lochinver, Highland;1;58.153685;-5.255516 Alyn Williams at The Westbury;Mayfair, London;1;51.511349;-0.142557 Amaya Belgravia;Belgravia, London;1;51.499169;-0.157223 Ametsa with Arzak Instruction;Belgravia, London;1;51.500816;-0.152029 Angler;Moorgate, London;1;51.519075;-0.086701 Aniar;Galway, County Galway;1;53.271110;-9.057106 Aquavit;St James', London;1;51.508793;-0.133359 Barrafina Adelaide Street;London;1;51.509395;-0.125711 Benares;London;1;51.509847;-0.145079 Boath House;Nairn, Highland;1;57.579495;-3.808447 Bohemia;St. Helier, Jersey;1;49.181549;-2.102331 Bonhams Restaurant;Mayfair, London;1;51.513743;-0.146178 Braidwoods;Dalry, North Ayrshire;1;55.694939;-4.742590 Butcher's Arms;Eldersfield, Worcestershire;1;51.971134;-2.272500 Campagne;Kilkenny, County Kilkenny;1;52.655892;-7.246688 Carters of Moseley;Birmingham, West Midlands;1;52.445729;-1.883893 Casamia;Bristol, Bristol;1;51.447258;-2.593973 Céleste;Hyde Park, London;1;51.502419;-0.152779 Chapter One;Dublin, Ireland;1;53.354332;-6.264122 Chez Bruce;Wandsworth, London;1;51.446011;-0.165649 City Social;City of London, London;1;51.515118;-0.084026 Club Gascon;London;1;51.518629;-0.100236 Coworth Park;Ascot, Berkshire;1;51.404544;-0.616682 Deanes Eipic;Belfast, County Antrim;1;54.595727;-5.932770 Driftwood;Portscatho, Cornwall;1;50.193254;-4.969768 Ellory;Hackney, London;1;51.537591;-0.057720 Fera at Claridges;Mayfair, London;1;51.512494;-0.148052 Fischer's at Baslow Hall;Bakewell, Derbyshire;1;53.252467;-1.625757 Five Fields;Chelsea, London;1;51.491691;-0.161326 Forest Side;Grasmere, Cumbria;1;54.463747;-3.015738 Fraiche;Birkenhead, Merseyside;1;53.381843;-3.042922 Galvin at Windows;Mayfair, London;1;51.505555;-0.150143 Galvin La Chapelle;London;1;51.520197;-0.078202 Gilpin Hotel and Lake House;Windermere, Cumbria;1;54.355074;-2.880064 Gravetye Manor;West Sussex;1;51.089298;-0.056508 Gymkhana;Mayfair, London;1;51.508491;-0.141472 Hakkasan Hanway Place;Fitzrovia;1;51.517214;-0.131692 Hakkasan Mayfair;London;1;51.510265;-0.145001 Hambleton Hall;Oakham;1;52.657408;-0.668072 Harwood Arms;Fulham, London;1;51.482901;-0.196462 Hedone;Chiswick, London;1;51.492611;-0.267942 Heron and Grey;Dublin, Ireland;1;53.301185;-6.177941 HKK;Shoreditch, London;1;51.521784;-0.082252 House (at Cliff House Hotel);Ardmore, Ireland;1;51.948629;-7.715334 House Of Tides;Newcastle, Tyne and Wear;1;54.967971;-1.610267 Jamavar;Mayfair, London;1;51.510334;-0.148399 John's House;Mountsorrel, Leicestershire;1;52.732765;-1.145878 JSW;Petersfield, Hampshire;1;51.002453;-0.934893 Kai;Mayfair, London;1;51.508752;-0.151572 Kitchen Table at Bubbledogs;Fitzrovia, London;1;51.520376;-0.136532 Kitchen W8;Kensington, London;1;51.499072;-0.196844 La Dame de Pic;City of London, London;1;51.510102;-0.077980 La Trompette;Chiswick, London;1;51.491901;-0.256015 Lady Helen at Mount Juliet Hotel;Thomastown, County Kilkenny;1;52.525974;-7.187934 L'Atelier de Joël Robuchon;Covent Garden, London;1;51.513132;-0.128487 L'Ecrivain;Dublin, Ireland;1;53.336222;-6.248748 Lima;Fitzrovia, London;1;51.517747;-0.134371 Loam;Galway, County Galway;1;53.274372;-9.044628 Locanda Locatelli;Marylebone, London;1;51.515123;-0.157287 Loch Bay;Stein, Isle of Skye;1;57.514915;-6.571126 L'Ortolan;Reading, Berkshire;1;51.408876;-0.954076 Lyle's;Shoreditch, London;1;51.523760;-0.076285 Martin Wishart at Loch Lomond;Loch Lomond, Dunbartonshire;1;56.012829;-4.606845 Moor Hall;Ormskirk, Lancashire;1;53.541623;-2.889552 Morston Hall;Holt, Norfolk;1;52.954945;0.985756 Murano;Mayfair, London;1;51.507139;-0.147175 Northcote;Langho, Blackburn;1;53.809064;-2.447520 Number One (at Balmoral Hotel);Edinburgh, Midlothian;1;55.952938;-3.189287 Nut Tree;Murcott, Oxfordshire;1;51.836174;-1.149944 Ormer;St Helier, Jersey;1;49.184452;-2.105952 Outlaw's at The Capital;Knightsbridge, London;1;51.500036;-0.161589 Outlaw's Fish Kitchen;Cornwall;1;50.592075;-4.831906 Ox Belfast;Belfast, County Antrim;1;54.599284;-5.921933 Paco Tapas;Bristol, Bristol;1;51.446610;-2.593873 Paul Ainsworth at Number 6;Padstow;1;50.541500;-4.939887 Peel's at Hampton Manor;Solihull, Birmingham;1;52.425753;-1.705685 Pétrus;Belgravia, London;1;51.499596;-0.156716 Pied à Terre;London;1;51.519124;-0.135097 Pollen Street Social;Mayfair, London;1;51.513376;-0.142324 Portland;London;1;51.519792;-0.142689 Purnell's;Birmingham, West Midlands;1;52.482733;-1.901663 Quilon;Victoria, London;1;51.498706;-0.137672 Restaurant James Sommerin;Penarth;1;51.434398;-3.168064 Restaurant Martin Wishart;Edinburgh;1;55.975511;-3.170333 Restaurant Story;Southwark, London;1;51.502776;-0.077770 Restaurant Tristan;Horsham, West Sussex;1;51.061712;-0.326863 Ritz Restaurant;St James', London;1;51.507053;-0.141567 River Café;Hammersmith, London;1;51.484127;-0.224305 Seven Park Place;London;1;51.506105;-0.140299 Simon Radley at The Chester Grosvenor;Chester, Cheshire;1;53.190631;-2.889379 Simpsons;Birmingham;1;52.468337;-1.922959 Social Eating House;Soho, London;1;51.513833;-0.136716 Sosban and The Old Butchers;Anglesey, Wales;1;53.226087;-4.162991 St. John;Clerkenwell, London;1;51.520451;-0.101429 Tamarind;Mayfair;1;51.507092;-0.147175 Texture;London;1;51.514847;-0.156667 The Black Rat;Winchester, Hampshire;1;51.057934;-1.306874 The Black Swan at Oldstead;York, North Yorkshire;1;54.212123;-1.188057 The Box Tree;West Yorkshire;1;53.926129;-1.825781 The Bybrook at The Manor;Chippenham, Wiltshire;1;51.493622;-2.231983 The Cellar;Anstruther, Fife;1;56.222079;-2.696070 The Checkers;Montgomery, Monmouthshire;1;52.560452;-3.147883 The Clock House;Ripley, Surrey;1;51.300300;-0.492722 The Clove Club;Shoreditch, London;1;51.527044;-0.079158 The Coach;Marlow, Buckinghamshire;1;51.571662;-0.777177 The Cross at Kenilworth;Kenilworth;1;52.350665;-1.579172 The Crown;Maidenhead, Berkshire;1;51.524813;-0.791565 The Dining Room at Whatley Manor;Malmesbury, Wiltshire;1;51.583699;-2.149331 The Elephant;Devon;1;41.997564;-87.762537 The Glasshouse;Kew, London;1;51.477019;-0.285587 The Goring;London;1;51.497608;-0.145632 The Greenhouse;Dublin, County Dublin;1;53.340005;-6.258440 The Harrow at Little Bedwyn;Marlborough, Wiltshire;1;51.390958;-1.581565 The Hind's Head;Bray, Berkshire;1;51.508193;-0.702106 The Kitchin;Edinburgh;1;55.977038;-3.172689 The Man Behind The Curtain;Leeds, West Yorkshire;1;53.798261;-1.539791 The Masons Arms;Devon;1;50.995525;-3.671643 The Neptune;Norfolk;1;52.951091;0.509279 The Ninth;Fitzrovia, London;1;51.518853;-0.134868 The Park (at Lucknam Park Hotel);Chippenham, Wiltshire;1;51.455047;-2.259393 The Peat Inn;Scotland;1;56.278297;-2.884629 The Pipe and Glass Inn;Beverley;1;53.895380;-0.534926 The Pony and Trap;Bristol, Avon;1;51.352659;-2.595793 The Red Lion Free House;East Chisenbury, Wiltshire;1;51.272674;-1.800565 The Royal Oak;Maidenhead, Berkshire;1;51.478019;-0.753044 The Sportsman;Whitstable, Kent;1;51.343921;0.958890 The Square;Mayfair, London;1;51.510770;-0.143986 The Star Inn;York, North Yorkshire;1;54.083105;-1.134909 The Tudor Room at Great Fosters;Egham, Surrey;1;51.417304;-0.544368 The Walnut Tree Inn;Abergavenny;1;51.843275;-2.963998 The West House;Kent;1;51.115195;0.642403 The Woodspeen;Newbury, Berkshire;1;51.416005;-1.353953 The Yorke Arms;Harrogate;1;54.134559;-1.819342 Thomas Carr @ The Olive Room;Ilfracombe, Devon;1;51.209536;-4.118844 Trinity;London;1;51.463498;-0.141512 Trishna;Marylebone, London;1;51.518342;-0.153094 Tyddyn Llan;North Wales;1;52.923599;-3.442263 Veeraswamy;Regent Street, London;1;51.510007;-0.137867 Whitebrook;Monmouth, Monmouthshire;1;51.759669;-2.686770 Wild Honey Inn;Lisdoonvarna, County Clare;1;53.028476;-9.295849 Wilks;Redland, Bristol;1;51.467545;-2.606788 Yauatcha Soho;London;1;51.513663;-0.135272 Ynyshir;Machynlleth, Powys;1;52.544703;-3.944577 """ from heapq import heappush, nsmallest def dist(p1, p2): p1x, p1y = p1 p2x, p2y = p2 return ((p1x - p2x)**2 + (p1y - p2y)**2) ** 0.5 # Find nearby Michelin restaurants starting from selected points (lat, lon) starting_points = [(52.770763, -3.626109), (53.167746, 0.285024), (55.684918, -3.197642)] for starting_point in starting_points: heap = [] for lines in data.split('\n')[1:-1]: restaurant_name, city, michelin_stars, latitude, longitude = lines.split(';') michelin_stars = int(michelin_stars) point = list(map(float, [latitude, longitude])) # A one-star restaurant at distance d from the starting point should have the same rank as a two-star restaurant at distance 2*d heappush(heap, (dist(starting_point, point) / michelin_stars, ', '.join([restaurant_name, city]))) print('Restaurants of interest at location %s:' % (str(starting_point))) print('\n'.join(list(map(lambda x: x[1], nsmallest(10, heap)))) + '\n') """ Restaurants of interest at location (52.770763, -3.626109): Tyddyn Llan, North Wales Ynyshir, Machynlleth, Powys The Checkers, Montgomery, Monmouthshire Sosban and The Old Butchers, Anglesey, Wales L’Enclume, Cartmel Nr Grange over Sands, Cumbria Fraiche, Birkenhead, Merseyside Simon Radley at The Chester Grosvenor, Chester, Cheshire Le Champignon Sauvage, Cheltenham, Gloucestershire Gidleigh Park, Devon The Fat Duck, Bray, Berkshire Restaurants of interest at location (53.167746, 0.285024): The Neptune, Norfolk Midsummer House, Cambridge, Cambridgeshire The Araki, Mayfair, London Alain Ducasse at The Dorchester, Mayfair, London Restaurant Gordon Ramsay, Chelsea, London The Waterside Inn, Bray, Berkshire The Fat Duck, Bray, Berkshire Morston Hall, Holt, Norfolk Restaurant Sat Bains with Rooms, Nottingham Sketch (The Lecture Room & Library), Mayfair, London Restaurants of interest at location (55.684918, -3.197642): Number One (at Balmoral Hotel), Edinburgh, Midlothian 21212, Edinburgh, Scotland Restaurant Martin Wishart, Edinburgh The Kitchin, Edinburgh Andrew Fairlie at Gleneagles, Auchterarder, Perthshire The Peat Inn, Scotland The Cellar, Anstruther, Fife L’Enclume, Cartmel Nr Grange over Sands, Cumbria The Raby Hunt, Summerhouse, County Durham Forest Side, Grasmere, Cumbria """