{ "cells": [ { "cell_type": "markdown", "id": "5f7c9658-c285-4854-96c0-e899fc55421b", "metadata": {}, "source": [ "# DM project: cheese" ] }, { "cell_type": "code", "execution_count": 1, "id": "7f4f2b89-8257-468c-9f5e-a77e11b8b8ff", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "from IPython.display import display, HTML\n", "from mlxtend.preprocessing import TransactionEncoder\n", "from mlxtend.frequent_patterns import apriori, association_rules\n", "from geopy.geocoders import Nominatim\n", "import matplotlib.pyplot as plt\n", "import time\n", "import tqdm.notebook as tqdm\n", "import random\n", "import json\n", "import os" ] }, { "cell_type": "code", "execution_count": 2, "id": "1a0afba8-692b-4377-a2ce-5114983e3bbb", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
cheeseurlmilkcountryregionfamilytypefat_contentcalcium_contenttexturerindcolorflavoraromavegetarianvegansynonymsalt_spellingsproducers
0Aarewasserhttps://www.cheese.com/aarewasser/cowSwitzerlandNaNNaNsemi-softNaNNaNbutterywashedyellowsweetbutteryFalseFalseNaNNaNJumi
1Abbaye de Bellochttps://www.cheese.com/abbaye-de-belloc/sheepFrancePays BasqueNaNsemi-hard, artisanNaNNaNcreamy, dense, firmnaturalyellowburnt caramellanolineTrueFalseAbbaye Notre-Dame de BellocNaNNaN
2Abbaye de Belvalhttps://www.cheese.com/abbaye-de-belval/cowFranceNaNNaNsemi-hard40-46%NaNelasticwashedivoryNaNaromaticFalseFalseNaNNaNNaN
3Abbaye de Citeauxhttps://www.cheese.com/abbaye-de-citeaux/cowFranceBurgundyNaNsemi-soft, artisan, brinedNaNNaNcreamy, dense, smoothwashedwhiteacidic, milky, smoothbarnyardy, earthyFalseFalseNaNNaNNaN
4Abbaye de Tamiéhttps://www.cheese.com/tamie/cowFranceSavoieNaNsoft, artisanNaNNaNcreamy, open, smoothwashedwhitefruity, nuttyperfumed, pungentFalseFalseNaNTamié, Trappiste de Tamie, Abbey of TamieNaN
............................................................
1182Sveciaosthttps://www.cheese.com/sveciaost/cowSwedenLow-laying regionsNaNsemi-hard, brined45%NaNcreamy, supplerindlesspale yellowacidicNaNFalseFalseNaNNaNNaN
1183Swaghttps://www.cheese.com/swag/goatAustraliaSouth AustraliaNaNfresh firm, artisanNaNNaNcreamy, crumblyash coatedwhiteacidic, creamyfreshTrueFalseNaNNaNWoodside Cheese Wrights
1184Swaledalehttps://www.cheese.com/swaledale/sheepEnglandSwaledale, North YorkshireNaNhardNaNNaNsemi firmNaNyellowsmooth, sweetfloralTrueFalseSwaledale Sheep CheeseNaNNaN
1185Sweet Style Swisshttps://www.cheese.com/sweet-style-swiss/NaNSwitzerlandNaNNaNsemi-hard, artisanNaNNaNfirm, supplewaxedNaNnuttynutty, sweetFalseFalseNaNNaNNaN
1186Swiss cheesehttps://www.cheese.com/swiss/cowUnited StatesNaNSwiss Cheesehard, artisan, processed7.8 g/100gNaNfirmrindlesspale yellownutty, sweetNaNTrueFalseAmerican Swiss CheeseNaNVarious
\n", "

1187 rows × 19 columns

\n", "
" ], "text/plain": [ " cheese url milk \\\n", "0 Aarewasser https://www.cheese.com/aarewasser/ cow \n", "1 Abbaye de Belloc https://www.cheese.com/abbaye-de-belloc/ sheep \n", "2 Abbaye de Belval https://www.cheese.com/abbaye-de-belval/ cow \n", "3 Abbaye de Citeaux https://www.cheese.com/abbaye-de-citeaux/ cow \n", "4 Abbaye de Tamié https://www.cheese.com/tamie/ cow \n", "... ... ... ... \n", "1182 Sveciaost https://www.cheese.com/sveciaost/ cow \n", "1183 Swag https://www.cheese.com/swag/ goat \n", "1184 Swaledale https://www.cheese.com/swaledale/ sheep \n", "1185 Sweet Style Swiss https://www.cheese.com/sweet-style-swiss/ NaN \n", "1186 Swiss cheese https://www.cheese.com/swiss/ cow \n", "\n", " country region family \\\n", "0 Switzerland NaN NaN \n", "1 France Pays Basque NaN \n", "2 France NaN NaN \n", "3 France Burgundy NaN \n", "4 France Savoie NaN \n", "... ... ... ... \n", "1182 Sweden Low-laying regions NaN \n", "1183 Australia South Australia NaN \n", "1184 England Swaledale, North Yorkshire NaN \n", "1185 Switzerland NaN NaN \n", "1186 United States NaN Swiss Cheese \n", "\n", " type fat_content calcium_content \\\n", "0 semi-soft NaN NaN \n", "1 semi-hard, artisan NaN NaN \n", "2 semi-hard 40-46% NaN \n", "3 semi-soft, artisan, brined NaN NaN \n", "4 soft, artisan NaN NaN \n", "... ... ... ... \n", "1182 semi-hard, brined 45% NaN \n", "1183 fresh firm, artisan NaN NaN \n", "1184 hard NaN NaN \n", "1185 semi-hard, artisan NaN NaN \n", "1186 hard, artisan, processed 7.8 g/100g NaN \n", "\n", " texture rind color flavor \\\n", "0 buttery washed yellow sweet \n", "1 creamy, dense, firm natural yellow burnt caramel \n", "2 elastic washed ivory NaN \n", "3 creamy, dense, smooth washed white acidic, milky, smooth \n", "4 creamy, open, smooth washed white fruity, nutty \n", "... ... ... ... ... \n", "1182 creamy, supple rindless pale yellow acidic \n", "1183 creamy, crumbly ash coated white acidic, creamy \n", "1184 semi firm NaN yellow smooth, sweet \n", "1185 firm, supple waxed NaN nutty \n", "1186 firm rindless pale yellow nutty, sweet \n", "\n", " aroma vegetarian vegan synonyms \\\n", "0 buttery False False NaN \n", "1 lanoline True False Abbaye Notre-Dame de Belloc \n", "2 aromatic False False NaN \n", "3 barnyardy, earthy False False NaN \n", "4 perfumed, pungent False False NaN \n", "... ... ... ... ... \n", "1182 NaN False False NaN \n", "1183 fresh True False NaN \n", "1184 floral True False Swaledale Sheep Cheese \n", "1185 nutty, sweet False False NaN \n", "1186 NaN True False American Swiss Cheese \n", "\n", " alt_spellings producers \n", "0 NaN Jumi \n", "1 NaN NaN \n", "2 NaN NaN \n", "3 NaN NaN \n", "4 Tamié, Trappiste de Tamie, Abbey of Tamie NaN \n", "... ... ... \n", "1182 NaN NaN \n", "1183 NaN Woodside Cheese Wrights \n", "1184 NaN NaN \n", "1185 NaN NaN \n", "1186 NaN Various \n", "\n", "[1187 rows x 19 columns]" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data=pd.read_csv(\"cheeses.csv\")\n", "data" ] }, { "cell_type": "markdown", "id": "bf3b548c-5ac4-4126-9ae9-5578ad158015", "metadata": {}, "source": [ "## Cleaning and pre-processing" ] }, { "cell_type": "code", "execution_count": 3, "id": "2018aac2-6f3d-489a-b5d0-90b7c7793076", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'brown', 'red', 'cream', 'pink and white', 'white', 'pale white', 'pale yellow', 'orange', 'straw', 'golden yellow', 'golden orange', nan, 'blue', 'yellow', 'blue-grey', 'ivory', 'brownish yellow', 'green'}\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
cheeseurlmilkcountryregionfamilytypefat_contentcalcium_contenttexturerindcolorflavoraromavegetarianvegansynonymsalt_spellingsproducers
10Acapellahttps://www.cheese.com/acapella/goatUnited StatesCaliforniaNaNsoft, soft-ripenedNaNNaNNaNNaNNaNbutteryfresh, herbalFalseFalseNaNNaNNaN
13Acornhttps://www.cheese.com/acorn/sheepUnited KingdomBethaniaNaNhard, artisan52%NaNcrumbly, firmNaNNaNburnt caramel, citrusy, herbaceousfruityTrueFalseNaNNaNNaN
19Afuega'l Pituhttps://www.cheese.com/afuegal-pitu/cowSpainAsturiasNaNsoft, artisanNaNNaNsmoothcloth wrappedNaNspicy, strongNaNFalseFalseNaNNaNNaN
48Alpe di Frabosahttps://www.cheese.com/alpe-di-frabosa/cowItalyNaNNaNsemi-softNaNNaNNaNNaNNaNbittermilky, mushroomFalseFalseNaNNaNNaN
50Alpicrèmehttps://www.cheese.com/alpicreme/goatFranceNaNNaNsoftNaNNaNNaNNaNNaNNaNNaNFalseFalseNaNNaNNaN
............................................................
1172Strathdon Bluehttps://www.cheese.com/strathdon-blue/cowScotlandTainBluesemi-softNaNNaNcreamyNaNNaNcreamy, spicyaromatic, richTrueFalseNaNNaNHighland Fine Cheeses Limited
1175String Cheesehttps://www.cheese.com/string/NaNNaNNaNNaNsemi-hardNaNNaNchewy, firm, stringyNaNNaNNaNNaNNaNNaNNaNNaNNaN
1177Sulgunihttps://www.cheese.com/sulguni/buffalo, cowGeorgiaSvaneti, SamegreloNaNsemi-firmNaNNaNdense, elasticNaNNaNsalty, smokey , sourNaNNaNNaNGeorgian Pickle CheeseMegruli Sulguni, Shebolili Megruli SulguniNaN
1181Sussex Slipcotehttps://www.cheese.com/sussex-slipcote/sheepEnglandNaNNaNsoftNaNNaNNaNNaNNaNsharpNaNTrueFalseNaNNaNHigh Weald Dairy
1185Sweet Style Swisshttps://www.cheese.com/sweet-style-swiss/NaNSwitzerlandNaNNaNsemi-hard, artisanNaNNaNfirm, supplewaxedNaNnuttynutty, sweetFalseFalseNaNNaNNaN
\n", "

142 rows × 19 columns

\n", "
" ], "text/plain": [ " cheese url \\\n", "10 Acapella https://www.cheese.com/acapella/ \n", "13 Acorn https://www.cheese.com/acorn/ \n", "19 Afuega'l Pitu https://www.cheese.com/afuegal-pitu/ \n", "48 Alpe di Frabosa https://www.cheese.com/alpe-di-frabosa/ \n", "50 Alpicrème https://www.cheese.com/alpicreme/ \n", "... ... ... \n", "1172 Strathdon Blue https://www.cheese.com/strathdon-blue/ \n", "1175 String Cheese https://www.cheese.com/string/ \n", "1177 Sulguni https://www.cheese.com/sulguni/ \n", "1181 Sussex Slipcote https://www.cheese.com/sussex-slipcote/ \n", "1185 Sweet Style Swiss https://www.cheese.com/sweet-style-swiss/ \n", "\n", " milk country region family \\\n", "10 goat United States California NaN \n", "13 sheep United Kingdom Bethania NaN \n", "19 cow Spain Asturias NaN \n", "48 cow Italy NaN NaN \n", "50 goat France NaN NaN \n", "... ... ... ... ... \n", "1172 cow Scotland Tain Blue \n", "1175 NaN NaN NaN NaN \n", "1177 buffalo, cow Georgia Svaneti, Samegrelo NaN \n", "1181 sheep England NaN NaN \n", "1185 NaN Switzerland NaN NaN \n", "\n", " type fat_content calcium_content texture \\\n", "10 soft, soft-ripened NaN NaN NaN \n", "13 hard, artisan 52% NaN crumbly, firm \n", "19 soft, artisan NaN NaN smooth \n", "48 semi-soft NaN NaN NaN \n", "50 soft NaN NaN NaN \n", "... ... ... ... ... \n", "1172 semi-soft NaN NaN creamy \n", "1175 semi-hard NaN NaN chewy, firm, stringy \n", "1177 semi-firm NaN NaN dense, elastic \n", "1181 soft NaN NaN NaN \n", "1185 semi-hard, artisan NaN NaN firm, supple \n", "\n", " rind color flavor \\\n", "10 NaN NaN buttery \n", "13 NaN NaN burnt caramel, citrusy, herbaceous \n", "19 cloth wrapped NaN spicy, strong \n", "48 NaN NaN bitter \n", "50 NaN NaN NaN \n", "... ... ... ... \n", "1172 NaN NaN creamy, spicy \n", "1175 NaN NaN NaN \n", "1177 NaN NaN salty, smokey , sour \n", "1181 NaN NaN sharp \n", "1185 waxed NaN nutty \n", "\n", " aroma vegetarian vegan synonyms \\\n", "10 fresh, herbal False False NaN \n", "13 fruity True False NaN \n", "19 NaN False False NaN \n", "48 milky, mushroom False False NaN \n", "50 NaN False False NaN \n", "... ... ... ... ... \n", "1172 aromatic, rich True False NaN \n", "1175 NaN NaN NaN NaN \n", "1177 NaN NaN NaN Georgian Pickle Cheese \n", "1181 NaN True False NaN \n", "1185 nutty, sweet False False NaN \n", "\n", " alt_spellings \\\n", "10 NaN \n", "13 NaN \n", "19 NaN \n", "48 NaN \n", "50 NaN \n", "... ... \n", "1172 NaN \n", "1175 NaN \n", "1177 Megruli Sulguni, Shebolili Megruli Sulguni \n", "1181 NaN \n", "1185 NaN \n", "\n", " producers \n", "10 NaN \n", "13 NaN \n", "19 NaN \n", "48 NaN \n", "50 NaN \n", "... ... \n", "1172 Highland Fine Cheeses Limited \n", "1175 NaN \n", "1177 NaN \n", "1181 High Weald Dairy \n", "1185 NaN \n", "\n", "[142 rows x 19 columns]" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "print(set(data[\"color\"]))\n", "data[pd.isnull(data[\"color\"])]" ] }, { "cell_type": "code", "execution_count": 4, "id": "a0a77563-518e-4808-b744-9fc0c76763fe", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1162\n", "939\n" ] } ], "source": [ "print(len(data[pd.isnull(data[\"calcium_content\"])]))\n", "print(len(data[pd.isnull(data[\"fat_content\"])]))" ] }, { "cell_type": "code", "execution_count": 5, "id": "c8489ffa-1067-4eb7-b65a-2fa18fdb4b04", "metadata": {}, "outputs": [], "source": [ "del data[\"alt_spellings\"]\n", "del data[\"producers\"]\n", "del data[\"calcium_content\"]\n", "del data[\"url\"]\n", "del data[\"fat_content\"]\n", "del data[\"synonyms\"]" ] }, { "cell_type": "code", "execution_count": 6, "id": "5379265a-cd49-41fa-845c-bfae33bb8f5a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
cheesemilkcountryregionfamilytypetexturerindcolorflavoraromavegetarianvegan
0AarewassercowSwitzerlandNaNNaNsemi-softbutterywashedyellowsweetbutteryFalseFalse
1Abbaye de BellocsheepFrancePays BasqueNaNsemi-hard, artisancreamy, dense, firmnaturalyellowburnt caramellanolineTrueFalse
2Abbaye de BelvalcowFranceNaNNaNsemi-hardelasticwashedivoryNaNaromaticFalseFalse
3Abbaye de CiteauxcowFranceBurgundyNaNsemi-soft, artisan, brinedcreamy, dense, smoothwashedwhiteacidic, milky, smoothbarnyardy, earthyFalseFalse
4Abbaye de TamiécowFranceSavoieNaNsoft, artisancreamy, open, smoothwashedwhitefruity, nuttyperfumed, pungentFalseFalse
..........................................
1182SveciaostcowSwedenLow-laying regionsNaNsemi-hard, brinedcreamy, supplerindlesspale yellowacidicNaNFalseFalse
1183SwaggoatAustraliaSouth AustraliaNaNfresh firm, artisancreamy, crumblyash coatedwhiteacidic, creamyfreshTrueFalse
1184SwaledalesheepEnglandSwaledale, North YorkshireNaNhardsemi firmNaNyellowsmooth, sweetfloralTrueFalse
1185Sweet Style SwissNaNSwitzerlandNaNNaNsemi-hard, artisanfirm, supplewaxedNaNnuttynutty, sweetFalseFalse
1186Swiss cheesecowUnited StatesNaNSwiss Cheesehard, artisan, processedfirmrindlesspale yellownutty, sweetNaNTrueFalse
\n", "

1187 rows × 13 columns

\n", "
" ], "text/plain": [ " cheese milk country region \\\n", "0 Aarewasser cow Switzerland NaN \n", "1 Abbaye de Belloc sheep France Pays Basque \n", "2 Abbaye de Belval cow France NaN \n", "3 Abbaye de Citeaux cow France Burgundy \n", "4 Abbaye de Tamié cow France Savoie \n", "... ... ... ... ... \n", "1182 Sveciaost cow Sweden Low-laying regions \n", "1183 Swag goat Australia South Australia \n", "1184 Swaledale sheep England Swaledale, North Yorkshire \n", "1185 Sweet Style Swiss NaN Switzerland NaN \n", "1186 Swiss cheese cow United States NaN \n", "\n", " family type texture \\\n", "0 NaN semi-soft buttery \n", "1 NaN semi-hard, artisan creamy, dense, firm \n", "2 NaN semi-hard elastic \n", "3 NaN semi-soft, artisan, brined creamy, dense, smooth \n", "4 NaN soft, artisan creamy, open, smooth \n", "... ... ... ... \n", "1182 NaN semi-hard, brined creamy, supple \n", "1183 NaN fresh firm, artisan creamy, crumbly \n", "1184 NaN hard semi firm \n", "1185 NaN semi-hard, artisan firm, supple \n", "1186 Swiss Cheese hard, artisan, processed firm \n", "\n", " rind color flavor aroma \\\n", "0 washed yellow sweet buttery \n", "1 natural yellow burnt caramel lanoline \n", "2 washed ivory NaN aromatic \n", "3 washed white acidic, milky, smooth barnyardy, earthy \n", "4 washed white fruity, nutty perfumed, pungent \n", "... ... ... ... ... \n", "1182 rindless pale yellow acidic NaN \n", "1183 ash coated white acidic, creamy fresh \n", "1184 NaN yellow smooth, sweet floral \n", "1185 waxed NaN nutty nutty, sweet \n", "1186 rindless pale yellow nutty, sweet NaN \n", "\n", " vegetarian vegan \n", "0 False False \n", "1 True False \n", "2 False False \n", "3 False False \n", "4 False False \n", "... ... ... \n", "1182 False False \n", "1183 True False \n", "1184 True False \n", "1185 False False \n", "1186 True False \n", "\n", "[1187 rows x 13 columns]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data" ] }, { "cell_type": "code", "execution_count": 7, "id": "633ed80e-e416-41f6-ae58-b86ce4c132af", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1181 rows remaining\n" ] } ], "source": [ "data=data.dropna(subset=[\"country\",\"region\"], how=\"all\")\n", "data=data.fillna(value={\"country\":\"\"})\n", "data=data.fillna(value={\"region\":\"\"})\n", "print(f\"{len(data)} rows remaining\")" ] }, { "cell_type": "markdown", "id": "fd66568f-78d4-4e1a-a91c-8ec483b4b03c", "metadata": {}, "source": [ "We removed 6 rows for which we could not find a suitable location. " ] }, { "cell_type": "code", "execution_count": 8, "id": "5a4c0e30-8535-498b-9a9e-0d7d232d4eb7", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
cheesemilkcountryregionfamilytypetexturerindcolorflavoraromavegetarianvegan
0AarewassercowSwitzerlandNaNsemi-softbutterywashedyellowsweetbutteryFalseFalse
1Abbaye de BellocsheepFrancePays BasqueNaNsemi-hard, artisancreamy, dense, firmnaturalyellowburnt caramellanolineTrueFalse
2Abbaye de BelvalcowFranceNaNsemi-hardelasticwashedivoryNaNaromaticFalseFalse
3Abbaye de CiteauxcowFranceBurgundyNaNsemi-soft, artisan, brinedcreamy, dense, smoothwashedwhiteacidic, milky, smoothbarnyardy, earthyFalseFalse
4Abbaye de TamiécowFranceSavoieNaNsoft, artisancreamy, open, smoothwashedwhitefruity, nuttyperfumed, pungentFalseFalse
..........................................
1182SveciaostcowSwedenLow-laying regionsNaNsemi-hard, brinedcreamy, supplerindlesspale yellowacidicNaNFalseFalse
1183SwaggoatAustraliaSouth AustraliaNaNfresh firm, artisancreamy, crumblyash coatedwhiteacidic, creamyfreshTrueFalse
1184SwaledalesheepEnglandSwaledale, North YorkshireNaNhardsemi firmNaNyellowsmooth, sweetfloralTrueFalse
1185Sweet Style SwissNaNSwitzerlandNaNsemi-hard, artisanfirm, supplewaxedNaNnuttynutty, sweetFalseFalse
1186Swiss cheesecowUnited StatesSwiss Cheesehard, artisan, processedfirmrindlesspale yellownutty, sweetNaNTrueFalse
\n", "

1181 rows × 13 columns

\n", "
" ], "text/plain": [ " cheese milk country region \\\n", "0 Aarewasser cow Switzerland \n", "1 Abbaye de Belloc sheep France Pays Basque \n", "2 Abbaye de Belval cow France \n", "3 Abbaye de Citeaux cow France Burgundy \n", "4 Abbaye de Tamié cow France Savoie \n", "... ... ... ... ... \n", "1182 Sveciaost cow Sweden Low-laying regions \n", "1183 Swag goat Australia South Australia \n", "1184 Swaledale sheep England Swaledale, North Yorkshire \n", "1185 Sweet Style Swiss NaN Switzerland \n", "1186 Swiss cheese cow United States \n", "\n", " family type texture \\\n", "0 NaN semi-soft buttery \n", "1 NaN semi-hard, artisan creamy, dense, firm \n", "2 NaN semi-hard elastic \n", "3 NaN semi-soft, artisan, brined creamy, dense, smooth \n", "4 NaN soft, artisan creamy, open, smooth \n", "... ... ... ... \n", "1182 NaN semi-hard, brined creamy, supple \n", "1183 NaN fresh firm, artisan creamy, crumbly \n", "1184 NaN hard semi firm \n", "1185 NaN semi-hard, artisan firm, supple \n", "1186 Swiss Cheese hard, artisan, processed firm \n", "\n", " rind color flavor aroma \\\n", "0 washed yellow sweet buttery \n", "1 natural yellow burnt caramel lanoline \n", "2 washed ivory NaN aromatic \n", "3 washed white acidic, milky, smooth barnyardy, earthy \n", "4 washed white fruity, nutty perfumed, pungent \n", "... ... ... ... ... \n", "1182 rindless pale yellow acidic NaN \n", "1183 ash coated white acidic, creamy fresh \n", "1184 NaN yellow smooth, sweet floral \n", "1185 waxed NaN nutty nutty, sweet \n", "1186 rindless pale yellow nutty, sweet NaN \n", "\n", " vegetarian vegan \n", "0 False False \n", "1 True False \n", "2 False False \n", "3 False False \n", "4 False False \n", "... ... ... \n", "1182 False False \n", "1183 True False \n", "1184 True False \n", "1185 False False \n", "1186 True False \n", "\n", "[1181 rows x 13 columns]" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data" ] }, { "cell_type": "code", "execution_count": 9, "id": "7ef7494b-ff08-40a5-890f-e0f718cf2842", "metadata": {}, "outputs": [], "source": [ "data.loc[data.country.str.contains(\"England, Great Britain, United Kingdom\")|data.country.str.contains(\"England, United Kingdom\"),\"country\"]=\"England\"\n", "data.loc[data.country.str.contains(\"Scotland\"),\"country\"]=\"Scotland\"\n", "data.loc[data.country.str.contains(\"Great Britain, United Kingdom, Wales\")|data.country.str.contains(\"United Kingdom, Wales\"),\"country\"]=\"Wales\"\n" ] }, { "cell_type": "code", "execution_count": 10, "id": "fb044984-c33c-492c-91a2-4e9fff29ceb3", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
indexcheesemilkcountryregionfamilytypetexturerindcolorflavoraromavegetarianvegan
00AarewassercowSwitzerlandNaNsemi-softbutterywashedyellowsweetbutteryFalseFalse
11Abbaye de BellocsheepFrancePays BasqueNaNsemi-hard, artisancreamy, dense, firmnaturalyellowburnt caramellanolineTrueFalse
22Abbaye de BelvalcowFranceNaNsemi-hardelasticwashedivoryNaNaromaticFalseFalse
33Abbaye de CiteauxcowFranceBurgundyNaNsemi-soft, artisan, brinedcreamy, dense, smoothwashedwhiteacidic, milky, smoothbarnyardy, earthyFalseFalse
44Abbaye de TamiécowFranceSavoieNaNsoft, artisancreamy, open, smoothwashedwhitefruity, nuttyperfumed, pungentFalseFalse
.............................................
11351182SveciaostcowSwedenLow-laying regionsNaNsemi-hard, brinedcreamy, supplerindlesspale yellowacidicNaNFalseFalse
11361183SwaggoatAustraliaSouth AustraliaNaNfresh firm, artisancreamy, crumblyash coatedwhiteacidic, creamyfreshTrueFalse
11371184SwaledalesheepEnglandSwaledale, North YorkshireNaNhardsemi firmNaNyellowsmooth, sweetfloralTrueFalse
11381185Sweet Style SwissNaNSwitzerlandNaNsemi-hard, artisanfirm, supplewaxedNaNnuttynutty, sweetFalseFalse
11391186Swiss cheesecowUnited StatesSwiss Cheesehard, artisan, processedfirmrindlesspale yellownutty, sweetNaNTrueFalse
\n", "

1140 rows × 14 columns

\n", "
" ], "text/plain": [ " index cheese milk country \\\n", "0 0 Aarewasser cow Switzerland \n", "1 1 Abbaye de Belloc sheep France \n", "2 2 Abbaye de Belval cow France \n", "3 3 Abbaye de Citeaux cow France \n", "4 4 Abbaye de Tamié cow France \n", "... ... ... ... ... \n", "1135 1182 Sveciaost cow Sweden \n", "1136 1183 Swag goat Australia \n", "1137 1184 Swaledale sheep England \n", "1138 1185 Sweet Style Swiss NaN Switzerland \n", "1139 1186 Swiss cheese cow United States \n", "\n", " region family type \\\n", "0 NaN semi-soft \n", "1 Pays Basque NaN semi-hard, artisan \n", "2 NaN semi-hard \n", "3 Burgundy NaN semi-soft, artisan, brined \n", "4 Savoie NaN soft, artisan \n", "... ... ... ... \n", "1135 Low-laying regions NaN semi-hard, brined \n", "1136 South Australia NaN fresh firm, artisan \n", "1137 Swaledale, North Yorkshire NaN hard \n", "1138 NaN semi-hard, artisan \n", "1139 Swiss Cheese hard, artisan, processed \n", "\n", " texture rind color flavor \\\n", "0 buttery washed yellow sweet \n", "1 creamy, dense, firm natural yellow burnt caramel \n", "2 elastic washed ivory NaN \n", "3 creamy, dense, smooth washed white acidic, milky, smooth \n", "4 creamy, open, smooth washed white fruity, nutty \n", "... ... ... ... ... \n", "1135 creamy, supple rindless pale yellow acidic \n", "1136 creamy, crumbly ash coated white acidic, creamy \n", "1137 semi firm NaN yellow smooth, sweet \n", "1138 firm, supple waxed NaN nutty \n", "1139 firm rindless pale yellow nutty, sweet \n", "\n", " aroma vegetarian vegan \n", "0 buttery False False \n", "1 lanoline True False \n", "2 aromatic False False \n", "3 barnyardy, earthy False False \n", "4 perfumed, pungent False False \n", "... ... ... ... \n", "1135 NaN False False \n", "1136 fresh True False \n", "1137 floral True False \n", "1138 nutty, sweet False False \n", "1139 NaN True False \n", "\n", "[1140 rows x 14 columns]" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data=data.drop(index=data[data[\"country\"].str.contains(\",\")].index)\n", "data=data.drop(index=data[data[\"country\"].str.contains(\" and \")].index)\n", "data.reset_index()" ] }, { "cell_type": "markdown", "id": "2f42c973-247a-4f51-947e-fbd76f8f12fc", "metadata": {}, "source": [ "We removed 41 cheeses because they can come froms several countries. " ] }, { "cell_type": "code", "execution_count": 11, "id": "59c4e6e7-d624-45a5-a9ea-eb375102b771", "metadata": {}, "outputs": [], "source": [ "data[\"location\"]=data[\"region\"]+\", \"+data[\"country\"]" ] }, { "cell_type": "code", "execution_count": 12, "id": "0dee0f25-4699-4e46-97d0-21bb36d9c603", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
cheesemilkcountryregionfamilytypetexturerindcolorflavoraromavegetarianveganlocation
0AarewassercowSwitzerlandNaNsemi-softbutterywashedyellowsweetbutteryFalseFalse, Switzerland
1Abbaye de BellocsheepFrancePays BasqueNaNsemi-hard, artisancreamy, dense, firmnaturalyellowburnt caramellanolineTrueFalsePays Basque, France
2Abbaye de BelvalcowFranceNaNsemi-hardelasticwashedivoryNaNaromaticFalseFalse, France
3Abbaye de CiteauxcowFranceBurgundyNaNsemi-soft, artisan, brinedcreamy, dense, smoothwashedwhiteacidic, milky, smoothbarnyardy, earthyFalseFalseBurgundy, France
4Abbaye de TamiécowFranceSavoieNaNsoft, artisancreamy, open, smoothwashedwhitefruity, nuttyperfumed, pungentFalseFalseSavoie, France
.............................................
1182SveciaostcowSwedenLow-laying regionsNaNsemi-hard, brinedcreamy, supplerindlesspale yellowacidicNaNFalseFalseLow-laying regions, Sweden
1183SwaggoatAustraliaSouth AustraliaNaNfresh firm, artisancreamy, crumblyash coatedwhiteacidic, creamyfreshTrueFalseSouth Australia, Australia
1184SwaledalesheepEnglandSwaledale, North YorkshireNaNhardsemi firmNaNyellowsmooth, sweetfloralTrueFalseSwaledale, North Yorkshire, England
1185Sweet Style SwissNaNSwitzerlandNaNsemi-hard, artisanfirm, supplewaxedNaNnuttynutty, sweetFalseFalse, Switzerland
1186Swiss cheesecowUnited StatesSwiss Cheesehard, artisan, processedfirmrindlesspale yellownutty, sweetNaNTrueFalse, United States
\n", "

1140 rows × 14 columns

\n", "
" ], "text/plain": [ " cheese milk country region \\\n", "0 Aarewasser cow Switzerland \n", "1 Abbaye de Belloc sheep France Pays Basque \n", "2 Abbaye de Belval cow France \n", "3 Abbaye de Citeaux cow France Burgundy \n", "4 Abbaye de Tamié cow France Savoie \n", "... ... ... ... ... \n", "1182 Sveciaost cow Sweden Low-laying regions \n", "1183 Swag goat Australia South Australia \n", "1184 Swaledale sheep England Swaledale, North Yorkshire \n", "1185 Sweet Style Swiss NaN Switzerland \n", "1186 Swiss cheese cow United States \n", "\n", " family type texture \\\n", "0 NaN semi-soft buttery \n", "1 NaN semi-hard, artisan creamy, dense, firm \n", "2 NaN semi-hard elastic \n", "3 NaN semi-soft, artisan, brined creamy, dense, smooth \n", "4 NaN soft, artisan creamy, open, smooth \n", "... ... ... ... \n", "1182 NaN semi-hard, brined creamy, supple \n", "1183 NaN fresh firm, artisan creamy, crumbly \n", "1184 NaN hard semi firm \n", "1185 NaN semi-hard, artisan firm, supple \n", "1186 Swiss Cheese hard, artisan, processed firm \n", "\n", " rind color flavor aroma \\\n", "0 washed yellow sweet buttery \n", "1 natural yellow burnt caramel lanoline \n", "2 washed ivory NaN aromatic \n", "3 washed white acidic, milky, smooth barnyardy, earthy \n", "4 washed white fruity, nutty perfumed, pungent \n", "... ... ... ... ... \n", "1182 rindless pale yellow acidic NaN \n", "1183 ash coated white acidic, creamy fresh \n", "1184 NaN yellow smooth, sweet floral \n", "1185 waxed NaN nutty nutty, sweet \n", "1186 rindless pale yellow nutty, sweet NaN \n", "\n", " vegetarian vegan location \n", "0 False False , Switzerland \n", "1 True False Pays Basque, France \n", "2 False False , France \n", "3 False False Burgundy, France \n", "4 False False Savoie, France \n", "... ... ... ... \n", "1182 False False Low-laying regions, Sweden \n", "1183 True False South Australia, Australia \n", "1184 True False Swaledale, North Yorkshire, England \n", "1185 False False , Switzerland \n", "1186 True False , United States \n", "\n", "[1140 rows x 14 columns]" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data" ] }, { "cell_type": "code", "execution_count": 13, "id": "e2e868d4-33a1-4602-af97-afb1d29e612f", "metadata": { "scrolled": true }, "outputs": [], "source": [ "locs=set(data[\"location\"])" ] }, { "cell_type": "code", "execution_count": 14, "id": "debb780e-ec13-4502-ac44-6001335e507d", "metadata": {}, "outputs": [], "source": [ "def str_to_gps(loc):\n", " l=loc.split(\",\")\n", " loc=\",\".join([l[0],l[-1]])# removing details gives less errors while fetching the GPS coordinates\n", " try:\n", " res=Nominatim(user_agent=\"dmProject\").geocode(loc) \n", " return (res.latitude, res.longitude)\n", " except AttributeError:\n", " loc=l[-1]\n", " res=Nominatim(user_agent=\"dmProject\").geocode(loc) \n", " return (res.latitude, res.longitude)" ] }, { "cell_type": "code", "execution_count": 15, "id": "eed3ac7b-5283-4d8e-bc26-61e1d821ccaf", "metadata": {}, "outputs": [], "source": [ "if not os.path.isfile(\"locations_to_gps.json\"):\n", " locations_to_gps={}\n", " errors=set()\n", " for loc in tqdm.tqdm(locs):\n", " time.sleep(1)\n", " try:\n", " locations_to_gps[loc]=str_to_gps(loc)\n", " print(loc, locations_to_gps[loc])\n", " except AttributeError:\n", " print(loc, \"ERROR\")\n", " errors.add(loc)\n", " with open(\"locations_to_gps.json\", \"w\") as f:\n", " json.dump(locations_to_gps, f)\n", "else: \n", " with open(\"locations_to_gps.json\") as f:\n", " locations_to_gps=json.load(f)\n", " errors=set()" ] }, { "cell_type": "code", "execution_count": 16, "id": "a6966ac7-7a69-4829-8588-d10f85ea98a4", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{'Galax, Virginia, United States': [36.6612387, -80.9239671], 'Northeastern Brazil, Brazil': [-10.3333333, -53.2], 'Tieton, Washington, United States': [46.7020686, -120.75535], 'Central Balkan Mountains, Bulgaria': [42.6073975, 25.4856617], 'Postel, Belgium': [51.2874865, 5.1897863], ', Netherlands': [52.2434979, 5.6343227], 'Äänekoski, Finland': [62.6032186, 25.7301361], 'New Hampshire, United States': [43.4849133, -71.6553992], 'Friuli Venezia Giulia and Veneto, Italy': [42.6384261, 12.674297], 'County Cavan, Ireland': [54.03497495, -7.2937022825583675], 'Charentes-Poitou, France': [45.4039367, 0.3756199], 'Veneto, ': [45.6476663, 11.8665254], 'Lazio, Sardinia, Italy': [41.9808038, 12.7662312], 'Fairview, United States': [40.6333724, -90.1637318], 'County Wexford, Ireland': [52.46018745, -6.606515459159162], 'Southwestern Wisconsin, United States': [42.53116075, -90.43762550236468], 'Co. Carlow, Ireland': [52.69078865, -6.825145150844913], 'West Pawlet, VT, United States': [43.356893, -73.24966776033015], 'Passendale, Belgium': [50.9003015, 3.0203891], 'Serra da Estrela, Portugal': [40.4358994, -7.516865473467464], 'Centre-Val de Loire, France': [47.5490251, 1.7324062], \"Lucerne, Schwyz, Unterwald, and Zoug, and the following additional places: Muri district in d'Argovi, Switzerland\": [47.0505452, 8.3054682], 'Bjurholm, Sweden': [63.966667, 19.0], 'Po valley region, Italy': [42.6384261, 12.674297], 'Wales, Great Britain': [53.28236125, -3.8286207326666837], ', Denmark': [55.670249, 10.3333283], 'Asiago, Italy': [45.8753771, 11.5106998], 'Flanders, Belgium': [51.096246199999996, 4.178629103169916], 'Languedoc, France': [43.65420305, 3.674669940206605], 'Brickhill, Co. Clare, Ireland': [52.70642975, -8.751786760846851], 'Ontario, Canada': [50.000678, -86.000977], ', Armenia': [4.491976149999999, -75.74135085294314], 'Mornington Peninsula, Melbourne, Australia': [-38.3312575, 145.08106868543985], 'Bergues, France': [50.9683886, 2.4325247], 'Pesaro-Urbino, Italy': [43.694112700000005, 12.701443660480004], 'Cheshire, England': [53.2141028, -2.471770086071205], 'Indiana, United States': [40.3270127, -86.1746933], 'Rhone-Alps, France': [45.2968119, 4.6604809], 'Stranraer, Scotland': [54.9044332, -5.026204], 'Seattle, Washington, United States': [47.6038321, -122.330062], 'St. Gallen (canton), Tufertschwil, Switzerland': [47.1561047, 9.338323], 'South East England, United Kingdom': [51.45115235, -0.9935673736185868], 'Lombardy, Italy': [45.5703694, 9.7732524], 'Utah, United States': [39.4225192, -111.714358], 'Illinois, United States': [40.0796606, -89.4337288], ', Wales': [52.2928116, -3.73893], 'Low-laying regions, Sweden': [59.6749712, 14.5208584], 'Avesnes, France': [50.5495906, 1.9721295], ', Middle East': [39.3014159, -76.5888477], 'Midi-Pyrenees, France': [43.8099068, 1.4344926056549236], 'Southern California, United States': [34.169262950000004, -116.787448181486], 'Piedmont, Italy': [45.060735, 7.923549], 'California, United States': [36.7014631, -118.755997], 'Gloucestershire, England': [51.7643786, -2.1880661838719386], 'North Wootton, England': [52.7923213, 0.4278194], 'Severn Valley, England': [52.454530899999995, -2.3755702502240226], 'Extremadura, Spain': [39.1748426, -6.1529891], 'Cumbrian, United Kingdom': [54.478530449999994, -3.06553306667584], 'Lebanon, CT, United States': [40.375713, -76.4626118], 'Lodi, Italy': [45.2613104, 9.491678060021837], 'Websterville, VT, United States': [44.162985, -72.47576806895253], 'Swabia, Germany': [48.15313125, 10.47129100603846], 'Stewarton, Scotland': [55.680265, -4.5153023], 'Oxfordshire, Great Britain': [51.7412674, -1.2245951], 'Ballarat, Victoria, Australia': [-37.5623013, 143.8605645], 'old Liburnia (Dalmatia), Croatia': [45.3658443, 15.6575209], 'Orkney Isles, Scotland': [56.7861112, -4.1140518], 'Puimichel in Provence Alpes, France': [46.603354, 1.8883335], ', Israel': [30.8124247, 34.8594762], 'Port Townsend, United States': [48.1179702, -122.769544], ', Iraq': [33.0955793, 44.1749775], ', Greece': [38.9953683, 21.9877132], 'Greensboro, VT, United States': [36.0726355, -79.7919754], 'Cornwall, England': [50.443348900000004, -4.62465658489158], 'South West England, England': [51.50076785, -2.5503106339491204], 'Pembrokeshire, United Kingdom': [51.8339209, -4.916667], 'Northern Holland, Netherlands': [52.2434979, 5.6343227], 'Prince Edward Island, Canada': [46.3355508, -63.1466676], 'Central and Western Macedonia, Thessalia, Greece': [38.9953683, 21.9877132], 'Richfield, Wisconsin, United States': [44.8766431, -93.2877877], 'Burgundy, France': [47.27808725, 4.222486304306048], 'Pokolbin, Hunter Valley, Australia': [-32.7792106, 151.2978747], 'Cotswolds, England': [51.7489422, -0.2303579], 'Beara Peninsula, Co. Cork, Ireland': [51.7280451, -9.767906428362338], 'County Tipperary, Clogheen, Ireland': [52.68482145, -7.898147186112796], 'Ceredigion, United Kingdom': [52.2945764, -3.9527809990291427], 'Dorset, England': [50.79683685, -2.34473226124306], 'Maine, United States': [45.709097, -68.8590201], ', Switzerland': [46.7985624, 8.2319736], 'Bethania, United Kingdom': [52.2509586, -4.0888576], 'Laruns, France': [42.9882368, -0.4266324], ', Sweden': [59.6749712, 14.5208584], 'St. Louis, Missouri, United States': [38.6280278, -90.1910154], 'Moliterno, Italy': [40.2423024, 15.868903], 'Minas Gerais, Brazil': [-18.5264844, -44.1588654], 'Troyes , Aube, France': [48.2971626, 4.0746257], 'Veneto, Trentino, Italy': [45.6476663, 11.8665254], 'Lincolnshire, England': [53.1823034, -0.2031208542548153], 'Co. Offaly, Ireland': [53.13617215, -7.810340751784169], 'Quebec, Canada': [52.4760892, -71.8258668], 'Allgau, Germany': [47.8241593, 11.6822424], ', Hungary': [47.1817585, 19.5060937], 'Marathon, NY, United States': [44.8914036, -89.7748098], 'Timsbury, Somerset, Scotland': [56.7861112, -4.1140518], 'Petaluma, California, United States': [38.2325829, -122.636465], 'Landford, England': [50.9700788, -1.6363792], 'Piora Valley, Switzerland': [46.7985624, 8.2319736], 'Burgund, France': [47.27808725, 4.222486304306048], 'Wigtownshire, Scotland': [54.9042579, -5.0248893], 'Macedonia, Thrace, Thessalia, Peloponissos, Ionian Islands, Aegean islands, Crete Island and Epirus, Greece': [40.6186482, 22.91795361795959], ', Australia': [-24.7761086, 134.755], 'Staffordshire, England': [52.824694199999996, -2.0074546723348115], 'Haute Vienne, France': [45.91901925, 1.203176771876291], 'Alba, Italy': [44.7007236, 8.0357786], 'Campania, Italy': [40.860672, 14.843984], 'Taxco, Mexico': [18.5565446, -99.6052838], 'New York, United States': [40.7127281, -74.0060152], 'Svaneti, Samegrelo, Georgia': [42.63545205, 42.24871384619953], 'East Midlands, England': [53.1188177, -1.2597068974971675], 'Fornells de la Selva, Gironès, Spain': [41.9319675, 2.8090343], 'North Cornwall, England': [51.7561518, 0.4645198], 'Colorado, United States': [38.7251776, -105.607716], 'Nicasio, United States': [38.0615885, -122.6985975], ', Brazil': [-10.3333333, -53.2], 'Pyrenees, France': [48.8738565, 2.3852638], 'Derbyshire, Leicestershire, Nottinghamshire, England': [53.1185033, -1.5566179305872214], 'Québec, Canada': [52.4760892, -71.8258668], 'Manitoba, Canada': [55.001251, -97.001038], 'Auvergne, Salers, France': [45.2968119, 4.6604809], 'Upper Corsica, France': [46.603354, 1.8883335], 'Setubal, Palmela and Sesimbra, Portugal': [38.5241783, -8.8932341], 'Roncq, France': [50.7531232, 3.1209016], 'Oregon Coast Range, United States': [39.7837304, -100.445882], ', Mexico': [23.6585116, -102.0077097], 'Roxburghshire, Scotland': [56.7861112, -4.1140518], 'Tipperary, Ireland': [52.4734839, -8.1614446], 'Wisconsin, United States': [44.4308975, -89.6884637], 'Mankato, MN, United States': [44.1634663, -93.9993505], 'Devon, England': [50.724140500000004, -3.6607788161410735], 'Kimball, United States': [41.1881305, -103.6997645], 'Brooklyn NY, United States': [40.6526006, -73.9497211], 'Northern Wisconsin, United States': [44.94725995, -91.39373410986752], 'All Holland, Netherlands': [52.4601118, 4.6056526], 'Tuscany, Italy': [43.4586541, 11.1389204], 'Avila, Spain': [40.656478, -4.7002172], 'Belvederis, Lithuania': [55.0820118, 23.3897023], 'Naples, Italy': [40.8358846, 14.2487679], 'Galicia, Spain': [42.61946, -7.863112], 'Castelo Branco, Fundão and Idanha-a-Nova, Portugal': [39.97675825, -7.446059929966704], 'Pullman, Washington, United States': [46.7304268, -117.173895], 'Aveyron, France': [44.315857449999996, 2.5065697302419823], 'Ann Arbor, Michigan, United States': [42.2813722, -83.7484616], 'Oregon, United States': [43.9792797, -120.737257], ', Austria': [47.59397, 14.12456], 'Bregenzerwald, Kleinwalsertal, Großwalsertal, Laiblachtal (Pfänderstock) and Rheintal, Austria': [47.387028799999996, 9.95606355528393], 'Airedale farming district, New Zealand': [-41.5000831, 172.8344077], 'Cevenes, France': [44.3509309, 3.8584812791602983], 'massif des Causses, France': [46.603354, 1.8883335], 'Stawley, near Wellington, Somerset, England': [50.9961449, -3.3382702], 'Canary Islands, Spain': [28.286398900000002, -16.796011808910734], 'Timsbury, Somerset, England': [51.3271927, -2.4755923], 'Anjou, France': [45.3462, 4.88149], 'Co Limerick, Ireland': [52.518831649999996, -8.795834650292788], 'Coquet, England': [54.88091196980861, -1.5495607774216265], 'Modena, Italy': [44.5384728, 10.935960870530739], 'Herefordshire, West Midlands, United Kingdom': [52.083333, -2.75], 'Dalmatia, Croatia': [43.538796500000004, 16.175235566874342], 'Gloucestershire County, England': [51.9425914, -2.100154122305389], 'Prince Edward County, Ontario, Canada': [44.031827, -77.246933], 'Karlovy Vary, Czech Republic': [50.2306216, 12.8701437], ', Canada': [61.0666922, -107.991707], ', Afghanistan': [33.7680065, 66.2385139], ', Portugal': [39.6621648, -8.1353519], 'Chirac, France': [45.9140138, 0.6548543], 'Allgäu, Germany': [47.5926009, 10.209156], 'Ile de France, France': [48.6443057, 2.7537863], 'French Basque Country, Midi-Pyrénées, France': [46.603354, 1.8883335], 'St Antoine, France': [44.0361186, 0.8397552], ', Spain': [39.3260685, -4.8379791], 'Charentes, France': [45.4039367, 0.3756199], 'Béarnaise in Pyrénées-Atlantique, France': [46.603354, 1.8883335], 'Emilia-Romagna, Italy': [44.525696, 11.039437], 'Kinfauns, Perthshire, Scotland': [56.3822607, -3.36565], 'Bas-Languedoc, Comtat Venaissin, France': [43.687621, 4.2691037], 'Piave Valley, Italy, Italy': [45.735099578237005, 7.320173335891282], 'North East Victoria, Australia': [-37.8633951, 145.0100994], 'Brittany, France': [48.2640845, -2.9202408], 'Fethard, Co Tipperary, Ireland': [52.467222, -7.691111], 'Castilla Leon, Spain': [40.4598868, -3.4720773], 'Carneros, Sonoma, California, United States': [33.223027, -111.70568456233669], 'Loire Valley, France': [47.44927715, -0.34954901296919916], 'Bermondsey, London, England': [51.4970125, -0.063268], 'Bursa, Turkey': [39.9895878, 28.8944669], 'Centre , the department of Loiret, France': [47.5490251, 1.7324062], ', Argentina': [-34.9964963, -64.9672817], 'Pays Basque, France': [47.6867895, 7.3927627], 'Vermont, United States': [44.5990718, -72.5002608], 'Carmarthenshire, Wales': [51.893669849999995, -4.217282721429928], 'Island of Pag, Croatia': [45.3658443, 15.6575209], 'Sebastopol, California, United States': [38.4021038, -122.824222], 'Friuli-Venezia Giulia, Italy': [46.151042, 13.055904], ', Turkey': [39.294076, 35.2316631], 'Schoonrewoerd, Leerdam, Netherlands': [51.920458, 5.1156505], 'Asturias, Spain': [43.3133868, -5.94192], 'Ile-de-France/Champagne, France': [48.5499833, 7.7510775], 'island wide, Cyprus': [34.9174159, 32.889902651331866], 'Rhône-Alpes, France': [45.3175313, 5.721294352585611], 'Aberdeenshire, Scotland': [57.166667, -2.666667], 'Co. Cork, Ireland': [51.917535900000004, -8.58597726870895], 'Oristano, Italy': [40.02656765, 8.679641647435716], 'Zasavica, Serbia': [44.9454307, 19.4987239], 'North Yorkshire, England': [54.13453275, -1.498628491239545], ', Italy': [42.6384261, 12.674297], 'Orkney Islands, Scotland': [58.94182309999999, -3.129694439563327], 'Croisy-sur-Eure, France': [49.0291802, 1.346505], 'Swaledale, North Yorkshire, England': [54.38299324007608, -1.9841360652878535], 'Canton of Glarus, Switzerland': [46.7985624, 8.2319736], 'Pyrenees-Atlantiques, France': [43.18718655, -0.728247400084667], 'Pyrénées, France': [48.8738565, 2.3852638], 'Valencia, Spain': [39.4697065, -0.3763353], 'East Sussex, United Kingdom': [50.9404266, 0.3699977891068864], ', Serbia': [44.024322850000004, 21.07657433209902], 'Oviken, Sweden': [62.9974877, 14.3928671], 'Aquitaine, France': [44.24620635, -0.18399787392367906], 'Dumfriesshire, Scotland': [55.166667, -3.5], 'Huizen, Netherlands': [52.2958122, 5.2567209], 'Leiden, Netherlands': [52.1594747, 4.4908843], 'Gevrey-Chambertin, Burgundy, France': [47.2261857, 4.9705666], 'Azores, Portugal': [37.80855645, -25.473137391245295], 'Dumfries, Scotland': [55.0691397, -3.6107936], 'Rhone Valley, France': [46.603354, 1.8883335], 'Blarney, Ireland': [51.9325233, -8.5678665], 'British Columbia, Canada': [55.001251, -125.002441], 'Castile-Leon, Spain': [41.55005, -5.1387401], 'Illoud (Haute-Marne), France': [48.2089823, 5.5615126], 'Pienza, Italy': [43.0765485, 11.6789076], 'Averyon, France': [46.603354, 1.8883335], 'Banks Peninsular in Canterbury, New Zealand': [-41.5000831, 172.8344077], 'Pyrénées-Atlantiques, France': [43.18718655, -0.728247400084667], 'Hamilton, New Zealand': [-37.7878809, 175.281788], 'New South Wales, Australia': [-31.8759835, 147.2869493], 'Savoie, France': [45.494895150000005, 6.384660381375652], 'Tomales, California, United States': [38.2468075, -122.90630461024097], 'Wallonia, Belgium': [50.154540049999994, 5.399359762971196], 'Aveyron, Laguiole, France': [44.315857449999996, 2.5065697302419823], ', United States': [39.7837304, -100.445882], 'Banon, France': [44.0381752, 5.6296701], 'Emilia Romagna, Italy': [44.525696, 11.039437], 'Wales, London, Wales': [52.41446365, -4.0685073132923], 'New York, France': [44.8705067, -0.5504343], 'Veneto, Italy': [45.6476663, 11.8665254], 'Pays d’Auge, Normandy, France': [49.0356178, 0.1573083324015645], 'Gâtinais, France': [48.15497515, 2.811419156673292], 'Co Clare, Ireland': [52.857257450000006, -8.937435925994537], 'Gravina in Puglia, Murgia, Italy': [40.819725, 16.422779], 'Gippsland, Victoria, Australia': [-37.87448275, 146.9111788341666], 'Monterey, California, United States': [36.2231079, -121.387742], ', Germany': [51.1638175, 10.4478313], ', Mongolia': [46.8250388, 103.8499736], 'Serra da Canastra, Minas Gerais state, Brazil': [-20.1615, -46.76365461658604], 'Pinconning, Michigan, United States': [43.853633, -83.964987], 'Co. Mayo, Ireland': [53.9087056, -9.298304863654256], 'Västra Götaland, Sweden': [58.215850200000006, 12.651820794914073], 'Somerset, England': [51.161750850000004, -3.0753867062227487], 'Carrigtwohill, ': [51.9094617, -8.2611809], 'Calabria, Italy': [39.0565974, 16.5249864], 'Bavaria, Germany': [48.9467562, 11.4038717], ', United Kingdom': [54.7023545, -3.2765753], ', Poland': [52.215933, 19.134422], 'Sulzberg, Austria': [47.52121792021591, 9.91273065974192], ', Mauritania': [20.2540382, -9.2399263], 'Piemonte, Italy': [45.060735, 7.923549], 'Franche Comté, France': [48.68347355, 2.1776625116070027], 'Beira Baixa Province, Portugal': [39.6621648, -8.1353519], 'Valpadana, Italy': [39.60288591417616, 16.626802703803317], 'Carrigtwohill, Ireland': [51.9094617, -8.2611809], 'Maribo, Denmark': [54.7758018, 11.5054333], 'South West England, United Kingdom': [51.0339991, -2.949011916021195], 'Basque, Pyrenees Mountains, France': [45.359277750000004, -1.1480053453043046], 'Crotone, Italy': [39.1873894, 16.87828188895307], 'Provence, France': [44.0580563, 6.0638506], 'province of Brittany, France': [46.603354, 1.8883335], 'Campania, Paestum, Foggia, Italy': [40.860672, 14.843984], 'Shelburne Farms, United States': [34.89046225, -82.24340593189123], 'Treviso, Veneto, Italy': [45.806691349999994, 12.206315763116372], 'Missouri, United States': [38.7604815, -92.5617875], 'Georgia, United States': [32.3293809, -83.1137366], 'North East Victoria, ': [54.699881, -1.6031519], 'Tasmania, Australia': [-42.035067, 146.6366887], 'Amou, Gascony, France': [43.59266, -0.7475291], 'Normandy, France': [49.0677708, 0.3138532], 'County Carlow, Ireland': [52.69078865, -6.825145150844913], 'Berry, France': [44.5760186, 0.3095833], 'Inagh, Co Clare, Ireland': [52.9071704, -9.2345138], 'Mols, Denmark': [56.187042, 10.460782482125193], 'Odell, Bedfordshire, England': [52.21843025, -0.5921260787763352], 'Pembrokeshire, Wales': [51.8339209, -4.916667], 'Comox Valley, Vancouver Island, Canada': [49.670981, -125.0353253], 'Provencale, France': [43.7899311033635, 7.524017533510311], 'Milford, NJ, United States': [41.2222218, -73.0570603], 'Carnia, Italy': [46.3738716, 13.1339829], 'Northwest, United States': [34.3129464, -78.1611077], 'Auvergne, France': [45.2968119, 4.6604809], 'Friuli-Venezia Giulia and the Veneto, Italy': [42.6384261, 12.674297], ', New Zealand': [-41.5000831, 172.8344077], 'Adamstown, Co Wexford, Ireland': [53.3360017, -6.4692321], 'Castille-Leon, Spain': [41.55005, -5.1387401], 'Murazzano, Italy': [44.4746494, 8.0213361], 'Massachusetts, United States': [42.3788774, -72.032366], 'Haute-Savoie / Upper Savoy, France': [46.06904065, 6.344532137164], ', Belgium': [50.6402809, 4.6667145], 'Kent, United Kingdom': [51.20707485, 0.7210361813401444], 'Landshut, Germany': [48.536217, 12.1516551], 'Brisbane, Australia': [-27.4689682, 153.0234991], 'Allgaeu Alps, Germany': [51.1638175, 10.4478313], 'Aconcagua, Chile': [-33.030515957094444, -71.5177984276482], 'Rio Grande do Sul, Brazil': [-29.8425284, -53.7680577], 'Menorca, Balearic Islands, Spain': [39.949257200000005, 4.0499641751186415], 'Isere, France': [45.28979315, 5.634382477386232], 'Stoneyford, Ireland': [52.5362671, -7.2278963], 'Loire, France': [45.75385355, 4.045473682551104], 'Cotherstone, England': [54.570244, -1.9804176], ', England': [52.5310214, -1.2649062], 'Jura, Switzerland': [47.3566699, 7.1598893], 'Charm, Ohio, United States': [40.5067308, -81.7848553], 'Chelmarsh, Bridgnorth, Shropshire, England': [52.4875359, -2.4124407], 'West Bengal, India': [22.9964948, 87.6855882], 'County Antrim, Ireland': [54.864725500000006, -6.143637910742768], ', France': [46.603354, 1.8883335], 'Pennsylvania, United States': [40.9699889, -77.7278831], 'Stonegate, East Sussex, England': [53.960910892985034, -1.0833748506182423], 'Gujarat, India': [22.3850051, 71.745261], ', Cyprus': [34.9174159, 32.889902651331866], 'Vorarlberg, Austria': [47.25, 9.9166667], 'Poitou-Charentes, France': [46.13244785, -0.15455354898441043], 'Larzac, France': [44.74693, 1.0075], 'Sonoma, California, United States': [38.5110803, -122.8473388], 'Midi-Pyrénées, France': [43.8099068, 1.4344926056549236], 'Corsica, France': [42.188089649999995, 9.068413771427695], 'Coast of Oregon, United States': [39.7837304, -100.445882], 'Kilmallock County Limerick, Ireland': [52.400645600000004, -8.571161660434711], 'Greenville, Indiana, United States': [34.851354, -82.3984882], 'Romanian Carpathians, Romania': [46.4046483, 22.9894841933513], 'Basilicata, Italy': [40.500571, 16.081953], 'Lower Normandy, France': [48.953684499999994, -0.573365358805311], 'Lapland, Finland': [67.69291045, 26.728214183162986], 'Normandy, Auvilliers, France': [49.0677708, 0.3138532], 'Languedoc-Roussillon, France': [43.65420305, 3.674669940206605], 'Allagau, Bavarian Alps, Germany': [51.1638175, 10.4478313], 'Buxton, Derbyshire, England': [53.2593422, -1.9100768], 'Bornholm, Denmark': [55.143122399999996, 14.922629658767558], 'Bloomdale, United States': [33.2473378, -96.6794382], 'Cornwall, ': [50.416667, -4.75], 'Barcelona, Spain': [41.3828939, 2.1774322], 'Hunter Valley, Australia': [-32.5421803, 151.2185641], 'North Carolina, United States': [35.6729639, -79.0392919], 'Laqueuille, France': [45.6507627, 2.7320917], 'Minnesota, United States': [45.9896587, -94.6113288], 'Sardinia & Campania, Italy': [42.6384261, 12.674297], 'South Australia, Australia': [-30.5343665, 135.6301212], 'Central and Western Macedonia, Thessaly, Greece': [38.9953683, 21.9877132], ', Ireland': [52.865196, -7.9794599], 'NY, United States': [43.1561681, -75.8449946], 'Bourgogne, France': [47.27808725, 4.222486304306048], 'Virginia, United States': [37.1232245, -78.4927721], 'Póvoa de Lanhoso, Portugal': [41.5759516, -8.2699521], 'Colby, Wisconsin, United States': [44.5684775, -69.66002565150262], 'Lanarkshire, Scotland': [55.5752966, -3.833333], 'Herault, France': [43.591422, 3.3553309364095925], ', Scotland': [56.7861112, -4.1140518], 'Murcia, Spain': [37.9923795, -1.1305431], 'La Velle, Wisconsin, United States': [45.1699553, -109.88428658948227], 'Ann Arbor, MI, United States': [42.2813722, -83.7484616], 'New Jersey, United States': [40.0757384, -74.4041622], 'Duhallow, Ireland': [52.1837912, -9.00609563330653], ', Iceland': [64.9841821, -18.1059013], 'Iowa, United States': [41.9216734, -93.3122705], 'Queenstown, New Zealand': [-45.0321923, 168.661], 'Tain, Scotland': [57.8119372, -4.0550663], 'Sardegna, Italy': [40.0912813, 9.0305773], 'Nottinghamshire, England': [53.1459288, -1.0214971168122484], 'Peekskill, United States': [41.289811, -73.9204922], 'Fife, Scotland': [56.3333331, -3.0000001], 'Umbria, Lazio, Italy': [42.965916, 12.490236], 'Nord-Pas-de-Calais, France': [50.5289634, 2.454515765955904], 'Victoria, Australia': [-36.5986096, 144.6780052], 'Het Groene Hart, Netherlands': [51.5246, 4.280818038775446], 'Inagh, Co Clare, ': [52.9071704, -9.2345138], ', Holland': [52.2434979, 5.6343227]}\n" ] } ], "source": [ "print(locations_to_gps)" ] }, { "cell_type": "code", "execution_count": 17, "id": "204d1446-e58f-4585-8ac0-7466930e4291", "metadata": {}, "outputs": [], "source": [ "latitudes, longitudes=[],[]\n", "for i,value in enumerate(data.location):\n", " latitudes.append(locations_to_gps[value][0])\n", " longitudes.append(locations_to_gps[value][1])\n", "data[\"latitude\"]=latitudes\n", "data[\"longitude\"]=longitudes" ] }, { "cell_type": "code", "execution_count": 18, "id": "0e10c205-7492-489d-8404-da10c8a6a487", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
cheesemilkcountryregionfamilytypetexturerindcolorflavoraromavegetarianveganlocationlatitudelongitude
0AarewassercowSwitzerlandNaNsemi-softbutterywashedyellowsweetbutteryFalseFalse, Switzerland46.7985628.231974
1Abbaye de BellocsheepFrancePays BasqueNaNsemi-hard, artisancreamy, dense, firmnaturalyellowburnt caramellanolineTrueFalsePays Basque, France47.6867907.392763
2Abbaye de BelvalcowFranceNaNsemi-hardelasticwashedivoryNaNaromaticFalseFalse, France46.6033541.888334
3Abbaye de CiteauxcowFranceBurgundyNaNsemi-soft, artisan, brinedcreamy, dense, smoothwashedwhiteacidic, milky, smoothbarnyardy, earthyFalseFalseBurgundy, France47.2780874.222486
4Abbaye de TamiécowFranceSavoieNaNsoft, artisancreamy, open, smoothwashedwhitefruity, nuttyperfumed, pungentFalseFalseSavoie, France45.4948956.384660
...................................................
1182SveciaostcowSwedenLow-laying regionsNaNsemi-hard, brinedcreamy, supplerindlesspale yellowacidicNaNFalseFalseLow-laying regions, Sweden59.67497114.520858
1183SwaggoatAustraliaSouth AustraliaNaNfresh firm, artisancreamy, crumblyash coatedwhiteacidic, creamyfreshTrueFalseSouth Australia, Australia-30.534367135.630121
1184SwaledalesheepEnglandSwaledale, North YorkshireNaNhardsemi firmNaNyellowsmooth, sweetfloralTrueFalseSwaledale, North Yorkshire, England54.382993-1.984136
1185Sweet Style SwissNaNSwitzerlandNaNsemi-hard, artisanfirm, supplewaxedNaNnuttynutty, sweetFalseFalse, Switzerland46.7985628.231974
1186Swiss cheesecowUnited StatesSwiss Cheesehard, artisan, processedfirmrindlesspale yellownutty, sweetNaNTrueFalse, United States39.783730-100.445882
\n", "

1140 rows × 16 columns

\n", "
" ], "text/plain": [ " cheese milk country region \\\n", "0 Aarewasser cow Switzerland \n", "1 Abbaye de Belloc sheep France Pays Basque \n", "2 Abbaye de Belval cow France \n", "3 Abbaye de Citeaux cow France Burgundy \n", "4 Abbaye de Tamié cow France Savoie \n", "... ... ... ... ... \n", "1182 Sveciaost cow Sweden Low-laying regions \n", "1183 Swag goat Australia South Australia \n", "1184 Swaledale sheep England Swaledale, North Yorkshire \n", "1185 Sweet Style Swiss NaN Switzerland \n", "1186 Swiss cheese cow United States \n", "\n", " family type texture \\\n", "0 NaN semi-soft buttery \n", "1 NaN semi-hard, artisan creamy, dense, firm \n", "2 NaN semi-hard elastic \n", "3 NaN semi-soft, artisan, brined creamy, dense, smooth \n", "4 NaN soft, artisan creamy, open, smooth \n", "... ... ... ... \n", "1182 NaN semi-hard, brined creamy, supple \n", "1183 NaN fresh firm, artisan creamy, crumbly \n", "1184 NaN hard semi firm \n", "1185 NaN semi-hard, artisan firm, supple \n", "1186 Swiss Cheese hard, artisan, processed firm \n", "\n", " rind color flavor aroma \\\n", "0 washed yellow sweet buttery \n", "1 natural yellow burnt caramel lanoline \n", "2 washed ivory NaN aromatic \n", "3 washed white acidic, milky, smooth barnyardy, earthy \n", "4 washed white fruity, nutty perfumed, pungent \n", "... ... ... ... ... \n", "1182 rindless pale yellow acidic NaN \n", "1183 ash coated white acidic, creamy fresh \n", "1184 NaN yellow smooth, sweet floral \n", "1185 waxed NaN nutty nutty, sweet \n", "1186 rindless pale yellow nutty, sweet NaN \n", "\n", " vegetarian vegan location latitude \\\n", "0 False False , Switzerland 46.798562 \n", "1 True False Pays Basque, France 47.686790 \n", "2 False False , France 46.603354 \n", "3 False False Burgundy, France 47.278087 \n", "4 False False Savoie, France 45.494895 \n", "... ... ... ... ... \n", "1182 False False Low-laying regions, Sweden 59.674971 \n", "1183 True False South Australia, Australia -30.534367 \n", "1184 True False Swaledale, North Yorkshire, England 54.382993 \n", "1185 False False , Switzerland 46.798562 \n", "1186 True False , United States 39.783730 \n", "\n", " longitude \n", "0 8.231974 \n", "1 7.392763 \n", "2 1.888334 \n", "3 4.222486 \n", "4 6.384660 \n", "... ... \n", "1182 14.520858 \n", "1183 135.630121 \n", "1184 -1.984136 \n", "1185 8.231974 \n", "1186 -100.445882 \n", "\n", "[1140 rows x 16 columns]" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data" ] }, { "cell_type": "code", "execution_count": 19, "id": "d41b1dc8-90df-44b8-9d83-d218f82a3637", "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAioAAAGdCAYAAAA8F1jjAAAAOnRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjEwLjAsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvlHJYcgAAAAlwSFlzAAAPYQAAD2EBqD+naQAAQVBJREFUeJzt3Xt8VOWB//HvJJIQwEyAhCRAQgItFyWAAcRIzcqlBKVdW1Kl1a6XZbGtaKtQNeDPW20NxaqtFrWyW3VXq0hB3YpS2CAikiKEOwKWlJgUMhFKmCAEiOT8/khnzGQumcDMnJOZz/v1mpfkmZMzT46TOd88V5thGIYAAAAsKM7sCgAAAPhDUAEAAJZFUAEAAJZFUAEAAJZFUAEAAJZFUAEAAJZFUAEAAJZFUAEAAJZ1gdkVOF/Nzc06dOiQLrzwQtlsNrOrAwAAgmAYho4fP66+ffsqLs5/u0mnDyqHDh1SVlaW2dUAAADnoKamRv379/f7fKcPKhdeeKGklh80OTnZ5NoAAIBgNDQ0KCsry30f96fTBxVXd09ycjJBBQCATqa9YRsMpgUAAJZFUAEAAJZFUAEAAJZFUAEAAJZFUAEAAJZFUAEAAJZFUAEAAJZFUAEAAJZFUAEAAJZFUAEAAJZFUAFgebXORm2oPKJaZ6PZVQEQYZ1+rx8A0W3JpmrNW75TzYYUZ5NKp+dpxthss6sFIEJoUQFgWbXORndIkaRmQ5q/fBctK0AMIagAsKwDR064Q4rLWcNQ1ZGT5lQIQMQRVABYVm5qd8W12QE+3mZTTmo3cyoEIOIIKgAsK9OepNLpeYq3taSVeJtNj04frkx7ksk1AxApDKYFYGkzxmarcHCaqo6cVE5qN0IKEGMIKgAsL9OeREABYhRdPwAAwLIIKoBFba+p1+IPKrW9pt7sqgCAaej6ASxo7uvbtGzLQffXxfn99Ph1o8yrEACY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vHmzUVBQYBQUFJhc68g4fvy4+zNJkvHEE08YW7duNT799FPDMAxjwYIFRkpKivHWW28ZO3bsMK655hojNzfXaGxsdJ9j6tSpxiWXXGJs3LjRWL9+vfHVr37V+N73vmfWjxQ2ga7V8ePHjZ/+9KdGeXm5ceDAAeP//u//jPz8fOOrX/2qcerUKfc5YuVa+UNQsaibbrrJkOT1eO+999zHVFVVGVdddZWRlJRkpKamGnPnzjWampo8zvPee+8Zo0aNMhISEoyBAwcaL7zwQmR/EBNUVFQY48aNM+x2u9G1a1dj2LBhxqOPPurxi28YhrF9+3bja1/7mpGYmGj069fPWLBggUk1Nt/TTz9tZGdnGwkJCcall15q/OUvfzG7SqabMWOGkZmZaSQkJBj9+vUzZsyYYezfv9/9fGNjo3HbbbcZPXv2NLp162Z8+9vfNmpra02sceS89957Pj+fbrrpJsMwWqYo33///UZ6erqRmJhoTJo0ydi3b5/HOf7xj38Y3/ve94wePXoYycnJxi233OL+QyyaBLpWJ0+eNKZMmWKkpaUZXbp0MQYMGGDMmjXL64+EWLlW/tgMwzAi3owDAAAQBMaoAAAAyyKoAAAAyyKoAAAAyyKoAAAAyyKoAAAAyyKoAAAAyyKoAAAAyyKoAAAAyyKoAAAAyyKoAAAAyyKoAAAAyyKoAAAAy/r/nN3ErroJikgAAAAASUVORK5CYII=", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "x=data[\"longitude\"]\n", "y=data[\"latitude\"]\n", "plt.plot(x,y,\".\");" ] }, { "cell_type": "code", "execution_count": 20, "id": "66ce4e4a-7006-411f-abd0-ee94d7cf99b3", "metadata": {}, "outputs": [], "source": [ "def filter_df(df, cols=None):\n", " if cols is None:\n", " cols = [\"milk\", \"country\", \"type\", \"texture\", \"flavor\", \"aroma\", \"family\", \"rind\"]\n", "\n", " df = df.copy()\n", " attributes = set() # Get all the possible attributes (some are mixed in different columns)\n", " for col in cols:\n", " values = set()\n", " for val in set(df[col]):\n", " if type(val) == float: # skip NaN values\n", " continue\n", " values = values.union([x.strip() for x in set(val.split(\",\"))])\n", " attributes = attributes.union(values)\n", " row_attrs = [set() for _ in range(len(df))] # get the attributes specific to each row\n", " for col in cols:\n", " for i, row in enumerate(df[col]):\n", " if type(row) != float:\n", " row_attrs[i] = row_attrs[i].union([x.strip() for x in row.split(\",\")])\n", " for attr in attributes: # Add attributes rows\n", " df[attr] = list(attr in row_attrs[i] for i in range(len(df[col])))\n", " df=df.copy()\n", " for col in cols:\n", " del df[col]\n", "\n", " return df.copy()" ] }, { "cell_type": "code", "execution_count": 21, "id": "fda6aaad-7b1e-4daa-8d28-cd049df9cec2", "metadata": {}, "outputs": [], "source": [ "data_features=filter_df(data)" ] }, { "cell_type": "code", "execution_count": 22, "id": "99d028a8-326d-4fbd-ba01-19a8ab4b4557", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
cheeseregioncolorvegetarianveganlocationlatitudelongitudeLithuania...Italian CheeseScotlandMexicoburnt caramellacticRacletterindlesswater buffaloMauritaniaBelgium
0AarewasseryellowFalseFalse, Switzerland46.7985628.231974FalseFalse...FalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
1Abbaye de BellocPays BasqueyellowTrueFalsePays Basque, France47.6867907.392763FalseFalse...FalseFalseFalseTrueFalseFalseFalseFalseFalseFalse
2Abbaye de BelvalivoryFalseFalse, France46.6033541.888334FalseFalse...FalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
3Abbaye de CiteauxBurgundywhiteFalseFalseBurgundy, France47.2780874.222486FalseFalse...FalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
4Abbaye de TamiéSavoiewhiteFalseFalseSavoie, France45.4948956.384660FalseFalse...FalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
..................................................................
1182SveciaostLow-laying regionspale yellowFalseFalseLow-laying regions, Sweden59.67497114.520858FalseFalse...FalseFalseFalseFalseFalseFalseTrueFalseFalseFalse
1183SwagSouth AustraliawhiteTrueFalseSouth Australia, Australia-30.534367135.630121FalseFalse...FalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
1184SwaledaleSwaledale, North YorkshireyellowTrueFalseSwaledale, North Yorkshire, England54.382993-1.984136FalseFalse...FalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
1185Sweet Style SwissNaNFalseFalse, Switzerland46.7985628.231974FalseFalse...FalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
1186Swiss cheesepale yellowTrueFalse, United States39.783730-100.445882FalseFalse...FalseFalseFalseFalseFalseFalseTrueFalseFalseFalse
\n", "

1140 rows × 204 columns

\n", "
" ], "text/plain": [ " cheese region color vegetarian \\\n", "0 Aarewasser yellow False \n", "1 Abbaye de Belloc Pays Basque yellow True \n", "2 Abbaye de Belval ivory False \n", "3 Abbaye de Citeaux Burgundy white False \n", "4 Abbaye de Tamié Savoie white False \n", "... ... ... ... ... \n", "1182 Sveciaost Low-laying regions pale yellow False \n", "1183 Swag South Australia white True \n", "1184 Swaledale Swaledale, North Yorkshire yellow True \n", "1185 Sweet Style Swiss NaN False \n", "1186 Swiss cheese pale yellow True \n", "\n", " vegan location latitude longitude \\\n", "0 False , Switzerland 46.798562 8.231974 \n", "1 False Pays Basque, France 47.686790 7.392763 \n", "2 False , France 46.603354 1.888334 \n", "3 False Burgundy, France 47.278087 4.222486 \n", "4 False Savoie, France 45.494895 6.384660 \n", "... ... ... ... ... \n", "1182 False Low-laying regions, Sweden 59.674971 14.520858 \n", "1183 False South Australia, Australia -30.534367 135.630121 \n", "1184 False Swaledale, North Yorkshire, England 54.382993 -1.984136 \n", "1185 False , Switzerland 46.798562 8.231974 \n", "1186 False , United States 39.783730 -100.445882 \n", "\n", " Lithuania ... Italian Cheese Scotland Mexico burnt caramel \\\n", "0 False False ... False False False False \n", "1 False False ... False False False True \n", "2 False False ... False False False False \n", "3 False False ... False False False False \n", "4 False False ... False False False False \n", "... ... ... ... ... ... ... ... \n", "1182 False False ... False False False False \n", "1183 False False ... False False False False \n", "1184 False False ... False False False False \n", "1185 False False ... False False False False \n", "1186 False False ... False False False False \n", "\n", " lactic Raclette rindless water buffalo Mauritania Belgium \n", "0 False False False False False False \n", "1 False False False False False False \n", "2 False False False False False False \n", "3 False False False False False False \n", "4 False False False False False False \n", "... ... ... ... ... ... ... \n", "1182 False False True False False False \n", "1183 False False False False False False \n", "1184 False False False False False False \n", "1185 False False False False False False \n", "1186 False False True False False False \n", "\n", "[1140 rows x 204 columns]" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data_features" ] }, { "cell_type": "markdown", "id": "a1b022a3-a2f9-4e39-9e79-48ae9f6adca5", "metadata": {}, "source": [ "## Classification" ] }, { "cell_type": "code", "execution_count": 23, "id": "94bcde38-784b-41d9-89b0-3e2e17aa2979", "metadata": {}, "outputs": [], "source": [ "from sklearn import tree" ] }, { "cell_type": "code", "execution_count": 24, "id": "7b2b9d3e-d7da-4f43-9e1c-4e62e837ed0b", "metadata": {}, "outputs": [], "source": [ "c=tree.DecisionTreeClassifier()" ] }, { "cell_type": "markdown", "id": "100a7c2e-2d24-4814-bd68-4b9f6433ce4d", "metadata": {}, "source": [ "Transformer: la couleur en RGB; la localisation en GPS\n", "1ère question: est-ce que la couleur suffit à savoir d'où ça vient ? \n", "2ème question: est-ce que si on ajoute le type ça marche ? \n", "3ème question: et les caractéristiques gustatives ?\n" ] }, { "cell_type": "code", "execution_count": 27, "id": "24e7ff6e-c308-4cc8-aeac-eeb372f4c479", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
cheeseregioncolorvegetarianveganlocationlatitudelongitudeLithuania...Italian CheeseScotlandMexicoburnt caramellacticRacletterindlesswater buffaloMauritaniaBelgium
0AarewasseryellowFalseFalse, Switzerland46.7985628.231974FalseFalse...FalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
1Abbaye de BellocPays BasqueyellowTrueFalsePays Basque, France47.6867907.392763FalseFalse...FalseFalseFalseTrueFalseFalseFalseFalseFalseFalse
2Abbaye de BelvalivoryFalseFalse, France46.6033541.888334FalseFalse...FalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
3Abbaye de CiteauxBurgundywhiteFalseFalseBurgundy, France47.2780874.222486FalseFalse...FalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
4Abbaye de TamiéSavoiewhiteFalseFalseSavoie, France45.4948956.384660FalseFalse...FalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
..................................................................
1182SveciaostLow-laying regionspale yellowFalseFalseLow-laying regions, Sweden59.67497114.520858FalseFalse...FalseFalseFalseFalseFalseFalseTrueFalseFalseFalse
1183SwagSouth AustraliawhiteTrueFalseSouth Australia, Australia-30.534367135.630121FalseFalse...FalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
1184SwaledaleSwaledale, North YorkshireyellowTrueFalseSwaledale, North Yorkshire, England54.382993-1.984136FalseFalse...FalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
1185Sweet Style SwissNaNFalseFalse, Switzerland46.7985628.231974FalseFalse...FalseFalseFalseFalseFalseFalseFalseFalseFalseFalse
1186Swiss cheesepale yellowTrueFalse, United States39.783730-100.445882FalseFalse...FalseFalseFalseFalseFalseFalseTrueFalseFalseFalse
\n", "

1140 rows × 204 columns

\n", "
" ], "text/plain": [ " cheese region color vegetarian \\\n", "0 Aarewasser yellow False \n", "1 Abbaye de Belloc Pays Basque yellow True \n", "2 Abbaye de Belval ivory False \n", "3 Abbaye de Citeaux Burgundy white False \n", "4 Abbaye de Tamié Savoie white False \n", "... ... ... ... ... \n", "1182 Sveciaost Low-laying regions pale yellow False \n", "1183 Swag South Australia white True \n", "1184 Swaledale Swaledale, North Yorkshire yellow True \n", "1185 Sweet Style Swiss NaN False \n", "1186 Swiss cheese pale yellow True \n", "\n", " vegan location latitude longitude \\\n", "0 False , Switzerland 46.798562 8.231974 \n", "1 False Pays Basque, France 47.686790 7.392763 \n", "2 False , France 46.603354 1.888334 \n", "3 False Burgundy, France 47.278087 4.222486 \n", "4 False Savoie, France 45.494895 6.384660 \n", "... ... ... ... ... \n", "1182 False Low-laying regions, Sweden 59.674971 14.520858 \n", "1183 False South Australia, Australia -30.534367 135.630121 \n", "1184 False Swaledale, North Yorkshire, England 54.382993 -1.984136 \n", "1185 False , Switzerland 46.798562 8.231974 \n", "1186 False , United States 39.783730 -100.445882 \n", "\n", " Lithuania ... Italian Cheese Scotland Mexico burnt caramel \\\n", "0 False False ... False False False False \n", "1 False False ... False False False True \n", "2 False False ... False False False False \n", "3 False False ... False False False False \n", "4 False False ... False False False False \n", "... ... ... ... ... ... ... ... \n", "1182 False False ... False False False False \n", "1183 False False ... False False False False \n", "1184 False False ... False False False False \n", "1185 False False ... False False False False \n", "1186 False False ... False False False False \n", "\n", " lactic Raclette rindless water buffalo Mauritania Belgium \n", "0 False False False False False False \n", "1 False False False False False False \n", "2 False False False False False False \n", "3 False False False False False False \n", "4 False False False False False False \n", "... ... ... ... ... ... ... \n", "1182 False False True False False False \n", "1183 False False False False False False \n", "1184 False False False False False False \n", "1185 False False False False False False \n", "1186 False False True False False False \n", "\n", "[1140 rows x 204 columns]" ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data_features" ] }, { "cell_type": "code", "execution_count": null, "id": "ca969d41-a88a-47d9-b94b-8b633d3d3348", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "e2c9b84f-b899-4c99-abb7-37a9deeafbb5", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "d41c1cfc-1564-4131-8391-c8a8971b9d13", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 28, "id": "42a1e4ed-9a1e-41f8-a322-b5d2de68d24a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
cheesemilkcountryregionfamilytypetexturerindcolorflavoraromavegetarianveganlocationlatitudelongitude
\n", "
" ], "text/plain": [ "Empty DataFrame\n", "Columns: [cheese, milk, country, region, family, type, texture, rind, color, flavor, aroma, vegetarian, vegan, location, latitude, longitude]\n", "Index: []" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data[pd.isnull(data[\"country\"])&pd.isnull(data[\"region\"])]\n" ] }, { "cell_type": "markdown", "id": "038cd38e-3890-4f73-91a7-c30294b3bc5b", "metadata": {}, "source": [ "## Pattern Mining" ] }, { "cell_type": "code", "execution_count": 29, "id": "2e6b0dc1-030c-4239-803f-52736a41bcb5", "metadata": {}, "outputs": [], "source": [ "data_features_only=data_features.drop(columns=[\"vegetarian\",\"vegan\",\"cheese\",\"region\",\"color\",\"location\",\"latitude\",\"longitude\"])" ] }, { "cell_type": "code", "execution_count": 30, "id": "23b75579-95bb-4889-928f-9c3c1309a18a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "196" ] }, "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "data_features_only.shape[1]" ] }, { "cell_type": "markdown", "id": "b76e8b2f-2efc-43f7-9aa7-fffb960313ad", "metadata": {}, "source": [ "We have $196$ features in our data, that is very big compared to the number of rows of our data. So, we choose a min_support of $0.1$ during the apriori algorithm for pattern mining. " ] }, { "cell_type": "code", "execution_count": 42, "id": "e7113235-7546-4c71-9b34-181472466d20", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
supportitemsets
00.188596(hard)
10.328947(soft)
20.108772(washed)
30.298246(smooth)
40.221053(firm)
50.135088(spicy)
60.075439(Cheddar)
70.097368(salty)
80.079825(bloomy)
90.108772(soft-ripened)
100.195614(semi-hard)
110.655263(cow)
120.560526(creamy)
130.088596(earthy)
140.148246(France)
150.060526(savory)
160.055263(herbaceous)
170.224561(goat)
180.078070(Blue)
190.098246(aromatic)
200.079825(dense)
210.072807(England)
220.070175(blue-veined)
230.057018(Canada)
240.254386(sweet)
250.054386(supple)
260.371053(natural)
270.136842(strong)
280.135088(rich)
290.087719(fruity)
300.135965(tangy)
310.055263(Brie)
320.198246(mild)
330.078070(sharp)
340.267544(United States)
350.066667(full-flavored)
360.188596(crumbly)
370.203509(nutty)
380.058772(fresh soft)
390.067544(grassy)
400.069298(open)
410.123684(Italy)
420.160526(sheep)
430.052632(compact)
440.100877(milky)
450.228947(semi-soft)
460.203509(buttery)
470.064912(acidic)
480.541228(artisan)
490.126316(fresh)
500.089474(rindless)
510.064035(hard, firm)
520.142982(hard, cow)
530.060526(hard, creamy)
540.050877(sweet, hard)
550.103509(hard, natural)
560.084211(hard, crumbly)
570.072807(hard, nutty)
580.110526(hard, artisan)
590.124561(soft, smooth)
600.067544(bloomy, soft)
610.088596(soft, soft-ripened)
620.200000(soft, cow)
630.228070(soft, creamy)
640.092982(soft, France)
650.100877(goat, soft)
660.068421(sweet, soft)
670.073684(natural, soft)
680.071053(mild, soft)
690.068421(United States, soft)
700.085088(buttery, soft)
710.153509(soft, artisan)
720.058772(fresh, soft)
730.084211(washed, cow)
740.060526(washed, creamy)
750.051754(washed, artisan)
760.187719(smooth, cow)
770.193860(smooth, creamy)
780.064912(smooth, France)
790.071930(goat, smooth)
800.086842(sweet, smooth)
810.103509(natural, smooth)
820.069298(mild, smooth)
830.067544(United States, smooth)
840.067544(smooth, nutty)
850.080702(smooth, semi-soft)
860.064912(buttery, smooth)
870.169298(smooth, artisan)
880.069298(semi-hard, firm)
890.143860(firm, cow)
900.074561(firm, creamy)
910.071053(sweet, firm)
920.094737(natural, firm)
930.073684(United States, firm)
940.061404(firm, nutty)
950.135965(firm, artisan)
960.103509(cow, spicy)
970.069298(creamy, spicy)
980.072807(natural, spicy)
990.083333(spicy, artisan)
1000.071053(cow, Cheddar)
1010.050877(Cheddar, artisan)
1020.066667(salty, cow)
1030.052632(salty, artisan)
1040.057895(bloomy, soft-ripened)
1050.057895(bloomy, cow)
1060.066667(bloomy, creamy)
1070.075439(soft-ripened, cow)
1080.084211(creamy, soft-ripened)
1090.143860(semi-hard, cow)
1100.092982(semi-hard, creamy)
1110.057018(semi-hard, sweet)
1120.110526(semi-hard, natural)
1130.066667(semi-hard, United States)
1140.053509(semi-hard, nutty)
1150.122807(semi-hard, artisan)
1160.378070(creamy, cow)
1170.059649(cow, earthy)
1180.086842(France, cow)
1190.063158(Blue, cow)
1200.063158(aromatic, cow)
1210.051754(cow, dense)
1220.057018(England, cow)
1230.057895(blue-veined, cow)
1240.160526(sweet, cow)
1250.250000(natural, cow)
1260.093860(strong, cow)
1270.109649(rich, cow)
1280.070175(fruity, cow)
1290.080702(cow, tangy)
1300.126316(mild, cow)
1310.057895(sharp, cow)
1320.176316(United States, cow)
1330.124561(crumbly, cow)
1340.142105(cow, nutty)
1350.052632(open, cow)
1360.063158(Italy, cow)
1370.064035(milky, cow)
1380.153509(cow, semi-soft)
1390.163158(buttery, cow)
1400.331579(cow, artisan)
1410.063158(fresh, cow)
1420.057018(rindless, cow)
1430.052632(creamy, earthy)
1440.085088(creamy, France)
1450.133333(goat, creamy)
1460.060526(Blue, creamy)
1470.057018(aromatic, creamy)
1480.050877(England, creamy)
1490.056140(blue-veined, creamy)
1500.140351(sweet, creamy)
1510.184211(natural, creamy)
1520.067544(strong, creamy)
1530.089474(creamy, rich)
1540.065789(creamy, tangy)
1550.130702(mild, creamy)
1560.169298(United States, creamy)
1570.075439(creamy, crumbly)
1580.100000(creamy, nutty)
1590.067544(sheep, creamy)
1600.065789(milky, creamy)
1610.151754(creamy, semi-soft)
1620.131579(buttery, creamy)
1630.306140(creamy, artisan)
1640.091228(fresh, creamy)
1650.056140(rindless, creamy)
1660.052632(goat, France)
1670.069298(France, artisan)
1680.050877(goat, sweet)
1690.065789(goat, natural)
1700.051754(goat, mild)
1710.078070(United States, goat)
1720.050000(goat, semi-soft)
1730.128070(goat, artisan)
1740.060526(Blue, blue-veined)
1750.057895(aromatic, artisan)
1760.050877(dense, artisan)
1770.100877(sweet, natural)
1780.057018(mild, sweet)
1790.089474(United States, sweet)
1800.076316(sweet, nutty)
1810.061404(sweet, semi-soft)
1820.060526(sweet, buttery)
1830.151754(sweet, artisan)
1840.056140(natural, strong)
1850.059649(natural, tangy)
1860.077193(mild, natural)
1870.108772(United States, natural)
1880.101754(natural, crumbly)
1890.091228(natural, nutty)
1900.072807(natural, Italy)
1910.074561(sheep, natural)
1920.072807(natural, semi-soft)
1930.063158(buttery, natural)
1940.238596(natural, artisan)
1950.078947(strong, artisan)
1960.059649(United States, rich)
1970.079825(rich, artisan)
1980.053509(fruity, artisan)
1990.065789(United States, tangy)
2000.085965(artisan, tangy)
2010.059649(United States, mild)
2020.106140(mild, artisan)
2030.061404(United States, crumbly)
2040.071930(United States, nutty)
2050.065789(United States, semi-soft)
2060.065789(United States, buttery)
2070.184211(United States, artisan)
2080.051754(crumbly, nutty)
2090.122807(crumbly, artisan)
2100.056140(buttery, nutty)
2110.121053(nutty, artisan)
2120.051754(sheep, Italy)
2130.081579(Italy, artisan)
2140.104386(sheep, artisan)
2150.054386(milky, artisan)
2160.051754(buttery, semi-soft)
2170.126316(semi-soft, artisan)
2180.103509(buttery, artisan)
2190.071930(fresh, artisan)
2200.052632(hard, creamy, cow)
2210.078947(hard, natural, cow)
2220.065789(hard, crumbly, cow)
2230.055263(hard, cow, nutty)
2240.082456(hard, cow, artisan)
2250.051754(hard, natural, crumbly)
2260.069298(hard, natural, artisan)
2270.076316(soft, smooth, cow)
2280.086842(soft, smooth, creamy)
2290.069298(soft, smooth, artisan)
2300.054386(bloomy, soft, cow)
2310.057018(bloomy, soft, creamy)
2320.066667(soft-ripened, soft, cow)
2330.070175(soft, creamy, soft-ripened)
2340.145614(soft, creamy, cow)
2350.068421(buttery, soft, cow)
2360.085088(soft, cow, artisan)
2370.055263(soft, creamy, France)
2380.064912(goat, soft, creamy)
2390.051754(mild, soft, creamy)
2400.050000(United States, soft, creamy)
2410.068421(buttery, soft, creamy)
2420.106140(soft, creamy, artisan)
2430.053509(goat, soft, artisan)
2440.130702(creamy, smooth, cow)
2450.051754(sweet, smooth, cow)
2460.064035(natural, smooth, cow)
2470.055263(smooth, cow, semi-soft)
2480.052632(buttery, smooth, cow)
2490.099123(smooth, cow, artisan)
2500.057895(sweet, smooth, creamy)
2510.059649(natural, smooth, creamy)
2520.050877(mild, smooth, creamy)
2530.051754(United States, smooth, creamy)
2540.057018(smooth, creamy, semi-soft)
2550.108772(smooth, creamy, artisan)
2560.054386(sweet, smooth, artisan)
2570.073684(natural, smooth, artisan)
2580.052632(semi-hard, firm, cow)
2590.067544(natural, firm, cow)
2600.077193(firm, cow, artisan)
2610.052632(firm, creamy, artisan)
2620.058772(natural, firm, artisan)
2630.055263(United States, firm, artisan)
2640.052632(cow, creamy, spicy)
2650.057018(cow, natural, spicy)
2660.059649(cow, spicy, artisan)
2670.050000(natural, spicy, artisan)
2680.050877(bloomy, creamy, cow)
2690.062281(soft-ripened, creamy, cow)
2700.073684(semi-hard, creamy, cow)
2710.079825(semi-hard, natural, cow)
2720.050000(semi-hard, United States, cow)
2730.085088(semi-hard, cow, artisan)
2740.061404(semi-hard, natural, creamy)
2750.064035(semi-hard, creamy, artisan)
2760.077193(semi-hard, natural, artisan)
2770.052632(France, creamy, cow)
2780.050877(Blue, creamy, cow)
2790.091228(sweet, creamy, cow)
2800.135088(natural, creamy, cow)
2810.054386(creamy, strong, cow)
2820.069298(rich, creamy, cow)
2830.081579(mild, creamy, cow)
2840.107018(United States, creamy, cow)
2850.074561(cow, creamy, nutty)
2860.104386(creamy, cow, semi-soft)
2870.107895(buttery, creamy, cow)
2880.192982(creamy, cow, artisan)
2890.050000(Blue, blue-veined, cow)
2900.065789(sweet, natural, cow)
2910.064912(United States, sweet, cow)
2920.054386(sweet, cow, nutty)
2930.086842(sweet, cow, artisan)
2940.085965(United States, natural, cow)
2950.069298(natural, crumbly, cow)
2960.068421(cow, natural, nutty)
2970.050000(natural, cow, semi-soft)
2980.050000(buttery, natural, cow)
2990.151754(natural, cow, artisan)
3000.050877(strong, cow, artisan)
3010.059649(rich, cow, artisan)
3020.055263(mild, cow, artisan)
3030.054386(United States, cow, nutty)
3040.053509(United States, buttery, cow)
3050.120175(United States, cow, artisan)
3060.080702(crumbly, cow, artisan)
3070.081579(cow, nutty, artisan)
3080.072807(semi-soft, cow, artisan)
3090.083333(buttery, cow, artisan)
3100.055263(United States, creamy, goat)
3110.079825(goat, creamy, artisan)
3120.052632(United States, sweet, creamy)
3130.083333(sweet, creamy, artisan)
3140.060526(United States, natural, creamy)
3150.050877(natural, creamy, semi-soft)
3160.121053(natural, creamy, artisan)
3170.053509(creamy, rich, artisan)
3180.064912(mild, creamy, artisan)
3190.050000(United States, creamy, semi-soft)
3200.113158(United States, creamy, artisan)
3210.060526(creamy, nutty, artisan)
3220.086842(semi-soft, creamy, artisan)
3230.066667(buttery, creamy, artisan)
3240.071930(sweet, natural, artisan)
3250.059649(United States, sweet, artisan)
3260.050000(sweet, nutty, artisan)
3270.050877(mild, natural, artisan)
3280.081579(United States, natural, artisan)
3290.069298(natural, crumbly, artisan)
3300.064912(natural, nutty, artisan)
3310.054386(natural, Italy, artisan)
3320.059649(sheep, natural, artisan)
3330.050000(United States, crumbly, artisan)
3340.054386(United States, nutty, artisan)
3350.054386(hard, natural, cow, artisan)
3360.057895(creamy, soft, smooth, cow)
3370.057018(soft, creamy, cow, soft-ripened)
3380.056140(buttery, soft, creamy, cow)
3390.059649(soft, creamy, cow, artisan)
3400.070175(creamy, smooth, cow, artisan)
3410.050000(semi-hard, natural, creamy, cow)
3420.050877(semi-hard, natural, cow, artisan)
3430.050000(sweet, creamy, cow, artisan)
3440.051754(United States, natural, creamy, cow)
3450.085088(natural, creamy, cow, artisan)
3460.069298(United States, creamy, cow, artisan)
3470.054386(semi-soft, creamy, cow, artisan)
3480.055263(buttery, creamy, cow, artisan)
3490.064035(United States, natural, cow, artisan)
3500.050000(cow, natural, nutty, artisan)
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "frequent_itemsets=apriori(data_features_only,min_support=.05, use_colnames=True)\n", "display(HTML(frequent_itemsets.to_html()))" ] }, { "cell_type": "code", "execution_count": 41, "id": "61959c04-61bf-464a-89ca-72ec4782f927", "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
antecedentsconsequentsantecedent supportconsequent supportsupportconfidenceliftrepresentativityleverageconvictionzhangs_metricjaccardcertaintykulczynski
0(hard)(cow)0.1885960.6552630.1429820.7581401.1570001.00.0194021.4253540.1672360.2040050.2984200.488173
1(hard)(natural)0.1885960.3710530.1035090.5488371.4791361.00.0335301.3940590.3992210.2269230.2826700.413899
2(hard)(artisan)0.1885960.5412280.1105260.5860471.0828091.00.0084531.1082690.0942510.1784700.0976920.395130
3(soft)(cow)0.3289470.6552630.2000000.6080000.9278711.0-0.0155470.879431-0.1038150.255034-0.1370990.456610
4(soft)(creamy)0.3289470.5605260.2280700.6933331.2369331.00.0436871.4330660.2854450.3448280.3021960.550110
5(smooth)(cow)0.2982460.6552630.1877190.6294120.9605481.0-0.0077100.930242-0.0552920.245132-0.0749890.457946
6(smooth)(creamy)0.2982460.5605260.1938600.6500001.1596241.00.0266851.2556390.1961540.2915570.2035930.497926
7(smooth)(artisan)0.2982460.5412280.1692980.5676471.0488131.00.0078791.0611050.0663210.2526180.0575860.440225
8(firm)(cow)0.2210530.6552630.1438600.6507940.9931791.0-0.0009880.987201-0.0087400.196407-0.0129650.435169
9(firm)(artisan)0.2210530.5412280.1359650.6150791.1364511.00.0163251.1918610.1541410.2170870.1609760.433147
10(spicy)(cow)0.1350880.6552630.1035090.7662341.1693531.00.0149911.4747080.1674460.1507020.3218990.462099
11(semi-hard)(cow)0.1956140.6552630.1438600.7354261.1223371.00.0156811.3029880.1355090.2034740.2325330.477485
12(semi-hard)(natural)0.1956140.3710530.1105260.5650221.5227551.00.0379431.4459310.4267800.2423080.3084040.431447
13(semi-hard)(artisan)0.1956140.5412280.1228070.6278031.1599601.00.0169351.2326040.1714360.2000000.1887090.427354
14(creamy)(cow)0.5605260.6552630.3780700.6744911.0293441.00.0107781.0590710.0648680.4513090.0557770.625733
15(cow)(creamy)0.6552630.5605260.3780700.5769751.0293441.00.0107781.0388820.0826940.4513090.0374270.625733
16(sweet)(cow)0.2543860.6552630.1605260.6310340.9630251.0-0.0061630.934333-0.0489730.214286-0.0702820.438007
17(natural)(cow)0.3710530.6552630.2500000.6737591.0282261.00.0068631.0566930.0436470.3220340.0536520.527642
18(rich)(cow)0.1350880.6552630.1096490.8116881.2387211.00.0211311.8306720.2228150.1610820.4537520.489512
19(mild)(cow)0.1982460.6552630.1263160.6371680.9723851.0-0.0035870.950128-0.0342090.173703-0.0524890.414970
20(United States)(cow)0.2675440.6552630.1763160.6590161.0057281.00.0010041.0110070.0077750.2361930.0108870.464046
21(crumbly)(cow)0.1885960.6552630.1245610.6604651.0079391.00.0009811.0153210.0097070.1731710.0150900.425279
22(nutty)(cow)0.2035090.6552630.1421050.6982761.0656421.00.0087531.1425560.0773370.1982860.1247700.457572
23(semi-soft)(cow)0.2289470.6552630.1535090.6704981.0232501.00.0034881.0462360.0294690.2100840.0441930.452384
24(buttery)(cow)0.2035090.6552630.1631580.8017241.2235151.00.0298061.7386730.2293590.2345520.4248490.525360
25(cow)(artisan)0.6552630.5412280.3315790.5060240.9349551.0-0.0230680.928733-0.1679190.383367-0.0767350.559333
26(artisan)(cow)0.5412280.6552630.3315790.6126420.9349551.0-0.0230680.889969-0.1316760.383367-0.1236340.559333
27(goat)(creamy)0.2245610.5605260.1333330.5937501.0592721.00.0074611.0817810.0721600.2045760.0755990.415811
28(sweet)(creamy)0.2543860.5605260.1403510.5517240.9842971.0-0.0022390.980364-0.0209490.208062-0.0200290.401058
29(mild)(creamy)0.1982460.5605260.1307020.6592921.1762021.00.0195801.2898840.1868470.2081010.2247360.446234
30(United States)(creamy)0.2675440.5605260.1692980.6327871.1289161.00.0193331.1967810.1559060.2569910.1644250.467411
31(semi-soft)(creamy)0.2289470.5605260.1517540.6628351.1825231.00.0234231.3034390.2001810.2379640.2327990.466785
32(buttery)(creamy)0.2035090.5605260.1315790.6465521.1534731.00.0175071.2433890.1670480.2080440.1957460.440647
33(creamy)(artisan)0.5605260.5412280.3061400.5461661.0091231.00.0027681.0108800.0205720.3847850.0107630.555903
34(artisan)(creamy)0.5412280.5605260.3061400.5656401.0091231.00.0027681.0117730.0197070.3847850.0116360.555903
35(goat)(artisan)0.2245610.5412280.1280700.5703121.0537381.00.0065311.0676870.0657660.2008250.0633960.403471
36(sweet)(artisan)0.2543860.5412280.1517540.5965521.1022191.00.0140741.1371270.1243790.2356950.1205910.438470
37(crumbly)(natural)0.1885960.3710530.1017540.5395351.4540661.00.0317751.3658960.3848560.2222220.2678800.406883
38(natural)(artisan)0.3710530.5412280.2385960.6430261.1880871.00.0377721.2851690.2517070.3541670.2218920.541934
39(mild)(artisan)0.1982460.5412280.1061400.5353980.9892281.0-0.0011560.987452-0.0133990.167590-0.0127070.365754
40(United States)(artisan)0.2675440.5412280.1842110.6885251.2721521.00.0394081.4728990.2920730.2949440.3210670.514441
41(crumbly)(artisan)0.1885960.5412280.1228070.6511631.2031211.00.0207331.3151460.2080690.2023120.2396280.439034
42(nutty)(artisan)0.2035090.5412280.1210530.5948281.0990331.00.0109081.1322880.1131330.1940930.1168330.409245
43(sheep)(artisan)0.1605260.5412280.1043860.6502731.2014771.00.0175051.3118010.1997580.1747430.2376890.421571
44(semi-soft)(artisan)0.2289470.5412280.1263160.5517241.0193931.00.0024031.0234140.0246730.1961850.0228790.392556
45(buttery)(artisan)0.2035090.5412280.1035090.5086210.9397531.0-0.0066360.933641-0.0744940.161423-0.0710750.349934
46(soft, creamy)(cow)0.2280700.6552630.1456140.6384620.9743591.0-0.0038320.953527-0.0329670.197384-0.0487380.430342
47(soft, cow)(creamy)0.2000000.5605260.1456140.7280701.2989051.00.0335091.6161290.2876510.2368050.3812380.493926
48(soft, artisan)(creamy)0.1535090.5605260.1061400.6914291.2335351.00.0200951.4242200.2236540.1746030.2978610.440393
49(smooth, creamy)(cow)0.1938600.6552630.1307020.6742081.0289121.00.0036731.0581510.0348570.1819290.0549550.436836
50(smooth, cow)(creamy)0.1877190.5605260.1307020.6962621.2421571.00.0254801.4468830.2400020.2116480.3088590.464719
51(smooth, creamy)(artisan)0.1938600.5412280.1087720.5610861.0366901.00.0038501.0452430.0439030.1736690.0432850.381029
52(smooth, artisan)(creamy)0.1692980.5605260.1087720.6424871.1462211.00.0138761.2292520.1535660.1751410.1864970.418270
53(natural, creamy)(cow)0.1842110.6552630.1350880.7333331.1191431.00.0143811.2927630.1304990.1917810.2264630.469746
54(natural, cow)(creamy)0.2500000.5605260.1350880.5403510.9640061.0-0.0050440.956107-0.0474230.200000-0.0459080.390676
55(United States, creamy)(cow)0.1692980.6552630.1070180.6321240.9646881.0-0.0039170.937102-0.0422050.149144-0.0671200.397722
56(United States, cow)(creamy)0.1763160.5605260.1070180.6069651.0828491.00.0081881.1181550.0928870.1699160.1056690.398944
57(creamy, semi-soft)(cow)0.1517540.6552630.1043860.6878611.0497481.00.0049471.1044350.0558690.1485640.0945590.423583
58(cow, semi-soft)(creamy)0.1535090.5605260.1043860.6800001.2131461.00.0183401.3733550.2075590.1712230.2718560.433114
59(buttery, creamy)(cow)0.1315790.6552630.1078950.8200001.2514061.00.0216761.9152050.2313380.1589150.4778630.492329
60(buttery, cow)(creamy)0.1631580.5605260.1078950.6612901.1797671.00.0164401.2974940.1820830.1752140.2292830.426889
61(buttery)(creamy, cow)0.2035090.3780700.1078950.5301721.4023121.00.0309541.3237410.3601950.2277780.2445650.407778
62(creamy, cow)(artisan)0.3780700.5412280.1929820.5104410.9431161.0-0.0116400.937112-0.0884070.265700-0.0671080.433502
63(creamy, artisan)(cow)0.3061400.6552630.1929820.6303720.9620141.0-0.0076200.932660-0.0538430.251142-0.0722020.462442
64(cow, artisan)(creamy)0.3315790.5605260.1929820.5820111.0383291.00.0071241.0513990.0552250.2760350.0488860.463149
65(natural, cow)(artisan)0.2500000.5412280.1517540.6070181.1215561.00.0164471.1674110.1445090.2373110.1434030.443703
66(natural, artisan)(cow)0.2385960.6552630.1517540.6360290.9706471.0-0.0045890.947156-0.0381990.204492-0.0557930.433811
67(United States, cow)(artisan)0.1763160.5412280.1201750.6815921.2593431.00.0247481.4408310.2500170.2011750.3059560.451817
68(United States, artisan)(cow)0.1842110.6552630.1201750.6523810.9956011.0-0.0005310.991709-0.0053860.167073-0.0083610.417891
69(natural, creamy)(artisan)0.1842110.5412280.1210530.6571431.2141701.00.0213531.3380850.2162230.2002900.2526630.440403
70(natural, artisan)(creamy)0.2385960.5605260.1210530.5073530.9051371.0-0.0126870.892066-0.1209930.178525-0.1209930.361658
71(United States, creamy)(artisan)0.1692980.5412280.1131580.6683941.2349581.00.0215291.3834840.2290300.1894270.2771870.438735
72(United States, artisan)(creamy)0.1842110.5605260.1131580.6142861.0959091.00.0099031.1393760.1072770.1791670.1223270.408082
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "display(HTML(association_rules(frequent_itemsets, min_threshold=0.5).to_html()))" ] }, { "cell_type": "code", "execution_count": null, "id": "744f8d1d-0874-4b92-921f-5a85ccf598ad", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "f99af4d2-20e9-4bff-802a-dbdb91f95a96", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "fa04bb73-ba5c-4164-a1af-f061d9627557", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "36ff5c84-93f3-4854-b2c4-e6082859c974", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "1bb8a528-619e-4ebc-a157-60199cec9de3", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.3" } }, "nbformat": 4, "nbformat_minor": 5 }