I have a dataframe containing biological observations. For each observations, i have latitude, longitude and species name.
What i want to do is an heatmap of the biodiversity/species richness (number of different species at a location). I don't want to do an heatmap of my observation but the diversity of species in it.
I am sure that it exist an elegant way to do it. That's why i need your help.
Here is my data as exemple : https://filesender.ens-lyon.fr/?vid=1de55ca8-7e1d-6b29-4a28-00004e605af1
Otherwise i plan to :
- divide a map into square
- check presence or absence of levels in a subseted data that fit a square
- Add the number of species of this square into a data frame (a kind of length(levels(subset(data,lon and lat in the square))))
- Heatmap plot of my dataframe of levels count I don't really like this method because of the dividing of my map which will complexify my code a lot.
Thanks you for reading. I hope that your eyes are not bleeding because of my english.
Akim