setwd("C:/Users/subas/Syncplicity/MyProjects_IMP/MY_Papers_V2/TRB 2020/00000000 FINALz/00002 TRR")
dat <- read.csv("AuthorsbyY.1-06192019 bm sd2.csv", check.names=FALSE)
library(reshape2)
dat1 <- melt(dat, id="Author")
colnames(dat1)[2] <- "Year"
colnames(dat1)[3] <- "Papers"
library(CGPfunctions)
newggslopegraph(dataframe = dat1,
Times = Year,
Measurement = Papers,
Grouping = Author,
Title = "TRR Papers (2009-2018)",
SubTitle ="",
Caption = NULL)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
## Registered S3 method overwritten by 'xts':
## method from
## as.zoo.xts zoo
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
## Highcharts (www.highcharts.com) is a Highsoft software product which is
## not free for commercial and Governmental use
## Loading required package: viridisLite
dat <- read.csv("AuthorsbyY.1-06192019 bm sd4.csv", check.names=FALSE)
dim(dat)
## [1] 36098 48
dat1 <- head(dat, 25)
library(reshape2)
dat2 <- melt(dat1[,-c(2)], id="Author")
## Warning: attributes are not identical across measure variables; they will
## be dropped
colnames(dat2)[2] <- "Year"
colnames(dat2)[3] <- "Papers"
dat2$Papers <- as.numeric(dat2$Papers)
dat2$Author <- as.character(dat2$Author)
fntltp <- JS("function(){
return this.series.xAxis.categories[this.point.x] + ' TRR, ' + this.series.yAxis.categories[this.point.y] + ':<br>' +
Highcharts.numberFormat(this.point.value, 0)+ ' Paper(s)';
}")
## dat2$Year <- as.integer(dat2$Year)
hchart(dat2, "heatmap", hcaes(x = Year, y = Author, value = Papers)) %>%
hc_colorAxis(stops = color_stops(10, rev(inferno(10)))) %>%
hc_yAxis(reversed = TRUE, offset = -20, tickLength = 0,
gridLineWidth = 0, minorGridLineWidth = 0,
labels = list(style = list(fontSize = "14px"))) %>%
hc_tooltip(formatter = fntltp) %>%
hc_title(text = "Most Prolific TRR Authors") %>%
hc_legend(layout = "vertical", verticalAlign = "top",
align = "right", valueDecimals = 0) %>%
hc_size(height = 600)