diff --git "a/notebooks/ToL_stats_EDA.ipynb" "b/notebooks/ToL_stats_EDA.ipynb" new file mode 100644--- /dev/null +++ "b/notebooks/ToL_stats_EDA.ipynb" @@ -0,0 +1,4866 @@ +{ + "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_52067/1753147992.py:1: DtypeWarning: Columns (4,5,6) 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/statistics.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", + "
treeoflife_ideol_content_ideol_page_idbioscan_partbioscan_filenameinat21_filenameinat21_cls_nameinat21_cls_numkingdomphylumclassorderfamilygenusspeciescommon
0591045ed-19d1-482a-a312-a143bae420f529538374.065414274.0NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNmanfredatuberose
18a7fd521-97d2-4130-961c-7d7610a86bcd27793900.0888015.0NaNNaNNaNNaNNaNAnimaliaArthropodaInsectaLepidopteraOenosandridaeDiscophlebialipaugesDiscophlebia lipauges
2aad12e5b-5336-4bfe-a3ee-87e34d56fe6929121641.05618956.0NaNNaNNaNNaNNaNPlantaeTracheophytaMagnoliopsidaSapindalesRutaceaeMelicopedenhamiiMelicope denhamii
367d527bf-bae7-4b5c-b3b7-23403e519fef27596176.0607817.0NaNNaNNaNNaNNaNAnimaliaArthropodaInsectaTrichopteraLimnephilidaeLimnephiluslithusLimnephilus lithus
4298b088a-1d4d-4d63-86cd-13f52fd6c36020300703.0267922.0NaNNaNNaNNaNNaNAnimaliaArthropodaInsectaLepidopteraLycaenidaeGlaucopsycheastraeaAnatolian Black-eyed Blue
\n", + "
" + ], + "text/plain": [ + " treeoflife_id eol_content_id eol_page_id \n", + "0 591045ed-19d1-482a-a312-a143bae420f5 29538374.0 65414274.0 \\\n", + "1 8a7fd521-97d2-4130-961c-7d7610a86bcd 27793900.0 888015.0 \n", + "2 aad12e5b-5336-4bfe-a3ee-87e34d56fe69 29121641.0 5618956.0 \n", + "3 67d527bf-bae7-4b5c-b3b7-23403e519fef 27596176.0 607817.0 \n", + "4 298b088a-1d4d-4d63-86cd-13f52fd6c360 20300703.0 267922.0 \n", + "\n", + " bioscan_part bioscan_filename inat21_filename inat21_cls_name \n", + "0 NaN NaN NaN NaN \\\n", + "1 NaN NaN NaN NaN \n", + "2 NaN NaN NaN NaN \n", + "3 NaN NaN NaN NaN \n", + "4 NaN NaN NaN NaN \n", + "\n", + " inat21_cls_num kingdom phylum class order \n", + "0 NaN NaN NaN NaN NaN \\\n", + "1 NaN Animalia Arthropoda Insecta Lepidoptera \n", + "2 NaN Plantae Tracheophyta Magnoliopsida Sapindales \n", + "3 NaN Animalia Arthropoda Insecta Trichoptera \n", + "4 NaN Animalia Arthropoda Insecta Lepidoptera \n", + "\n", + " family genus species common \n", + "0 NaN NaN manfreda tuberose \n", + "1 Oenosandridae Discophlebia lipauges Discophlebia lipauges \n", + "2 Rutaceae Melicope denhamii Melicope denhamii \n", + "3 Limnephilidae Limnephilus lithus Limnephilus lithus \n", + "4 Lycaenidae Glaucopsyche astraea Anatolian Black-eyed Blue " + ] + }, + "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: 9562634 entries, 0 to 9562633\n", + "Data columns (total 16 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 treeoflife_id 9562634 non-null object \n", + " 1 eol_content_id 5938235 non-null float64\n", + " 2 eol_page_id 5938235 non-null float64\n", + " 3 bioscan_part 1071898 non-null float64\n", + " 4 bioscan_filename 1071898 non-null object \n", + " 5 inat21_filename 2552501 non-null object \n", + " 6 inat21_cls_name 2552501 non-null object \n", + " 7 inat21_cls_num 2552501 non-null float64\n", + " 8 kingdom 9196047 non-null object \n", + " 9 phylum 9205360 non-null object \n", + " 10 class 9182631 non-null object \n", + " 11 order 9180299 non-null object \n", + " 12 family 9150548 non-null object \n", + " 13 genus 8296095 non-null object \n", + " 14 species 8287116 non-null object \n", + " 15 common 8647125 non-null object \n", + "dtypes: float64(4), object(12)\n", + "memory usage: 1.1+ GB\n" + ] + } + ], + "source": [ + "df.info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Original version had 10,436,521 entries; was the validation set left out (there does seem to be about 5-10% less of each source).\n", + "\n", + "Labeling definitely has far better coverage now." + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "treeoflife_id 9562634\n", + "eol_content_id 5938235\n", + "eol_page_id 498053\n", + "bioscan_part 113\n", + "bioscan_filename 1071898\n", + "inat21_filename 2552501\n", + "inat21_cls_name 10000\n", + "inat21_cls_num 10000\n", + "kingdom 7\n", + "phylum 90\n", + "class 282\n", + "order 1328\n", + "family 7762\n", + "genus 71459\n", + "species 168030\n", + "common 439972\n", + "dtype: int64" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.nunique()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "There are 498,053 unique EOL page IDs, suggesting 498,053 unique classes among the 5,938,235 images pulled from EOL (and maintained here). Presumably this would represent the number of species or other lowest rank taxa covered." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Notice that we have 7 unique kingdoms, when there are only..." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "kingdom\n", + "Animalia 5685811\n", + "Plantae 3153467\n", + "Fungi 337175\n", + "Protozoa 10418\n", + "Chromista 6401\n", + "Bacteria 2752\n", + "Archaea 23\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 6, + "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`. \n", + "\n", + "We now have other single-celled organisms for kingdom" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['kingdom', 'phylum', 'class', 'order', 'family', 'genus', 'species']" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "taxa = list(df.columns[8:15])\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: 7901259 entries, 1 to 9562633\n", + "Data columns (total 7 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 kingdom 7901259 non-null object\n", + " 1 phylum 7901259 non-null object\n", + " 2 class 7901259 non-null object\n", + " 3 order 7901259 non-null object\n", + " 4 family 7901259 non-null object\n", + " 5 genus 7901259 non-null object\n", + " 6 species 7901259 non-null object\n", + "dtypes: object(7)\n", + "memory usage: 482.3+ 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 7,901,259 images with full taxonomic labels.\n", + "\n", + "Notice that we 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 the 7M+ entries with full taxonomic labels expectation, so that's good." + ] + }, + { + "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)\n", + "\n", + "```\n", + "[2023-10-25 10:25:28,242] [WARNING] [root] There are 7 kingdoms instead of 3.\n", + "[2023-10-25 10:25:29,234] [WARNING] [root] 14795 entries are missing rank kingdom, but have genus label.\n", + "[2023-10-25 10:25:29,477] [WARNING] [root] 5824 entries are missing rank phylum, but have genus label.\n", + "[2023-10-25 10:25:29,719] [WARNING] [root] 15763 entries are missing rank class, but have genus label.\n", + "[2023-10-25 10:25:29,958] [WARNING] [root] 10550 entries are missing rank order, but have genus label.\n", + "[2023-10-25 10:25:30,203] [WARNING] [root] 7539 entries are missing rank family, but have genus label.\n", + "[2023-10-25 10:25:30,470] [WARNING] [root] 296 entries are missing rank kingdom, but have family label.\n", + "[2023-10-25 10:25:30,495] [WARNING] [root] 272 entries are missing rank phylum, but have family label.\n", + "[2023-10-25 10:25:30,520] [WARNING] [root] 753 entries are missing rank class, but have family label.\n", + "[2023-10-25 10:25:30,545] [WARNING] [root] 395 entries are missing rank order, but have family label.\n", + "[2023-10-25 10:25:30,590] [WARNING] [root] 156 entries are missing rank kingdom, but have order label.\n", + "[2023-10-25 10:25:30,591] [WARNING] [root] 100 entries are missing rank phylum, but have order label.\n", + "[2023-10-25 10:25:30,592] [WARNING] [root] 1187 entries are missing rank class, but have order label.\n", + "[2023-10-25 10:25:30,637] [WARNING] [root] 74 entries have kingdom and species labels but no genus.\n", + "[2023-10-25 10:25:30,644] [WARNING] [root] 74 entries have phylum and species labels but no genus.\n", + "[2023-10-25 10:25:30,650] [WARNING] [root] 74 entries have class and species labels but no genus.\n", + "[2023-10-25 10:25:30,656] [WARNING] [root] 74 entries have order and species labels but no genus.\n", + "[2023-10-25 10:25:30,662] [WARNING] [root] 74 entries have family and species labels but no genus.\n", + "[2023-10-25 10:25:31,992] [WARNING] [root] There are 158279 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 74 entries that are missing genus?" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "kingdom 1\n", + "phylum 2\n", + "class 2\n", + "order 2\n", + "family 6\n", + "genus 0\n", + "species 14\n", + "dtype: int64" + ] + }, + "execution_count": 18, + "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": 19, + "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 : ['Ranidae' 'Centrolenidae' 'Dendrobatidae' 'Halictidae' 'Craugastoridae'\n", + " 'Eulophidae']\n", + "genus : [nan]\n", + "species : ['lateralis' 'latouchii' 'quindianum' 'ruthveni' 'placatus' 'carinata'\n", + " 'bilineatus' 'robledoi' 'tetramalaise01 malaise6997'\n", + " 'tetramalaise01 malaise7245' 'tetramalaise01 malaise4739' 'azulae'\n", + " 'tetramalaise01 malaise7544' 'tetramalaise01 malaise4749']\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": [ + "Let's add a column indicating the original data source so we can also get some stats by datasource." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "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": 8, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['EOL', 'BIOSCAN'], dtype=object)" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.loc[df['common'].isna(), 'data_source'].unique()" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['EOL', 'BIOSCAN'], dtype=object)" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "missing_genus.data_source.unique()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Missing genus with all other taxa occurs in both BIOSCAN and EOL." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "First, check their unique class values (`common`)." + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "433308" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.loc[df['data_source'] == 'EOL', 'common'].nunique()" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "9947" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.loc[df['data_source'] == 'iNat21', 'common'].nunique()" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "9930" + ] + }, + "execution_count": 23, + "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` has gone up by 6...why?\n", + "\n", + "BIOSCAN and EOL's counts went down, as expected (this is just training set and the common mapping was not done if scientific name was not provided, so we wouldn't see many for BIOSCAN)." + ] + }, + { + "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": 24, + "metadata": {}, + "outputs": [], + "source": [ + "taxa_com = list(df.columns[8:16]) # taxa + common\n", + "taxa_com.insert(0, 'data_source')\n", + "df_taxa = df[taxa_com]" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "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
0EOLNaNNaNNaNNaNNaNNaNmanfredatuberose
1EOLAnimaliaArthropodaInsectaLepidopteraOenosandridaeDiscophlebialipaugesDiscophlebia lipauges
2EOLPlantaeTracheophytaMagnoliopsidaSapindalesRutaceaeMelicopedenhamiiMelicope denhamii
3EOLAnimaliaArthropodaInsectaTrichopteraLimnephilidaeLimnephiluslithusLimnephilus lithus
4EOLAnimaliaArthropodaInsectaLepidopteraLycaenidaeGlaucopsycheastraeaAnatolian Black-eyed Blue
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order \n", + "0 EOL NaN NaN NaN NaN \\\n", + "1 EOL Animalia Arthropoda Insecta Lepidoptera \n", + "2 EOL Plantae Tracheophyta Magnoliopsida Sapindales \n", + "3 EOL Animalia Arthropoda Insecta Trichoptera \n", + "4 EOL Animalia Arthropoda Insecta Lepidoptera \n", + "\n", + " family genus species common \n", + "0 NaN NaN manfreda tuberose \n", + "1 Oenosandridae Discophlebia lipauges Discophlebia lipauges \n", + "2 Rutaceae Melicope denhamii Melicope denhamii \n", + "3 Limnephilidae Limnephilus lithus Limnephilus lithus \n", + "4 Lycaenidae Glaucopsyche astraea Anatolian Black-eyed Blue " + ] + }, + "execution_count": 25, + "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": 26, + "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": 27, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 2552501 entries, 6460215 to 9562633\n", + "Data columns (total 9 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 2552501 non-null object\n", + " 1 kingdom 2552501 non-null object\n", + " 2 phylum 2552501 non-null object\n", + " 3 class 2552501 non-null object\n", + " 4 order 2552501 non-null object\n", + " 5 family 2552501 non-null object\n", + " 6 genus 2552501 non-null object\n", + " 7 species 2552501 non-null object\n", + " 8 common 2552501 non-null object\n", + "dtypes: object(9)\n", + "memory usage: 194.7+ 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,552,501 of 2,686,843 images (training, validation set is separate).\n", + "\n", + "Quick view of diversity in iNat21." + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "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": 28, + "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": 29, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "kingdom\n", + "Animalia 1375431\n", + "Plantae 1091584\n", + "Fungi 85486\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 29, + "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": 30, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_52067/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": 31, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 10000 entries, 6460215 to 9562365\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": 32, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 1071898 entries, 4418422 to 8048853\n", + "Data columns (total 9 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 1071898 non-null object\n", + " 1 kingdom 1071898 non-null object\n", + " 2 phylum 1071898 non-null object\n", + " 3 class 1071898 non-null object\n", + " 4 order 1071898 non-null object\n", + " 5 family 1057316 non-null object\n", + " 6 genus 241443 non-null object\n", + " 7 species 80207 non-null object\n", + " 8 common 241451 non-null object\n", + "dtypes: object(9)\n", + "memory usage: 81.8+ 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. These proportions were maintained when the validation set was removed." + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "data_source 1\n", + "kingdom 1\n", + "phylum 1\n", + "class 1\n", + "order 19\n", + "family 492\n", + "genus 3407\n", + "species 6961\n", + "common 9930\n", + "dtype: int64" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bioscan_df.nunique()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We did lose 2 families, 37 genera, and 1,354 species to the validation set. Note, they may be (likely are) represented in EOL and/or iNat." + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "kingdom\n", + "Animalia 1071898\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 34, + "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": 35, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 241443 entries, 4493727 to 8048851\n", + "Data columns (total 9 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 241443 non-null object\n", + " 1 kingdom 241443 non-null object\n", + " 2 phylum 241443 non-null object\n", + " 3 class 241443 non-null object\n", + " 4 order 241443 non-null object\n", + " 5 family 241443 non-null object\n", + " 6 genus 241443 non-null object\n", + " 7 species 80199 non-null object\n", + " 8 common 241443 non-null object\n", + "dtypes: object(9)\n", + "memory usage: 18.4+ MB\n" + ] + } + ], + "source": [ + "bioscan_df.loc[bioscan_df['genus'].notna()].info()" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "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
5708400BIOSCANAnimaliaArthropodaInsectaHymenopteraBraconidaeBinodoxysangelicaeBinodoxys angelicae
6841056BIOSCANAnimaliaArthropodaInsectaLepidopteraGelechiidaeTelphusabiolep476Telphusa biolep476
6128636BIOSCANAnimaliaArthropodaInsectaDipteraEmpididaeRhamphomyiasciarinaRhamphomyia sciarina
6175566BIOSCANAnimaliaArthropodaInsectaDipteraSarcophagidaeCraticulinadiffusaCraticulina diffusa
6812788BIOSCANAnimaliaArthropodaInsectaHemipteraCicadellidaeSibovianielsoniSibovia nielsoni
6433447BIOSCANAnimaliaArthropodaInsectaDipteraMuscidaeAtherigonaNaNAtherigona
6463034BIOSCANAnimaliaArthropodaInsectaDipteraPsychodidaePsychodaalternataTrickling Filter Fly
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order \n", + "5708400 BIOSCAN Animalia Arthropoda Insecta Hymenoptera \\\n", + "6841056 BIOSCAN Animalia Arthropoda Insecta Lepidoptera \n", + "6128636 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "6175566 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "6812788 BIOSCAN Animalia Arthropoda Insecta Hemiptera \n", + "6433447 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "6463034 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "\n", + " family genus species common \n", + "5708400 Braconidae Binodoxys angelicae Binodoxys angelicae \n", + "6841056 Gelechiidae Telphusa biolep476 Telphusa biolep476 \n", + "6128636 Empididae Rhamphomyia sciarina Rhamphomyia sciarina \n", + "6175566 Sarcophagidae Craticulina diffusa Craticulina diffusa \n", + "6812788 Cicadellidae Sibovia nielsoni Sibovia nielsoni \n", + "6433447 Muscidae Atherigona NaN Atherigona \n", + "6463034 Psychodidae Psychoda alternata Trickling Filter Fly " + ] + }, + "execution_count": 36, + "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": 37, + "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
6150179BIOSCANAnimaliaArthropodaInsectaDipteraChironomidaeNaNNaNNaN
6839935BIOSCANAnimaliaArthropodaInsectaDipteraCecidomyiidaeNaNNaNNaN
5105628BIOSCANAnimaliaArthropodaInsectaDipteraChironomidaeNaNNaNNaN
7431762BIOSCANAnimaliaArthropodaInsectaDipteraSciaridaeNaNNaNNaN
4437860BIOSCANAnimaliaArthropodaInsectaDipteraChironomidaeNaNNaNNaN
6834577BIOSCANAnimaliaArthropodaInsectaDipteraCecidomyiidaeNaNNaNNaN
7383543BIOSCANAnimaliaArthropodaInsectaDipteraChironomidaeNaNNaNNaN
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order family \n", + "6150179 BIOSCAN Animalia Arthropoda Insecta Diptera Chironomidae \\\n", + "6839935 BIOSCAN Animalia Arthropoda Insecta Diptera Cecidomyiidae \n", + "5105628 BIOSCAN Animalia Arthropoda Insecta Diptera Chironomidae \n", + "7431762 BIOSCAN Animalia Arthropoda Insecta Diptera Sciaridae \n", + "4437860 BIOSCAN Animalia Arthropoda Insecta Diptera Chironomidae \n", + "6834577 BIOSCAN Animalia Arthropoda Insecta Diptera Cecidomyiidae \n", + "7383543 BIOSCAN Animalia Arthropoda Insecta Diptera Chironomidae \n", + "\n", + " genus species common \n", + "6150179 NaN NaN NaN \n", + "6839935 NaN NaN NaN \n", + "5105628 NaN NaN NaN \n", + "7431762 NaN NaN NaN \n", + "4437860 NaN NaN NaN \n", + "6834577 NaN NaN NaN \n", + "7383543 NaN NaN NaN " + ] + }, + "execution_count": 37, + "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 no longer get `common` of all higher order taxa available; though we are going to go back to this with the next iteration it seems." + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_52067/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": 39, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 10427 entries, 4418422 to 8044689\n", + "Data columns (total 10 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 10427 non-null object\n", + " 1 kingdom 10427 non-null object\n", + " 2 phylum 10427 non-null object\n", + " 3 class 10427 non-null object\n", + " 4 order 10427 non-null object\n", + " 5 family 10413 non-null object\n", + " 6 genus 9995 non-null object\n", + " 7 species 8131 non-null object\n", + " 8 common 10000 non-null object\n", + " 9 duplicate 10427 non-null bool \n", + "dtypes: bool(1), object(9)\n", + "memory usage: 824.8+ KB\n" + ] + } + ], + "source": [ + "bioscan_df_unique_taxa.info(show_counts = True)" + ] + }, + { + "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": 40, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 80207 entries, 4493727 to 8048825\n", + "Data columns (total 10 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 80207 non-null object\n", + " 1 kingdom 80207 non-null object\n", + " 2 phylum 80207 non-null object\n", + " 3 class 80207 non-null object\n", + " 4 order 80207 non-null object\n", + " 5 family 80207 non-null object\n", + " 6 genus 80199 non-null object\n", + " 7 species 80207 non-null object\n", + " 8 common 80207 non-null object\n", + " 9 duplicate 80207 non-null bool \n", + "dtypes: bool(1), object(9)\n", + "memory usage: 6.2+ MB\n" + ] + } + ], + "source": [ + "bioscan_df.loc[bioscan_df.species.notna()].info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "There are only 8 images where the `species` is labeled, but the `genus` isn't. There must be 1 in the validation set." + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "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", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommonduplicate
5074948BIOSCANAnimaliaArthropodaInsectaHymenopteraEulophidaeNaNtetramalaise01 malaise6997Tetramalaise01 malaise6997False
5103857BIOSCANAnimaliaArthropodaInsectaHymenopteraEulophidaeNaNtetramalaise01 malaise7245Tetramalaise01 malaise7245False
5115975BIOSCANAnimaliaArthropodaInsectaHymenopteraEulophidaeNaNtetramalaise01 malaise4739Tetramalaise01 malaise4739False
5120391BIOSCANAnimaliaArthropodaInsectaHymenopteraEulophidaeNaNtetramalaise01 malaise7245Tetramalaise01 malaise7245True
6257852BIOSCANAnimaliaArthropodaInsectaHymenopteraEulophidaeNaNtetramalaise01 malaise7544Tetramalaise01 malaise7544False
6355336BIOSCANAnimaliaArthropodaInsectaHymenopteraEulophidaeNaNtetramalaise01 malaise4749Tetramalaise01 malaise4749False
6936855BIOSCANAnimaliaArthropodaInsectaHymenopteraEulophidaeNaNtetramalaise01 malaise4739Tetramalaise01 malaise4739True
7366734BIOSCANAnimaliaArthropodaInsectaHymenopteraEulophidaeNaNtetramalaise01 malaise4739Tetramalaise01 malaise4739True
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order family \n", + "5074948 BIOSCAN Animalia Arthropoda Insecta Hymenoptera Eulophidae \\\n", + "5103857 BIOSCAN Animalia Arthropoda Insecta Hymenoptera Eulophidae \n", + "5115975 BIOSCAN Animalia Arthropoda Insecta Hymenoptera Eulophidae \n", + "5120391 BIOSCAN Animalia Arthropoda Insecta Hymenoptera Eulophidae \n", + "6257852 BIOSCAN Animalia Arthropoda Insecta Hymenoptera Eulophidae \n", + "6355336 BIOSCAN Animalia Arthropoda Insecta Hymenoptera Eulophidae \n", + "6936855 BIOSCAN Animalia Arthropoda Insecta Hymenoptera Eulophidae \n", + "7366734 BIOSCAN Animalia Arthropoda Insecta Hymenoptera Eulophidae \n", + "\n", + " genus species common \n", + "5074948 NaN tetramalaise01 malaise6997 Tetramalaise01 malaise6997 \\\n", + "5103857 NaN tetramalaise01 malaise7245 Tetramalaise01 malaise7245 \n", + "5115975 NaN tetramalaise01 malaise4739 Tetramalaise01 malaise4739 \n", + "5120391 NaN tetramalaise01 malaise7245 Tetramalaise01 malaise7245 \n", + "6257852 NaN tetramalaise01 malaise7544 Tetramalaise01 malaise7544 \n", + "6355336 NaN tetramalaise01 malaise4749 Tetramalaise01 malaise4749 \n", + "6936855 NaN tetramalaise01 malaise4739 Tetramalaise01 malaise4739 \n", + "7366734 NaN tetramalaise01 malaise4739 Tetramalaise01 malaise4739 \n", + "\n", + " duplicate \n", + "5074948 False \n", + "5103857 False \n", + "5115975 False \n", + "5120391 True \n", + "6257852 False \n", + "6355336 False \n", + "6936855 True \n", + "7366734 True " + ] + }, + "execution_count": 41, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bioscan_df.loc[(bioscan_df.species.notna()) & (bioscan_df.genus.isna())]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It seems the `genus` is `tetramalaise01` ([genus page for tetraMalaise01](https://v3.boldsystems.org/index.php/Taxbrowser_Taxonpage?taxid=1074204))." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "In general, when the species is listed in BIOSCAN it is listed as `genus-species`. This is certainly true here and would work to fill the 9 missing genera.\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": 66, + "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" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_52067/1898242669.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": 44, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 1071898 entries, 4418422 to 8048853\n", + "Data columns (total 11 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 1071898 non-null object\n", + " 1 kingdom 1071898 non-null object\n", + " 2 phylum 1071898 non-null object\n", + " 3 class 1071898 non-null object\n", + " 4 order 1071898 non-null object\n", + " 5 family 1057316 non-null object\n", + " 6 genus 241443 non-null object\n", + " 7 species 80207 non-null object\n", + " 8 common 241451 non-null object\n", + " 9 duplicate 1071898 non-null bool \n", + " 10 len_species 1071898 non-null int64 \n", + "dtypes: bool(1), int64(1), object(9)\n", + "memory usage: 91.0+ MB\n" + ] + } + ], + "source": [ + "bioscan_species_len_df.info(show_counts = True)" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 3612 entries, 4496637 to 8045044\n", + "Data columns (total 11 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 3612 non-null object\n", + " 1 kingdom 3612 non-null object\n", + " 2 phylum 3612 non-null object\n", + " 3 class 3612 non-null object\n", + " 4 order 3612 non-null object\n", + " 5 family 3612 non-null object\n", + " 6 genus 3604 non-null object\n", + " 7 species 3612 non-null object\n", + " 8 common 3612 non-null object\n", + " 9 duplicate 3612 non-null bool \n", + " 10 len_species 3612 non-null int64 \n", + "dtypes: bool(1), int64(1), object(9)\n", + "memory usage: 313.9+ 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." + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "len_species\n", + "1 1068286\n", + "2 3033\n", + "3 565\n", + "4 14\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 46, + "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": 47, + "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
6263077BIOSCANAnimaliaArthropodaInsectaLepidopteraGracillariidaeMalaisegraci01 malaise4560malaisegraci01 malaise6860Malaisegraci01 malaise4560 malaisegraci01 mala...True2
5124422BIOSCANAnimaliaArthropodaInsectaDipteraPsychodidaePsychodasp. 11gmkPsychoda sp. 11gmkTrue2
6261498BIOSCANAnimaliaArthropodaInsectaLepidopteraGracillariidaeMalaisegraci01 malaise4560malaisegraci01 malaise6860Malaisegraci01 malaise4560 malaisegraci01 mala...True2
6393358BIOSCANAnimaliaArthropodaInsectaLepidopteraGracillariidaeMalaisegraci01 malaise4560malaisegraci01 malaise4525Malaisegraci01 malaise4560 malaisegraci01 mala...True2
6174844BIOSCANAnimaliaArthropodaInsectaDipteraEmpididaePorphyrochroasp. 6 bkc-2015Porphyrochroa sp. 6 bkc-2015True3
4534139BIOSCANAnimaliaArthropodaInsectaDipteraChironomidaeAllocladiussp. 1esAllocladius sp. 1esTrue2
5742647BIOSCANAnimaliaArthropodaInsectaDipteraEmpididaePorphyrochroasp. 6 bkc-2015Porphyrochroa sp. 6 bkc-2015True3
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order \n", + "6263077 BIOSCAN Animalia Arthropoda Insecta Lepidoptera \\\n", + "5124422 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "6261498 BIOSCAN Animalia Arthropoda Insecta Lepidoptera \n", + "6393358 BIOSCAN Animalia Arthropoda Insecta Lepidoptera \n", + "6174844 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "4534139 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "5742647 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "\n", + " family genus \n", + "6263077 Gracillariidae Malaisegraci01 malaise4560 \\\n", + "5124422 Psychodidae Psychoda \n", + "6261498 Gracillariidae Malaisegraci01 malaise4560 \n", + "6393358 Gracillariidae Malaisegraci01 malaise4560 \n", + "6174844 Empididae Porphyrochroa \n", + "4534139 Chironomidae Allocladius \n", + "5742647 Empididae Porphyrochroa \n", + "\n", + " species \n", + "6263077 malaisegraci01 malaise6860 \\\n", + "5124422 sp. 11gmk \n", + "6261498 malaisegraci01 malaise6860 \n", + "6393358 malaisegraci01 malaise4525 \n", + "6174844 sp. 6 bkc-2015 \n", + "4534139 sp. 1es \n", + "5742647 sp. 6 bkc-2015 \n", + "\n", + " common duplicate \n", + "6263077 Malaisegraci01 malaise4560 malaisegraci01 mala... True \\\n", + "5124422 Psychoda sp. 11gmk True \n", + "6261498 Malaisegraci01 malaise4560 malaisegraci01 mala... True \n", + "6393358 Malaisegraci01 malaise4560 malaisegraci01 mala... True \n", + "6174844 Porphyrochroa sp. 6 bkc-2015 True \n", + "4534139 Allocladius sp. 1es True \n", + "5742647 Porphyrochroa sp. 6 bkc-2015 True \n", + "\n", + " len_species \n", + "6263077 2 \n", + "5124422 2 \n", + "6261498 2 \n", + "6393358 2 \n", + "6174844 3 \n", + "4534139 2 \n", + "5742647 3 " + ] + }, + "execution_count": 47, + "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": 50, + "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
6904104BIOSCANAnimaliaArthropodaInsectaHymenopteraFigitidaeGanaspissp. 3 tas-2012Ganaspis sp. 3 tas-2012True3
6270138BIOSCANAnimaliaArthropodaInsectaDipteraEmpididaePorphyrochroasp. 6 bkc-2015Porphyrochroa sp. 6 bkc-2015True3
7019868BIOSCANAnimaliaArthropodaInsectaDipteraSciaridaeCosmosciarasp. saevg morph0042Cosmosciara sp. saevg morph0042True3
6188618BIOSCANAnimaliaArthropodaInsectaDipteraSciaridaeCosmosciarasp. saevg morph0042Cosmosciara sp. saevg morph0042True3
6250382BIOSCANAnimaliaArthropodaInsectaDipteraSciaridaeCosmosciarasp. saevg morph0042Cosmosciara sp. saevg morph0042True3
6547010BIOSCANAnimaliaArthropodaInsectaDipteraSciaridaeCosmosciarasp. saevg morph0042Cosmosciara sp. saevg morph0042True3
6414135BIOSCANAnimaliaArthropodaInsectaDipteraSciaridaeCosmosciarasp. saevg morph0042Cosmosciara sp. saevg morph0042True3
4497850BIOSCANAnimaliaArthropodaInsectaDipteraClusiidaeSobarocephalasp. 1 ol-2008Sobarocephala sp. 1 ol-2008True3
6407419BIOSCANAnimaliaArthropodaInsectaHymenopteraIchneumonidaeChilocyrtussp. 6 nw-2012Chilocyrtus sp. 6 nw-2012True3
6264034BIOSCANAnimaliaArthropodaInsectaDipteraSciaridaeCosmosciarasp. saevg morph0042Cosmosciara sp. saevg morph0042True3
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order \n", + "6904104 BIOSCAN Animalia Arthropoda Insecta Hymenoptera \\\n", + "6270138 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "7019868 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "6188618 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "6250382 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "6547010 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "6414135 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "4497850 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "6407419 BIOSCAN Animalia Arthropoda Insecta Hymenoptera \n", + "6264034 BIOSCAN Animalia Arthropoda Insecta Diptera \n", + "\n", + " family genus species \n", + "6904104 Figitidae Ganaspis sp. 3 tas-2012 \\\n", + "6270138 Empididae Porphyrochroa sp. 6 bkc-2015 \n", + "7019868 Sciaridae Cosmosciara sp. saevg morph0042 \n", + "6188618 Sciaridae Cosmosciara sp. saevg morph0042 \n", + "6250382 Sciaridae Cosmosciara sp. saevg morph0042 \n", + "6547010 Sciaridae Cosmosciara sp. saevg morph0042 \n", + "6414135 Sciaridae Cosmosciara sp. saevg morph0042 \n", + "4497850 Clusiidae Sobarocephala sp. 1 ol-2008 \n", + "6407419 Ichneumonidae Chilocyrtus sp. 6 nw-2012 \n", + "6264034 Sciaridae Cosmosciara sp. saevg morph0042 \n", + "\n", + " common duplicate len_species \n", + "6904104 Ganaspis sp. 3 tas-2012 True 3 \n", + "6270138 Porphyrochroa sp. 6 bkc-2015 True 3 \n", + "7019868 Cosmosciara sp. saevg morph0042 True 3 \n", + "6188618 Cosmosciara sp. saevg morph0042 True 3 \n", + "6250382 Cosmosciara sp. saevg morph0042 True 3 \n", + "6547010 Cosmosciara sp. saevg morph0042 True 3 \n", + "6414135 Cosmosciara sp. saevg morph0042 True 3 \n", + "4497850 Sobarocephala sp. 1 ol-2008 True 3 \n", + "6407419 Chilocyrtus sp. 6 nw-2012 True 3 \n", + "6264034 Cosmosciara sp. saevg morph0042 True 3 " + ] + }, + "execution_count": 50, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bioscan_long_species.loc[bioscan_long_species['len_species'] > 2].sample(10)" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "array(['albipennis', nan, 'trinodulosa', 'satchelli', 'alternata',\n", + " 'phalaenoides', 'sp. 11gmk', 'minuta', 'grisescens', 'mycophila',\n", + " 'erminea', 'setigera', 'sigma', 'uncinula', 'divaricata',\n", + " 'uniformata', 'lativentris', 'lobata', 'gemina', 'cinerea'],\n", + " dtype=object)" + ] + }, + "execution_count": 49, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "bioscan_df.loc[bioscan_df[\"genus\"] == \"Psychoda\", \"species\"].unique()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We can see that the case of \"Psychoda\" was resolved appropriately." + ] + }, + { + "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": 51, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 5938235 entries, 0 to 9418548\n", + "Data columns (total 9 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 5938235 non-null object\n", + " 1 kingdom 5571648 non-null object\n", + " 2 phylum 5580961 non-null object\n", + " 3 class 5558232 non-null object\n", + " 4 order 5555900 non-null object\n", + " 5 family 5540731 non-null object\n", + " 6 genus 5502151 non-null object\n", + " 7 species 5654408 non-null object\n", + " 8 common 5853173 non-null object\n", + "dtypes: object(9)\n", + "memory usage: 453.1+ MB\n" + ] + } + ], + "source": [ + "eol_df.info(show_counts = True)" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "data_source 1\n", + "kingdom 7\n", + "phylum 90\n", + "class 278\n", + "order 1318\n", + "family 7705\n", + "genus 70564\n", + "species 163640\n", + "common 433308\n", + "dtype: int64" + ] + }, + "execution_count": 52, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_df.nunique()" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "data_source 1\n", + "kingdom 7\n", + "phylum 88\n", + "class 258\n", + "order 1145\n", + "family 5879\n", + "genus 33835\n", + "species 0\n", + "common 33661\n", + "dtype: int64" + ] + }, + "execution_count": 53, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_df.loc[eol_df.species.isna()].nunique()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "There are 498,053 (training + val 570,515) unique page IDs from EOL in this training set, which clearly represent varying levels of taxa. \n", + "\n", + "Unique species + unique common where species is null (197,301) does not reach this number." + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "kingdom\n", + "Animalia 3238482\n", + "Plantae 2061883\n", + "Fungi 251689\n", + "Protozoa 10418\n", + "Chromista 6401\n", + "Bacteria 2752\n", + "Archaea 23\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 54, + "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." + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_52067/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": 56, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 446296 entries, 0 to 9418342\n", + "Data columns (total 10 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 446296 non-null object\n", + " 1 kingdom 396034 non-null object\n", + " 2 phylum 399665 non-null object\n", + " 3 class 398234 non-null object\n", + " 4 order 399012 non-null object\n", + " 5 family 399068 non-null object\n", + " 6 genus 396062 non-null object\n", + " 7 species 407486 non-null object\n", + " 8 common 441470 non-null object\n", + " 9 duplicate 446296 non-null bool \n", + "dtypes: bool(1), object(9)\n", + "memory usage: 34.5+ MB\n" + ] + } + ], + "source": [ + "eol_df_unique_taxa.info(show_counts = True)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The actual number of distinct creatures is likely higher, as evidenced below where we have unique common names listed in `common` but all taxa are null.\n", + "\n", + "We should be able to fill all in for all values of `species` that also have `genus` indicated. Is `genus` labeled for all entries with `species` labeled? " + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 5654408 entries, 0 to 9418548\n", + "Data columns (total 10 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 5654408 non-null object\n", + " 1 kingdom 5290838 non-null object\n", + " 2 phylum 5298696 non-null object\n", + " 3 class 5289856 non-null object\n", + " 4 order 5294233 non-null object\n", + " 5 family 5296633 non-null object\n", + " 6 genus 5303386 non-null object\n", + " 7 species 5654408 non-null object\n", + " 8 common 5654408 non-null object\n", + " 9 duplicate 5654408 non-null bool \n", + "dtypes: bool(1), object(9)\n", + "memory usage: 436.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))." + ] + }, + { + "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": 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", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommonduplicate
83610EOLPlantaeTracheophytaMagnoliopsidaGeranialesGeraniaceaeGeraniumpotentilloidescinquefoil geraniumFalse
3895894EOLAnimaliaChordataAvesPasseriformesFringillidaeCrithagratottaCape SiskinTrue
1225507EOLAnimaliaEchinodermataEchinoideaCidaroidaCtenocidaridaeAporocidarismillerimiller's sea urchinFalse
2893186EOLAnimaliaArthropodaInsectaLepidopteraTortricidaeOriodryasolbophoraOriodryas olbophoraTrue
849135EOLAnimaliaArthropodaInsectaHymenopteraApidaeBombuslatreilleBombus latreilleTrue
2800177EOLAnimaliaArthropodaInsectaHymenopteraApidaeBombusbalteatusHigh Country Bumble BeeTrue
1568547EOLPlantaeTracheophytaMagnoliopsidaBoraginalesBoraginaceaeTiquiliapalmeriPalmer's coldeniaTrue
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order \n", + "83610 EOL Plantae Tracheophyta Magnoliopsida Geraniales \\\n", + "3895894 EOL Animalia Chordata Aves Passeriformes \n", + "1225507 EOL Animalia Echinodermata Echinoidea Cidaroida \n", + "2893186 EOL Animalia Arthropoda Insecta Lepidoptera \n", + "849135 EOL Animalia Arthropoda Insecta Hymenoptera \n", + "2800177 EOL Animalia Arthropoda Insecta Hymenoptera \n", + "1568547 EOL Plantae Tracheophyta Magnoliopsida Boraginales \n", + "\n", + " family genus species \n", + "83610 Geraniaceae Geranium potentilloides \\\n", + "3895894 Fringillidae Crithagra totta \n", + "1225507 Ctenocidaridae Aporocidaris milleri \n", + "2893186 Tortricidae Oriodryas olbophora \n", + "849135 Apidae Bombus latreille \n", + "2800177 Apidae Bombus balteatus \n", + "1568547 Boraginaceae Tiquilia palmeri \n", + "\n", + " common duplicate \n", + "83610 cinquefoil geranium False \n", + "3895894 Cape Siskin True \n", + "1225507 miller's sea urchin False \n", + "2893186 Oriodryas olbophora True \n", + "849135 Bombus latreille True \n", + "2800177 High Country Bumble Bee True \n", + "1568547 Palmer's coldenia True " + ] + }, + "execution_count": 58, + "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": 59, + "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
5338130EOLAnimaliaArthropodaInsectaHemipteraNabidaeNaNNaNNaNTrue
1305998EOLPlantaeRhodophytaFlorideophyceaeNemalialesScinaiaceaeNaNNaNNaNFalse
4262302EOLAnimaliaArthropodaArachnidaOpilionesTriaenonychidaeHendeaNaNHendeaTrue
1653054EOLAnimaliaArthropodaInsectaHymenopteraFormicidaeNaNNaNNaNTrue
5999708EOLAnimaliaChordataAvesPasseriformesPipridaeNaNNaNNaNTrue
1034526EOLAnimaliaArthropodaInsectaThysanopteraPhlaeothripidaeElaphrothripsNaNElaphrothripsFalse
5917965EOLAnimaliaArthropodaInsectaHymenopteraFormicidaeNaNNaNNaNTrue
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order \n", + "5338130 EOL Animalia Arthropoda Insecta Hemiptera \\\n", + "1305998 EOL Plantae Rhodophyta Florideophyceae Nemaliales \n", + "4262302 EOL Animalia Arthropoda Arachnida Opiliones \n", + "1653054 EOL Animalia Arthropoda Insecta Hymenoptera \n", + "5999708 EOL Animalia Chordata Aves Passeriformes \n", + "1034526 EOL Animalia Arthropoda Insecta Thysanoptera \n", + "5917965 EOL Animalia Arthropoda Insecta Hymenoptera \n", + "\n", + " family genus species common duplicate \n", + "5338130 Nabidae NaN NaN NaN True \n", + "1305998 Scinaiaceae NaN NaN NaN False \n", + "4262302 Triaenonychidae Hendea NaN Hendea True \n", + "1653054 Formicidae NaN NaN NaN True \n", + "5999708 Pipridae NaN NaN NaN True \n", + "1034526 Phlaeothripidae Elaphrothrips NaN Elaphrothrips False \n", + "5917965 Formicidae NaN NaN NaN True " + ] + }, + "execution_count": 59, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# No species label\n", + "eol_df.loc[eol_df.species.isna()].sample(7)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Here are a lot of higher-order taxa missing species...let's check for the details noted below.\n", + "\n", + "From original check:\n", + "All `common` values are filled in with predominently common names. It seems we could map these back to some level of taxa with the taxon-common matching? Though why would these EOL images have common without any other designation?\n", + "\n", + "Good example of strange inconsistency: the `American red raspberry` is `Rubus strigosus`, and a quick Google search easily provides the entire taxonomy.\n", + "\n", + "`Cremastobaeus` seems to be a genus of wasp." + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "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", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommonduplicate
\n", + "
" + ], + "text/plain": [ + "Empty DataFrame\n", + "Columns: [data_source, kingdom, phylum, class, order, family, genus, species, common, duplicate]\n", + "Index: []" + ] + }, + "execution_count": 61, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_df.loc[eol_df.common == \"American red raspberry\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "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", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommonduplicate
\n", + "
" + ], + "text/plain": [ + "Empty DataFrame\n", + "Columns: [data_source, kingdom, phylum, class, order, family, genus, species, common, duplicate]\n", + "Index: []" + ] + }, + "execution_count": 62, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_df.loc[eol_df.common == \"Rubus strigosus\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We seem to have lost the raspberry..." + ] + }, + { + "cell_type": "code", + "execution_count": 63, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommonduplicate
12725EOLAnimaliaArthropodaInsectaColeopteraHisteridaeAcritusstrigosusAcritus strigosusFalse
21968EOLPlantaeTracheophytaMagnoliopsidaPoalesCyperaceaeCyperusstrigosusstawcolored flatsedgeFalse
24126EOLAnimaliaArthropodaInsectaColeopteraHisteridaeAcritusstrigosusAcritus strigosusTrue
45722EOLPlantaeTracheophytaMagnoliopsidaPoalesCyperaceaeCyperusstrigosusstawcolored flatsedgeTrue
48107EOLPlantaeTracheophytaMagnoliopsidaPoalesCyperaceaeCyperusstrigosusstawcolored flatsedgeTrue
.................................
8326131EOLAnimaliaChordataActinopterygiiSyngnathiformesAulostomidaeAulostomusstrigosusEastern Atlantic TrumpetfishTrue
8370952EOLPlantaeTracheophytaMagnoliopsidaPoalesCyperaceaeCyperusstrigosusstawcolored flatsedgeTrue
9083544EOLPlantaeTracheophytaMagnoliopsidaFabalesFabaceaeLotusstrigosusstrigose bird's-foot trefoilTrue
9140948EOLPlantaeTracheophytaMagnoliopsidaAsteralesAsteraceaeEchinopsstrigosusRough-leaved Globe-thistleTrue
9397961EOLPlantaeTracheophytaMagnoliopsidaDipsacalesCaprifoliaceaeDipsacusstrigosusyellowflower teaselTrue
\n", + "

404 rows × 10 columns

\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order \n", + "12725 EOL Animalia Arthropoda Insecta Coleoptera \\\n", + "21968 EOL Plantae Tracheophyta Magnoliopsida Poales \n", + "24126 EOL Animalia Arthropoda Insecta Coleoptera \n", + "45722 EOL Plantae Tracheophyta Magnoliopsida Poales \n", + "48107 EOL Plantae Tracheophyta Magnoliopsida Poales \n", + "... ... ... ... ... ... \n", + "8326131 EOL Animalia Chordata Actinopterygii Syngnathiformes \n", + "8370952 EOL Plantae Tracheophyta Magnoliopsida Poales \n", + "9083544 EOL Plantae Tracheophyta Magnoliopsida Fabales \n", + "9140948 EOL Plantae Tracheophyta Magnoliopsida Asterales \n", + "9397961 EOL Plantae Tracheophyta Magnoliopsida Dipsacales \n", + "\n", + " family genus species common \n", + "12725 Histeridae Acritus strigosus Acritus strigosus \\\n", + "21968 Cyperaceae Cyperus strigosus stawcolored flatsedge \n", + "24126 Histeridae Acritus strigosus Acritus strigosus \n", + "45722 Cyperaceae Cyperus strigosus stawcolored flatsedge \n", + "48107 Cyperaceae Cyperus strigosus stawcolored flatsedge \n", + "... ... ... ... ... \n", + "8326131 Aulostomidae Aulostomus strigosus Eastern Atlantic Trumpetfish \n", + "8370952 Cyperaceae Cyperus strigosus stawcolored flatsedge \n", + "9083544 Fabaceae Lotus strigosus strigose bird's-foot trefoil \n", + "9140948 Asteraceae Echinops strigosus Rough-leaved Globe-thistle \n", + "9397961 Caprifoliaceae Dipsacus strigosus yellowflower teasel \n", + "\n", + " duplicate \n", + "12725 False \n", + "21968 False \n", + "24126 True \n", + "45722 True \n", + "48107 True \n", + "... ... \n", + "8326131 True \n", + "8370952 True \n", + "9083544 True \n", + "9140948 True \n", + "9397961 True \n", + "\n", + "[404 rows x 10 columns]" + ] + }, + "execution_count": 63, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_df.loc[eol_df.species == \"strigosus\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 64, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommonduplicate
12725EOLAnimaliaArthropodaInsectaColeopteraHisteridaeAcritusstrigosusAcritus strigosusFalse
21968EOLPlantaeTracheophytaMagnoliopsidaPoalesCyperaceaeCyperusstrigosusstawcolored flatsedgeFalse
54507EOLAnimaliaChordataActinopterygiiAcanthuriformesAcanthuridaeCtenochaetusstrigosusbristletoothed surgeonfishFalse
62340EOLAnimaliaArthropodaInsectaColeopteraCerambycidaeAnisopodusstrigosusAnisopodus strigosusFalse
67422EOLPlantaeTracheophytaMagnoliopsidaAsteralesAsteraceaeErigeronstrigosusBeyrich's fleabaneFalse
74622EOLAnimaliaArthropodaInsectaColeopteraCerambycidaeUracanthusstrigosusUracanthus strigosusFalse
91478EOLAnimaliaArthropodaInsectaMecopteraBittacidaeBittacusstrigosusThin HangingflyFalse
96813EOLAnimaliaArthropodaInsectaHymenopteraPlatygastridaeIsocybusstrigosusIsocybus strigosusFalse
117427EOLFungiBasidiomycotaAgaricomycetesRussulalesBondarzewiaceaeGloiodonstrigosusGloiodon strigosusFalse
127701EOLAnimaliaChordataActinopterygiiSyngnathiformesAulostomidaeAulostomusstrigosusEastern Atlantic TrumpetfishFalse
150943EOLPlantaeTracheophytaMagnoliopsidaDipsacalesCaprifoliaceaeDipsacusstrigosusyellowflower teaselFalse
154588EOLPlantaeTracheophytaMagnoliopsidaLamialesLamiaceaePlectranthusstrigosusDwarf SpurflowerFalse
343827EOLPlantaeTracheophytaMagnoliopsidaAsteralesAsteraceaeEchinopsstrigosusRough-leaved Globe-thistleFalse
492919EOLFungiBasidiomycotaAgaricomycetesCantharellalesCantharellaceaeCraterellusstrigosusCraterellus strigosusFalse
812386EOLPlantaeTracheophytaMagnoliopsidaFabalesFabaceaeLotusstrigosusstrigose bird's-foot trefoilFalse
934501EOLAnimaliaArthropodaInsectaDipteraRhagionidaeRhagiostrigosusYellow Downlooker SnipeflyFalse
1375383EOLAnimaliaArthropodaInsectaColeopteraLeiodidaeAnemadusstrigosusAnemadus strigosusFalse
1433522EOLAnimaliaArthropodaInsectaHemipteraMiridaePhytocorisstrigosusPhytocoris strigosusFalse
1595633EOLAnimaliaArthropodaInsectaHymenopteraEncyrtidaeEricydnusstrigosusEricydnus strigosusFalse
1595723EOLAnimaliaArthropodaInsectaHymenopteraEumenidaePolistesstrigosusPolistes strigosusFalse
1711092EOLNaNNaNNaNNaNNaNNaNstrigosusStrigosusFalse
1962328EOLAnimaliaArthropodaInsectaColeopteraEucinetidaeEucinetusstrigosusEucinetus strigosusFalse
2487598EOLAnimaliaArthropodaInsectaHymenopteraBraconidaeOrgilusstrigosusOrgilus strigosusFalse
4341182EOLPlantaeTracheophytaMagnoliopsidaBoraginalesBoraginaceaeLobostemonstrigosusWestern Karoo HealthbushFalse
5741032EOLAnimaliaArthropodaInsectaColeopteraCerambycidaeCosmocerusstrigosusCosmocerus strigosusFalse
6032365EOLPlantaeTracheophytaMagnoliopsidaFabalesFabaceaeAcmisponstrigosusstrigose bird's-foot trefoilFalse
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order \n", + "12725 EOL Animalia Arthropoda Insecta Coleoptera \\\n", + "21968 EOL Plantae Tracheophyta Magnoliopsida Poales \n", + "54507 EOL Animalia Chordata Actinopterygii Acanthuriformes \n", + "62340 EOL Animalia Arthropoda Insecta Coleoptera \n", + "67422 EOL Plantae Tracheophyta Magnoliopsida Asterales \n", + "74622 EOL Animalia Arthropoda Insecta Coleoptera \n", + "91478 EOL Animalia Arthropoda Insecta Mecoptera \n", + "96813 EOL Animalia Arthropoda Insecta Hymenoptera \n", + "117427 EOL Fungi Basidiomycota Agaricomycetes Russulales \n", + "127701 EOL Animalia Chordata Actinopterygii Syngnathiformes \n", + "150943 EOL Plantae Tracheophyta Magnoliopsida Dipsacales \n", + "154588 EOL Plantae Tracheophyta Magnoliopsida Lamiales \n", + "343827 EOL Plantae Tracheophyta Magnoliopsida Asterales \n", + "492919 EOL Fungi Basidiomycota Agaricomycetes Cantharellales \n", + "812386 EOL Plantae Tracheophyta Magnoliopsida Fabales \n", + "934501 EOL Animalia Arthropoda Insecta Diptera \n", + "1375383 EOL Animalia Arthropoda Insecta Coleoptera \n", + "1433522 EOL Animalia Arthropoda Insecta Hemiptera \n", + "1595633 EOL Animalia Arthropoda Insecta Hymenoptera \n", + "1595723 EOL Animalia Arthropoda Insecta Hymenoptera \n", + "1711092 EOL NaN NaN NaN NaN \n", + "1962328 EOL Animalia Arthropoda Insecta Coleoptera \n", + "2487598 EOL Animalia Arthropoda Insecta Hymenoptera \n", + "4341182 EOL Plantae Tracheophyta Magnoliopsida Boraginales \n", + "5741032 EOL Animalia Arthropoda Insecta Coleoptera \n", + "6032365 EOL Plantae Tracheophyta Magnoliopsida Fabales \n", + "\n", + " family genus species \n", + "12725 Histeridae Acritus strigosus \\\n", + "21968 Cyperaceae Cyperus strigosus \n", + "54507 Acanthuridae Ctenochaetus strigosus \n", + "62340 Cerambycidae Anisopodus strigosus \n", + "67422 Asteraceae Erigeron strigosus \n", + "74622 Cerambycidae Uracanthus strigosus \n", + "91478 Bittacidae Bittacus strigosus \n", + "96813 Platygastridae Isocybus strigosus \n", + "117427 Bondarzewiaceae Gloiodon strigosus \n", + "127701 Aulostomidae Aulostomus strigosus \n", + "150943 Caprifoliaceae Dipsacus strigosus \n", + "154588 Lamiaceae Plectranthus strigosus \n", + "343827 Asteraceae Echinops strigosus \n", + "492919 Cantharellaceae Craterellus strigosus \n", + "812386 Fabaceae Lotus strigosus \n", + "934501 Rhagionidae Rhagio strigosus \n", + "1375383 Leiodidae Anemadus strigosus \n", + "1433522 Miridae Phytocoris strigosus \n", + "1595633 Encyrtidae Ericydnus strigosus \n", + "1595723 Eumenidae Polistes strigosus \n", + "1711092 NaN NaN strigosus \n", + "1962328 Eucinetidae Eucinetus strigosus \n", + "2487598 Braconidae Orgilus strigosus \n", + "4341182 Boraginaceae Lobostemon strigosus \n", + "5741032 Cerambycidae Cosmocerus strigosus \n", + "6032365 Fabaceae Acmispon strigosus \n", + "\n", + " common duplicate \n", + "12725 Acritus strigosus False \n", + "21968 stawcolored flatsedge False \n", + "54507 bristletoothed surgeonfish False \n", + "62340 Anisopodus strigosus False \n", + "67422 Beyrich's fleabane False \n", + "74622 Uracanthus strigosus False \n", + "91478 Thin Hangingfly False \n", + "96813 Isocybus strigosus False \n", + "117427 Gloiodon strigosus False \n", + "127701 Eastern Atlantic Trumpetfish False \n", + "150943 yellowflower teasel False \n", + "154588 Dwarf Spurflower False \n", + "343827 Rough-leaved Globe-thistle False \n", + "492919 Craterellus strigosus False \n", + "812386 strigose bird's-foot trefoil False \n", + "934501 Yellow Downlooker Snipefly False \n", + "1375383 Anemadus strigosus False \n", + "1433522 Phytocoris strigosus False \n", + "1595633 Ericydnus strigosus False \n", + "1595723 Polistes strigosus False \n", + "1711092 Strigosus False \n", + "1962328 Eucinetus strigosus False \n", + "2487598 Orgilus strigosus False \n", + "4341182 Western Karoo Healthbush False \n", + "5741032 Cosmocerus strigosus False \n", + "6032365 strigose bird's-foot trefoil False " + ] + }, + "execution_count": 64, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_df_unique_taxa.loc[eol_df_unique_taxa.species == \"strigosus\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "It seems likely the row with the null values is our lost raspberry.\n", + "\n", + "Also good evidence of the duplication of species names across kingdoms and other taxa." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Rubus strigosus is apparently a subspecies of \"Rubus idaeus\", and we are not looking at the subspecies level." + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": { + "scrolled": true + }, + "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", + "
data_sourcekingdomphylumclassorderfamilygenusspeciescommonduplicate
49295EOLPlantaeTracheophytaMagnoliopsidaRosalesRosaceaeRubusidaeusEuropean red raspberryFalse
4109669EOLNaNNaNNaNNaNNaNNaNidaeusIdaeusFalse
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order family \n", + "49295 EOL Plantae Tracheophyta Magnoliopsida Rosales Rosaceae \\\n", + "4109669 EOL NaN NaN NaN NaN NaN \n", + "\n", + " genus species common duplicate \n", + "49295 Rubus idaeus European red raspberry False \n", + "4109669 NaN idaeus Idaeus False " + ] + }, + "execution_count": 87, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_df_unique_taxa.loc[eol_df_unique_taxa.species == \"idaeus\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Though the question remains, why did we lose the common name?" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's check the `species` length in EOL as well, we know there are some that have genus-species." + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/var/folders/nv/f0fq1p1n1_3b11x579py_0q80000gq/T/ipykernel_52067/1392676569.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: 5938235 entries, 0 to 9418548\n", + "Data columns (total 11 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 5938235 non-null object\n", + " 1 kingdom 5571648 non-null object\n", + " 2 phylum 5580961 non-null object\n", + " 3 class 5558232 non-null object\n", + " 4 order 5555900 non-null object\n", + " 5 family 5540731 non-null object\n", + " 6 genus 5502151 non-null object\n", + " 7 species 5654408 non-null object\n", + " 8 common 5853173 non-null object\n", + " 9 duplicate 5938235 non-null bool \n", + " 10 len_species 5938235 non-null int64 \n", + "dtypes: bool(1), int64(1), object(9)\n", + "memory usage: 504.0+ MB\n" + ] + } + ], + "source": [ + "eol_species_len = check_sci_name(eol_df)\n", + "eol_species_len.info(show_counts = True)" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Index: 154667 entries, 12 to 9418519\n", + "Data columns (total 11 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 data_source 154667 non-null object\n", + " 1 kingdom 19 non-null object\n", + " 2 phylum 19 non-null object\n", + " 3 class 19 non-null object\n", + " 4 order 550 non-null object\n", + " 5 family 598 non-null object\n", + " 6 genus 598 non-null object\n", + " 7 species 154667 non-null object\n", + " 8 common 154667 non-null object\n", + " 9 duplicate 154667 non-null bool \n", + " 10 len_species 154667 non-null int64 \n", + "dtypes: bool(1), int64(1), object(9)\n", + "memory usage: 13.1+ 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": 69, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "len_species\n", + "3 127298\n", + "4 21771\n", + "5 4257\n", + "8 591\n", + "7 354\n", + "6 309\n", + "10 33\n", + "9 24\n", + "17 13\n", + "11 5\n", + "19 4\n", + "23 3\n", + "18 2\n", + "12 1\n", + "27 1\n", + "16 1\n", + "Name: count, dtype: int64" + ] + }, + "execution_count": 69, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_long_species.len_species.value_counts()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Observe, we did not wind up with any of length 2, so this issue was partially resolved. \n", + "\n", + "Why are some more than 10 words long?" + ] + }, + { + "cell_type": "code", + "execution_count": 73, + "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
5763498EOLNaNNaNNaNNaNNaNNaNtilia platyphyllos x cordata = t. x europaeaTilia platyphyllos x cordata = t. x europaeaTrue8
4764464EOLNaNNaNNaNNaNNaNNaNcrataegus monogyna x laevigata = c. x mediaCrataegus monogyna x laevigata = c. x mediaTrue8
5772983EOLNaNNaNNaNNaNNaNNaNtilia platyphyllos x cordata = t. x europaeaTilia platyphyllos x cordata = t. x europaeaTrue8
3485173EOLNaNNaNNaNNaNNaNNaNtypha latifolia x angustifolia = t. x glaucaTypha latifolia x angustifolia = t. x glaucaTrue8
2434843EOLNaNNaNNaNNaNNaNNaNaster laevis x novi-belgii = a. x versicolorAster laevis x novi-belgii = a. x versicolorTrue8
8403779EOLNaNNaNNaNNaNNaNNaNsilene latifolia x dioica = s. x hampeanaSilene latifolia x dioica = s. x hampeanaTrue8
3782759EOLNaNNaNNaNNaNNaNNaNmiliusa montana gardner ex hook. f. & thomsonMiliusa montana gardner ex hook. f. & thomsonFalse8
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order family genus \n", + "5763498 EOL NaN NaN NaN NaN NaN NaN \\\n", + "4764464 EOL NaN NaN NaN NaN NaN NaN \n", + "5772983 EOL NaN NaN NaN NaN NaN NaN \n", + "3485173 EOL NaN NaN NaN NaN NaN NaN \n", + "2434843 EOL NaN NaN NaN NaN NaN NaN \n", + "8403779 EOL NaN NaN NaN NaN NaN NaN \n", + "3782759 EOL NaN NaN NaN NaN NaN NaN \n", + "\n", + " species \n", + "5763498 tilia platyphyllos x cordata = t. x europaea \\\n", + "4764464 crataegus monogyna x laevigata = c. x media \n", + "5772983 tilia platyphyllos x cordata = t. x europaea \n", + "3485173 typha latifolia x angustifolia = t. x glauca \n", + "2434843 aster laevis x novi-belgii = a. x versicolor \n", + "8403779 silene latifolia x dioica = s. x hampeana \n", + "3782759 miliusa montana gardner ex hook. f. & thomson \n", + "\n", + " common duplicate len_species \n", + "5763498 Tilia platyphyllos x cordata = t. x europaea True 8 \n", + "4764464 Crataegus monogyna x laevigata = c. x media True 8 \n", + "5772983 Tilia platyphyllos x cordata = t. x europaea True 8 \n", + "3485173 Typha latifolia x angustifolia = t. x glauca True 8 \n", + "2434843 Aster laevis x novi-belgii = a. x versicolor True 8 \n", + "8403779 Silene latifolia x dioica = s. x hampeana True 8 \n", + "3782759 Miliusa montana gardner ex hook. f. & thomson False 8 " + ] + }, + "execution_count": 73, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_long_species.loc[eol_long_species[\"len_species\"] > 7].sample(7)" + ] + }, + { + "cell_type": "code", + "execution_count": 74, + "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 47\n", + "species 25161\n", + "common 25159\n", + "duplicate 2\n", + "len_species 16\n", + "dtype: int64" + ] + }, + "execution_count": 74, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_long_species.nunique()" + ] + }, + { + "cell_type": "code", + "execution_count": 76, + "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
5801145EOLNaNNaNNaNNaNNaNNaNveronica pinnata l.Veronica pinnata l.True3
3106825EOLNaNNaNNaNNaNNaNNaNvanessa gonerilla idaVanessa gonerilla idaTrue3
203743EOLNaNNaNNaNNaNNaNNaNadelpha godmani fruhstorferAdelpha godmani fruhstorferTrue3
1210781EOLNaNNaNNaNNaNNaNNaNdiscophlebia celaena turnerDiscophlebia celaena turnerTrue3
97965EOLNaNNaNNaNNaNNaNNaNmiantonota punctilinea dogninMiantonota punctilinea dogninFalse3
6129261EOLNaNNaNNaNNaNNaNNaNadelpha paroeca batesAdelpha paroeca batesTrue3
104169EOLNaNNaNNaNNaNNaNNaNrosa canina group pubescentesRosa canina group pubescentesFalse4
\n", + "
" + ], + "text/plain": [ + " data_source kingdom phylum class order family genus \n", + "5801145 EOL NaN NaN NaN NaN NaN NaN \\\n", + "3106825 EOL NaN NaN NaN NaN NaN NaN \n", + "203743 EOL NaN NaN NaN NaN NaN NaN \n", + "1210781 EOL NaN NaN NaN NaN NaN NaN \n", + "97965 EOL NaN NaN NaN NaN NaN NaN \n", + "6129261 EOL NaN NaN NaN NaN NaN NaN \n", + "104169 EOL NaN NaN NaN NaN NaN NaN \n", + "\n", + " species common \n", + "5801145 veronica pinnata l. Veronica pinnata l. \\\n", + "3106825 vanessa gonerilla ida Vanessa gonerilla ida \n", + "203743 adelpha godmani fruhstorfer Adelpha godmani fruhstorfer \n", + "1210781 discophlebia celaena turner Discophlebia celaena turner \n", + "97965 miantonota punctilinea dognin Miantonota punctilinea dognin \n", + "6129261 adelpha paroeca bates Adelpha paroeca bates \n", + "104169 rosa canina group pubescentes Rosa canina group pubescentes \n", + "\n", + " duplicate len_species \n", + "5801145 True 3 \n", + "3106825 True 3 \n", + "203743 True 3 \n", + "1210781 True 3 \n", + "97965 False 3 \n", + "6129261 True 3 \n", + "104169 False 4 " + ] + }, + "execution_count": 76, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "eol_long_species.loc[eol_long_species[\"len_species\"] < 7].sample(7)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Quick search: \"Adelpha godmani\" is a butterfly with species name given by Fruhstorfer in 1913 ([source](https://butterfliesofamerica.com/L/t/Adelpha_godmani_a.htm))." + ] + }, + { + "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": 78, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "there are 70564 genera in EOL\n", + "there are 4884 genera in inat21\n", + "there are 3407 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": 79, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "There are 4710 genera shared between EOL and iNat21.\n", + "There are 2674 genera shared between EOL and BIOSCAN.\n", + "There are 212 genera shared between iNat21 and BIOSCAN.\n", + "There are 200 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": 80, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np" + ] + }, + { + "cell_type": "code", + "execution_count": 81, + "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": 82, + "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.313721e+061146.176688
1phylum1.159613e+05340.5309741.022818e+05319.815224
2class3.700894e+04192.3770773.256252e+04180.450883
3order7.858826e+0388.6500206.912876e+0383.143705
4family1.344566e+0336.6683241.178890e+0334.334975
5genus1.460491e+0212.0850771.160959e+0210.774779
6species6.211106e+017.8810574.931926e+017.022768
7common2.372088e+014.8704081.965381e+014.433261
\n", + "
" + ], + "text/plain": [ + " class average_all_imgs standard_deviation avg_labeled \n", + "0 kingdom 1.490932e+06 1221.037088 1.313721e+06 \\\n", + "1 phylum 1.159613e+05 340.530974 1.022818e+05 \n", + "2 class 3.700894e+04 192.377077 3.256252e+04 \n", + "3 order 7.858826e+03 88.650020 6.912876e+03 \n", + "4 family 1.344566e+03 36.668324 1.178890e+03 \n", + "5 genus 1.460491e+02 12.085077 1.160959e+02 \n", + "6 species 6.211106e+01 7.881057 4.931926e+01 \n", + "7 common 2.372088e+01 4.870408 1.965381e+01 \n", + "\n", + " std_dev_labeled \n", + "0 1146.176688 \n", + "1 319.815224 \n", + "2 180.450883 \n", + "3 83.143705 \n", + "4 34.334975 \n", + "5 10.774779 \n", + "6 7.022768 \n", + "7 4.433261 " + ] + }, + "execution_count": 82, + "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": 86, + "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." + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "metadata": {}, + "outputs": [], + "source": [ + "sns.set(rc = {'figure.figsize': (10,6)})" + ] + }, + { + "cell_type": "code", + "execution_count": 85, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 85, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAA0UAAAIgCAYAAABKycLoAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABAxklEQVR4nO3dd3gU5f7+8Xt3AxKEIEWEg9jABQwEkCgiTYIcpEkRvrQEaXKQjgdFmoIlYqWKCCKgiBVBNHZARaWIR0ClREIgFClSDBBass/vD35ZWUAJIWF287xf15Uryezsk8/MZyez987srMsYYwQAAAAAlnI7XQAAAAAAOIlQBAAAAMBqhCIAAAAAViMUAQAAALAaoQgAAACA1QhFAAAAAKxGKAI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h9//KH3339fw4YNk6SAdbxkyRK1adNGUVFRatSokcaPHx9wiliFChU0btw4NWjQQLVr19bmzZsDTp8LxW3jQmTlOdfw4cPVrl07RUdHa8GCBZJOHZVr2bKloqKi1LBhQ82cOTNg3H/a3rKyTg8dOqRRo0bptttuU40aNdSlSxf9/PPPFzQG/j+DkDV27FhTrVo1k5aWZlJTU03lypXN448/7r89NjbWREZGmueff95s3rzZJCQkmMqVK5vJkycbY4xZvny58Xq9Ztu2bcYYYxo0aGCqVq1q3n77bZOSkmJGjRplbrrpJtOiRQuzbNkys3btWhMTE2P69+9vjDFm165dJioqyowdO9Zs2bLFbNq0yTz88MOmcuXKZu/evcYYY4YOHWpiY2ONMcZs27bNeL1es3z5cmOMMb179zatWrUyq1evNtu2bTMffvihqVy5spk1a9YlW4e5pUGDBmbixIkB03bt2mUGDBhgqlWrZnbs2BEwz+eff24iIyPN/Pnzzfbt283q1atN27ZtTcuWLQPGrFy5spk9e7ZJTk42r7/+uqlQoYKZP3++SU9PN2vWrDFer9d89tln5vDhw+bnn382FStWNDNmzDApKSlm/fr1plevXqZWrVrm+PHjxhhjnn/+eXPHHXeYxYsXm61bt5r33nvPVK9e3cyZM+eSrSunxcbGmqFDh17Q7ed6XNerV898+eWXZtOmTWbEiBGmYsWKJiUlxRhjzJw5c0xUVJR59913zebNm82UKVNMxYoVTYMGDQLGyNw28pqsbg+VK1c23333nVm7dq05fvy4eeKJJ8wtt9xiFi5caJKTk82cOXNMZGSkee2114wxxuzZs8d4vV4za9Ysk5qaag4dOmTq169vYmNjzZo1a8z69etNv379THR0tNmxY4dJT083e/bs8X/t2rXLdOrUyTRv3twcOnTIpKenm9atW5vmzZubZcuWmU2bNpnRo0ebyMhIs3btWmOMMTNnzjTR0dFm0aJFZvv27Wb58uWmUaNGpk+fPpd8vWZVUlKS8Xq95uOPPz7vvF6v11SrVs3Mnz/fpKSkmBdffNF4vV7z/fffG2OMmThxovF6veaJJ54wKSkpJjk52axZs8ZERkaaMWPGmN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M8Pc1U506dfwvCgazM7eXyMhI4/V6Tbt27fzr/Xz7z7feestUrVrVHDhwwH97YmKiefbZZ82xY8fMvHnzjNfr9d/WsWNHM2bMmIDxli1bFvAcwev1mvj4+LNqzdyPheK2kVVZfc7VqlWrgPu1b98+4D7GGPPOO+/49w3n297Ot06///574/V6A/7nGWNM586d/dtDXu5LTuM9RSHq66+/1t69e9W0aVP/tKZNm+qLL75QQkKC2rZtK0kqV65cwP0KFy6s1NTUvx33+uuv9/+ceSrF1Vdf7Z922WWX+Q+nly1bVvfcc4/mzJmjTZs2acuWLVq/fr0kKSMj47zL0KlTJy1evFgffPCBUlJSlJiYqG3btum66647731DQYcOHfynWLndbl1xxRUqXLjwOee95ZZbVKxYMU2ZMkVbt25VcnKy1q9ff9apHufq58mTJ885ZqVKlVSkSBFNnz5dycnJZ/Vn06ZNOn78uIYOHeo/lUI6dYWqEydO6NixY/7HQF4XExOjIUOGBEy70GU/vTeZfT558qQOHDigHTt2qFq1agHz16hRI+D0yLwuK9vDtdde6/958+bNOnnypGrUqBEwT3R0tGbOnKl9+/apRIkSAbclJibquuuuC3ifw2WXXaaoqCj/qVaZ3njjDb311luaPXu2ypQp479/4cKF5fV6/fO5XC5FR0dr6dKlkk49VtasWaOJEydq69atSkpK0m+//aarrroqu6sm12Wuj4MHD2Zp/tP3A5IUERGh48eP+38vXrx4QO8SExNVu3btgPtUqFBBERER2rhxo+rXr3/WuOfbv5xp8ODBio+P15tvvqnbbrtNdevWVZMmTeR2n/0ugAIFCig2NlaffvqpZs+era1bt2rDhg3as2dPyJw+d/r2kp6eri1btmjcuHHq1KmT5s2bd97958aNG3Xdddfpiiuu8I954403nvV/LtO6deu0du1a/2mk0l/vO0pKSvL36fRt9EyhuG1kVVafc525fjZu3KgmTZoETGvXrl3A7/+0vZ1vnWbuQzJPn8904sSJLI+BvxCKQlTmJRwHDBhw1m1vvfWWfwM913tX/knmOf6nO9dORzr1j7Jjx4666aabVLt2bTVs2FBFixY9a4M/F2OMevfurY0bN6pFixZq3LixHnjgAY0aNeqC6g1mRYoU+ccdyOkSEhL00EMPqXnz5oqKilLbtm2VmJioxx57LGC+c/XT/M0bZn/44Qd1795d9evXV3R0tJo1a6ajR4+qb9++AfcbP368brjhhrPuf6GPnVB2+eWX/2OvzlzH5wqif9ebzG3q7/pki6xsD6cH0cz15XK5AubJfFJ7rv9Vxpiz5pdOvQhw+vzffPON4uPjFR8fr5tvvvm89/f5fP77T58+XZMmTVKbNm106623Ki4uTosWLQrqy0GXLVtWJUqU0E8//RTwpC7Tli1b9Nhjj2no0KGSTl3k4EynP37PfMHgn9Zbvnz5/L9fyP7lTJ07d9Zdd92lr7/+WsuWLdMLL7ygSZMmacGCBWeF46NHj6pz5846evSomjRpopYtW2rUqFE5coGCS+XM7aVcuXIqUqSIOnfurO+//15z5879x/1nWFjYOXvyd3w+n3r27KnWrVufddvpF3z4pxeLQnHbyKqsPuc6c/1kpQ//tL2db536fD4VKlTonJf1ztwn5eW+5DRCUQjav3+/vv76a7Vp00bdunULuG327Nl67733Lskr0G+++aaKFy8e8FkHixcvlnT+J4Dr1q3T119/rXfeeUdVq1aVdOqJZkpKisqWLZtrNQerqVOnqm3btv43LUvSokWLJP39E44znTnPjBkzVLNmTU2ePNk/7fXXX/ePecMNNygsLEw7d+5UgwYN/PO89tpr2rRp01mBzFb58uXToUOHAqalpKRk+UhS4cKFVaZMGa1evVp33nmnf/ratWtztM68JvPxuWrVKlWsWNE/fdWqVbryyivPealmr9erBQsWaN++fSpevLgk6fjx4/rll1/8l5veuHGjBg8erJ49e6ply5YB969QoYJSU1OVmJgYcLToxx9/9F/m/qWXXlK/fv3Uq1cv/+0zZswI6tDrdrvVtm1bzZkzRz179jzrFeJXXnlFq1ev9h8xu1Ber/esz4rasGGDDh8+fNbR7ez4448/NGXKFPXq1Utt2rRRmzZttHv3btWrV08rV648K+gtXbpUv/76q7777jt/YDp48KD27dsX1H3Kql9++eW8+8/y5cvr3Xff1aFDh/xH9datW6du3brp/fffP2t/ceONN2rz5s0BQWzlypWaPXu2Ro8erYIFC563rlDcNrLiYp5zlStXLuCiB5IUHx+v7du3a8qUKef92+dbp16vV4cPH9aJEyd04403+ucZOXKkKlasqNjY2Dzbl9zA1edC0AcffKD09HT17NlTXq834Kt3797yeDx68803c72OUqVKadeuXfr666+1Y8cOff755xo9erQknfdDzUqUKKGwsDB98skn2rZtm37++WcNGjRIe/fuzZEPRAs1pUuX1v/+9z/9+uuvSklJ0axZszRnzhxJ51+XmTJ3WomJiTp06JBKly6tjRs3atWqVdq+fbvmzZunCRMm+McsXLiwOnTooPHjx2vBggXatm2b5s+fr2efffasV15tdvPNN+v777/X4sWLtW3bNk2cOFGJiYkXNMZ9992nOXPmaP78+dq6datmzZqlTz75JJcqzhsKFy6s//u//9PEiRP14YcfauvWrXrjjTc0d+5cde/e3f+krmDBgkpKStKBAwfUokULRUREaNCgQVq7dq02bNigBx98UGlpaWrfvr327t2r3r1767bbbtO9996rvXv3+r8OHTqk2rVrq0KFCvrvf/+rFStWKCkpSWPGjFFiYqLuvfdeSae21e+++06bNm3S5s2bNW7cOH3++edB/3+rd+/euvbaa9WhQwctWLBAKSkp+vnnnzVixAjNmzdPjz/+uAoVKpStsbt27aoNGzboscceU1JSklauXKkhQ4bopptuUq1atS669iuuuEJfffWVRo4cqfXr12vbtm2aO3eu8uXLp8qVK0s6dbR3x44d2rVrl/8KewsXLtSOHTu0atUq9enTRydPngz6PmVKS0vzPzb37NmjVatWKT4+XiVLllS7du3Ou/9s0aKFihQpogcffFAbNmzQL7/8otGjR8vr9apMmTL+/cUvv/yiY8eO6b777tPnn3+uSZMmKTk5WcuWLdOwYcOUmpqa5Uujh+q2cT4X85yrV69e+vjjj/Xaa68pJSVFCQkJeuutt7J8+fvzrdO6deuqUqVKGjRokJYtW6atW7fq6aef1rx58/wvSOTVvuQGQlEIev/993X77bef8xW4smXLqlGjRkpISNDhw4dztY4uXbqoSZMm/tO+XnrpJT3wwAMqU6bMeV8Fv+qqqzR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l2nywAAgFAEAHBGqVKlVKpUKafLAACA0+cAAJfOe++9p4oVK2rSpElnnT4XFxenESNGaNq0abrjjjtUpUoVdejQQWvWrAkY46uvvlKbNm0UFRWlxo0b66OPPlKjRo00adIk/zw7d+5Uv379VKNGDdWuXVszZ848q5aMjAy98cYbatGihaKionTHHXfoueee0/Hjx/3zPPzww+rRo4feeecd3XnnnYqKilKHDh2UnJysJUuWqEWLFqpataratWun9evX58IaAwBcChwpAgBcEh9//LFGjRql3r17q3///gEhJtNnn32mcuXKaeTIkTLG6Omnn9aAAQO0ePFieTweLV++XH369FGDBg00cOBAbd26VY8++mhAkElLS1NsbKzcbrcee+wxhYWFacKECUpJSVH16tX98z3yyCNasGCBevbsqVtvvVXr1q3Tiy++qPXr1+uVV16Ry+WSJK1evVp79uzRww8/rGPHjmn06NHq1auXXC6XBgwYILfbrfj4eA0ZMkQJCQm5vyIBADmOUAQAyHVLlizRQw89pF69emnQoEF/O196erpmzJihQoUKSZKOHDmioUOHav369apcubImTZqk8uXLa/Lkyf7QUrx4cT3wwAP+MebPn6+dO3fqgw8+8B+JioqKUqNGjfzzbNq0Se+9954GDRqk+++/X5JUu3ZtlSxZUg899JC++eYb1a9fX5J0+PBhjR8/XuXKlZMkrVy5Um+//bZmzZqlWrVqSZJ27dqlp59+WqmpqYqIiMihtQYAuFQ4fQ4AkKt+/fVXDRw4UCVLltTAgQP/cd7y5cv7A5EkXXXVVZKko0eP6sSJE/rpp5/UuHFjfyCSpMaNGyss7K/X+FatWqWyZcsGnJpXunRpVatWzf/7ypUrJUktWrQI+PvNmjWTx+PRihUr/NOKFCniD0SSdOWVV0pSwHhXXHGFJCk1NfUflw8AEJwIRQCAXJWYmKjbb79dO3bs0Jw5c/5x3vDw8IDf3e5Tuymfz6eDBw8qIyNDxYsXD5gnLCxMRYsW9f/+559/qlixYmeNnRlmMuc5c9rpYx06dMg/7fSQ9k+1AgBCF6EIAJCr6tSpo6lTp6p58+YaN26cdu7cma1xihcvrnz58mnfvn0B030+nw4cOOD/vWjRovrjjz/Ouv/Bgwf9PxcpUkSStHfv3oB5Tp48qQMHDgSELABA3kcoAgDkqsyjMcOGDVNYWJgeeeSRbI3j8Xh0880368svvwyYvnjxYqWnp/t/v+2227R9+3b9/PPP/mn79+/X6tWr/b/feuutkqQPP/wwYKyEhARlZGSoRo0a2aoRABCauNACAOCSKFGihAYPHqwxY8bogw8+yNYYAwYMUFxcnAYMGKC2bdtq586dmjBhgiT532fUsmVLvfbaa+rXr58GDx6sQoUK6aWXXpLP5/OPU758ebVu3VqTJ0/WsWPHVLNmTa1fv16TJ09WzZo1+VBZALAMR4oAAJdMhw4dFBUVpfj4eO3fv/+C7x8dHa1JkyYpOTlZffr00cyZMzVq1ChJ0uWXXy5Jyp8/v2bPnq1bbrlFTz75pIYPH65atWqpQYMGAWM9+eST6tevnxISEtSrVy+98cYbiouL0/Tp0/3vZQIA2MFljDFOFwEAQFYsWrRIpUqVUmRkpH/ab7/9pubNm2vKlClq2LChg9UBAEIVp88BAELGt99+q48//lhDhgzR9ddfr127dumll17SDTfcoDp16jhdHgAgRHGkCAAQMo4dO6YJEybos88+0549e3TFFVeobt26+u9//6sSJUo4XR4AIEQRigAAAABYjXeSAgAAALAaoQgAAACA1QhFAAAAAKxGKAIAAABgNUIRAAAAAKsRigAAAABYjVAEAAAAwGqEIgAAAABW+3+kH9ahfdsv1wAAAABJRU5ErkJggg==", + "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 +}