if (FALSE) {
# Create a basic example dataset of duplicates to visualise
basicData <- dplyr::tribble(
~dataSource, ~dataSource_keep,
"GBIF_Halictidae", "USGS_data",
"GBIF_Halictidae", "USGS_data",
"GBIF_Halictidae", "USGS_data",
"GBIF_Halictidae", "USGS_data",
"GBIF_Halictidae", "USGS_data",
"GBIF_Halictidae", "USGS_data",
"SCAN_Halictidae", "GBIF_Halictidae",
"iDigBio_halictidae", "GBIF_Halictidae",
"iDigBio_halictidae", "SCAN_Halictidae",
"iDigBio_halictidae", "SCAN_Halictidae",
"SCAN_Halictidae", "GBIF_Halictidae",
"iDigBio_apidae", "SCAN_Apidae",
"SCAN_Apidae", "Ecd_Anthophila",
"iDigBio_apidae", "Ecd_Anthophila",
"SCAN_Apidae", "Ecd_Anthophila",
"iDigBio_apidae", "Ecd_Anthophila",
"SCAN_Megachilidae", "SCAN_Megachilidae",
"CAES_Anthophila", "CAES_Anthophila",
"CAES_Anthophila", "CAES_Anthophila"
)
chordDiagramR(
dupeData = basicData,
outPath = tempdir(),
fileName = "ChordDiagram.pdf",
# These can be modified to help fit the final pdf that's exported.
width = 9,
height = 7.5,
bg = "white",
# How few distinct dataSources should a group have to be listed as "other"
smallGrpThreshold = 3,
title = "Duplicated record sources",
# The default list of colour palettes to choose from using the paleteer package
palettes = c("cartography::blue.pal", "cartography::green.pal",
"cartography::sand.pal", "cartography::orange.pal", "cartography::red.pal",
"cartography::purple.pal", "cartography::brown.pal"),
canvas.ylim = c(-1.0,1.0),
canvas.xlim = c(-0.6, 0.25),
text.col = "black",
legendX = grid::unit(6, "mm"),
legendY = grid::unit(18, "mm"),
legendJustify = c("left", "bottom"),
niceFacing = TRUE)}
Run the code above in your browser using DataLab