Extract StackOverflow questions for a given set of tags, exluding questions related to an optional list of tags. This code is based on the tidyverse tweets bot by Jake Thompson.

get_stack_questions(extracted_tags = NULL, excluded_tags = NULL,
  time_window = 60, add_process_fn = NULL, ...)

Arguments

extracted_tags

A character vector of tags to extract questions for.

excluded_tags

A character vector of tags to exclude questions from the output.

time_window

Numeric, the timewindow to extract questions for (in minutes. Defaults to 60 minutes. Note that a maximum of 100 questions are extracted by the StackOverflow api, if you expect your tags to have a high volume of questions reduce this. If using this function as part of a sheduled bot makes sure this time frame corresponds the frequency with which your bot is running.

add_process_fn

A function. If additional munging or data extraction is required add to a custom function and pass here. This function must except a dataframe as its first arguement and return a dataframe. See the examples for details.

...

Pass additional arguements to stackr::stack_questions.

Value

A list containing the title, creation date, link, and tags for StackOverflow questions related to your selected tags.

Examples

## Basic call get_stack_questions(extracted_tags = "ggplot2", excluded_tags = "plotly", time_window = 60*24)
#> $title #> [1] "ggplot2 - Correctly arrange odd number of plots into one figure" #> [2] "Plotting monthly percentages in shiny R" #> [3] "ggplot order of geom_point and geom_line differ" #> [4] "How do I annotate a ggtree object with bootstrap values?" #> [5] "How to annotate different values for each facet with dodged geom_boxplot on R?" #> [6] "How to fix the multiple error bar issue of ggplot in R?" #> [7] "No legend in ggplot line graph" #> [8] "Choropleth Plotting polygons with ggplot2 R on a map" #> [9] "Why do I get the weird purple line in ggplot?" #> [10] "R (ggplot2): line with data labels" #> [11] "ggplot y axis adjustment and statistics" #> [12] "How to install ggplot2 for R to a custom lib directory" #> [13] "ggplot2: can geom_point work in melted dataframes?" #> [14] "Framework for adding lines on existing plots: \"points\" and \"plot\" in ggplot" #> [15] "grouped barplot from table" #> [16] "ggplot: Show 24-hour activity profiles for each day through 48 weeks" #> [17] "ggplot2: grouping a barplot by several instead of a single categorical variable" #> [18] "Plotting multiple densities in ggplot2: How to add an extra variable with a different scale?" #> [19] "How to pass a string argument to expression function in ggplot2?" #> #> $creation_date #> [1] "2018-10-23 16:12:55 UTC" "2018-10-23 17:25:35 UTC" #> [3] "2018-10-23 17:36:53 UTC" "2018-10-23 19:02:17 UTC" #> [5] "2018-10-23 22:04:02 UTC" "2018-10-24 02:26:12 UTC" #> [7] "2018-10-24 03:57:08 UTC" "2018-10-24 05:48:05 UTC" #> [9] "2018-10-24 06:00:17 UTC" "2018-10-24 06:45:06 UTC" #> [11] "2018-10-24 10:25:10 UTC" "2018-10-24 10:57:49 UTC" #> [13] "2018-10-24 12:27:44 UTC" "2018-10-24 13:30:20 UTC" #> [15] "2018-10-24 13:30:20 UTC" "2018-10-24 15:10:46 UTC" #> [17] "2018-10-24 15:40:50 UTC" "2018-10-24 15:45:12 UTC" #> [19] "2018-10-24 15:48:50 UTC" #> #> $link #> [1] "https://stackoverflow.com/questions/52953569/ggplot2-correctly-arrange-odd-number-of-plots-into-one-figure" #> [2] "https://stackoverflow.com/questions/52954681/plotting-monthly-percentages-in-shiny-r" #> [3] "https://stackoverflow.com/questions/52954846/ggplot-order-of-geom-point-and-geom-line-differ" #> [4] "https://stackoverflow.com/questions/52956181/how-do-i-annotate-a-ggtree-object-with-bootstrap-values" #> [5] "https://stackoverflow.com/questions/52958453/how-to-annotate-different-values-for-each-facet-with-dodged-geom-boxplot-on-r" #> [6] "https://stackoverflow.com/questions/52960261/how-to-fix-the-multiple-error-bar-issue-of-ggplot-in-r" #> [7] "https://stackoverflow.com/questions/52960885/no-legend-in-ggplot-line-graph" #> [8] "https://stackoverflow.com/questions/52961807/choropleth-plotting-polygons-with-ggplot2-r-on-a-map" #> [9] "https://stackoverflow.com/questions/52961934/why-do-i-get-the-weird-purple-line-in-ggplot" #> [10] "https://stackoverflow.com/questions/52962517/r-ggplot2-line-with-data-labels" #> [11] "https://stackoverflow.com/questions/52966608/ggplot-y-axis-adjustment-and-statistics" #> [12] "https://stackoverflow.com/questions/52967249/how-to-install-ggplot2-for-r-to-a-custom-lib-directory" #> [13] "https://stackoverflow.com/questions/52968996/ggplot2-can-geom-point-work-in-melted-dataframes" #> [14] "https://stackoverflow.com/questions/52970305/framework-for-adding-lines-on-existing-plots-points-and-plot-in-ggplot" #> [15] "https://stackoverflow.com/questions/52970306/grouped-barplot-from-table" #> [16] "https://stackoverflow.com/questions/52972439/ggplot-show-24-hour-activity-profiles-for-each-day-through-48-weeks" #> [17] "https://stackoverflow.com/questions/52973023/ggplot2-grouping-a-barplot-by-several-instead-of-a-single-categorical-variable" #> [18] "https://stackoverflow.com/questions/52973132/plotting-multiple-densities-in-ggplot2-how-to-add-an-extra-variable-with-a-diff" #> [19] "https://stackoverflow.com/questions/52973186/how-to-pass-a-string-argument-to-expression-function-in-ggplot2" #> #> $tags #> [1] "r,ggplot2,cowplot" #> [2] "r,ggplot2,shiny,shinydashboard" #> [3] "r,ggplot2" #> [4] "r,ggplot2,bioinformatics,phylogeny,ggtree" #> [5] "r,ggplot2,text,boxplot" #> [6] "ggplot2,errorbar" #> [7] "r,ggplot2,legend,linegraph" #> [8] "r,ggplot2,gis,ggmap" #> [9] "r,ggplot2" #> [10] "r,ggplot2" #> [11] "r,ggplot2,ggpubr" #> [12] "r,ggplot2,installation,package" #> [13] "r,ggplot2,scatter-plot,dcast" #> [14] "r,ggplot2" #> [15] "r,ggplot2,bar-chart" #> [16] "r,ggplot2,plot" #> [17] "r,ggplot2" #> [18] "r,ggplot2,scaling" #> [19] "ggplot2" #>
## Add additional processing step library(dplyr)
#> #> 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
add_process_fn <- function(df) { df %>% mutate(id = 1:n()) } get_stack_questions(extracted_tags = "ggplot2", excluded_tags = "plotly", time_window = 60*24, add_process_fn = add_process_fn)
#> $title #> [1] "ggplot2 - Correctly arrange odd number of plots into one figure" #> [2] "Plotting monthly percentages in shiny R" #> [3] "ggplot order of geom_point and geom_line differ" #> [4] "How do I annotate a ggtree object with bootstrap values?" #> [5] "How to annotate different values for each facet with dodged geom_boxplot on R?" #> [6] "How to fix the multiple error bar issue of ggplot in R?" #> [7] "No legend in ggplot line graph" #> [8] "Choropleth Plotting polygons with ggplot2 R on a map" #> [9] "Why do I get the weird purple line in ggplot?" #> [10] "R (ggplot2): line with data labels" #> [11] "ggplot y axis adjustment and statistics" #> [12] "How to install ggplot2 for R to a custom lib directory" #> [13] "ggplot2: can geom_point work in melted dataframes?" #> [14] "Framework for adding lines on existing plots: \"points\" and \"plot\" in ggplot" #> [15] "grouped barplot from table" #> [16] "ggplot: Show 24-hour activity profiles for each day through 48 weeks" #> [17] "ggplot2: grouping a barplot by several instead of a single categorical variable" #> [18] "Plotting multiple densities in ggplot2: How to add an extra variable with a different scale?" #> [19] "How to pass a string argument to expression function in ggplot2?" #> #> $creation_date #> [1] "2018-10-23 16:12:55 UTC" "2018-10-23 17:25:35 UTC" #> [3] "2018-10-23 17:36:53 UTC" "2018-10-23 19:02:17 UTC" #> [5] "2018-10-23 22:04:02 UTC" "2018-10-24 02:26:12 UTC" #> [7] "2018-10-24 03:57:08 UTC" "2018-10-24 05:48:05 UTC" #> [9] "2018-10-24 06:00:17 UTC" "2018-10-24 06:45:06 UTC" #> [11] "2018-10-24 10:25:10 UTC" "2018-10-24 10:57:49 UTC" #> [13] "2018-10-24 12:27:44 UTC" "2018-10-24 13:30:20 UTC" #> [15] "2018-10-24 13:30:20 UTC" "2018-10-24 15:10:46 UTC" #> [17] "2018-10-24 15:40:50 UTC" "2018-10-24 15:45:12 UTC" #> [19] "2018-10-24 15:48:50 UTC" #> #> $link #> [1] "https://stackoverflow.com/questions/52953569/ggplot2-correctly-arrange-odd-number-of-plots-into-one-figure" #> [2] "https://stackoverflow.com/questions/52954681/plotting-monthly-percentages-in-shiny-r" #> [3] "https://stackoverflow.com/questions/52954846/ggplot-order-of-geom-point-and-geom-line-differ" #> [4] "https://stackoverflow.com/questions/52956181/how-do-i-annotate-a-ggtree-object-with-bootstrap-values" #> [5] "https://stackoverflow.com/questions/52958453/how-to-annotate-different-values-for-each-facet-with-dodged-geom-boxplot-on-r" #> [6] "https://stackoverflow.com/questions/52960261/how-to-fix-the-multiple-error-bar-issue-of-ggplot-in-r" #> [7] "https://stackoverflow.com/questions/52960885/no-legend-in-ggplot-line-graph" #> [8] "https://stackoverflow.com/questions/52961807/choropleth-plotting-polygons-with-ggplot2-r-on-a-map" #> [9] "https://stackoverflow.com/questions/52961934/why-do-i-get-the-weird-purple-line-in-ggplot" #> [10] "https://stackoverflow.com/questions/52962517/r-ggplot2-line-with-data-labels" #> [11] "https://stackoverflow.com/questions/52966608/ggplot-y-axis-adjustment-and-statistics" #> [12] "https://stackoverflow.com/questions/52967249/how-to-install-ggplot2-for-r-to-a-custom-lib-directory" #> [13] "https://stackoverflow.com/questions/52968996/ggplot2-can-geom-point-work-in-melted-dataframes" #> [14] "https://stackoverflow.com/questions/52970305/framework-for-adding-lines-on-existing-plots-points-and-plot-in-ggplot" #> [15] "https://stackoverflow.com/questions/52970306/grouped-barplot-from-table" #> [16] "https://stackoverflow.com/questions/52972439/ggplot-show-24-hour-activity-profiles-for-each-day-through-48-weeks" #> [17] "https://stackoverflow.com/questions/52973023/ggplot2-grouping-a-barplot-by-several-instead-of-a-single-categorical-variable" #> [18] "https://stackoverflow.com/questions/52973132/plotting-multiple-densities-in-ggplot2-how-to-add-an-extra-variable-with-a-diff" #> [19] "https://stackoverflow.com/questions/52973186/how-to-pass-a-string-argument-to-expression-function-in-ggplot2" #> #> $tags #> [1] "r,ggplot2,cowplot" #> [2] "r,ggplot2,shiny,shinydashboard" #> [3] "r,ggplot2" #> [4] "r,ggplot2,bioinformatics,phylogeny,ggtree" #> [5] "r,ggplot2,text,boxplot" #> [6] "ggplot2,errorbar" #> [7] "r,ggplot2,legend,linegraph" #> [8] "r,ggplot2,gis,ggmap" #> [9] "r,ggplot2" #> [10] "r,ggplot2" #> [11] "r,ggplot2,ggpubr" #> [12] "r,ggplot2,installation,package" #> [13] "r,ggplot2,scatter-plot,dcast" #> [14] "r,ggplot2" #> [15] "r,ggplot2,bar-chart" #> [16] "r,ggplot2,plot" #> [17] "r,ggplot2" #> [18] "r,ggplot2,scaling" #> [19] "ggplot2" #> #> $id #> [1] 19 18 17 16 15 14 13 12 11 10 9 8 7 5 6 4 3 2 1 #>