Description Usage Arguments Value Examples
View source: R/visualizePatentData.R
Scan for patent market gaps. Visualize the features of a set of patents by a category. Can view up to four dimensions of data with this plot (x, y, and optionals fill and facet).
Quickly scan this chart to look for gaps in the feature sets.
1 2 |
df |
The patent data frame you want to graph. |
xVal |
The x value you will be plotting, a character value that is a
name of |
tileVal |
The tile value you will be plotting, a character value that is a
name of |
fillVal |
An optional value for filling the color of the tiles on a third
variable. Default set to |
xangle |
A numeric 0 to 360 value for the angle of the x axis text |
xhjust |
Double value between 0 and 1. 0 Means left justified, 1 means right justified, default set to 0.5 (middle), for the x axis text. |
showLegend |
A logical to allow you to show or hide the legend, which is mapped to the fillVal |
facetVal |
Optional faceting.
A character string of the facet you want for your plot, must be a
name of the header in |
fscale |
Facet scale, a character value chosen from |
A ggplot2 facet plot object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | sumo <- cleanPatentData(patentData = patentr::acars, columnsExpected = sumobrainColumns,
cleanNames = sumobrainNames,
dateFields = sumobrainDateFields,
dateOrders = sumobrainDateOrder,
deduplicate = TRUE,
cakcDict = patentr::cakcDict,
docLengthTypesDict = patentr::docLengthTypesDict,
keepType = "grant",
firstAssigneeOnly = TRUE,
assigneeSep = ";",
stopWords = patentr::assigneeStopWords)
# note that in reality, you need a patent analyst to carefully score
# these patents, the score here is for demonstrational purposes
score <- round(rnorm(dim(sumo)[1],mean=1.4,sd=0.9))
score[score>3] <- 3; score[score<0] <- 0
sumo$score <- score
sumo$assigneeSmall <- strtrim(sumo$assigneeClean,12)
category <- c("system","control algorithm","product","control system", "communication")
c <- round(rnorm(dim(sumo)[1],mean=2.5,sd=1.5))
c[c>5] <- 5; c[c<1] <- 1
sumo$category <- category[c]
feature1 <- c("adaptive", "park", "lane", NA,NA,NA,NA,NA,
"brake", "steer","accelerate","deactivate")
f <- round(rnorm(dim(sumo)[1],mean=5,sd=1))
l <- length(feature1)
f[f>l] <- l; f[f<1] <- 1
sumo$feature1 <- c(feature1,feature1[f])[1:dim(sumo)[1]]
tilePlot(sumo, "category", "feature1")
tilePlot(sumo, xVal = "assigneeSmall", tileVal = "feature1", fillVal = "category",
xangle=90, xhjust=0, showLegend = TRUE)
tilePlot(sumo, xVal = "assigneeSmall", tileVal = "feature1", fillVal = "category",
xangle=90, xhjust=0, showLegend = TRUE, facetVal = "docType", fscale = "fixed")
tilePlot(sumo, xVal = "assigneeSmall", tileVal = "feature1", fillVal = "category",
xangle=90, xhjust=0, showLegend = TRUE, facetVal = "docType", fscale = "free")
tilePlot(sumo, xVal = "assigneeSmall", tileVal = "feature1", fillVal = "category",
xangle=90, xhjust=0, showLegend = TRUE, facetVal = "score", fscale = "free")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.