diff --git "a/notebooks/ToL_catalog_EDA.ipynb" "b/notebooks/ToL_catalog_EDA.ipynb" new file mode 100644--- /dev/null +++ "b/notebooks/ToL_catalog_EDA.ipynb" @@ -0,0 +1,3779 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import seaborn as sns\n", + "\n", + "sns.set_style(\"whitegrid\")\n", + "sns.set(rc = {'figure.figsize': (10,10)})" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_90984/1753147992.py:1: DtypeWarning: Columns (5,6,7) have mixed types. Specify dtype option on import or set low_memory=False.\n", + " df = pd.read_csv(\"../data/statistics.csv\")\n" + ] + } + ], + "source": [ + "df = pd.read_csv(\"../data/catalog.csv\")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "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", + "
splittreeoflife_ideol_content_ideol_page_idbioscan_partbioscan_filenameinat21_filenameinat21_cls_nameinat21_cls_numkingdomphylumclassorderfamilygenusspeciescommon
0train_smalla87c78c0-eb7c-45ee-9a98-681f61292d6b29586132.065441690.0NaNNaNNaNNaNNaNAnimaliaArthropodaInsectaLepidopteraNymphalidaeAcraeaterpsicoreTawny Coster
1train_smallf8158395-d663-4f0f-b38d-1c6ecb16a8ca29811010.045510040.0NaNNaNNaNNaNNaNAnimaliaChordataAvesPasseriformesPycnonotidaePycnonotuscaferRed-vented Bulbul
2train_small63aab6e3-b01d-4259-be13-9dd41becaf2928563112.0736062.0NaNNaNNaNNaNNaNAnimaliaArthropodaInsectaDipteraEmpididaeRhamphomyialimbataRhamphomyia limbata
3train_smallcf2d58e1-d504-489c-80dd-e99407f8c13d29002118.0349296.0NaNNaNNaNNaNNaNAnimaliaArthropodaInsectaLepidopteraGeometridaeExelispyrolariaFine Lined Gray
4train_smalle745403a-0971-4576-8f4f-a301532f882b20918400.064681220.0NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNmorioMorio
\n", + "
" + ], + "text/plain": [ + " split treeoflife_id eol_content_id \n", + "0 train_small a87c78c0-eb7c-45ee-9a98-681f61292d6b 29586132.0 \\\n", + "1 train_small f8158395-d663-4f0f-b38d-1c6ecb16a8ca 29811010.0 \n", + "2 train_small 63aab6e3-b01d-4259-be13-9dd41becaf29 28563112.0 \n", + "3 train_small cf2d58e1-d504-489c-80dd-e99407f8c13d 29002118.0 \n", + "4 train_small e745403a-0971-4576-8f4f-a301532f882b 20918400.0 \n", + "\n", + " eol_page_id bioscan_part bioscan_filename inat21_filename inat21_cls_name \n", + "0 65441690.0 NaN NaN NaN NaN \\\n", + "1 45510040.0 NaN NaN NaN NaN \n", + "2 736062.0 NaN NaN NaN NaN \n", + "3 349296.0 NaN NaN NaN NaN \n", + "4 64681220.0 NaN NaN NaN NaN \n", + "\n", + " inat21_cls_num kingdom phylum class order family \n", + "0 NaN Animalia Arthropoda Insecta Lepidoptera Nymphalidae \\\n", + "1 NaN Animalia Chordata Aves Passeriformes Pycnonotidae \n", + "2 NaN Animalia Arthropoda Insecta Diptera Empididae \n", + "3 NaN Animalia Arthropoda Insecta Lepidoptera Geometridae \n", + "4 NaN NaN NaN NaN NaN NaN \n", + "\n", + " genus species common \n", + "0 Acraea terpsicore Tawny Coster \n", + "1 Pycnonotus cafer Red-vented Bulbul \n", + "2 Rhamphomyia limbata Rhamphomyia limbata \n", + "3 Exelis pyrolaria Fine Lined Gray \n", + "4 NaN morio Morio " + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "RangeIndex: 11022075 entries, 0 to 11022074\n", + "Data columns (total 17 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 split 11022075 non-null object \n", + " 1 treeoflife_id 11022075 non-null object \n", + " 2 eol_content_id 6844480 non-null float64\n", + " 3 eol_page_id 6844480 non-null float64\n", + " 4 bioscan_part 1235502 non-null float64\n", + " 5 bioscan_filename 1235502 non-null object \n", + " 6 inat21_filename 2942093 non-null object \n", + " 7 inat21_cls_name 2942093 non-null object \n", + " 8 inat21_cls_num 2942093 non-null float64\n", + " 9 kingdom 10603907 non-null object \n", + " 10 phylum 10614632 non-null object \n", + " 11 class 10588333 non-null object \n", + " 12 order 10585664 non-null object \n", + " 13 family 10551249 non-null object \n", + " 14 genus 9725732 non-null object \n", + " 15 species 9551898 non-null object \n", + " 16 common 11022075 non-null object \n", + "dtypes: float64(4), object(13)\n", + "memory usage: 1.4+ GB\n" + ] + } + ], + "source": [ + "df.info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The `train_small` is duplicates of `train`, so we will drop those to analyze the full training set plus val." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "df = df.loc[df.split != 'train_small']" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 10065845 entries, 956230 to 11022074\n", + "Data columns (total 17 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 split 10065845 non-null object \n", + " 1 treeoflife_id 10065845 non-null object \n", + " 2 eol_content_id 6250689 non-null float64\n", + " 3 eol_page_id 6250689 non-null float64\n", + " 4 bioscan_part 1128313 non-null float64\n", + " 5 bioscan_filename 1128313 non-null object \n", + " 6 inat21_filename 2686843 non-null object \n", + " 7 inat21_cls_name 2686843 non-null object \n", + " 8 inat21_cls_num 2686843 non-null float64\n", + " 9 kingdom 9683696 non-null object \n", + " 10 phylum 9693478 non-null object \n", + " 11 class 9669514 non-null object \n", + " 12 order 9667014 non-null object \n", + " 13 family 9635607 non-null object \n", + " 14 genus 8881576 non-null object \n", + " 15 species 8723172 non-null object \n", + " 16 common 10065845 non-null object \n", + "dtypes: float64(4), object(13)\n", + "memory usage: 1.3+ GB\n" + ] + } + ], + "source": [ + "df.info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Original version had 10,436,521 entries; we expected loss of about 84K from the genera with label \"unknown\", but there's still another ~300K missing for this 10,065,845. Likely due to dropping subspecies, which will now be integrated back in under their species for the next round.\n", + "\n", + "Labeling definitely has far better coverage from original, and even improves over the last version (of course `common` is completely filled, but we also gained almost 50K more taxa labels across the board)." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "split 2\n", + "treeoflife_id 10065845\n", + "eol_content_id 6250689\n", + "eol_page_id 503595\n", + "bioscan_part 113\n", + "bioscan_filename 1128313\n", + "inat21_filename 2686843\n", + "inat21_cls_name 10000\n", + "inat21_cls_num 10000\n", + "kingdom 7\n", + "phylum 90\n", + "class 284\n", + "order 1331\n", + "family 7792\n", + "genus 73857\n", + "species 164844\n", + "common 444893\n", + "dtype: int64" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.nunique()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "There are 503,595 unique EOL page IDs, suggesting 503,595 unique classes among the 6,250,689 images pulled from EOL (and maintained here). Presumably this would represent the number of species or other lowest rank taxa covered by EOL." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Notice that we have 7 unique kingdoms, which we're sticking with." + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "kingdom\n", + "Animalia 5987044\n", + "Plantae 3320712\n", + "Fungi 355684\n", + "Protozoa 10924\n", + "Chromista 6443\n", + "Bacteria 2864\n", + "Archaea 25\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df['kingdom'].value_counts()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "`Metazoa` and `Archaeplastida` have been replaced by `Animalia` and `Plantae`, setting them as the dominant kingdoms represented (which we'd expect). \n", + "\n", + "We now have other single-celled organisms for kingdom" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['kingdom', 'phylum', 'class', 'order', 'family', 'genus', 'species']" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "taxa = list(df.columns[9:16])\n", + "taxa" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Check the number of images with all 7 taxonomic labels." + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 8320837 entries, 956230 to 11022074\n", + "Data columns (total 7 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 kingdom 8320837 non-null object\n", + " 1 phylum 8320837 non-null object\n", + " 2 class 8320837 non-null object\n", + " 3 order 8320837 non-null object\n", + " 4 family 8320837 non-null object\n", + " 5 genus 8320837 non-null object\n", + " 6 species 8320837 non-null object\n", + "dtypes: object(7)\n", + "memory usage: 507.9+ MB\n" + ] + } + ], + "source": [ + "df_all_taxa = df.dropna(subset = taxa)\n", + "df_all_taxa[taxa].info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We have 8,320,837 images with full taxonomic labels.\n", + "\n", + "Notice that we still have gaps in the taxonomic hierarchy (both higher and lower values), as this is less than the number of species labels in the dataset and species had the least non-null values. \n", + "\n", + "We did hit 8M+ entries with full taxonomic labels, so that's really good, especially considering 1,043,863 of the BIOSCAN sourced images don't have species labels." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "More detail on these missing values from [`check_taxa` script](https://github.com/Imageomics/open_clip/blob/main/scripts/evobio10m/check_taxa.py) are displayed below. Note: full record of taxa check output is in `data/missing_taxa_output.txt`.\n", + "\n", + "```\n", + "[2023-10-26 13:44:09,780] [WARNING] [root] There are 7 kingdoms instead of 3.\n", + "[2023-10-26 13:44:11,325] [WARNING] [root] 160824 entries are missing rank kingdom, but have genus label.\n", + "[2023-10-26 13:44:11,613] [WARNING] [root] 151405 entries are missing rank phylum, but have genus label.\n", + "[2023-10-26 13:44:11,910] [WARNING] [root] 161871 entries are missing rank class, but have genus label.\n", + "[2023-10-26 13:44:12,199] [WARNING] [root] 156405 entries are missing rank order, but have genus label.\n", + "[2023-10-26 13:44:12,483] [WARNING] [root] 153279 entries are missing rank family, but have genus label.\n", + "[2023-10-26 13:44:12,782] [WARNING] [root] 315 entries are missing rank kingdom, but have family label.\n", + "[2023-10-26 13:44:12,809] [WARNING] [root] 289 entries are missing rank phylum, but have family label.\n", + "[2023-10-26 13:44:12,837] [WARNING] [root] 792 entries are missing rank class, but have family label.\n", + "[2023-10-26 13:44:12,865] [WARNING] [root] 414 entries are missing rank order, but have family label.\n", + "[2023-10-26 13:44:12,905] [WARNING] [root] 170 entries are missing rank kingdom, but have order label.\n", + "[2023-10-26 13:44:12,906] [WARNING] [root] 105 entries are missing rank phylum, but have order label.\n", + "[2023-10-26 13:44:12,908] [WARNING] [root] 1263 entries are missing rank class, but have order label.\n", + "[2023-10-26 13:44:12,949] [WARNING] [root] 41 entries have kingdom and species labels but no genus.\n", + "[2023-10-26 13:44:12,953] [WARNING] [root] 41 entries have phylum and species labels but no genus.\n", + "[2023-10-26 13:44:12,957] [WARNING] [root] 41 entries have class and species labels but no genus.\n", + "[2023-10-26 13:44:12,961] [WARNING] [root] 41 entries have order and species labels but no genus.\n", + "[2023-10-26 13:44:12,965] [WARNING] [root] 41 entries have family and species labels but no genus.\n", + "[2023-10-26 13:44:14,425] [WARNING] [root] There are 149057 samples for which the species column may have genus and species.\n", + "```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Can we get some more information on those 41 entries that are still missing genus?" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "kingdom 1\n", + "phylum 2\n", + "class 2\n", + "order 2\n", + "family 5\n", + "genus 0\n", + "species 8\n", + "dtype: int64" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "missing_genus = df.dropna(subset = ['kingdom', 'phylum', 'class', 'order', 'family', 'species'])\n", + "missing_genus = missing_genus.loc[missing_genus.genus.isna()]\n", + "missing_genus[taxa].nunique()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "So it's a handful of taxa, let's take a look." + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The taxa missing genus are: \n", + "kingdom : ['Animalia']\n", + "phylum : ['Chordata' 'Arthropoda']\n", + "class : ['Amphibia' 'Insecta']\n", + "order : ['Anura' 'Hymenoptera']\n", + "family : ['Centrolenidae' 'Halictidae' 'Dendrobatidae' 'Craugastoridae' 'Ranidae']\n", + "genus : [nan]\n", + "species : ['quindianum' 'carinata' 'placatus' 'ruthveni' 'azulae' 'robledoi'\n", + " 'bilineatus' 'celebensis']\n" + ] + } + ], + "source": [ + "print(\"The taxa missing genus are: \")\n", + "for taxon in taxa:\n", + " print(taxon, \": \", missing_genus[taxon].unique())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\"celebensis\" is new, but next iteration should resolve these." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's add a column indicating the original data source so we can also get some stats by datasource." + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [], + "source": [ + "# Add data_source column for easier slicing\n", + "df.loc[df['inat21_filename'].notna(), 'data_source'] = 'iNat21'\n", + "df.loc[df['bioscan_filename'].notna(), 'data_source'] = 'BIOSCAN'\n", + "df.loc[df['eol_content_id'].notna(), 'data_source'] = 'EOL'" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['EOL'], dtype=object)" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# re-do missing genus with the data source to check if it's just EOL or Bioscan too\n", + "missing_genus = df.dropna(subset = ['kingdom', 'phylum', 'class', 'order', 'family', 'species'])\n", + "missing_genus = missing_genus.loc[missing_genus.genus.isna()]\n", + "missing_genus.data_source.unique()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Missing genus with all other taxa occurs only in EOL now, so should get fixed." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "First, check their unique class values (`common`)." + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "440892" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.loc[df['data_source'] == 'EOL', 'common'].nunique()" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "9947" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.loc[df['data_source'] == 'iNat21', 'common'].nunique()" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "7758" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.loc[df['data_source'] == 'BIOSCAN', 'common'].nunique()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "iNat's number of unique values in `common` is still up by 6 from the original --- probably pulled from ITIS instead and that has more listed?\n", + "\n", + "EOL's went back up a bit, though still about 70-80K less than the original version.\n", + "\n", + "BIOSCAN's counts went down even more..." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Make `df_taxa` with just taxa columns (+ `common` & `data_source`) so it's smaller to process faster." + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [], + "source": [ + "taxa_com = list(df.columns[9:17]) # taxa + common\n", + "taxa_com.insert(0, 'data_source')\n", + "df_taxa = df[taxa_com]" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "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", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommon
956230iNat21PlantaeTracheophytaMagnoliopsidaAsteralesAsteraceaeSolidagorigidastiff-leaved goldenrod
956231iNat21PlantaeTracheophytaMagnoliopsidaAsteralesAsteraceaeSolidagorigidastiff-leaved goldenrod
956232iNat21PlantaeTracheophytaMagnoliopsidaAsteralesAsteraceaeSolidagorigidastiff-leaved goldenrod
956233iNat21PlantaeTracheophytaMagnoliopsidaAsteralesAsteraceaeSolidagorigidastiff-leaved goldenrod
956234iNat21PlantaeTracheophytaMagnoliopsidaAsteralesAsteraceaeSolidagorigidastiff-leaved goldenrod
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order \n", + "956230 iNat21 Plantae Tracheophyta Magnoliopsida Asterales \\\n", + "956231 iNat21 Plantae Tracheophyta Magnoliopsida Asterales \n", + "956232 iNat21 Plantae Tracheophyta Magnoliopsida Asterales \n", + "956233 iNat21 Plantae Tracheophyta Magnoliopsida Asterales \n", + "956234 iNat21 Plantae Tracheophyta Magnoliopsida Asterales \n", + "\n", + " family genus species common \n", + "956230 Asteraceae Solidago rigida stiff-leaved goldenrod \n", + "956231 Asteraceae Solidago rigida stiff-leaved goldenrod \n", + "956232 Asteraceae Solidago rigida stiff-leaved goldenrod \n", + "956233 Asteraceae Solidago rigida stiff-leaved goldenrod \n", + "956234 Asteraceae Solidago rigida stiff-leaved goldenrod " + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_taxa.head()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's look a little closer at each of our three data sources." + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [], + "source": [ + "inat21_df = df_taxa.loc[df_taxa.data_source == 'iNat21']\n", + "bioscan_df = df_taxa.loc[df_taxa.data_source == 'BIOSCAN']\n", + "eol_df = df_taxa.loc[df_taxa.data_source == 'EOL']" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### iNat21" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 2686843 entries, 956230 to 11022074\n", + "Data columns (total 9 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 2686843 non-null object\n", + " 1 kingdom 2686843 non-null object\n", + " 2 phylum 2686843 non-null object\n", + " 3 class 2686843 non-null object\n", + " 4 order 2686843 non-null object\n", + " 5 family 2686843 non-null object\n", + " 6 genus 2686843 non-null object\n", + " 7 species 2686843 non-null object\n", + " 8 common 2686843 non-null object\n", + "dtypes: object(9)\n", + "memory usage: 205.0+ MB\n" + ] + } + ], + "source": [ + "inat21_df.info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "iNat21 isn't missing anything, as expected, and we have 2,686,843 images.\n", + "\n", + "Quick view of diversity in iNat21." + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "data_source 1\n", + "kingdom 3\n", + "phylum 13\n", + "class 51\n", + "order 273\n", + "family 1103\n", + "genus 4884\n", + "species 6485\n", + "common 9947\n", + "dtype: int64" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "inat21_df.nunique()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Again, 6 more common values were added, but the diversity has not been altered (same numbers of unique values)." + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "kingdom\n", + "Animalia 1448093\n", + "Plantae 1148702\n", + "Fungi 90048\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "inat21_df['kingdom'].value_counts()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "iNat21 uses `Animalia` and `Plantae`." + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_90984/2358816078.py:2: SettingWithCopyWarning: \n", + "A value is trying to be set on a copy of a slice from a DataFrame.\n", + "Try using .loc[row_indexer,col_indexer] = value instead\n", + "\n", + "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", + " inat21_df['duplicate'] = inat21_df.duplicated(subset = taxa, keep = 'first')\n" + ] + } + ], + "source": [ + "#number of unique 7-tuples in iNat21\n", + "inat21_df['duplicate'] = inat21_df.duplicated(subset = taxa, keep = 'first')\n", + "inat21_df_unique_taxa = inat21_df.loc[~inat21_df['duplicate']]" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 10000 entries, 956230 to 10447607\n", + "Data columns (total 10 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 10000 non-null object\n", + " 1 kingdom 10000 non-null object\n", + " 2 phylum 10000 non-null object\n", + " 3 class 10000 non-null object\n", + " 4 order 10000 non-null object\n", + " 5 family 10000 non-null object\n", + " 6 genus 10000 non-null object\n", + " 7 species 10000 non-null object\n", + " 8 common 10000 non-null object\n", + " 9 duplicate 10000 non-null bool \n", + "dtypes: bool(1), object(9)\n", + "memory usage: 791.0+ KB\n" + ] + } + ], + "source": [ + "inat21_df_unique_taxa.info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "There's the 10K unique `species` that we expect. Let's check the same information across BIOSCAN and EOL." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### BIOSCAN" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 1128313 entries, 1250748 to 10996892\n", + "Data columns (total 9 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 1128313 non-null object\n", + " 1 kingdom 1128313 non-null object\n", + " 2 phylum 1128313 non-null object\n", + " 3 class 1128313 non-null object\n", + " 4 order 1128313 non-null object\n", + " 5 family 1112922 non-null object\n", + " 6 genus 254158 non-null object\n", + " 7 species 84447 non-null object\n", + " 8 common 1128313 non-null object\n", + "dtypes: object(9)\n", + "memory usage: 86.1+ MB\n" + ] + } + ], + "source": [ + "bioscan_df.info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "All images are labeled down to `order`, most (98.6%) are labeled to the `family` level, but we only have 22.5% and 7.5% with `genus` or `species` level designation, respectively. \n", + "\n", + "There seems to be 1 less genus from the original and 3 less species..." + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "data_source 1\n", + "kingdom 1\n", + "phylum 1\n", + "class 1\n", + "order 19\n", + "family 494\n", + "genus 3444\n", + "species 4095\n", + "common 7758\n", + "dtype: int64" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bioscan_df.nunique()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We have half as many unique species and 3,000 less unique common names as in the original. Can this be accounted for by the adjustment in genus?" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "kingdom\n", + "Animalia 1128313\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bioscan_df['kingdom'].value_counts()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "BIOSCAN is all `Animalia`, as expected." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Check we're not missing `family` designation when we have `genus`." + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 254158 entries, 1250748 to 10996889\n", + "Data columns (total 9 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 254158 non-null object\n", + " 1 kingdom 254158 non-null object\n", + " 2 phylum 254158 non-null object\n", + " 3 class 254158 non-null object\n", + " 4 order 254158 non-null object\n", + " 5 family 254158 non-null object\n", + " 6 genus 254158 non-null object\n", + " 7 species 84447 non-null object\n", + " 8 common 254158 non-null object\n", + "dtypes: object(9)\n", + "memory usage: 19.4+ MB\n" + ] + } + ], + "source": [ + "bioscan_df.loc[bioscan_df['genus'].notna()].info()" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "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", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommon
2017833BIOSCANAnimaliaArthropodaInsectaDipteraPhoridaeConiceromyiaNaNConiceromyia
10597769BIOSCANAnimaliaArthropodaInsectaPsocodeaPeripsocidaePeripsocusNaNPeripsocus
6533871BIOSCANAnimaliaArthropodaInsectaDipteraChironomidaeLimnophyespentaplastusLimnophyes pentaplastus
6676160BIOSCANAnimaliaArthropodaInsectaPsocodeaCaeciliusidaeCaeciliusNaNCaecilius
4184393BIOSCANAnimaliaArthropodaInsectaHymenopteraEulophidaeEulophmalaise01malaiseEulophmalaise01 malaise
5653281BIOSCANAnimaliaArthropodaInsectaLepidopteraGelechiidaeAristoteliabiolepAristotelia biolep
3933387BIOSCANAnimaliaArthropodaInsectaDipteraPsychodidaeLutzomyiaovallesiLutzomyia ovallesi
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order \n", + "2017833 BIOSCAN Animalia Arthropoda Insecta Diptera \\\n", + "10597769 BIOSCAN Animalia Arthropoda Insecta Psocodea \n", + "6533871 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "6676160 BIOSCAN Animalia Arthropoda Insecta Psocodea \n", + "4184393 BIOSCAN Animalia Arthropoda Insecta Hymenoptera \n", + "5653281 BIOSCAN Animalia Arthropoda Insecta Lepidoptera \n", + "3933387 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "\n", + " family genus species \n", + "2017833 Phoridae Coniceromyia NaN \\\n", + "10597769 Peripsocidae Peripsocus NaN \n", + "6533871 Chironomidae Limnophyes pentaplastus \n", + "6676160 Caeciliusidae Caecilius NaN \n", + "4184393 Eulophidae Eulophmalaise01 malaise \n", + "5653281 Gelechiidae Aristotelia biolep \n", + "3933387 Psychodidae Lutzomyia ovallesi \n", + "\n", + " common \n", + "2017833 Coniceromyia \n", + "10597769 Peripsocus \n", + "6533871 Limnophyes pentaplastus \n", + "6676160 Caecilius \n", + "4184393 Eulophmalaise01 malaise \n", + "5653281 Aristotelia biolep \n", + "3933387 Lutzomyia ovallesi " + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bioscan_df.loc[bioscan_df['genus'].notna()].sample(7)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We should not have instances where `common` is labeled as `Genus genus species` this time." + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "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", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommon
2828691BIOSCANAnimaliaArthropodaInsectaDipteraCeratopogonidaeNaNNaNAnimalia Arthropoda Insecta Diptera Ceratopogo...
8619691BIOSCANAnimaliaArthropodaInsectaDipteraCecidomyiidaeNaNNaNAnimalia Arthropoda Insecta Diptera Cecidomyiidae
10352035BIOSCANAnimaliaArthropodaInsectaLepidopteraTineidaeNaNNaNAnimalia Arthropoda Insecta Lepidoptera Tineidae
7670646BIOSCANAnimaliaArthropodaInsectaDipteraCecidomyiidaeNaNNaNAnimalia Arthropoda Insecta Diptera Cecidomyiidae
9934447BIOSCANAnimaliaArthropodaInsectaDipteraTephritidaeNaNNaNAnimalia Arthropoda Insecta Diptera Tephritidae
7501355BIOSCANAnimaliaArthropodaInsectaLepidopteraNaNNaNNaNAnimalia Arthropoda Insecta Lepidoptera
6477512BIOSCANAnimaliaArthropodaInsectaDipteraBombyliidaeNaNNaNAnimalia Arthropoda Insecta Diptera Bombyliidae
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order \n", + "2828691 BIOSCAN Animalia Arthropoda Insecta Diptera \\\n", + "8619691 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "10352035 BIOSCAN Animalia Arthropoda Insecta Lepidoptera \n", + "7670646 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "9934447 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "7501355 BIOSCAN Animalia Arthropoda Insecta Lepidoptera \n", + "6477512 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "\n", + " family genus species \n", + "2828691 Ceratopogonidae NaN NaN \\\n", + "8619691 Cecidomyiidae NaN NaN \n", + "10352035 Tineidae NaN NaN \n", + "7670646 Cecidomyiidae NaN NaN \n", + "9934447 Tephritidae NaN NaN \n", + "7501355 NaN NaN NaN \n", + "6477512 Bombyliidae NaN NaN \n", + "\n", + " common \n", + "2828691 Animalia Arthropoda Insecta Diptera Ceratopogo... \n", + "8619691 Animalia Arthropoda Insecta Diptera Cecidomyiidae \n", + "10352035 Animalia Arthropoda Insecta Lepidoptera Tineidae \n", + "7670646 Animalia Arthropoda Insecta Diptera Cecidomyiidae \n", + "9934447 Animalia Arthropoda Insecta Diptera Tephritidae \n", + "7501355 Animalia Arthropoda Insecta Lepidoptera \n", + "6477512 Animalia Arthropoda Insecta Diptera Bombyliidae " + ] + }, + "execution_count": 35, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bioscan_df.loc[bioscan_df['genus'].isna()].sample(7)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "When the `genus` is null, we again have `common` as a list of all higher order taxa available." + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_90984/2375049309.py:2: SettingWithCopyWarning: \n", + "A value is trying to be set on a copy of a slice from a DataFrame.\n", + "Try using .loc[row_indexer,col_indexer] = value instead\n", + "\n", + "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", + " bioscan_df['duplicate'] = bioscan_df.duplicated(subset = taxa, keep = 'first')\n" + ] + } + ], + "source": [ + "#number of unique 7-tuples in BIOSCAN\n", + "bioscan_df['duplicate'] = bioscan_df.duplicated(subset = taxa, keep = 'first')\n", + "bioscan_df_unique_taxa = bioscan_df.loc[~bioscan_df['duplicate']]" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 7831 entries, 1250748 to 10992773\n", + "Data columns (total 10 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 7831 non-null object\n", + " 1 kingdom 7831 non-null object\n", + " 2 phylum 7831 non-null object\n", + " 3 class 7831 non-null object\n", + " 4 order 7831 non-null object\n", + " 5 family 7817 non-null object\n", + " 6 genus 7404 non-null object\n", + " 7 species 5510 non-null object\n", + " 8 common 7831 non-null object\n", + " 9 duplicate 7831 non-null bool \n", + "dtypes: bool(1), object(9)\n", + "memory usage: 619.4+ KB\n" + ] + } + ], + "source": [ + "bioscan_df_unique_taxa.info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "7,831 unique." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We should be able to fill all in for all values of `species` that also have `genus` indicated since they are all in `Animalia`. Is `genus` labeled for all entries with `species` labeled? " + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 84447 entries, 1250748 to 10996872\n", + "Data columns (total 10 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 84447 non-null object\n", + " 1 kingdom 84447 non-null object\n", + " 2 phylum 84447 non-null object\n", + " 3 class 84447 non-null object\n", + " 4 order 84447 non-null object\n", + " 5 family 84447 non-null object\n", + " 6 genus 84447 non-null object\n", + " 7 species 84447 non-null object\n", + " 8 common 84447 non-null object\n", + " 9 duplicate 84447 non-null bool \n", + "dtypes: bool(1), object(9)\n", + "memory usage: 6.5+ MB\n" + ] + } + ], + "source": [ + "bioscan_df.loc[bioscan_df.species.notna()].info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "All resolved now." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In general, when the species is listed in BIOSCAN it is listed as `genus-species`. \n", + "\n", + "This should have been resolved.\n", + "\n", + "Let's check those stats again, we did confirm it earlier, but would also like to check EOL as it had a similar issue for some entries." + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [], + "source": [ + "def check_sci_name(df):\n", + " \"\"\"\n", + " This function checks the number of words in the species column for each sample.\n", + " Logs a warning with the number that have more than one word indicating the potential for both genus and species to be recorded.\n", + " Warning is printed to terminal, not saved to file.\n", + "\n", + " Parameters:\n", + " -----------\n", + " df - DataFrame with taxonomic hierarchy as columns.\n", + "\n", + " Returns:\n", + " --------\n", + " df - DataFrame with taxonomic hierarchy and length of species entry as columns.\n", + " \"\"\"\n", + " # Set length of species column with default = 1\n", + " df[\"len_species\"] = 1\n", + "\n", + " # Check for scientific name in species column (i.e., genus speices in species column, may correspond to missing genus)\n", + " for species in list(df.loc[df[\"species\"].notna(), \"species\"].unique()):\n", + " len_species = len(species.split(\" \"))\n", + " if len_species > 1:\n", + " df.loc[df[\"species\"] == species, \"len_species\"] = len_species\n", + " \n", + " return df\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_90984/2529943378.py:16: SettingWithCopyWarning: \n", + "A value is trying to be set on a copy of a slice from a DataFrame.\n", + "Try using .loc[row_indexer,col_indexer] = value instead\n", + "\n", + "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", + " df[\"len_species\"] = 1\n" + ] + } + ], + "source": [ + "bioscan_species_len_df = check_sci_name(bioscan_df)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 1128313 entries, 1250748 to 10996892\n", + "Data columns (total 11 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 1128313 non-null object\n", + " 1 kingdom 1128313 non-null object\n", + " 2 phylum 1128313 non-null object\n", + " 3 class 1128313 non-null object\n", + " 4 order 1128313 non-null object\n", + " 5 family 1112922 non-null object\n", + " 6 genus 254158 non-null object\n", + " 7 species 84447 non-null object\n", + " 8 common 1128313 non-null object\n", + " 9 duplicate 1128313 non-null bool \n", + " 10 len_species 1128313 non-null int64 \n", + "dtypes: bool(1), int64(1), object(9)\n", + "memory usage: 95.8+ MB\n" + ] + } + ], + "source": [ + "bioscan_species_len_df.info(show_counts = True)" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 3756 entries, 1250949 to 10996636\n", + "Data columns (total 11 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 3756 non-null object\n", + " 1 kingdom 3756 non-null object\n", + " 2 phylum 3756 non-null object\n", + " 3 class 3756 non-null object\n", + " 4 order 3756 non-null object\n", + " 5 family 3756 non-null object\n", + " 6 genus 3756 non-null object\n", + " 7 species 3756 non-null object\n", + " 8 common 3756 non-null object\n", + " 9 duplicate 3756 non-null bool \n", + " 10 len_species 3756 non-null int64 \n", + "dtypes: bool(1), int64(1), object(9)\n", + "memory usage: 326.4+ KB\n" + ] + } + ], + "source": [ + "bioscan_long_species = bioscan_species_len_df.loc[bioscan_species_len_df[\"len_species\"] > 1]\n", + "bioscan_long_species.info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Not all species indicated have length greater than 1 now, though this number has actually gone up by 140 since the last iteration." + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "len_species\n", + "1 1124557\n", + "2 3169\n", + "3 570\n", + "4 17\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 43, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bioscan_species_len_df.len_species.value_counts()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It seems the genus may have been removed, but the remaining string retained as they previously ranged from 2 to 5 \"words\" long." + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "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", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommonduplicatelen_species
6638941BIOSCANAnimaliaArthropodaInsectaHemipteraCicadellidaeLadoffacf. sannionisLadoffa cf. sannionisTrue2
8921010BIOSCANAnimaliaArthropodaInsectaDipteraChironomidaeAllocladiussp. 1esAllocladius sp. 1esTrue2
2234877BIOSCANAnimaliaArthropodaInsectaDipteraPsychodidaePsychodasp. 11gmkPsychoda sp. 11gmkTrue2
5575490BIOSCANAnimaliaArthropodaInsectaColeopteraChrysomelidaeChryssasp. 55Chryssa sp. 55True2
5996519BIOSCANAnimaliaArthropodaInsectaDipteraPsychodidaePsychodasp. 11gmkPsychoda sp. 11gmkTrue2
8253727BIOSCANAnimaliaArthropodaInsectaDipteraSimuliidaeSimuliumarcticum complexSimulium arcticum complexTrue2
6281701BIOSCANAnimaliaArthropodaInsectaDipteraPsychodidaePsychodasp. 11gmkPsychoda sp. 11gmkTrue2
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order family \n", + "6638941 BIOSCAN Animalia Arthropoda Insecta Hemiptera Cicadellidae \\\n", + "8921010 BIOSCAN Animalia Arthropoda Insecta Diptera Chironomidae \n", + "2234877 BIOSCAN Animalia Arthropoda Insecta Diptera Psychodidae \n", + "5575490 BIOSCAN Animalia Arthropoda Insecta Coleoptera Chrysomelidae \n", + "5996519 BIOSCAN Animalia Arthropoda Insecta Diptera Psychodidae \n", + "8253727 BIOSCAN Animalia Arthropoda Insecta Diptera Simuliidae \n", + "6281701 BIOSCAN Animalia Arthropoda Insecta Diptera Psychodidae \n", + "\n", + " genus species common duplicate \n", + "6638941 Ladoffa cf. sannionis Ladoffa cf. sannionis True \\\n", + "8921010 Allocladius sp. 1es Allocladius sp. 1es True \n", + "2234877 Psychoda sp. 11gmk Psychoda sp. 11gmk True \n", + "5575490 Chryssa sp. 55 Chryssa sp. 55 True \n", + "5996519 Psychoda sp. 11gmk Psychoda sp. 11gmk True \n", + "8253727 Simulium arcticum complex Simulium arcticum complex True \n", + "6281701 Psychoda sp. 11gmk Psychoda sp. 11gmk True \n", + "\n", + " len_species \n", + "6638941 2 \n", + "8921010 2 \n", + "2234877 2 \n", + "5575490 2 \n", + "5996519 2 \n", + "8253727 2 \n", + "6281701 2 " + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bioscan_long_species.sample(7)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Ah but the whole species indicator was moved into genus for some of these." + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "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", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommonduplicatelen_species
7525562BIOSCANAnimaliaArthropodaInsectaDipteraDrosophilidaeMycodrosophilaprojectans affinis 2Mycodrosophila projectans affinis 2True3
5454948BIOSCANAnimaliaArthropodaInsectaDipteraEmpididaePorphyrochroasp. 6 bkc-Porphyrochroa sp. 6 bkc-True3
2006286BIOSCANAnimaliaArthropodaInsectaDipteraSciaridaeCosmosciarasp. saevg morphCosmosciara sp. saevg morphTrue3
1299754BIOSCANAnimaliaArthropodaInsectaDipteraSciaridaeCosmosciarasp. saevg morphCosmosciara sp. saevg morphFalse3
7595135BIOSCANAnimaliaArthropodaInsectaDipteraSciaridaeCosmosciarasp. saevg morphCosmosciara sp. saevg morphTrue3
3850263BIOSCANAnimaliaArthropodaInsectaDipteraSciaridaeCosmosciarasp. saevg morphCosmosciara sp. saevg morphTrue3
10366847BIOSCANAnimaliaArthropodaInsectaDipteraSciaridaeCosmosciarasp. saevg morphCosmosciara sp. saevg morphTrue3
6253262BIOSCANAnimaliaArthropodaInsectaDipteraDrosophilidaeHirtodrosophilasubflavohalterata affinis 4Hirtodrosophila subflavohalterata affinis 4True3
4624702BIOSCANAnimaliaArthropodaInsectaDipteraEmpididaePorphyrochroasp. 6 bkc-Porphyrochroa sp. 6 bkc-True3
6143519BIOSCANAnimaliaArthropodaInsectaDipteraSciaridaeCosmosciarasp. saevg morphCosmosciara sp. saevg morphTrue3
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order family \n", + "7525562 BIOSCAN Animalia Arthropoda Insecta Diptera Drosophilidae \\\n", + "5454948 BIOSCAN Animalia Arthropoda Insecta Diptera Empididae \n", + "2006286 BIOSCAN Animalia Arthropoda Insecta Diptera Sciaridae \n", + "1299754 BIOSCAN Animalia Arthropoda Insecta Diptera Sciaridae \n", + "7595135 BIOSCAN Animalia Arthropoda Insecta Diptera Sciaridae \n", + "3850263 BIOSCAN Animalia Arthropoda Insecta Diptera Sciaridae \n", + "10366847 BIOSCAN Animalia Arthropoda Insecta Diptera Sciaridae \n", + "6253262 BIOSCAN Animalia Arthropoda Insecta Diptera Drosophilidae \n", + "4624702 BIOSCAN Animalia Arthropoda Insecta Diptera Empididae \n", + "6143519 BIOSCAN Animalia Arthropoda Insecta Diptera Sciaridae \n", + "\n", + " genus species \n", + "7525562 Mycodrosophila projectans affinis 2 \\\n", + "5454948 Porphyrochroa sp. 6 bkc- \n", + "2006286 Cosmosciara sp. saevg morph \n", + "1299754 Cosmosciara sp. saevg morph \n", + "7595135 Cosmosciara sp. saevg morph \n", + "3850263 Cosmosciara sp. saevg morph \n", + "10366847 Cosmosciara sp. saevg morph \n", + "6253262 Hirtodrosophila subflavohalterata affinis 4 \n", + "4624702 Porphyrochroa sp. 6 bkc- \n", + "6143519 Cosmosciara sp. saevg morph \n", + "\n", + " common duplicate len_species \n", + "7525562 Mycodrosophila projectans affinis 2 True 3 \n", + "5454948 Porphyrochroa sp. 6 bkc- True 3 \n", + "2006286 Cosmosciara sp. saevg morph True 3 \n", + "1299754 Cosmosciara sp. saevg morph False 3 \n", + "7595135 Cosmosciara sp. saevg morph True 3 \n", + "3850263 Cosmosciara sp. saevg morph True 3 \n", + "10366847 Cosmosciara sp. saevg morph True 3 \n", + "6253262 Hirtodrosophila subflavohalterata affinis 4 True 3 \n", + "4624702 Porphyrochroa sp. 6 bkc- True 3 \n", + "6143519 Cosmosciara sp. saevg morph True 3 " + ] + }, + "execution_count": 45, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bioscan_long_species.loc[bioscan_long_species['len_species'] > 2].sample(10)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This looks like about what we expected." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It would seem the \"sp. ...\" is used to indicate they are likely the same species, though the actual species is not designated (either unnamed or undetermined). This is information we should retain, but the duplicated genus can be removed." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### EOL" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 6250689 entries, 957254 to 10998645\n", + "Data columns (total 9 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 6250689 non-null object\n", + " 1 kingdom 5868540 non-null object\n", + " 2 phylum 5878322 non-null object\n", + " 3 class 5854358 non-null object\n", + " 4 order 5851858 non-null object\n", + " 5 family 5835842 non-null object\n", + " 6 genus 5940575 non-null object\n", + " 7 species 5951882 non-null object\n", + " 8 common 6250689 non-null object\n", + "dtypes: object(9)\n", + "memory usage: 476.9+ MB\n" + ] + } + ], + "source": [ + "eol_df.info(show_counts = True)" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "data_source 1\n", + "kingdom 7\n", + "phylum 90\n", + "class 280\n", + "order 1321\n", + "family 7735\n", + "genus 73065\n", + "species 163378\n", + "common 440892\n", + "dtype: int64" + ] + }, + "execution_count": 47, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_df.nunique()" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "data_source 1\n", + "kingdom 7\n", + "phylum 88\n", + "class 259\n", + "order 1149\n", + "family 5926\n", + "genus 34501\n", + "species 0\n", + "common 39233\n", + "dtype: int64" + ] + }, + "execution_count": 48, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_df.loc[eol_df.species.isna()].nunique()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "There are 503,595 unique page IDs from EOL in this dataset, which clearly represent varying levels of taxa. \n", + "\n", + "Unique species + unique common where species is null (39,233) does not reach this number. But we have added SO many more phyla through family!" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "kingdom\n", + "Animalia 3410638\n", + "Plantae 2172010\n", + "Fungi 265636\n", + "Protozoa 10924\n", + "Chromista 6443\n", + "Bacteria 2864\n", + "Archaea 25\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 49, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_df['kingdom'].value_counts()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We have much greater kingdom variety here.\n", + "\n", + "We have already observed that not all ranks are filled in at the higher levels, sometimes having just one gap. This has been greatly improved from the first iteration and we'll get one more pass." + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_90984/52183210.py:2: SettingWithCopyWarning: \n", + "A value is trying to be set on a copy of a slice from a DataFrame.\n", + "Try using .loc[row_indexer,col_indexer] = value instead\n", + "\n", + "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", + " eol_df['duplicate'] = eol_df.duplicated(subset = taxa, keep = 'first')\n" + ] + } + ], + "source": [ + "#number of unique 7-tuples in EOL\n", + "eol_df['duplicate'] = eol_df.duplicated(subset = taxa, keep = 'first')\n", + "eol_df_unique_taxa = eol_df.loc[~eol_df['duplicate']]" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 449882 entries, 957254 to 10998610\n", + "Data columns (total 10 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 449882 non-null object\n", + " 1 kingdom 399987 non-null object\n", + " 2 phylum 403692 non-null object\n", + " 3 class 402236 non-null object\n", + " 4 order 403031 non-null object\n", + " 5 family 403098 non-null object\n", + " 6 genus 423277 non-null object\n", + " 7 species 410316 non-null object\n", + " 8 common 449882 non-null object\n", + " 9 duplicate 449882 non-null bool \n", + "dtypes: bool(1), object(9)\n", + "memory usage: 34.8+ MB\n" + ] + } + ], + "source": [ + "eol_df_unique_taxa.info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This is quite a good number of unqiue taxa.\n", + "\n", + "Is `genus` labeled for all entries with `species` labeled? " + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 5951882 entries, 957254 to 10998645\n", + "Data columns (total 10 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 5951882 non-null object\n", + " 1 kingdom 5572904 non-null object\n", + " 2 phylum 5581161 non-null object\n", + " 3 class 5571860 non-null object\n", + " 4 order 5576429 non-null object\n", + " 5 family 5578918 non-null object\n", + " 6 genus 5731404 non-null object\n", + " 7 species 5951882 non-null object\n", + " 8 common 5951882 non-null object\n", + " 9 duplicate 5951882 non-null bool \n", + "dtypes: bool(1), object(9)\n", + "memory usage: 459.8+ MB\n" + ] + } + ], + "source": [ + "eol_df.loc[eol_df.species.notna()].info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Not all labeled species have higher order taxa, but they do all have `common` (likely because if there is no common name, it pulls scientific name (genus-species)).\n", + "\n", + "This will hopefully be filled with the next iteration." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's get a quick sample of the `common` column for images both with and without `species` labels. " + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "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", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommonduplicate
9270558EOLPlantaeTracheophytaMagnoliopsidaAsteralesAsteraceaeArtemisiacampestrisfield sagewortTrue
4817849EOLPlantaeTracheophytaMagnoliopsidaMyrtalesOnagraceaeFuchsialycioidesBox-thorn FuchsiaTrue
2551818EOLPlantaeTracheophytaMagnoliopsidaFabalesFabaceaeAspalathusfloriferaAspalathus floriferaTrue
5472692EOLPlantaeTracheophytaMagnoliopsidaGentianalesApocynaceaeMarsdeniapringleiMarsdenia pringleiTrue
10934680EOLAnimaliaArthropodaInsectaHymenopteraFormicidaeAztecatonduziAzteca tonduziTrue
10651724EOLPlantaeTracheophytaMagnoliopsidaRanunculalesPapaveraceaeEhrendorferiachrysanthagolden eardropsTrue
1338761EOLAnimaliaArthropodaInsectaHemipteraAphalaridaeAphalararumiciswhiteflyFalse
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order \n", + "9270558 EOL Plantae Tracheophyta Magnoliopsida Asterales \\\n", + "4817849 EOL Plantae Tracheophyta Magnoliopsida Myrtales \n", + "2551818 EOL Plantae Tracheophyta Magnoliopsida Fabales \n", + "5472692 EOL Plantae Tracheophyta Magnoliopsida Gentianales \n", + "10934680 EOL Animalia Arthropoda Insecta Hymenoptera \n", + "10651724 EOL Plantae Tracheophyta Magnoliopsida Ranunculales \n", + "1338761 EOL Animalia Arthropoda Insecta Hemiptera \n", + "\n", + " family genus species common \n", + "9270558 Asteraceae Artemisia campestris field sagewort \\\n", + "4817849 Onagraceae Fuchsia lycioides Box-thorn Fuchsia \n", + "2551818 Fabaceae Aspalathus florifera Aspalathus florifera \n", + "5472692 Apocynaceae Marsdenia pringlei Marsdenia pringlei \n", + "10934680 Formicidae Azteca tonduzi Azteca tonduzi \n", + "10651724 Papaveraceae Ehrendorferia chrysantha golden eardrops \n", + "1338761 Aphalaridae Aphalara rumicis whitefly \n", + "\n", + " duplicate \n", + "9270558 True \n", + "4817849 True \n", + "2551818 True \n", + "5472692 True \n", + "10934680 True \n", + "10651724 True \n", + "1338761 False " + ] + }, + "execution_count": 53, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# existing species label\n", + "eol_df.loc[eol_df.species.notna()].sample(7)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Good, some of these do have common names. We could check numbers of `common` where it doesn't match the `genus-species` form for a better count, but our random sample is promising." + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "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", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommonduplicate
5188973EOLAnimaliaMolluscaGastropodaNeogastropodaMitridaeMitraNaNmitras mitresTrue
5995303EOLPlantaeTracheophytaMagnoliopsidaVitalesVitaceaeVitisNaNchampin's grapeTrue
3906456EOLFungiBasidiomycotaAgaricomycetesAgaricalesAgaricaceaeAgaricusNaNAgaricusTrue
7978418EOLAnimaliaChordataAvesGalliformesNaNNaNNaNAnimalia Chordata Aves GalliformesTrue
5606824EOLAnimaliaMolluscaGastropodaLittorinimorphaCassidaePhaliumNaNPhaliumTrue
3243158EOLPlantaeTracheophytaMagnoliopsidaGentianalesApocynaceaeAspidoglossumNaNAspidoglossumTrue
5087076EOLAnimaliaChordataAvesPasseriformesTurdidaeCochoaNaNCochoaFalse
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order \n", + "5188973 EOL Animalia Mollusca Gastropoda Neogastropoda \\\n", + "5995303 EOL Plantae Tracheophyta Magnoliopsida Vitales \n", + "3906456 EOL Fungi Basidiomycota Agaricomycetes Agaricales \n", + "7978418 EOL Animalia Chordata Aves Galliformes \n", + "5606824 EOL Animalia Mollusca Gastropoda Littorinimorpha \n", + "3243158 EOL Plantae Tracheophyta Magnoliopsida Gentianales \n", + "5087076 EOL Animalia Chordata Aves Passeriformes \n", + "\n", + " family genus species \n", + "5188973 Mitridae Mitra NaN \\\n", + "5995303 Vitaceae Vitis NaN \n", + "3906456 Agaricaceae Agaricus NaN \n", + "7978418 NaN NaN NaN \n", + "5606824 Cassidae Phalium NaN \n", + "3243158 Apocynaceae Aspidoglossum NaN \n", + "5087076 Turdidae Cochoa NaN \n", + "\n", + " common duplicate \n", + "5188973 mitras mitres True \n", + "5995303 champin's grape True \n", + "3906456 Agaricus True \n", + "7978418 Animalia Chordata Aves Galliformes True \n", + "5606824 Phalium True \n", + "3243158 Aspidoglossum True \n", + "5087076 Cochoa False " + ] + }, + "execution_count": 54, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# No species label\n", + "eol_df.loc[eol_df.species.isna()].sample(7)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's check the `species` length in EOL as well, we know there are some that have genus-species. And others with hybrids that get VERY long." + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_90984/2529943378.py:16: SettingWithCopyWarning: \n", + "A value is trying to be set on a copy of a slice from a DataFrame.\n", + "Try using .loc[row_indexer,col_indexer] = value instead\n", + "\n", + "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", + " df[\"len_species\"] = 1\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 6250689 entries, 957254 to 10998645\n", + "Data columns (total 11 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 6250689 non-null object\n", + " 1 kingdom 5868540 non-null object\n", + " 2 phylum 5878322 non-null object\n", + " 3 class 5854358 non-null object\n", + " 4 order 5851858 non-null object\n", + " 5 family 5835842 non-null object\n", + " 6 genus 5940575 non-null object\n", + " 7 species 5951882 non-null object\n", + " 8 common 6250689 non-null object\n", + " 9 duplicate 6250689 non-null bool \n", + " 10 len_species 6250689 non-null int64 \n", + "dtypes: bool(1), int64(1), object(9)\n", + "memory usage: 530.5+ MB\n" + ] + } + ], + "source": [ + "eol_species_len = check_sci_name(eol_df)\n", + "eol_species_len.info(show_counts = True)" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 145301 entries, 957254 to 10998622\n", + "Data columns (total 11 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 145301 non-null object\n", + " 1 kingdom 22 non-null object\n", + " 2 phylum 22 non-null object\n", + " 3 class 22 non-null object\n", + " 4 order 582 non-null object\n", + " 5 family 631 non-null object\n", + " 6 genus 145301 non-null object\n", + " 7 species 145301 non-null object\n", + " 8 common 145301 non-null object\n", + " 9 duplicate 145301 non-null bool \n", + " 10 len_species 145301 non-null int64 \n", + "dtypes: bool(1), int64(1), object(9)\n", + "memory usage: 12.3+ MB\n" + ] + } + ], + "source": [ + "eol_long_species = eol_species_len.loc[eol_species_len[\"len_species\"] > 1]\n", + "eol_long_species.info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "That's quite a lot with species name longer than 1 word." + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "len_species\n", + "2 121046\n", + "3 19652\n", + "4 3948\n", + "5 316\n", + "6 264\n", + "8 26\n", + "7 14\n", + "16 13\n", + "10 6\n", + "18 4\n", + "9 4\n", + "21 3\n", + "17 2\n", + "15 1\n", + "26 1\n", + "11 1\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 57, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_long_species.len_species.value_counts()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We have length 2 all the way to 26. \n", + "\n", + "Why are some more than 10 words long?\n", + "- Seem to be hybrids, getting genus added now\n", + "- We have one that says \"Bee\"... it was \"bee bees ntomology apoidea extrememarco insects...\"" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "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", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommonduplicatelen_species
2602723EOLNaNNaNNaNNaNNaNPhotiniajaponica benth. & hook.f. ex asch. & schweinf.Photinia japonica benth. & hook.f. ex asch. & ...False8
1735249EOLNaNNaNNaNNaNNaNBeebees entomology apoidea extrememacro insects i...Bee bees entomology apoidea extrememacro insec...False15
4389838EOLNaNNaNNaNNaNNaNAlepidoscelispollen biml usgs usgsbiml droege female макрос...Alepidoscelis pollen biml usgs usgsbiml droege...False21
9658690EOLNaNNaNNaNNaNNaNMalacostracataxonomy:order=decapoda decapoda taxonomy:fami...Malacostraca taxonomy:order=decapoda decapoda ...False8
3427215EOLNaNNaNNaNNaNNaNCupressusmacrocarpa x xanthocyparis nootkatensis = x cu...Cupressus macrocarpa x xanthocyparis nootkaten...True8
5137227EOLNaNNaNNaNNaNNaNCupressusmacrocarpa x xanthocyparis nootkatensis = x cu...Cupressus macrocarpa x xanthocyparis nootkaten...True8
10327866EOLNaNNaNNaNNaNNaNCupressusmacrocarpa x xanthocyparis nootkatensis = x cu...Cupressus macrocarpa x xanthocyparis nootkaten...True8
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order family genus \n", + "2602723 EOL NaN NaN NaN NaN NaN Photinia \\\n", + "1735249 EOL NaN NaN NaN NaN NaN Bee \n", + "4389838 EOL NaN NaN NaN NaN NaN Alepidoscelis \n", + "9658690 EOL NaN NaN NaN NaN NaN Malacostraca \n", + "3427215 EOL NaN NaN NaN NaN NaN Cupressus \n", + "5137227 EOL NaN NaN NaN NaN NaN Cupressus \n", + "10327866 EOL NaN NaN NaN NaN NaN Cupressus \n", + "\n", + " species \n", + "2602723 japonica benth. & hook.f. ex asch. & schweinf. \\\n", + "1735249 bees entomology apoidea extrememacro insects i... \n", + "4389838 pollen biml usgs usgsbiml droege female макрос... \n", + "9658690 taxonomy:order=decapoda decapoda taxonomy:fami... \n", + "3427215 macrocarpa x xanthocyparis nootkatensis = x cu... \n", + "5137227 macrocarpa x xanthocyparis nootkatensis = x cu... \n", + "10327866 macrocarpa x xanthocyparis nootkatensis = x cu... \n", + "\n", + " common duplicate \n", + "2602723 Photinia japonica benth. & hook.f. ex asch. & ... False \\\n", + "1735249 Bee bees entomology apoidea extrememacro insec... False \n", + "4389838 Alepidoscelis pollen biml usgs usgsbiml droege... False \n", + "9658690 Malacostraca taxonomy:order=decapoda decapoda ... False \n", + "3427215 Cupressus macrocarpa x xanthocyparis nootkaten... True \n", + "5137227 Cupressus macrocarpa x xanthocyparis nootkaten... True \n", + "10327866 Cupressus macrocarpa x xanthocyparis nootkaten... True \n", + "\n", + " len_species \n", + "2602723 8 \n", + "1735249 15 \n", + "4389838 21 \n", + "9658690 8 \n", + "3427215 8 \n", + "5137227 8 \n", + "10327866 8 " + ] + }, + "execution_count": 58, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_long_species.loc[eol_long_species[\"len_species\"] > 7].sample(7)" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "data_source 1\n", + "kingdom 1\n", + "phylum 1\n", + "class 1\n", + "order 20\n", + "family 34\n", + "genus 8587\n", + "species 22759\n", + "common 23241\n", + "duplicate 2\n", + "len_species 16\n", + "dtype: int64" + ] + }, + "execution_count": 59, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_long_species.nunique()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Genus was filled out much more from the last iteration (from only 47 to 8,587 unique instances), also doesn't have any nulls now (pulling that first word from species column)." + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "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", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommonduplicatelen_species
7514898EOLNaNNaNNaNNaNNaNHarmoniaaxyridis form conspicuaHarmonia axyridis form conspicuaTrue3
5396591EOLNaNNaNNaNNaNNaNCoelomycetesp. indesc.Coelomycete sp. indesc.True2
1903947EOLNaNNaNNaNNaNNaNEndotrichadentiprocessa liEndotricha dentiprocessa liFalse2
8774963EOLNaNNaNNaNNaNNaNYpthimapandocus corticariaYpthima pandocus corticariaTrue2
1621291EOLNaNNaNNaNNaNNaNAlloporacampyleca tylota fisherAllopora campyleca tylota fisherFalse3
3601676EOLNaNNaNNaNNaNNaNSilenewahlbergella chowdhuriSilene wahlbergella chowdhuriTrue2
5636041EOLNaNNaNNaNNaNNaNPenstemonbrevisepalus pennellPenstemon brevisepalus pennellTrue2
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order family genus \n", + "7514898 EOL NaN NaN NaN NaN NaN Harmonia \\\n", + "5396591 EOL NaN NaN NaN NaN NaN Coelomycete \n", + "1903947 EOL NaN NaN NaN NaN NaN Endotricha \n", + "8774963 EOL NaN NaN NaN NaN NaN Ypthima \n", + "1621291 EOL NaN NaN NaN NaN NaN Allopora \n", + "3601676 EOL NaN NaN NaN NaN NaN Silene \n", + "5636041 EOL NaN NaN NaN NaN NaN Penstemon \n", + "\n", + " species common duplicate \n", + "7514898 axyridis form conspicua Harmonia axyridis form conspicua True \\\n", + "5396591 sp. indesc. Coelomycete sp. indesc. True \n", + "1903947 dentiprocessa li Endotricha dentiprocessa li False \n", + "8774963 pandocus corticaria Ypthima pandocus corticaria True \n", + "1621291 campyleca tylota fisher Allopora campyleca tylota fisher False \n", + "3601676 wahlbergella chowdhuri Silene wahlbergella chowdhuri True \n", + "5636041 brevisepalus pennell Penstemon brevisepalus pennell True \n", + "\n", + " len_species \n", + "7514898 3 \n", + "5396591 2 \n", + "1903947 2 \n", + "8774963 2 \n", + "1621291 3 \n", + "3601676 2 \n", + "5636041 2 " + ] + }, + "execution_count": 60, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_long_species.loc[eol_long_species[\"len_species\"] < 7].sample(7)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "There are inconsistencies we likely can't resolve, some have names following the species (in the scientific name standard format of genus-species-namer-year) while others have \"sp. __ \" which is often used to indicate unknown species (pronounced \"spa\"), but the following bit may be used to indicate multiple images with unknown species are likely of the same species. \n", + "\n", + "\n", + "Ex from earlier: \"Adelpha godmani\" is a butterfly with species name given by Fruhstorfer in 1913 ([source](https://butterfliesofamerica.com/L/t/Adelpha_godmani_a.htm)), it was listed as \"adelpha godmani fruhstorfer\"." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Label Overlap Check" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Checking for overlap between the three data sources should give pretty good results, now that most inconsistencies have been addressed.\n", + "\n", + "For now, let's just take a quick look at genera across the datasets since they are more standardized (and listed more often in BIOSCAN)." + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "there are 73065 genera in EOL\n", + "there are 4884 genera in inat21\n", + "there are 3444 genera in bioscan\n" + ] + } + ], + "source": [ + "eol_genera = list(eol_df.loc[eol_df['genus'].notna(), 'genus'].unique())\n", + "inat21_genera = list(inat21_df.loc[inat21_df['genus'].notna(), 'genus'].unique())\n", + "bioscan_genera = list(bioscan_df.loc[bioscan_df['genus'].notna(), 'genus'].unique())\n", + "\n", + "print(f\"there are {len(eol_genera)} genera in EOL\")\n", + "print(f\"there are {len(inat21_genera)} genera in inat21\")\n", + "print(f\"there are {len(bioscan_genera)} genera in bioscan\")" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "There are 4771 genera shared between EOL and iNat21.\n", + "There are 2760 genera shared between EOL and BIOSCAN.\n", + "There are 212 genera shared between iNat21 and BIOSCAN.\n", + "There are 207 genera shared between all three data sources.\n" + ] + } + ], + "source": [ + "gen_overlap = list(set(eol_genera) & set(inat21_genera))\n", + "print(f\"There are {len(gen_overlap)} genera shared between EOL and iNat21.\")\n", + "print(f\"There are {len(list(set(eol_genera) & set(bioscan_genera)))} genera shared between EOL and BIOSCAN.\")\n", + "print(f\"There are {len(list(set(inat21_genera) & set(bioscan_genera)))} genera shared between iNat21 and BIOSCAN.\")\n", + "print(f\"There are {len(list(set(gen_overlap) & set(bioscan_genera)))} genera shared between all three data sources.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "BIOSCAN and iNat21's overlap of genera is completely contained in EOL." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Overall Stats\n", + "\n", + "Keep in mind, this is without fixing remaining inconsistencies observed above." + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": {}, + "outputs": [], + "source": [ + "avgs_all_images = []\n", + "std_all_images = []\n", + "avgs_labeled_images = []\n", + "std_labeled_images = []\n", + "for taxon in taxa_com[1:]: #taxa + common\n", + " num_taxon = df[taxon].nunique()\n", + " num_img_taxon = len(df.loc[df[taxon].notna()])\n", + " avg_all = 10436521/num_taxon\n", + " std_all = np.sqrt(10436521/num_taxon)\n", + " avg_labeled = num_img_taxon/num_taxon\n", + " std_labeled = np.sqrt(num_img_taxon/num_taxon)\n", + " avgs_all_images.append(avg_all)\n", + " std_all_images.append(std_all)\n", + " avgs_labeled_images.append(avg_labeled)\n", + " std_labeled_images.append(std_labeled)" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "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", + "
classaverage_all_imgsstandard_deviationavg_labeledstd_dev_labeled
0kingdom1.490932e+061221.0370881.383385e+061176.173942
1phylum1.159613e+05340.5309741.077053e+05328.184873
2class3.674831e+04191.6984963.404758e+04184.519876
3order7.841113e+0388.5500587.262971e+0385.223064
4family1.339389e+0336.5976671.236603e+0335.165360
5genus1.413071e+0211.8872681.202537e+0210.966024
6species6.331150e+017.9568525.291774e+017.274458
7common2.345850e+014.8433972.262532e+014.756608
\n", + "
" + ], + "text/plain": [ + " class average_all_imgs standard_deviation avg_labeled \n", + "0 kingdom 1.490932e+06 1221.037088 1.383385e+06 \\\n", + "1 phylum 1.159613e+05 340.530974 1.077053e+05 \n", + "2 class 3.674831e+04 191.698496 3.404758e+04 \n", + "3 order 7.841113e+03 88.550058 7.262971e+03 \n", + "4 family 1.339389e+03 36.597667 1.236603e+03 \n", + "5 genus 1.413071e+02 11.887268 1.202537e+02 \n", + "6 species 6.331150e+01 7.956852 5.291774e+01 \n", + "7 common 2.345850e+01 4.843397 2.262532e+01 \n", + "\n", + " std_dev_labeled \n", + "0 1176.173942 \n", + "1 328.184873 \n", + "2 184.519876 \n", + "3 85.223064 \n", + "4 35.165360 \n", + "5 10.966024 \n", + "6 7.274458 \n", + "7 4.756608 " + ] + }, + "execution_count": 65, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "avg_std = pd.DataFrame(data = {'class': taxa_com[1:], 'average_all_imgs': avgs_all_images, 'standard_deviation': std_all_images,\n", + " 'avg_labeled': avgs_labeled_images, 'std_dev_labeled': std_labeled_images })\n", + "avg_std" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": {}, + "outputs": [], + "source": [ + "avg_std.to_csv(\"../data/stats_avg_std_byClass.csv\", index = False)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Observe that the Plant and Animal `kingdom`s are actually much more heavily represented than Fungi (it didn't look this way before we standardized the kingdoms)." + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": {}, + "outputs": [], + "source": [ + "sns.set(rc = {'figure.figsize': (10,6)})" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 68, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0UAAAIgCAY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2bMBRUFAAAAABdLaE5nHD16tH777TdJkjFGEyZMUPHixc+Yb8uWLSpbtmzeVQgAAAAA+SjHR4patmwpY4yMMb5p2b9nf7ndbtWtW1ePPfZYvhQLAAAAAHktx0eKYmJiFBMTI0mKi4vThAkTVLVq1XwrDAAAAAAuhhyHolO98cYbeV0HAAAAADgiV6HoyJEjeumll7R06VIdOXJEXq/X73aXy6XPP/88TwosyNxul9xul9NlXLCQELff94LM6zXyes25ZwQAAIA1chWKHn30Uc2dO1c33HCDatasKbe74L9Yzmtut0uXliqqkCBaN+HhYU6XcMGyvF4d2J9BMAIAAIBPrkLRp59+qhEjRqh///55XU/QcLtdCnG7Nfvjddq9L8Ppci6Iy+VSSIhbWVlevwttFDTlSxdV91tryu12EYoAAADgk6tQlJmZqcjIyLyuJSjt3pehHXsOOV3GBXG5XAoNDVFmZlaBDkUAAADA2eTq3K7GjRvrq6++yutaAAAAAOCiy9WRotatW+vBBx/Uvn37VKdOHYWFnflek9tvv/1CawMAAACAfJerUDR8+HBJ0vz58zV//vwzbne5XIQiAAAAAAVCrkLR4sWL87oOAAAAAHBErkJR5cqV87oOAAAAAHBErkLR888/f855Bg8enJuhAQAAAOCiyvNQVLx4cZUvX55QBAAAAKBAyFUoWr9+/RnTMjIy9MMPP2jChAkaP378BRcGAAAAABdDrj6n6GyKFi2qJk2aaNCgQXryySfzalgAAAAAyFd5FoqyVapUSZs2bcrrYQEAAAAgX+Tq9LmzMcbot99+07Rp07g6HQAAAIACI1ehqEaNGnK5XGe9zRjD6XMAAAAACoxchaJBgwadNRQVL15cN998s6688soLrQsAAAAALopchaIhQ4bkdR0AAAAA4Ihcv6fo+PHjev/997VixQqlp6erVKlSio6OVocOHXTJJZfkZY0AAAAAkG9yFYrS09PVs2dPrV+/Xv/6179Urlw5paam6sMPP9Sbb76p2bNnq0SJEnldKwAAAADkuVxdkvuZZ57Rrl27lJiYqCVLluidd97RkiVLlJiYqL1792ry5Mk5Hmvv3r2655571KBBA0VFRal///7auH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s8Z4PB7zySefmEOHDpmffvrJ1KhRw0yfPt2kpaWZdevWmf79+5uGDRuaY8eOGWOMeeaZZ8zNN99slixZYrZu3WrmzJljoqKiTGJi4kVbV4EgNjbWjB49+rxuHz16tImNjTXGGLNt2zbj8XjMTTfdZD7//HOzceNGM27cOFOjRg2TlpZmjDEmMTHRREZGmvfee89s3rzZTJ061dSoUcM0a9bMb4zly5fn01IGjscff9zUrVvXZGRkmPT0dFOrVi3z8MMP+26PjY01ERER5plnnjGbN282SUlJplatWub55583xhizfPly4/F4zLZt24wxJ7eNOnXqmHfeecekpaWZ8ePHm2uvvda0a9fOLFu2zKxdu9bExMSYIUOGGGNObouRkZHm8ccfN1u2bDEbN2409913n6lVq5bZs2ePMebs/c3uzYABA8ztt99uVq9ebbZt22Y++OADU6tWLTNz5syLtg7P16ZNm4zH4zEfffTROef1eDymbt26Zt68eSYtLc288MILxuPxmO+++84YY8yUKVOMx+MxjzzyiElLSzOpqalmzZo1JiIiwkycONH8+uuvZvny5aZNmzamY8eOJisryxhz/n06fb136NDB3HfffSY1NdX8+uuvpl+/fubf//63McaY/fv3my5duphhw4aZvXv3GmOMue2220zv3r1NcnKySUtLM6+//rrxeDzms88+y/P1mxdyut+oVauW+fbbb83atWvNsWPHzCOPPGKuv/56s3DhQpOammoSExNNRESEef31140xxuzevdt4PB4zc+ZMk56ebg4ePGiaNm1qYmNjzZo1a8y6devM4MGDTXR0tNmxY4fJzMw0u3fv9n3t2rXLdO/e3bRt29YcPHjQZGZmmg4dOpi2bduaZcuWmY0bN5oJEyaYiIgIs3btWmOMMTNmzDDR0dFm8eLFZvv27Wb58uWmRYsWZuDAgRd9veaFs/VmzZo1pkGDBubtt982xpz7eSE9Pd00btzY9OrVy6xdu9YkJyebzp07m65du5ojR46YmTNnGo/HY3bv3m2OHTtmvvzyS1O7dm0ze/Zss3XrVvP111+bW265xQwdOtRXg8fjMfXr1zdr1641P/744xm1BlsfTpeTfUn16tXNwoULTUpKitm3b59ZtGiRqVGjhnn55ZdNamqqSUpKMpGRkebdd981xpz7+e9c69Tr9ZouXbqY2NhYs3r1arNx40bzzDPPmIiICPPLL7/kaAz8hVAUBJo1a2YiIiJM3bp1Td26dU2tWrWMx+MxrVq1Ml988YVvnuwnrpUrV5p58+b5jfHOO++YGjVq+I159913+83Tvn17M378eGPMmS8gkpOTzwg333zzjfF4PGbnzp3m8OHDpnbt2mbRokV+80yePNn3Qt0WsbGx5tprr/X1K/urd+/evttzEopmzJjhuz09Pd14PB7zwQcfGGNO9u/pp5/2G2Pw4MHWhaITJ06YRo0amREjRvimDRo0yERHR5uMjAxjzMn1fdttt/ndb+DAgaZPnz7GmLOHouwX0sYY8+uvvxqPx+PbyRljzFNPPWVatmxpjDEmLS3NvPLKK74X68YYk5qaajwej/n++++NMf8cit544w2zbt06v/q6dOlixowZcwFrJn/973//Mx6Px3z77bfnnNfj8ZgnnnjCb1q9evXMK6+8Yoz5KxSlp6f7bh82bJjp2LGj333Wr19vPB6P33Pe+fTp9PVer1498/TTT5sTJ04YY06+2F++fLmvj6dup0eOHDHTp08327dv96upcePGvnAdaHK63xg0aJDvPgcPHjQRERHmjTfe8BvrscceMzfeeKPxer3GmJM9nTt3rjHGmDfffNNERkb6wqMxxhw9etQ0btzYPPnkk2fU9cgjj5iGDRv61uUXX3xhPB6P2bBhg28er9drOnToYIYNG2aMMWbx4sXm888/9xvn2WefNc2bN8/t6nHU6b2JiIgwHo/HdO7c2bcdnOt54e233zZ16tQx+/fv992ekpJinnrqKXP06FEzd+5c4/F4fLd169bNTJw40W+8ZcuW+T33eTweEx8ff0at2a8tgq0Pp8rpvuT222/3u1+XLl387mOMMe+++65vX32u579zrdPvvvvOeDwev+3LGGN69Ojhe34K5r7kNd5TFCS6du3qO73K7Xbr0ksvVYkSJc467/XXX6/SpUtr6tSp2rp1q1JTU7Vu3bozTvOoWrWq3+8lSpTQiRMnzjpmzZo1VbJkSU2bNk2pqanasmWL1q1bJ0nKysrSxo0bdezYMY0ePdp32F46e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fvz4PHlDfH7KyX7j1HWf3ZPT13128Dvb+v67XmVlZfnN/9VXXyk+Pl7x8fG67rrrznl/r9fru/+0adOUkJCgjh076oYbblBcXJwWL15coC+ZfnpvqlatqpIlS6pHjx767rvvNHv27H98XggNDT3revs7Xq9X/fr1U4cOHc647dQLPvzTP++CsQ/ZcrovOX395KQP//T8d6516vV6Vbx48bNe1jt7vxbMfclrhCILvfTSS+rUqZPvDcuStHjxYkl/vwM63enzTJ8+XfXr19fzzz/vm/bGG2/4xrz66qsVGhqqnTt3qlmzZr55Xn/9dW3cuPGMQGazQoUK6eDBg37T0tLScnwkqUSJEqpcubJWr16tf//7377pa9euzdM6A92+ffv05ZdfqmPHjurdu7ffbbNmzdKcOXMuypGzt956S2XKlPH7TJAlS5ZIOndwTU5O1pdffql3331XderUkXQyIKelpalKlSr5VvOFcrvd6tSpkxITE9WvX78z/iP56quvavXq1b6jAefL4/Gc8Tk469ev16FDh8446pcbf/zxh6ZOnar+/furY8eO6tixo37//XfddNNNWrly5RlB7+uvv9Yvv/yib7/91heYDhw4oL179wbVPyeyn8dXrVqlGjVq+KavWrVK5cqVO+vlzD0ej+bPn6+9e/eqTJkykqRjx47p559/9l2SfcOGDRoxYoT69eun9u3b+92/evXqSk9PV0pKit/Roh9++MH3cRAvvviiBg8erP79+/tunz59elCt+1P9/PPP53xeqFatmt577z0dPHjQd/QvOTlZvXv31vvvv3/GPvyaa67R5s2b/YLYypUrNWvWLE2YMEFFixY9Z13B2ocL2ZdUrVrV76IHkhQfH6/t27dr6tSp5/zb51qnHo9Hhw4d0vHjx3XNNdf45rn//vtVo0YNxcbGBm1f8gNXn7NQpUqV9L///U+//PKL0tLSNHPmTCUmJkpSjj+MLPsJMiUlRQcPHlSlSpW0YcMGrVq1Stu3b9fcuXM1efJk35glSpRQ165d9dxzz2n+/Pnatm2b5s2bp6eeeuqM/7ra7rrrrtN3332nJUuWaNu2bZoyZYpSUlLOa4y77rpLiYmJmjdvnrZu3aqZM2dq0aJF+VRxYFqwYIEyMzPVr18/eTwev68BAwYoJCREb731Vr7XUbFiRe3atUtffvmlduzYoU8//VQTJkyQdO7trWzZsgoNDdWiRYu0bds2/fTTTxo+fLj27NmTJx8cmJ8GDBigK664Ql27dtX8+fOVlpamn376SePGjdPcuXP18MMPq3jx4rkau1evXlq/fr0eeughbdq0SStXrtSoUaN07bXXqmHDhhdc+6WXXqovvvhC999/v9atW6dt27Zp9uzZKlSokGrVqiXp5NHeHTt2aNeuXb4r7C1cuFA7duzQqlWrNHDgQJ04cSLg+3Q+SpQoof/7v//TlClT9MEHH2jr1q168803NXv2bPXp08f3Qrto0aLatGmT9u/fr3bt2ik8PFzDhw/X2rVrtX79et1zzz3KyMhQly5dtGfPHg0YMEANGjTQnXfeqT179vi+Dh48qEaNGql69er673//qxUrVmjTpk2aOHGiUlJSdOedd0o6uU/79ttvtXHjRm3evFmTJk3Sp59+WqDXfUZGhm897N69W6tWrVJ8fLzKly+vzp07n/N5oV27dipZsqTuuecerV+/Xj///LMmTJggj8ejypUr+/bhP//8s44ePaq77rpLn376qRISEpSamqply5ZpzJgxSk9Pz/Gl6oOxD9KF7Uv69++vjz76SK+//rrS0tKUlJSkt99+O8cfR3CuddqkSRPVrFlTw4cP17Jly7R161Y98cQTmjt3ru8fRMHal/xAKLLQ+PHjVbZsWcXGxqpz585aunSpnnzySUnSmjVrcjRGqVKldMcdd+jJJ5/U5MmTNXToUNWtW1cDBgzQ7bffrvfee0/x8fEqUqSI7wjFmDFj1KtXL02ZMkWtWrXSCy+8oMGDB2vIkCH5tqwFUa9evdSyZUvdc8896tChg/7444/z/oC9bt26acCAAZo0aZLatm2rr7/+Wh06dPA7tSjYvf/++7rxxhvPeuSgSpUqatGihZKSknTo0KF8raNnz55q1aqV75TVF198USNHjlTlypXPefSuQoUKevzxx7VkyRK1bt1aw4YNU4UKFdSrVy/99NNPAf2fvrCwMCUmJuqOO+7QtGnT1L59e911113atWuXZs2adUGf7xEVFaVp06b5jjYMGzZMUVFRm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yOHj2q+vXra926dXr++edVv359PlQWACzDkSIAwEXTtWtXRUZGKj4+Xvv27Tvv+0dHRyshIUGpqakaOHCgZsyYofHjx0uSihUrJkkqXLiwZs2apeuvv16PPvqoxo4dq4YNG6pZs2Z+Yz366KMaPHiwkpKS1L9/f7355puKi4vTtGnTfO9lAgDYwWWMMU4XAQBATixevFgVK1ZURESEb9qvv/6qtm3baurUqWrevLmD1QEACipOnwMAFBjffPONPvroI40aNUpXXXWVdu3apRdffFFXX321Gjdu7HR5AIACiiNFAIAC4+jRo5o8ebI++eQT7d69W5deeqmaNGmi//73vypbtqzT5QEACihCEQAAAACr8U5SAAAAAFYjFAEAAACwGqEIAAAAgNUIRQAAAACsRigCAAAAYDVCEQAAAACrEYoAAAAAWI1QBAAAAMBq/w+Brq0uyv70/gAAAABJRU5ErkJggg==", + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "sns.histplot(df_taxa, x = 'kingdom')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "jupytext": { + "formats": "ipynb,py:percent" + }, + "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.11.3" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}