Skip to content

Instantly share code, notes, and snippets.

View voltek62's full-sized avatar

Vincent Terrasi voltek62

View GitHub Profile
@voltek62
voltek62 / api-similarweb.R
Last active June 4, 2020 16:09
get Web Traffic Data from SimilarWeb API with R
library(httr)
library(jsonlite)
# https://dataseolabs.com
# Doc : https://www.similarweb.com/corp/developer/
# Create your key here : https://pro.similarweb.com/#/account/api-management
# You can have freely 3 Months of Web Traffic Data
# conf
myList <- c("cuisineaz.com","marmiton.org","odelices.com","allrecipes.fr")
@voltek62
voltek62 / api-majestic.R
Last active June 29, 2018 23:29
get TF and CF from Majestic API with R
library(httr)
library(urltools)
library(dplyr)
# https://dataseolabs.com
# Doc : https://developer-support.majestic.com/api/
# Create your key here : https://developer-support.majestic.com/security/
apiUrl <- "https://api.majestic.com/api/json?app_api_key="
apiKey <- "YOURKEY"
@voltek62
voltek62 / api-semrush.R
Last active June 30, 2018 14:27
get SEO metrics from SEMrush API with R
library(dplyr)
# https://dataseolabs.com
# Doc : https://fr.semrush.com/api-documentation/
# Get your key here : https://fr.semrush.com/billing-admin/profile/subscription/api-units
# conf
keyAPI <- "YOURKEY"
domain <- "cnn.com"
country <- "fr"
library(googleAnalyticsR)
# https://dataseolabs.com
## authentication with both GA and SC
options(googleAuthR.scopes.selected =
c("https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"))
library(searchConsoleR)
# https://dataseolabs.com
## authentication with both GA and SC
options(googleAuthR.scopes.selected =
c("https://www.googleapis.com/auth/webmasters"))
googleAuthR::gar_auth()
# install.packages("ngram")
# install.packages("tm")
library(ngram)
library(tm)
# read txt file
url <- "https://raw.githubusercontent.com/voltek62/RsparkleR-examples/master/examples/advs.txt"
txt <- readLines(url)
data.sentence <- concatenate(txt)
@voltek62
voltek62 / display_internal_page_rank.R
Created October 26, 2018 20:49
Visualizing your website’s Internal Linking
#autoinstall packages
packages <- c("igraph", "dplyr", "ggplot2", "magrittr")
if (length(setdiff(packages, rownames(installed.packages()))) > 0) {
install.packages(setdiff(packages, rownames(installed.packages())))
}
# Enjoy learning ? https://dataseolabs.com
library(igraph)
library(dplyr)
@voltek62
voltek62 / expired_domain_finder.ipynb
Created January 28, 2019 22:08
Jupyter Notebook that input outlink from Screaming Frog crawl, grabs PA & DA from Moz API, and uses WHOIS API to determine domain availability.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@voltek62
voltek62 / seoml.md
Created January 28, 2019 22:30 — forked from jroakes/seoml.md
ML Repository for SEO

Machine Learning Repository for SEO

SEO is a field that is rich with data, yet many young SEOs may not be equipped to learn tools that will prepare them for the future. We want to support our community by using our expertise to provide access to more advanced tools that will allow SEOs of all levels to play with the technologies that will shape the future of our work.

Objectives

  • Provide a repositiory that makes it possible to learn about ML specifically targeted to those interested in SEO
  • Provide a repository that allows a novice user to run a simple model on something meaningful for SEO.
  • Provide a repository that allows advanced users to save time on data getting, cleaning, preprocessing, and model selection.
  • Allow users to showcase work and models developed.
  • Have users get involved with the future development of the repo.
@voltek62
voltek62 / extractMainContent.R
Created February 5, 2019 19:56
Extract only the main textual content from an HTML page
#autoinstall packages
packages <- c("rJava", "boilerpipeR", "httr")
if (length(setdiff(packages, rownames(installed.packages()))) > 0) {
install.packages(setdiff(packages, rownames(installed.packages())))
}
# Enjoy learning ? https://dataseolabs.com
# configure your jre
Sys.setenv(JAVA_HOME='C:\\Program Files\\Java\\jre1.8.0_181') # for 64-bit version