Skip to content
This repository was archived by the owner on Mar 8, 2024. It is now read-only.
/ overwatchr Public archive

R Interface to Query, Store, and Analyze OWAPI Data

License

Notifications You must be signed in to change notification settings

benbellman/overwatchr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

overwatchr

2024-03-08 Note: I'm trying to quit Overwatch (because it hasn't been good in years), and OWAPI has been dead for years (I wonder why?), so I'm finally archiving this package. It wasn't updated in literal years, but it was a fun project and I want to feature it proudly on my page. It's my first beginning-to-end package development effort, and it worked! When I'm an author/maintainer on software as I advance in my career, I'll always remember overwatchr as my first. :-)

The goal of overwatchr is to provide a framework for collecting and analyzing game statistics about public Overwatch accounts. The package relies on OWAPI to collect information from play.overwatch.com. It is not suitable for high-frequency querying, but aims to provide tools for users to analyze their long-term progression as Overwatch players. Currently, overwatchr only collects statistics from competitive gameplay.

The package consists of two main functions. The first function (scrape_ow_data) queries OWAPI for a specific profile and saves the data in a dedicated folder as multiple CSV files, one for each hero. This file structure supports multiple queries over time, which are appended to any existing CSV files, and can store data about multiple accounts. The second function (load_ow_data) loads this data into an R session for analysis. It also automatically transforms the raw information collected and stored by scrape_ow_data into more usable data by isolating gameplay between each OWAPI query, and by calculating stats per 10 minutes for each of these "sessions".

Installation

You can install overwatchr from GitHub with:

# install.packages("devtools")
devtools::install_github("benbellman/overwatchr")

Usage

The first step to using the package is to attach it in your R session:

library(overwatchr)

Next, a user needs to start collecting data. I suggest running a query at least half an hour after each session of competitive play, as Overwatch's website does not seem to update profile stats very quickly. This is simple to do with scrape_ow_data. All you need to specify is the account name, the gaming platform, and the file path to store collected data.

# create an empty folder to store all future overwatch data
# this function is from base R, not this package
dir.create("~/Desktop/ow_data")

# save new data query
# future queries will be appended to same files automatically
scrape_ow_data(
  profile_name = "catmaps", 
  platform = "psn", 
  file_path = "~/Desktop/ow_data"
)

When loading data from this folder, load_ow_data() must pull data for a single hero, for a single account, and for a single season in order for data transformation to be reliable and accurate.

moira_data <- load_ow_data(
  profile_name = "catmaps", 
  hero_table = "moira", 
  season_choice = 19, 
  file_path = "~/Desktop/ow_data"
)

About

R Interface to Query, Store, and Analyze OWAPI Data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages