---
# System prepended metadata

title: script parte prática
tags: [liibre]

---

---
tags: liibre
---
# script parte prática

#Testando

install.packages("rgbif")
install.packages("finch")

url <- "https://ipt.biodiversidad.co/sib/archive.do?r=ictiofauna_colombiana_dulceacuicola&v=2.12"

library(finch)

https://ipt.biodiversidad.co/sib/archive.do?r=ictiofauna_colombiana_dulceacuicola&v=2.12


dwc <- dwca_read(input = "data/dwca-ictiofauna_colombiana_dulceacuicola-v2.12.zip",
read = T)

taxon <- dwc$data$taxon.txt


library(dplyr)
install.packages("rgbif")
install.packages("CoordinateCleaner")


devtools::install_github("ropensci/CoordinateCleaner")
install.packages("remotes")
remotes::install_github("ropensci/CoordinateCleaner")


tapirus <- occ_search(scientificName = species,
basisOfRecord = "PRESERVED_SPECIMEN",
limit = 10000)

data_tapirus <- tapirus$data
table(data_tapirus$taxonomicStatus)
unique(data_tapirus$scientificName)

table(data_tapirus$scientificName, data_tapirus$taxonomicStatus)

tem_coordenada <- complete.cases(data_tapirus[, c("decimalLatitude", "decimalLongitude")])

coord_tapirus <- data_tapirus[ tem_coordenada , ]

clean <- clean_coordinates(x = coord_tapirus, 
lon = "decimalLongitude",
lat = "decimalLatitude",
species = "acceptedScientificName"
)