The R programming language for every SEOwoman. Position, program and see results

SEO
Sebastian MioduszewskiSebastian Mioduszewski
Published: 03.02.2021
10 minute

Positioning is a way of life for many professionals. However, it can be more than just a profession. I believe – like Lucjan Kydrynski – that everything we do should be easy and enjoyable. That’s why, on a daily basis dealing with SEO, I became interested in programming and chose the R language, which not only accelerated, but also significantly simplified my work as an SEO.

From this article you will learn:.

  • What is the R programming language,

    .

  • Why, when dealing with positioning, you need the R (or other) language,

    .

  • How your job will change if you learn at least a basic level of the R language,

  • .

  • Where to start your adventure with R (you will get ready-made solutions, so you will be able to find and use solutions of other R language users on your own).

  • How to get started with R.

Why R and SEO

.

The needs of SEO

.
The increasing demands that the SEO industry is placing on professionals are forcing them to spend more and more time learning more and more. This process means that nowadays an SEO must:

  • specialize in selected issues (e.g., technical SEO is an issue that can be handled “full time”),

  • .
  • be able to analyze more and more data, coming not only from different tools, but even on different issues (for example, technical parameters of the website and data on user behavior),

  • .

  • Combine data from different tools so as to be able to draw conclusions based on them and influence SEO results.

  • .

Accordingly, nowadays a positioner needs a Swiss Army Knife, that is, a set of tools that are applicable to different situations. Each of us, engaged in daily positioning, will need a slightly different tool. For one, the most important thing will be the analysis of the competition (for example, sources of link acquisition), for others it will be the internal optimization of the site.This is where R can play a role. Thanks to the knowledge of this programming language, we will be able to prepare or have prepared tools, corresponding directly to our needs.

Applications of R in SEO

.
R is a so-called interpreted programming language (the most popular languages of this type besides R are PHP, Python and JavaScript). Besides, R is a statistical computing environment. According to compilations of the popularity of programming languages, R is one of the 10 most popular in the world (data below).

<

Benefits and Disadvantages of R

.
Like any programming language, R has its strengths and weaknesses. Strengths include:

  • a very large number of ready-made libraries (you can think of libraries as tools to facilitate certain tasks – such as retrieving data from Google Analytics),

    .

  • extensive visualization capabilities (libraries such as Ggplot for charting and Shiny for building advanced report panels),

  • .

  • high availability of tutorials and materials to facilitate learning,

  • .

The downsides of R include:.

  • execution speed – a very popular (and confirmed by data scientist friends) opinion is that R is slower than the Python language (it has similar applications to R – a great advantage is the statistical “pedigree” of R. Thanks to it, statistical operations can be performed easily),

  • dependence on the hardware on which the code is executed (operations are performed in the RAM of the computer, which is important for very large data sets – I, having only 8 GB of RAM, was able to easily download to R and process information about more than 50 million page views downloaded from Google Search Console).

  • .

In summary, the R language is well suited for SEOs because it responds to business (good data visualization, ability to create report panels) and technical needs (analysis of datasets, at the size you would expect in SEO, occurs smoothly even on standard hardware). Using off-the-shelf solutions (publicly available libraries) you can, for example:

Senuto

  • check the positions of phrases in Google that you monitor (for you or your competitors),
  • .

  • add new words to monitor,
  • .

  • data for the monitored keywords (such as number of searches or cpc rate).
  • .

Google Webmaster Tools.

  • check all the sub-pages on your site that were visible in Google,
  • .

  • download all the phrases for which your site was visible in Google,
  • .

  • take all site maps added to Google Webmaster Tools,
  • .

  • review all errors and warnings visible in the Google Webmaster Tools panel,
  • .

Google Analytics.

  • check the number of visits from SEO on the subpages (it is worth comparing with the number of impressions from Google Webmaster Tools),
  • .

  • sales in your store (you can eventually combine this data with those already described above).
  • .

And much, much more.

How to get started with R

.
Basically, to start programming in R, we need to make two installations:

1. R programming environment.

