knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The keywordr package provides an efficient and user-friendly framework for keyword research. The results are typically used to optimize websites for search engines, create content strategy, design information architecture for websites, etc.
You can install the development version of keywordr from GitHub with:
# install.packages("devtools") devtools::install_github("MarekProkop/keywordr", build_vignettes = TRUE)
Note: You must have R version 4.1.0 because the package makes use of the native R pipe and the new syntax for anonymous functions.
This is a basic example which shows you how to use the package:
library(tidyverse) library(keywordr)
kwresearch
object and import queriesinput_data <- tribble( ~query, ~volume, "seo", 96000, "seo ye-ji", 22000, "seo meaning", 6700, "seo services", 6400, "what is a seo", 5300, "seo london", 5000, "what is seo", 4800, "seo agency", 4300, ) kwr <- kwresearch(input_data)
kwr_queries(kwr)
recipe_file <- file.path(tempdir(), "recipes.yml") kwr_add_pattern("ye-ji", recipe_file, recipe_type = "remove") kwr <- kwr |> kwr_prune(recipe_file)
kwr_queries(kwr)
kwr |> kwr_ngrams()
kwr_add_pattern( pattern = "agenc", recipe_file = recipe_file, recipe_type = "label", dim_name = "bussiness_type", value = "agency" ) kwr_add_pattern( pattern = "meaning", recipe_file = recipe_file, recipe_type = "label", dim_name = "info" ) kwr_add_pattern( pattern = "what is", recipe_file = recipe_file, recipe_type = "label", dim_name = "info" ) kwr <- kwr |> kwr_classify(recipe_file)
kwr_queries(kwr) |> select(1:5)
Please see vignette("workflow")
for a more detailed example.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.