{"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":"![](https://clef2022.clef-initiative.eu/images/logo_clef_2022_def.png)https://www.imageclef.org/LifeCLEF2022","metadata":{}},{"cell_type":"markdown","source":"<center style=\"font-family:verdana;\"><h1 style=\"font-size:200%; padding: 10px; background: #DC143C;\"><b style=\"color:white;\">Conference and Labs of the Evaluation Forum (CLEF)</b></h1></center>\n\nSince the Dataset is so complex, this Notebook is just an Overview of the data.\n\n\"LifeCLEF lab is part of the Conference and Labs of the Evaluation Forum (CLEF). CLEF consists of independent peer-reviewed workshops on a broad range of challenges in the fields of multilingual and multimodal information access evaluation, and a set of benchmarking activities carried in various labs designed to test different aspects of mono and cross-language Information retrieval systems. More details can be found on the CLEF 2022 website.\"\n\nhttps://www.imageclef.org/LifeCLEF2022","metadata":{}},{"cell_type":"code","source":"import numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport plotly.express as px\nimport plotly.graph_objs as go\n\nimport plotly\nplotly.offline.init_notebook_mode(connected=True)\n\n#Ignore warnings\nimport warnings\nwarnings.filterwarnings('ignore')","metadata":{"execution":{"iopub.status.busy":"2022-03-17T19:07:58.545691Z","iopub.execute_input":"2022-03-17T19:07:58.546550Z","iopub.status.idle":"2022-03-17T19:07:58.555150Z","shell.execute_reply.started":"2022-03-17T19:07:58.546500Z","shell.execute_reply":"2022-03-17T19:07:58.554481Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from PIL import Image","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:17:00.194988Z","iopub.execute_input":"2022-03-17T17:17:00.19582Z","iopub.status.idle":"2022-03-17T17:17:00.20052Z","shell.execute_reply.started":"2022-03-17T17:17:00.195778Z","shell.execute_reply":"2022-03-17T17:17:00.199411Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by Ritwek Khosla https://www.kaggle.com/vanvalkenberg/hubble-telescope-images/comments\n\ndef display_Image(path, save):\n    img1 = Image.open(path)\n    display(img1)\n    if save == True:\n        img1.save('21094700_rgb.jpg')","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:17:06.323787Z","iopub.execute_input":"2022-03-17T17:17:06.32434Z","iopub.status.idle":"2022-03-17T17:17:06.32903Z","shell.execute_reply.started":"2022-03-17T17:17:06.324303Z","shell.execute_reply":"2022-03-17T17:17:06.328117Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"display_Image('/kaggle/input/geolifeclef-2022-lifeclef-2022-fgvc9/patches_sample/patches-us/00/47/21934700_rgb.jpg', 0)","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:17:11.164783Z","iopub.execute_input":"2022-03-17T17:17:11.165201Z","iopub.status.idle":"2022-03-17T17:17:11.24447Z","shell.execute_reply.started":"2022-03-17T17:17:11.165168Z","shell.execute_reply":"2022-03-17T17:17:11.243625Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from fastai.vision.all import *\nfrom fastai.imports import *\nfrom fastai.vision.data import *\nfrom fastai import *\nimport numpy as np\nimport fastai\nimport matplotlib.pyplot as plt","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:17:17.083391Z","iopub.execute_input":"2022-03-17T17:17:17.083683Z","iopub.status.idle":"2022-03-17T17:17:18.78993Z","shell.execute_reply.started":"2022-03-17T17:17:17.083654Z","shell.execute_reply":"2022-03-17T17:17:18.789185Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"path = Path(\"/kaggle/input/geolifeclef-2022-lifeclef-2022-fgvc9/patches_sample/patches-us\")\npath.ls()","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:17:24.114291Z","iopub.execute_input":"2022-03-17T17:17:24.114583Z","iopub.status.idle":"2022-03-17T17:17:24.124642Z","shell.execute_reply.started":"2022-03-17T17:17:24.11455Z","shell.execute_reply":"2022-03-17T17:17:24.123743Z"},"_kg_hide-output":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fnames = get_image_files(path/\"images\")","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:17:38.096287Z","iopub.execute_input":"2022-03-17T17:17:38.096693Z","iopub.status.idle":"2022-03-17T17:17:38.102845Z","shell.execute_reply.started":"2022-03-17T17:17:38.096662Z","shell.execute_reply":"2022-03-17T17:17:38.101838Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dblock = DataBlock()","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:17:43.262972Z","iopub.execute_input":"2022-03-17T17:17:43.263422Z","iopub.status.idle":"2022-03-17T17:17:43.268148Z","shell.execute_reply.started":"2022-03-17T17:17:43.263384Z","shell.execute_reply":"2022-03-17T17:17:43.267202Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dblock = DataBlock(get_items = get_image_files)","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:17:47.804813Z","iopub.execute_input":"2022-03-17T17:17:47.805109Z","iopub.status.idle":"2022-03-17T17:17:47.812554Z","shell.execute_reply.started":"2022-03-17T17:17:47.805078Z","shell.execute_reply":"2022-03-17T17:17:47.811576Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import cv2 as cv\nimport matplotlib.pyplot as plt","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:17:52.958845Z","iopub.execute_input":"2022-03-17T17:17:52.959397Z","iopub.status.idle":"2022-03-17T17:17:53.294582Z","shell.execute_reply.started":"2022-03-17T17:17:52.959363Z","shell.execute_reply":"2022-03-17T17:17:53.293593Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"IMG_PATH = \"../input/geolifeclef-2022-lifeclef-2022-fgvc9/patches_sample/patches-us/00/47/21164700_near_ir.jpg\"\n\nimgArray = cv.imread(IMG_PATH)","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:17:59.2622Z","iopub.execute_input":"2022-03-17T17:17:59.262473Z","iopub.status.idle":"2022-03-17T17:17:59.295364Z","shell.execute_reply.started":"2022-03-17T17:17:59.262446Z","shell.execute_reply":"2022-03-17T17:17:59.294667Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"plt.imshow(imgArray);","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:18:15.895798Z","iopub.execute_input":"2022-03-17T17:18:15.896089Z","iopub.status.idle":"2022-03-17T17:18:16.103813Z","shell.execute_reply.started":"2022-03-17T17:18:15.896055Z","shell.execute_reply":"2022-03-17T17:18:16.102938Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"convertedArray = cv.cvtColor(imgArray, cv.COLOR_BGR2RGB)\n\nplt.subplots(figsize=(15,10))\nplt.imshow(convertedArray);plt.show()","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:18:23.651861Z","iopub.execute_input":"2022-03-17T17:18:23.652504Z","iopub.status.idle":"2022-03-17T17:18:23.991132Z","shell.execute_reply.started":"2022-03-17T17:18:23.652464Z","shell.execute_reply":"2022-03-17T17:18:23.990238Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"fig, ((ax1,ax2), (ax3,ax4)) =plt.subplots(2,2,figsize=(14,10))\n\nax1.imshow(convertedArray[:,:,0], cmap=\"Reds_r\"); ax1.set_title(\"R\", size=20) \nax2.imshow(convertedArray[:,:,1], cmap=\"Greens_r\"); ax2.set_title(\"G\", size=20)\nax3.imshow(convertedArray[:,:,2], cmap=\"Blues_r\"); ax3.set_title(\"B\", size=20)\n\nax4.axis(\"off\"); plt.tight_layout(); plt.show()","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:18:30.005118Z","iopub.execute_input":"2022-03-17T17:18:30.00544Z","iopub.status.idle":"2022-03-17T17:18:30.719877Z","shell.execute_reply.started":"2022-03-17T17:18:30.005407Z","shell.execute_reply":"2022-03-17T17:18:30.718994Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import cv2\n\nimport matplotlib.pyplot as plt\n%matplotlib inline\nfrom skimage.filters import threshold_otsu\nimport numpy as np\nfrom glob import glob\nimport scipy.misc\nfrom matplotlib.patches import Circle,Ellipse\nfrom matplotlib.patches import Rectangle\nimport os\nfrom PIL import Image\nimport keras\nfrom matplotlib import pyplot as plt\nimport numpy as np\nimport gzip\n%matplotlib inline\nfrom keras.layers import Input,Conv2D,MaxPooling2D,UpSampling2D\nfrom keras.models import Model\nfrom tensorflow.keras.optimizers import RMSprop\n#from keras.optimizers import RMSprop\n#from keras.layers.normalization import BatchNormalization\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import (\n    BatchNormalization, SeparableConv2D, MaxPooling2D, Activation, Flatten, Dropout, Dense\n)\nfrom tensorflow.keras import backend as K","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:18:36.081951Z","iopub.execute_input":"2022-03-17T17:18:36.082256Z","iopub.status.idle":"2022-03-17T17:18:42.278548Z","shell.execute_reply.started":"2022-03-17T17:18:36.082208Z","shell.execute_reply":"2022-03-17T17:18:42.277754Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Rasters","metadata":{}},{"cell_type":"code","source":"import rasterio as rio\nimport folium\nimport tifffile as tiff","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:18:44.681086Z","iopub.execute_input":"2022-03-17T17:18:44.681368Z","iopub.status.idle":"2022-03-17T17:18:45.36699Z","shell.execute_reply.started":"2022-03-17T17:18:44.681338Z","shell.execute_reply":"2022-03-17T17:18:45.366169Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by JyeSR https://www.kaggle.com/jyesawtellrickson/data-measurement-levels\n\nfrom skimage.io import imread\nimage = imread('/kaggle/input/geolifeclef-2022-lifeclef-2022-fgvc9/rasters/bio_13/bio_13_FR.tif')\nprint (image.shape)\nplt.imshow(image[:,:], cmap = 'terrain')#Chute mandei bem it was [:,:,0]\nplt.axes = False\nplt.title(\"Raster Bio 13 France\");","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:19:06.90716Z","iopub.execute_input":"2022-03-17T17:19:06.907453Z","iopub.status.idle":"2022-03-17T17:19:07.998781Z","shell.execute_reply.started":"2022-03-17T17:19:06.907423Z","shell.execute_reply":"2022-03-17T17:19:07.997987Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#IndexError: too many indices for array: array is 2-dimensional, but 3 were indexed\nI tried different things (=numbers to fit it randomly)","metadata":{}},{"cell_type":"code","source":"#Code by JyeSR https://www.kaggle.com/jyesawtellrickson/data-measurement-levels\n\nfrom skimage.io import imread\nimage = imread('/kaggle/input/geolifeclef-2022-lifeclef-2022-fgvc9/rasters/bio_4/bio_4_USA.tif')\nprint (image.shape)\nplt.imshow(image[:,:], cmap = 'ocean') #it was [:,:,0] 3D\nplt.axes = False\nplt.title(\"Raster Bio 4 USA\");","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-03-17T18:40:16.944745Z","iopub.execute_input":"2022-03-17T18:40:16.945059Z","iopub.status.idle":"2022-03-17T18:40:21.265784Z","shell.execute_reply.started":"2022-03-17T18:40:16.945025Z","shell.execute_reply":"2022-03-17T18:40:21.264753Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by JyeSR https://www.kaggle.com/jyesawtellrickson/data-measurement-levels\n\nfrom skimage.io import imread\nimage = imread('/kaggle/input/geolifeclef-2022-lifeclef-2022-fgvc9/rasters/bdticm/bdticm_USA.tif')\nprint (image.shape)\nplt.imshow(image[:,:], cmap = 'winter')#it was [:,:,0] 3D\nplt.axes = False\nplt.title(\"Raster Bdticm USA\");","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-03-17T18:39:40.867199Z","iopub.execute_input":"2022-03-17T18:39:40.867599Z","iopub.status.idle":"2022-03-17T18:40:07.11706Z","shell.execute_reply.started":"2022-03-17T18:39:40.86756Z","shell.execute_reply":"2022-03-17T18:40:07.115733Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by JyeSR https://www.kaggle.com/jyesawtellrickson/data-measurement-levels\n\nfrom skimage.io import imread\nimage = imread('/kaggle/input/geolifeclef-2022-lifeclef-2022-fgvc9/rasters/bdticm/bdticm_FR.tif')\nprint (image.shape)\nplt.imshow(image[:,:], cmap = 'summer')#it was [:,:,0] 3D\nplt.axes = False\nplt.title(\"Raster Bdticm France\");","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2022-03-17T18:37:15.480201Z","iopub.execute_input":"2022-03-17T18:37:15.480576Z","iopub.status.idle":"2022-03-17T18:37:21.65869Z","shell.execute_reply.started":"2022-03-17T18:37:15.480538Z","shell.execute_reply":"2022-03-17T18:37:21.65778Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#BDTICM: Absolute depth to bedrock\n\nhttps://www.isric.org/explore/soilgrids/faq-soilgrids-2017","metadata":{}},{"cell_type":"code","source":"df = pd.read_csv('/kaggle/input/geolifeclef-2022-lifeclef-2022-fgvc9/observations/observations_fr_train.csv', delimiter=';')\ndf.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-17T18:05:45.57162Z","iopub.execute_input":"2022-03-17T18:05:45.571934Z","iopub.status.idle":"2022-03-17T18:05:46.094773Z","shell.execute_reply.started":"2022-03-17T18:05:45.571903Z","shell.execute_reply":"2022-03-17T18:05:46.093738Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def plot_points_on_map(dataframe,begin_index,end_index,latitude_column,latitude_value,longitude_column,longitude_value,zoom):\n    df = dataframe[begin_index:end_index]\n    location = [latitude_value,longitude_value]\n    plot = folium.Map(location=location,zoom_start=zoom)\n    for i in range(0,len(df)):\n        popup = folium.Popup(str(df.species_id[i:i+1]))\n        folium.Marker([df[latitude_column].iloc[i],df[longitude_column].iloc[i]],popup=popup).add_to(plot)\n    return(plot)","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:41:00.614598Z","iopub.execute_input":"2022-03-17T17:41:00.614935Z","iopub.status.idle":"2022-03-17T17:41:00.622613Z","shell.execute_reply.started":"2022-03-17T17:41:00.614898Z","shell.execute_reply":"2022-03-17T17:41:00.621865Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def overlay_image_on_FR(file_name,band_layer,lat,lon,zoom):\n    band = rio.open(file_name).read(band_layer)\n    m = folium.Map([lat, lon], zoom_start=zoom)\n    folium.raster_layers.ImageOverlay(\n        image=band,\n        bounds = [[18.6,-67.3,],[17.9,-65.2]],\n        colormap=lambda x: (1, 0, 0, x),\n    ).add_to(m)\n    return m","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:55:08.902261Z","iopub.execute_input":"2022-03-17T17:55:08.903256Z","iopub.status.idle":"2022-03-17T17:55:08.911491Z","shell.execute_reply.started":"2022-03-17T17:55:08.903171Z","shell.execute_reply":"2022-03-17T17:55:08.910177Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def plot_scaled(file_name):\n    vmin, vmax = np.nanpercentile(file_name, (5,95))  # 5-95% stretch\n    img_plt = plt.imshow(file_name, cmap='gray', vmin=vmin, vmax=vmax)\n    plt.show()","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:55:16.437939Z","iopub.execute_input":"2022-03-17T17:55:16.439069Z","iopub.status.idle":"2022-03-17T17:55:16.444522Z","shell.execute_reply.started":"2022-03-17T17:55:16.439012Z","shell.execute_reply":"2022-03-17T17:55:16.443718Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def split_column_into_new_columns(dataframe,column_to_split,new_column_one,begin_column_one,end_column_one):\n    for i in range(0, len(dataframe)):\n        dataframe.loc[i, new_column_one] = dataframe.loc[i, column_to_split][begin_column_one:end_column_one]\n    return dataframe","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:55:21.618638Z","iopub.execute_input":"2022-03-17T17:55:21.619363Z","iopub.status.idle":"2022-03-17T17:55:21.626125Z","shell.execute_reply.started":"2022-03-17T17:55:21.619307Z","shell.execute_reply":"2022-03-17T17:55:21.625076Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Codes Paul Mooney https://www.kaggle.com/paultimothymooney/how-to-get-started-with-the-earth-engine-data\n\n#Ragnar https://www.kaggle.com/ragnar123/exploratory-data-analysis-and-factor-model-idea\n\n#df = split_column_into_new_columns(df,'.geo','latitude',45.705116)\n#df = split_column_into_new_columns(df,'.geo','longitude',1.424622)\ndf['latitude'] = df['latitude'].astype(float)\na = np.array(df['latitude'].values.tolist()) # 18 insted of 8\ndf['latitude'] = np.where(a < 10, a + 10, a).tolist()\nlat = 48.724445 ; lon = -4.006194\nplot_points_on_map(df, 0, 425, 'latitude', lat, 'longitude', lon, 9)","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:55:41.638462Z","iopub.execute_input":"2022-03-17T17:55:41.639089Z","iopub.status.idle":"2022-03-17T17:55:43.523031Z","shell.execute_reply.started":"2022-03-17T17:55:41.639039Z","shell.execute_reply":"2022-03-17T17:55:43.522079Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"image = '/kaggle/input/geolifeclef-2022-lifeclef-2022-fgvc9/patches-fr/04/04/10010404_altitude.tif'\nlatitude=50.676778; longitude= 2.888260 \noverlay_image_on_FR(image,band_layer=1,lat=latitude,lon=longitude,zoom=8)#band_layer was 7 Chutei de novo","metadata":{"execution":{"iopub.status.busy":"2022-03-17T18:08:39.417074Z","iopub.execute_input":"2022-03-17T18:08:39.418207Z","iopub.status.idle":"2022-03-17T18:08:39.590693Z","shell.execute_reply.started":"2022-03-17T18:08:39.418136Z","shell.execute_reply":"2022-03-17T18:08:39.589392Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Unfortunately, no Raster appeared on the map above. Besides, I have no clue where is the location of the tif I've chosen. There is just a line surrounding the map. ","metadata":{}},{"cell_type":"code","source":"df1 = pd.read_csv('/kaggle/input/geolifeclef-2022-lifeclef-2022-fgvc9/metadata/species_details.csv', delimiter=';')\ndf1.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:20:42.164497Z","iopub.execute_input":"2022-03-17T17:20:42.165291Z","iopub.status.idle":"2022-03-17T17:20:42.222763Z","shell.execute_reply.started":"2022-03-17T17:20:42.165242Z","shell.execute_reply":"2022-03-17T17:20:42.221894Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Codes by Pooja Jain https://www.kaggle.com/jainpooja/av-guided-hackathon-predict-youtube-likes/notebook\n\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\ntext_cols = ['GBIF_species_name', 'GBIF_genus_name', 'GBIF_family_name', 'GBIF_kingdom_name']\n\nfrom wordcloud import WordCloud, STOPWORDS\n\nwc = WordCloud(stopwords = set(list(STOPWORDS) + ['|']), random_state = 42, background_color='green',colormap=\"Dark2\",)\nfig, axes = plt.subplots(2,2, figsize=(20, 12))\naxes = [ax for axes_row in axes for ax in axes_row]\n\nfor i, c in enumerate(text_cols):\n  op = wc.generate(str(df1[c]))\n  _ = axes[i].imshow(op)\n  _ = axes[i].set_title(c.upper(), fontsize=24)\n  _ = axes[i].axis('off')\n\n#_ = fig.delaxes(axes[3])\n_ = axes[i].axis('off')","metadata":{"execution":{"iopub.status.busy":"2022-03-17T18:20:03.267371Z","iopub.execute_input":"2022-03-17T18:20:03.267747Z","iopub.status.idle":"2022-03-17T18:20:04.477743Z","shell.execute_reply.started":"2022-03-17T18:20:03.267709Z","shell.execute_reply":"2022-03-17T18:20:04.476831Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Laburnum\n\n\"Laburnum, sometimes called golden chain or golden rain, is a genus of two species of small trees in the subfamily Faboideae of the pea family Fabaceae. The species are Laburnum anagyroides—common laburnum and Laburnum alpinum—alpine laburnum. They are native to the mountains of southern Europe from France to the Balkans.\"\n\nhttps://en.wikipedia.org/wiki/Laburnum","metadata":{}},{"cell_type":"markdown","source":"#Laburnum is one of the most beautiful trees in flower. However, be cautious of its poisonous seed pods.\n\n![](https://i.ytimg.com/vi/YC2VbjCcga8/maxresdefault.jpg)youtube.com","metadata":{}},{"cell_type":"code","source":"df2 = pd.read_csv('/kaggle/input/geolifeclef-2022-lifeclef-2022-fgvc9/metadata/landcover_suggested_alignment.csv', delimiter=';')\ndf2.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-17T17:20:48.45868Z","iopub.execute_input":"2022-03-17T17:20:48.458981Z","iopub.status.idle":"2022-03-17T17:20:48.481166Z","shell.execute_reply.started":"2022-03-17T17:20:48.458943Z","shell.execute_reply":"2022-03-17T17:20:48.480316Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df3 = pd.read_csv('/kaggle/input/geolifeclef-2022-lifeclef-2022-fgvc9/pre-extracted/environmental_vectors.csv', delimiter=';')\ndf3.head()","metadata":{"execution":{"iopub.status.busy":"2022-03-17T19:08:19.731459Z","iopub.execute_input":"2022-03-17T19:08:19.732197Z","iopub.status.idle":"2022-03-17T19:08:32.859103Z","shell.execute_reply.started":"2022-03-17T19:08:19.732159Z","shell.execute_reply":"2022-03-17T19:08:32.858267Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#What do some of the filename codes mean?\n\n\"SoilGrids uses unique codes for names of variables. Layer naming is based on the simple convention where first three capital letters refer to the soil variable type (e.g. ORC = soil organic carbon mass fraction), the second three letters refer to the estimation method (e.g. DRC = dry combustion). The variables currently predicted in SoilGrids and their units are:\"                                    \n                                     \n                                     \nBDTICM: Absolute depth to bedrock    cm\n\nBLDFIE: Bulk density (fine earth)    kg/m3\n\nCECSOL: Cation Exchange Capacity of soil  cmolc/kg\n\nCLYPPT: Weight percentage of the clay particles (<0.0002 mm)  percentage\n\nORCDRC: Soil organic carbon content     permille\n\nPHIHOX: pH index measured in water solution  pH\n\nSLTPPT: Weight percentage of the silt particles (0.0002–0.05 mm)  percentage\n\nSNDPPT: Weight percentage of the sand particles (0.05–2 mm) percentage\n\nhttps://www.isric.org/explore/soilgrids/faq-soilgrids-2017","metadata":{}},{"cell_type":"code","source":"corr=df3[df3.columns.sort_values()].corr()\nmask = np.zeros_like(corr, dtype=np.bool)\nmask[np.triu_indices_from(mask)] = True\n\nfig = go.Figure(data=go.Heatmap(z=corr.mask(mask),\n                                x=corr.columns.values,\n                                y=corr.columns.values,\n                                xgap=1, ygap=1,\n                                colorscale=\"Rainbow\",\n                                colorbar_thickness=20,\n                                colorbar_ticklen=3,\n                                zmid=0),\n                layout = go.Layout(title_text='Correlation Matrix', template='plotly_dark',\n                height=900,\n                xaxis_showgrid=False,\n                yaxis_showgrid=False,\n                yaxis_autorange='reversed'))\nfig.show()","metadata":{"execution":{"iopub.status.busy":"2022-03-17T18:26:12.634207Z","iopub.execute_input":"2022-03-17T18:26:12.63456Z","iopub.status.idle":"2022-03-17T18:26:18.262863Z","shell.execute_reply.started":"2022-03-17T18:26:12.634525Z","shell.execute_reply":"2022-03-17T18:26:18.261699Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Acknowledgements:\n\nPaul Mooney https://www.kaggle.com/paultimothymooney/how-to-get-started-with-the-earth-engine-data\n\nRagnar https://www.kaggle.com/ragnar123/exploratory-data-analysis-and-factor-model-idea\n\nJyeSR https://www.kaggle.com/jyesawtellrickson/data-measurement-levels\n\nRitwek Khosla https://www.kaggle.com/vanvalkenberg/hubble-telescope-images/comments\n\nPooja Jain https://www.kaggle.com/jainpooja/av-guided-hackathon-predict-youtube-likes/notebook","metadata":{}}]}