{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Imports ","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19"}},{"cell_type":"code","source":"!pip install skimpy \nimport numpy as np \nimport pandas as pd \nimport plotly.express as px \nimport plotly.graph_objects as go \nimport skimpy","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:10:24.997218Z","iopub.execute_input":"2023-04-02T12:10:24.997666Z","iopub.status.idle":"2023-04-02T12:10:36.358681Z","shell.execute_reply.started":"2023-04-02T12:10:24.997629Z","shell.execute_reply":"2023-04-02T12:10:36.357593Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Reading the data ","metadata":{}},{"cell_type":"code","source":"taxo = pd.read_csv('/kaggle/input/birdclef-2022/eBird_Taxonomy_v2021.csv')\nss = pd.read_csv(\"/kaggle/input/birdclef-2022/sample_submission.csv\")\ntrain = pd.read_csv(\"/kaggle/input/birdclef-2022/train_metadata.csv\")\ntest = pd.read_csv(\"/kaggle/input/birdclef-2022/test.csv\")\nscores = pd.read_json(\"/kaggle/input/birdclef-2022/scored_birds.json\")","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:09:29.320738Z","iopub.execute_input":"2023-04-02T12:09:29.321215Z","iopub.status.idle":"2023-04-02T12:09:29.499952Z","shell.execute_reply.started":"2023-04-02T12:09:29.321174Z","shell.execute_reply":"2023-04-02T12:09:29.499037Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"skimpy.skim(taxo)","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:10:36.395435Z","iopub.execute_input":"2023-04-02T12:10:36.396238Z","iopub.status.idle":"2023-04-02T12:10:36.476716Z","shell.execute_reply.started":"2023-04-02T12:10:36.396183Z","shell.execute_reply":"2023-04-02T12:10:36.475603Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"skimpy.skim(train)","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:13:27.509633Z","iopub.execute_input":"2023-04-02T12:13:27.510596Z","iopub.status.idle":"2023-04-02T12:13:27.590562Z","shell.execute_reply.started":"2023-04-02T12:13:27.510553Z","shell.execute_reply":"2023-04-02T12:13:27.589350Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:13:42.158929Z","iopub.execute_input":"2023-04-02T12:13:42.159369Z","iopub.status.idle":"2023-04-02T12:13:42.188340Z","shell.execute_reply.started":"2023-04-02T12:13:42.159309Z","shell.execute_reply":"2023-04-02T12:13:42.186996Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"skimpy.skim(test)","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:14:08.718462Z","iopub.execute_input":"2023-04-02T12:14:08.718981Z","iopub.status.idle":"2023-04-02T12:14:08.804441Z","shell.execute_reply.started":"2023-04-02T12:14:08.718921Z","shell.execute_reply":"2023-04-02T12:14:08.802935Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:14:10.071081Z","iopub.execute_input":"2023-04-02T12:14:10.071544Z","iopub.status.idle":"2023-04-02T12:14:10.084278Z","shell.execute_reply.started":"2023-04-02T12:14:10.071495Z","shell.execute_reply":"2023-04-02T12:14:10.082841Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:14:51.922167Z","iopub.execute_input":"2023-04-02T12:14:51.922674Z","iopub.status.idle":"2023-04-02T12:14:51.934847Z","shell.execute_reply.started":"2023-04-02T12:14:51.922630Z","shell.execute_reply":"2023-04-02T12:14:51.933414Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# EDA ","metadata":{}},{"cell_type":"code","source":"fig = px.scatter_geo(train , lat = \"latitude\", lon = \"longitude\", color = \"primary_label\" , title = \"primary labels plotted with lon and lat \")\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:31:54.530398Z","iopub.execute_input":"2023-04-02T12:31:54.530804Z","iopub.status.idle":"2023-04-02T12:31:55.075364Z","shell.execute_reply.started":"2023-04-02T12:31:54.530768Z","shell.execute_reply":"2023-04-02T12:31:55.074150Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train.scientific_name.value_counts()","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:25:35.916947Z","iopub.execute_input":"2023-04-02T12:25:35.917405Z","iopub.status.idle":"2023-04-02T12:25:35.928016Z","shell.execute_reply.started":"2023-04-02T12:25:35.917363Z","shell.execute_reply":"2023-04-02T12:25:35.926822Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig = px.bar( x = train.scientific_name.value_counts().keys(), y = train.scientific_name.value_counts().values) \n\nfig.update_layout(\n    title = \"scientic names frequency\" , \n    xaxis_title = \"species_name\",\n    yaxis_title = \"species frequency\",\n    \n)\n\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:27:22.909837Z","iopub.execute_input":"2023-04-02T12:27:22.910610Z","iopub.status.idle":"2023-04-02T12:27:22.977820Z","shell.execute_reply.started":"2023-04-02T12:27:22.910560Z","shell.execute_reply":"2023-04-02T12:27:22.976752Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig = px.bar( x = train.common_name.value_counts().keys(), y = train.common_name.value_counts().values) \n\nfig.update_layout(\n    title = \"common names frequency\" , \n    xaxis_title = \"species common name\",\n    yaxis_title = \"species frequency\",\n    \n)\n\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:28:45.051108Z","iopub.execute_input":"2023-04-02T12:28:45.051538Z","iopub.status.idle":"2023-04-02T12:28:45.119299Z","shell.execute_reply.started":"2023-04-02T12:28:45.051501Z","shell.execute_reply":"2023-04-02T12:28:45.118061Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig = px.bar( x = train.author.value_counts().keys(), y = train.author.value_counts().values) \n\nfig.update_layout(\n    title = \"author frequency\" , \n    xaxis_title = \"author name\",\n    yaxis_title = \"author contribution frequency\",\n    \n)\n\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:31:00.885083Z","iopub.execute_input":"2023-04-02T12:31:00.885545Z","iopub.status.idle":"2023-04-02T12:31:00.957854Z","shell.execute_reply.started":"2023-04-02T12:31:00.885505Z","shell.execute_reply":"2023-04-02T12:31:00.956600Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig = px.scatter_geo(train , lat = 'latitude',\n                     lon = 'longitude', \n                     color = 'rating' , \n                     hover_data = [\"rating\", \"primary_label\",\"common_name\" ],\n                    )\n\nfig.update_layout(\ntitle = \"rating with primary labels\", \n    font_family=\"Courier New\",\n    font_color=\"blue\",\n    title_font_family=\"Times New Roman\",\n    title_font_color=\"red\",\n    legend_title_font_color=\"green\")\n\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:35:45.841145Z","iopub.execute_input":"2023-04-02T12:35:45.841621Z","iopub.status.idle":"2023-04-02T12:35:46.135926Z","shell.execute_reply.started":"2023-04-02T12:35:45.841580Z","shell.execute_reply":"2023-04-02T12:35:46.134653Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# visualizing taxonomy data ","metadata":{}},{"cell_type":"code","source":"taxo.head()","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:36:32.700712Z","iopub.execute_input":"2023-04-02T12:36:32.701146Z","iopub.status.idle":"2023-04-02T12:36:32.717117Z","shell.execute_reply.started":"2023-04-02T12:36:32.701105Z","shell.execute_reply":"2023-04-02T12:36:32.715801Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig = px.bar(x = taxo.CATEGORY.value_counts().keys(),y = taxo.CATEGORY.value_counts().values, \n             color  = taxo.CATEGORY.value_counts().values  )\nfig.update_layout(title = \"taxonomy categories\", xaxis_title = \"category\" , yaxis_title = \"no of categories\" )\n\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2023-04-02T12:38:56.502503Z","iopub.execute_input":"2023-04-02T12:38:56.503787Z","iopub.status.idle":"2023-04-02T12:38:56.574661Z","shell.execute_reply.started":"2023-04-02T12:38:56.503745Z","shell.execute_reply":"2023-04-02T12:38:56.573465Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}