Skip to content

Commit

Permalink
CRAN package version (#25)
Browse files Browse the repository at this point in the history
* Added legend to plots for categories
* Added SnowballC to packages
* Removed iconv calls
* Added seed and random color controls to wordcloud
* Added a few more options for text analysis corpus
* Cleaned up word cloud options
* Updated documentation
* Added new font for plots with MacOS
* Added text analysis word length slider
* Reworked text corpus functions
* Added arial unicode ms font a macos option
* Fixed some error conditions for sentiment plots
* Update cran-comments.md
  • Loading branch information
bryn-g authored Jul 27, 2020
1 parent a124ee4 commit e2b65b5
Show file tree
Hide file tree
Showing 87 changed files with 2,629 additions and 481 deletions.
6 changes: 5 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Package: VOSONDash
Version: 0.5.6
Version: 0.5.7
Title: User Interface for Collecting and Analysing Social Networks
Description: A 'Shiny' application for the interactive visualisation and
analysis of networks that also provides a web interface for collecting
social media data using 'vosonSML'.
Type: Package
Imports:
data.table,
graphics,
httpuv,
httr,
Expand All @@ -14,7 +15,10 @@ Imports:
magrittr,
RColorBrewer,
shiny (>= 1.3.2),
SnowballC,
systemfonts,
syuzhet,
textutils,
tm,
utils,
vosonSML (>= 0.29.0),
Expand Down
21 changes: 20 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,21 @@ export(applyPruneFilter)
export(collectRedditData)
export(collectTwitterData)
export(collectYoutubeData)
export(corpusFromGraph)
export(createRedditActorNetwork)
export(createRedditRequestUrl)
export(createTokenId)
export(createTwitterActorNetwork)
export(createTwitterDevToken)
export(createTwitterWebToken)
export(createYoutubeNetwork)
export(dtbGraph)
export(eawGraph)
export(emptyPlotMessage)
export(getNetworkMetrics)
export(getRedditUrlSubreddit)
export(getRedditUrlThreadId)
export(getSystemFontFamilies)
export(getVOSONDashVer)
export(getVertexCategories)
export(getVosonSMLVersion)
Expand All @@ -27,18 +31,22 @@ export(hasVosonTextData)
export(isMac)
export(isNullOrEmpty)
export(isVosonSML0290)
export(loadDemoGraph)
export(loadPackageGraph)
export(logMessage)
export(mixmat)
export(runVOSONDash)
export(systemTimeFilename)
export(wordCloudPlot)
export(wordFreqChart)
export(wordFreqFromCorpus)
export(wordSentChart)
export(wordSentData)
export(wordSentValenceChart)
import(SnowballC)
import(httpuv)
import(shiny)
importFrom(RColorBrewer,brewer.pal)
importFrom(data.table,data.table)
importFrom(graphics,barplot)
importFrom(graphics,par)
importFrom(graphics,plot)
Expand All @@ -64,6 +72,7 @@ importFrom(igraph,edge_attr_names)
importFrom(igraph,graph.density)
importFrom(igraph,gsize)
importFrom(igraph,is.directed)
importFrom(igraph,is.igraph)
importFrom(igraph,mean_distance)
importFrom(igraph,reciprocity)
importFrom(igraph,set_graph_attr)
Expand All @@ -75,9 +84,19 @@ importFrom(igraph,vertex_attr_names)
importFrom(lattice,barchart)
importFrom(magrittr,'%<>%')
importFrom(magrittr,'%>%')
importFrom(systemfonts,system_fonts)
importFrom(syuzhet,get_nrc_sentiment)
importFrom(textutils,HTMLdecode)
importFrom(tm,DocumentTermMatrix)
importFrom(tm,VCorpus)
importFrom(tm,VectorSource)
importFrom(tm,content_transformer)
importFrom(tm,removeNumbers)
importFrom(tm,removePunctuation)
importFrom(tm,removeSparseTerms)
importFrom(tm,stemDocument)
importFrom(tm,stopwords)
importFrom(tm,tm_map)
importFrom(utils,packageVersion)
importFrom(vosonSML,Authenticate)
importFrom(vosonSML,Collect)
Expand Down
17 changes: 16 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
# VOSONDash 0.5.7

## Minor Changes:
- Added a legend to network plots with vertex categorical attributes.
- Removed automatic `iconv` conversion of text for text analysis. So unicode should display properly for plots in most cases.
- Made `Arial Unicode MS` the default plot font for macOS systems that have it installed. This is to avoid problems with unicode characters. It can be disabled in the `Network Graphs` section.
- Added an option for HTML decoding text.
- Made removal of URL's, numbers and punctuation optional for text analysis.
- Added text analysis word length control.
- Added some additional `wordcloud` controls such as re-seed.
- Cleaned up text corpus, word frequency and text analysis plot functions.
- Improved speed of sentiment analysis plots. They will also now only update when the `Sentiment Analysis` tab is open or clicked on.
- Added convenience functions `dtbGraph()` and `eawGraph()`. These load package included "Divided They Blog" and "Enviro Activist Websites 2006" igraph graphs.
- Cleaned up package dependencies.
- CRAN version update.

# VOSONDash 0.5.6

## Minor Changes:
- Set `visNetwork` plot edge width if weight column present in edges.
- Removed arrows from `visNetwork` plot if graph undirected.
- Fixed a groups parameter warning from `dplyr::summarise`.
- Cleaned up package dependencies.
- CRAN version update.

# VOSONDash 0.5.5

Expand Down
9 changes: 7 additions & 2 deletions R/VOSONDash-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,24 @@
#' @docType package
#' @author Bryan Gertzel and Robert Ackland.
#'
#' @importFrom data.table data.table
#' @importFrom graphics plot text title par barplot
#' @import httpuv
#' @importFrom httr parse_url
#' @importFrom igraph vertex_attr as_edgelist gsize delete_vertices components simplify vcount
#' betweenness closeness set_graph_attr V 'V<-' E 'E<-' degree edge_attr_names vertex_attr_names
#' reciprocity transitivity mean_distance graph.density is.directed ecount count_components
#' centr_degree centr_betw centr_clo
#' centr_degree centr_betw centr_clo is.igraph
#' @importFrom lattice barchart
#' @importFrom magrittr '%>%' '%<>%'
#' @importFrom RColorBrewer brewer.pal
#' @import shiny
#' @import SnowballC
#' @importFrom systemfonts system_fonts
#' @importFrom syuzhet get_nrc_sentiment
#' @importFrom tm DocumentTermMatrix removeSparseTerms
#' @importFrom tm VCorpus VectorSource tm_map content_transformer DocumentTermMatrix
#' removeSparseTerms removeNumbers removePunctuation stopwords stemDocument
#' @importFrom textutils HTMLdecode
#' @importFrom utils packageVersion
#' @importFrom vosonSML Authenticate Collect Create
#' @importFrom wordcloud wordcloud
Expand Down
2 changes: 1 addition & 1 deletion R/assortativity.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' \dontrun{
#' # create a mixing matrix of the demonstration network based on vertex
#' # categorical attribute for political stance "vosonCA_Stance"
#' g <- loadDemoGraph("DividedTheyBlog_40Alist_release.graphml")
#' g <- loadPackageGraph("DividedTheyBlog_40Alist_release.graphml")
#'
#' mm <- mixmat(g, "vosonCA_Stance", use_density = FALSE)
#' }
Expand Down
53 changes: 43 additions & 10 deletions R/networkGraphs.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ addAdditionalMeasures <- function(g) {
#' @examples
#' \dontrun{
#' # get a list of voson vertex categories and values
#' g <- loadDemoGraph("DividedTheyBlog_40Alist_release.graphml")
#' g <- loadPackageGraph("DividedTheyBlog_40Alist_release.graphml")
#'
#' vcats <- getVertexCategories(g)
#'
Expand Down Expand Up @@ -197,7 +197,7 @@ hasVosonTextData <- function(g) {
#' \dontrun{
#' # return a graph containing only vertices that have the vertex category
#' # attribute "vosonCA_Stance" value "liberal"
#' g <- loadDemoGraph("DividedTheyBlog_40Alist_release.graphml")
#' g <- loadPackageGraph("DividedTheyBlog_40Alist_release.graphml")
#'
#' g <- applyCategoricalFilters(g, "Stance", c("liberal"))
#' }
Expand Down Expand Up @@ -242,9 +242,9 @@ applyPruneFilter <- function(g, selected_prune_verts) {
g
}

#' @title Load package demonstration network graph
#' @title Load package included network graph
#'
#' @description This function loads a demonstration network graph included in the \code{extdata} directory of the
#' @description This function loads a network graph included in the \code{extdata} directory of the
#' \code{VOSONDash} package by file name.
#'
#' @param fname Character string. Name of demonstration \code{graphml} file.
Expand All @@ -253,15 +253,12 @@ applyPruneFilter <- function(g, selected_prune_verts) {
#'
#' @examples
#' \dontrun{
#' # load the "DividedTheyBlog" demonstration network graph
#' g_demo_div <- loadDemoGraph("DividedTheyBlog_40Alist_release.graphml")
#'
#' # load the "enviroActivistWebsites" demonstration network graph
#' g_demo_env <- loadDemoGraph("enviroActivistWebsites_2006.graphml")
#' # load the "Divided They Blog" package included network graph by file name
#' g <- loadPackageGraph("DividedTheyBlog_40Alist_release.graphml")
#' }
#'
#' @export
loadDemoGraph <- function(fname) {
loadPackageGraph <- function(fname) {
tryCatch({
f <- system.file("extdata", fname, package = "VOSONDash", mustWork = TRUE)
g <- igraph::read_graph(f, format = c('graphml'))
Expand All @@ -271,3 +268,39 @@ loadDemoGraph <- function(fname) {

g
}

#' @title Load the package included "Divided They Blog" network graph
#'
#' @description This is a convenience function to load the "DividedTheyBlog_40Alist_release.graphml" graph.
#'
#' @return An igraph graph object.
#'
#' @examples
#' \dontrun{
#' # load the "Divided They Blog" network graph
#' g <- dtbGraph()
#' }
#'
#' @keywords internal
#' @export
dtbGraph <- function() {
loadPackageGraph("DividedTheyBlog_40Alist_release.graphml")
}

#' @title Load the package included "Enviro Activist Websites 2006" network graph
#'
#' @description This is a convenience function to load the "enviroActivistWebsites_2006.graphml" graph.
#'
#' @return An igraph graph object.
#'
#' @examples
#' \dontrun{
#' # load the "Enviro Activist Websites 2006" network graph
#' g <- eawGraph()
#' }
#'
#' @keywords internal
#' @export
eawGraph <- function() {
loadPackageGraph("enviroActivistWebsites_2006.graphml")
}
Loading

0 comments on commit e2b65b5

Please sign in to comment.