Packages

I started programming in R for SEO in 2016 and created some cool stuff since then. Some of it was published as an open-source R packages.

Right now you can find them on GitHub (and hopefully on CRAN someday):

  • RAhrefs – R interface for downloading data from Ahrefs API. I needed a simple solution that would enable downloading page’s offsite data (link: https://github.com/Leszek-Sieminski/RAhrefs). This package features:
    • authentication with an API key,
    • downloading data from 24 Ahrefs reports as formatted data frames,
    • ordering with “order_by” parameter and
    • creating selecting conditions with “where and “having” clauses.

  • pagespeedParseR – R interface for Google PageSpeed Insights API. There are some fine R packages that enable connecting to PageSpeed API, but I needed something more powerful (link: https://github.com/Leszek-Sieminski/pagespeedParseR). This package features:
    • authentication with an API key,
    • choosing output format:
      • simple (conveniently parsed data frame with most important info) or
      • raw (nested list with all the data provided by the API)
    • querying multiple URLs in one function call,
    • querying every page for both Desktop and Mobile in one function call,
    • finding out which URLs weren’t analyzed if error happened – output object keeps information about pages that didn’t create the report,
    • controlling API limits usage with simple time interval mechanism,
    • downloading data for two API versions – 4th (classical PageSpeed) and 5th (Lighthouse reports).

More to come soon!