Skip to contents

This function takes an addresses data.frame, links it to an authors_references dataset and plots a network diagram generated for countries of co-authorship.

Usage

plot_net_country(
  data,
  lineResolution = 10,
  mapRegion = "world",
  lineAlpha = 0.5
)

Arguments

data

the address element from the list outputted from the authors_georef() function, containing geocoded address latitude and longitude locations.

lineResolution

the resolution of the lines drawn, higher numbers will make smoother curves default is 10.

mapRegion

what portion of the world map to show. possible values include "world", "North America", "South America", "Australia", "Africa", "Antarctica", and "Eurasia"

lineAlpha

transparency of the lines, fed into ggplots alpha value. Number between 0 - 1.

Examples

## Using the output of authors_georef (e.g., BITR_geocode)
data(BITR_geocode)
## Plots the whole world
output <- plot_net_country(BITR_geocode)
#> Please note that 'maptools' will be retired during October 2023,
#> plan transition at your earliest convenience (see
#> https://r-spatial.org/r/2023/05/15/evolution4.html and earlier blogs
#> for guidance);some functionality will be moved to 'sp'.
#>  Checking rgeos availability: FALSE
#> Error: 'gpclibPermit' is not an exported object from 'namespace:maptools'

## Mapping only North America
output <- plot_net_country(BITR_geocode, mapRegion = 'North America')
#> Error: 'gpclibPermit' is not an exported object from 'namespace:maptools'

## Change the transparency of lines by modifying the lineAlpha parameter
output <- plot_net_country(BITR_geocode, lineAlpha = 0.2)
#> Error: 'gpclibPermit' is not an exported object from 'namespace:maptools'
                 
## Change the curvature of lines by modifying the lineResolution paramater
output <- plot_net_country(BITR_geocode, lineResolution = 30 )
#> Error: 'gpclibPermit' is not an exported object from 'namespace:maptools'
                 
## With all arguments: 
output <- plot_net_country(BITR_geocode, mapRegion = 'North America', lineAlpha = 0.2,
                 lineResolution = 30)
#> Error: 'gpclibPermit' is not an exported object from 'namespace:maptools'