Count number of questions/topics posted on en-net

count_topics_theme(topics = get_themes_topics(), .sort = TRUE)

count_topics_theme_time(
  topics = get_themes_topics(),
  by_time = c("day", "week", "month", "year"),
  .sort = TRUE
)

Arguments

topics

A tibble of topics by theme, by author, and by posting date from en-net forum produced through a call to get_themes_topics()

.sort

Logical. Should output be sorted by count frequencies? Default is TRUE

by_time

Should topics be counted by day, by week, by month or by year? Default is to count by day.

Value

A tibble of topic counts by specified grouping

Author

Ernest Guevarra

Examples

## Get counts of topics by theme
count_topics_theme(topics = ennet_topics)
#> # A tibble: 16 × 2
#>    Theme                                                                       n
#>    <chr>                                                                   <int>
#>  1 Announcements & Nutritionists needed                                     1342
#>  2 Assessment and Surveillance                                               570
#>  3 Management of wasting/acute malnutrition                                  566
#>  4 Infant and young child feeding interventions                              238
#>  5 Upcoming trainings                                                        103
#>  6 COVID-19 and nutrition programming                                         88
#>  7 Other thematic area                                                        57
#>  8 Micronutrients                                                             56
#>  9 Scaling Up Nutrition (SUN)                                                 56
#> 10 Cross-cutting issues                                                       48
#> 11 Management of small and nutritionally at risk infants under six months…    43
#> 12 Food assistance                                                            33
#> 13 Adolescent nutrition                                                       30
#> 14 Prevention and management of stunting                                      21
#> 15 Partnerships for research                                                  19
#> 16 Simplified Approaches for the Management of Acute Malnutrition             18

## Get counts of topics by theme and by time
count_topics_theme_time(topics = ennet_topics)
#> # A tibble: 2,683 × 3
#>    Theme                                day            n
#>    <chr>                                <date>     <int>
#>  1 Announcements & Nutritionists needed 2015-06-02    12
#>  2 Announcements & Nutritionists needed 2019-05-13    11
#>  3 Announcements & Nutritionists needed 2015-08-13     7
#>  4 Announcements & Nutritionists needed 2015-05-07     6
#>  5 Scaling Up Nutrition (SUN)           2016-11-11     6
#>  6 Announcements & Nutritionists needed 2013-10-21     5
#>  7 Announcements & Nutritionists needed 2014-09-11     5
#>  8 Announcements & Nutritionists needed 2015-08-11     5
#>  9 Announcements & Nutritionists needed 2015-09-02     5
#> 10 Announcements & Nutritionists needed 2016-03-11     5
#> # … with 2,673 more rows