From 39296fab9eafafa842d808b8ba809630be422ddc Mon Sep 17 00:00:00 2001 From: Scott Payne Date: Sat, 17 Apr 2021 17:19:59 -0500 Subject: [PATCH] Add link to kaggle dataset --- explore_data.ipynb | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/explore_data.ipynb b/explore_data.ipynb index 30a04c0..5c72afc 100644 --- a/explore_data.ipynb +++ b/explore_data.ipynb @@ -1078,13 +1078,30 @@ "emissions.info()" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import os.path\n", + "def print_if_no_file(path, msg):\n", + " if not os.path.exists(path):\n", + " print(f'File not found: {path}')\n", + " print(msg)" + ] + }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ - "recipes = pd.read_csv('data/large_data/RAW_recipes.csv')" + "# recipes = pd.read_csv('data/large_data/RAW_recipes.csv')\n", + "file_recipes = 'data/large_data/RAW_recipes.csv'\n", + "link_recipes = 'https://www.kaggle.com/shuyangli94/food-com-recipes-and-user-interactions?select=RAW_recipes.csv'\n", + "print_if_no_file(file_recipes, f'See {link_recipes}')\n", + "recipes = pd.read_csv(file_recipes)" ] }, { @@ -1552,7 +1569,11 @@ "metadata": {}, "outputs": [], "source": [ - "interactions = pd.read_csv('data/large_data/RAW_interactions.csv')" + "# interactions = pd.read_csv('data/large_data/RAW_interactions.csv')\n", + "file_interactions = 'data/large_data/RAW_interactions.csv'\n", + "link_interactions = 'https://www.kaggle.com/shuyangli94/food-com-recipes-and-user-interactions?select=RAW_interactions.csv'\n", + "print_if_no_file(file_interactions, f'See {link_interactions}')\n", + "interactions = pd.read_csv(file_interactions)" ] }, { @@ -2591,4 +2612,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} +} \ No newline at end of file