🤖
R for SEO
  • Using R for SEO, What to expect?
  • Getting started
  • What is R? What is SEO?
  • About this Book
  • Crawl and extract data
    • What's crawling and why is it useful?
    • Download and check XML sitemaps using R'
    • Crawling with rvest
    • Website Crawling and SEO extraction with Rcrawler
    • Perform automatic browser tests with RSelenium
  • Grabbing data from APIs
    • Grab Google Suggest Search Queries using R'
    • Grab Google Analytics Data x
    • Grab keywords search volume from DataForSeo API using R'
    • Grab Google Rankings from VALUE SERP API using R'
    • Classify SEO Keywords using GPT-3 & R'
    • Grab Google Search Console Data x
    • Grab 'ahrefs' API data x
    • Grab Google Custom search API Data x
    • Send requests to the Google Indexing API using googleAuthR
    • other APIs x
  • Export and read Data
    • Send and read SEO data to Excel/CSV
    • Send your data by email using gmail API
    • Send and read SEO data to Google Sheet x
  • data wrangling & analysis
    • Join Crawl data with Google Analytics Data
    • Count words, n-grams, shingles x
    • Hunt down keyword cannibalization
    • Duplicate content analysis x
    • Compute ‘Internal Page Rank’
    • SEO traffic Forecast x
    • URLs categorization
    • Track SEO active pages percentage over time x
  • Data Viz
    • Why Data visualisation is important? x
    • Use Esquisse to create plots quickly
  • Explore data with rPivotTable
  • Resources
    • Launch an R script using github actions
    • Types / Class & packages x
    • SEO & R People x
    • Execute R code online
    • useful SEO XPath's & CSS selectors X
Powered by GitBook
On this page

Was this helpful?

  1. data wrangling & analysis

SEO traffic Forecast x

⚠️ THIS IS A WORK IN PROGRESS

PreviousCompute ‘Internal Page Rank’NextURLs categorization

Last updated 4 years ago

Was this helpful?

For this one will be using a Forcast library done by Facebook called

path <- file.choose()


df <- read.csv(path, skip = 6)

View(df)

df <- data<-na.omit(df)

library(lubridate)
library(prophet)

origin_date <- ymd("2019-01-01")

origin_date + ddays(1)

df$index <- as.numeric(rownames(df))-1

df$ds <- origin_date+ddays(df$index-1)

df$ds <- df$Day.Index

df$y <- df$Sessions

df$Sessions <- NULL
df$Day.Index <- NULL


#ggplot(df)

m <- prophet(df)


future <- make_future_dataframe(m, periods = 365)

# R
forecast <- predict(m, future)
tail(forecast[c('ds', 'yhat', 'yhat_lower', 'yhat_upper')])


# View(forecast)

plot(m, forecast)

prophet_plot_components(m, forecast)

dyplot.prophet(m, forecast)

Prophet