Available for Windows (https://cloud.r-project.org/bin/windows/base/), Mac (https://cloud.r-project.org/bin/macosx/) and Linux (https://cloud.r-project.org/bin/linux/)). With this installation, we get access to an environment where we can already write and run programs.

Since this is done here in a not very friendly command line environment, I recommend doing an additional installation. It is R studio, which is an application that makes it easier to work with R. I myself write all my programs in R studio on a daily basis.

How to check if I already have the R environment on my computer?

.

  1. Check if there is an R.exe file on your computer. If not, then you don’t have R on that machine.
  2. If you don’t, then you don’t have R on that machine.
  3. If you do, check the full path of the location of this file (in my case, it’s C: R.exe-4.0.2)
  4. .

  5. Then run the command line (in Windows search for cmd) and into the window type the command: cd your r.exe file location – in my case it’s C:Userssebastian.mioduszewsDocuments-4.0.2bin (view below)
  6. .

Now all that’s left for you to do is use the r.exe command on the command line.

If the window you see is similar to mine, you have the R environment installed!

2. R Studio Desktop application

.

Also available for Windows, Mac and Linux (https://rstudio.com/products/rstudio/download/#download). This tool not only allows you to write and run programs in R, but also makes it easy to analyze errors, quickly access R language documentation and help, upload applications using Shiny to a server where they will be shared, and work with version control systems (for example, with Github, so you will never again lose the code you wrote).

How to use R language help

.
The developers of the R language have prepared a very good help for us, describing important functions of the language. As I have already written, we get a large part of R’s capabilities by using libraries (they extend the capabilities of the language and you too can become a library author). A library creator can also prepare help for his tool.

You can access the help in RStudio by using the help command and typing in parentheses the topic for which you need help.

A second excellent source where we can find user knowledge and help is the Stackoverflow.

.

Where to learn R? Resources for learning R

.
With all the tools in place, we can start learning and writing programs.

In my experience, the best way is to immediatelyprepare applications that support our daily work (speed it up or enable analysis that we could not do before).

I started learning R from books:

Courses:.

Of course, these are not all the sensible resources you can use. It is also possible that they are not the best available. Certainly these are the sources of knowledge through which I was able to learn R and thus change my daily work.

Further steps

.
From now on, you can take your own steps into the world of positioning, based on data analysis.

I recommend that when you are working, you constantly look for tasks that you can do faster thanks to R, or that you will be able to do at all thanks to it. Based on my own experience, I suggest you start with:

  • Daily, monotonous tasks (e.g., completing Excel with data) – this will be an excellent field for R to retrieve data via APIs of external tools – if the thing you are retrieving data from is from the stable of Google or Senuto, you will definitely be able to use the API.

  • .
  • Frequent questions about specific data (e.g., what positions do we have today) – here, thanks to Shiny, you will be able to prepare a report so that anyone interested can check the answer to their question themselves (I guarantee that this cuts off most unproductive discussions like “how’s the SEO going”).

  • Emergency issues (e.g., if some sub-pages on the site are frequently not working, R can check their availability for you daily).

  • Areas where you lack knowledge (e.g., you run a real estate listing service and you don’t know if your competitors have more listings than you do – R can check this for you daily, or if you’d like to get a reminder in your mailbox that, according to Senuto data, your competitor’s site this month is more than 10% visible keywords more than last month – again, R can do this and send it to your inbox).

  • .

Sources of knowledge for inspiration

.
A second great source of knowledge and inspiration is other positioners using R (or Python) – in many cases, it’s all about inspiration.

First, it’s a good idea to watch on Twitter for positioners familiar with R – for example, these are:

Secondly, you should of course visit Youtube – I recommend starting with:

Third, review popular English-language sites for SEO and programming:

Fourth, the GitHub site is a great source of ready-made solutions. A quick look here shows that there really are many ready-made solutions waiting here. Now you are not sure how to use this service? No problem. We’ll use the code provided on this site in future articles.

Of course, I won’t insult you by suggesting Google searches. Nevertheless, it is also worth doing. ????

This article is just an introduction to the diverse and interesting world of R and SEO. If any questions arise for you, go ahead and ask them in the comments – I will try to answer them!

Share this post:  
Sebastian Mioduszewski

Z branżą SEM/SEO związany od 2007 roku. Od 2012 odpowiedzialny za budowę i realizację strategii SEO dla serwisu Pracuj.

Try Senuto Suite for 14 days for free

Start the 14-day trial for free

Meet Senuto in 1-hour online training. Free.

Choose a date and sign up