knitr::opts_chunk$set( message = FALSE, warning = FALSE, error = FALSE, collapse = TRUE, comment = "#>" )
library(ennet) library(dplyr)
The ennet
package also includes analytic functions that summarises the text data available from the en-net online forum. Currently, there are four sets of analytic functions available from ennet
:
count_topics_time
functions - set of functions to count the number of topics or questions by day, wee, month or year;
count_topics_theme
functions - set of functions to count the number of topics or questions by theme;
count_topics_author
functions - set of functions to count the number of topics or questions by author; and,
arrange
functions - set of functions to arrange topics by number of views or by number of replies.
Summarising the number of topics or questions raised within the en-net online forum is basic and useful analytics that can proxy relative importance of a thematic area within the forum. This is facilitated by three sets of functions - 1) count_topics_time
; 2) count_topics_theme
; and, 3) count_topics_author
.
The count_topics_time
set of functions consist of four functions that count topics by day, by week, by month, or by year. To count the number of topics/questions per day, the count_topics_day
function is used as follows:
count_topics_day()
which results in:
ennet_topics %>% count_topics_day()
By default, the count_topics_day
function will provide an output that is not sorted by number of topics/questions per day. To sort by number of topics/questions per day, specify .sort
as TRUE
:
count_topics_day(.sort = TRUE)
which gives the following output:
ennet_topics %>% count_topics_day(.sort = TRUE)
Counting topics/questions by week, month, or year require just using the function named after the time required. For weekly counts, use count_topics_week
, for monthly use count_topics_month
, and for yearly use count_topics_year
.
## Count topics/questions by week count_topics_week() ## Count topics/questions by month count_topics_month() ## Count topics/questions by year count_topics_year()
The count_topics_theme
set of functions consists of two functions that count topics/questions by theme, and count topics/questions by theme and by time.
Counting of topics by theme is specified as follows:
count_topics_theme()
which results in:
ennet_topics %>% count_topics_theme()
Results provided by count_topics_theme
is not sorted by number of topics/questions. To sort, specify .sort
as TRUE
:
count_topics_theme(.sort = TRUE)
which results in:
count_topics_theme(.sort = TRUE)
Counting of topics/questions by theme can also be done by time using the count_topics_theme_time
. For example, counting topics/questions by theme by day is done as follows:
count_topics_theme_time(by_time = "day")
which gives the following output:
ennet_topics %>% count_topics_theme_time(by_time = "day")
Unlike the previous count functions, the output of count_topics_theme_time
is already sorted by default.
To count topics/questions by theme by week, month, or year just requires changing the by_time
argument to the desired time interval as shown below:
## Count topics/questions by theme by week count_topics_theme_time(by_time = "week") ## Count topics/questions by theme by month count_topics_theme_time(by_time = "month") ## Count topics/questions by theme by year count_topics_theme_time(by_time = "year")
The count_topics_author
set of functions consists of two functions that count topics/questions by author, and count topics/questions by author and by time.
Counting of topics by author is specified as follows:
count_topics_author()
which results in:
ennet_topics %>% count_topics_author()
Results provided by count_topics_author
is not sorted by number of topics/questions. To sort, specify .sort
as TRUE
:
count_topics_author(.sort = TRUE)
which results in:
ennet_topics %>% count_topics_author(.sort = TRUE)
Counting of topics/questions by author can also be done by time using the count_topics_author_time
. For example, counting topics/questions by author by day is done as follows:
count_topics_author_time(by_time = "day")
which gives the following output:
ennet_topics %>% count_topics_author_time(by_time = "day")
Unlike the previous count functions, the output of count_topics_author_time
is already sorted by default.
To count topics/questions by author by week, month, or year just requires changing the by_time
argument to the desired time interval as shown below:
## Count topics/questions by author by week count_topics_author_time(by_time = "week") ## Count topics/questions by author by month count_topics_author_time(by_time = "month") ## Count topics/questions by author by year count_topics_author_time(by_time = "year")
count
functionsIn the current release of the ennet
package, the following functions have now undergone deprecation:
count_topics
count_authors
These functions have now been superseded by the more performant count_topics
functions above. We recommend that if you have been using these deprecated functions previously to update your work to use the new functions described above. These deprecated function will be made defunct on the next release of ennet
package.
Summarising the number of topics or questions raised within the en-net online forum by arranging them based on number of views can proxy level of interest to a specific topic by those participating in the forum. This is facilitated using the arrange_views
function. Ranking of topics by number of views is done per thematic area and by a specific time period. Ranking of topics by number of views by thematic area and by month and year is performed by default:
get_themes() %>% get_themes_topics() %>% arrange_views()
which results in:
ennet_topics %>% arrange_views()
Arranging topics by number of views by thematic area and by year is performed as follows:
get_themes() %>% get_themes_topics() %>% arrange_views(by_date = "year")
which results in:
ennet_topics %>% arrange_views(by_date = "year")
Arranging topics by number of views by thematic area overall across the years is performed as follows:
get_themes() %>% get_themes_topics() %>% arrange_views(by_date = "all")
which results in:
ennet_topics %>% arrange_views(by_date = "all")
By default, the output of arrange_views
is grouped by thematic area. This default behaviour can be changed by setting the by_theme
argument to FALSE
. For example, to arrange the topics by number of views by month and year across all themes:
get_themes() %>% get_themes_topics() %>% arrange_views(by_theme = FALSE)
which results in:
ennet_topics %>% arrange_views(by_theme = FALSE)
Summarising the number of topics or questions raised within the en-net online forum by arranging them based on number of replies can proxy level of interest to a specific topic by those participating in the forum specifically those who provide responses and feedback to responses within the discussion. This is facilitated using the arrange_replies
function. Ranking of topics by number of replies is done per thematic area and by a specific time period. Ranking of topics by number of replies by thematic area and by month and year is performed by default:
get_themes() %>% get_themes_topics() %>% arrange_replies()
which results in:
ennet_topics %>% arrange_replies()
Arranging topics by number of replies by thematic area and by year is performed as follows:
get_themes() %>% get_themes_topics() %>% arrange_replies(by_date = "year")
which results in:
ennet_topics %>% arrange_replies(by_date = "year")
Arranging topics by number of replies by thematic area overall across the years is performed as follows:
get_themes() %>% get_themes_topics() %>% arrange_replies(by_date = "all")
which results in:
ennet_topics %>% arrange_replies(by_date = "all")
By default, the output of arrange_replies
is grouped by thematic area. This default behaviour can be changed by setting the by_theme
argument to FALSE
. For example, to arrange the topics by number of replies by month and year across all themes:
get_themes() %>% get_themes_topics() %>% arrange_replies(by_theme = FALSE)
which results in:
ennet_topics %>% arrange_replies(by_theme = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.