Skip to main content

Download World of Warcraft commodities auction data for the specified region.

Project description

WoW Commodities

PyPI - Version


WoW Commodities is a tool to download World of Warcraft commodities auction data using Blizzard API.

Installation

pip install WoW_Commodities

Usage

WoW Commodities needs tree positional arguments (in that order):

  • id: a client ID from the Blizzard API.
  • secret: a secret from the Blizzard API.
  • path: a writable path including the filename.

Details on how to create those credentials can be found here.

WoW Commodities may also take optional arguments defining the region of the downloaded data. The supported regions are:

  • us = North America
  • eu = Europe
  • kr = Korea
  • tw = Taiwan
  • cn = China

Defaults to us.

And a localization paramenter for language translations. The supported localization are:

  • US Region: en_US, es_MX, pt_BR
  • EU Region: en_GB, es_ES, fr_FR, ru_RU, de_DE, pt_PT, it_IT
  • KR Region: ko_KR
  • TW Region: zh_TW.
  • CN Region: zh_CN

Bear in mind that not all combinations of Regions and Localizations are valid. For more details on those combinations read this article.

Defaults to en_US.

With optional arguments:

wow-commodities -r us -l en_US id secret C:\User\username\Downloads\data.csv.xz

Without optional arguments:

wow-commodities id secret C:\User\username\Downloads\data.csv.xz

Where id and secret are your ID and SECRET from Blizzard API (alphanumerical sequences), and username is your computer user. You may change this path completely if you wish, just be sure the path exists and is writable.

The downloaded data will be in a LZMA (xz extention) compressed CSV file. Once this data file can get pretty big some times.

If needed you may uncompress it with 7-Zip and use the tools of preference to analyse it, but keep in mind that several tools can read it compressed (like R), without the need to unpack the file. Spreadsheet software might need the uncompressed file.

P.S.: Since chinese API uses a completely diferent set of links and the server seems to have access limitations, I was unable to test it. So I can't confirm if it works with for the Chinese region.

The Data

The downloaded data consists of four columns:

  • ID: a numeric identification of the auction.
  • Item: a numeric identification of the item.
  • Quantity: the amount of an item in the auction.
  • Unit Price: the value in copper per item unit (divide by 10000 to see the value in gold). The total value of the auction can be calculated multiplying this by quantity.
  • Time Left: time remaing for the auction to expire. This consists of categorical values (SHORT, MEDIUM, LONG and VERY LONG).

You can use a website like Wowhead to discover the item id you want to focus on. This is prefered since items can have repeated names and lots of translations, but only an unique ID. e.g: in https://www.wowhead.com/item=197794/grand-banquet-of-the-kaluak, item=197794 is the item id you want for Grand Banquet of Kalu'ak.

IMPORTANT:

Auction house data updates at a set interval. The value was initially set at 1 hour; however, it might change over time without notice.

So, it's pointless to download data in intervals lower than the API updates.

R import Example

Below an example of a R Script to import the data. Now you can have fun with it.

library(readr)

item_id = 197794 # Grand Banquet of the Kalu'ak

commodities <- read_csv(
  'C:\my\path\to\data.csv.xz',
  col_types = cols_only(
    `ID` = col_character(),
    `Item` = col_factor(),
    `Quantity` = col_integer(),
    `Unit Price` = col_double(),
    `Time Left` = col_factor(
      levels = c('SHORT', 'MEDIUM', 'LONG', 'VERY_LONG'),
      ordered = T,
    ),
  )
)

commodities$`Unit Price` <- commodities$`Unit Price` / 10000 # gold

You can even produce prety cool graphics with such data.

Graphic produced using R and ggplot.

License

Wow Commodities is distributed under the terms of the LGPL 3.0 license.

This application comes with no warrant of any kind. Use at your own risk.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wow_commodities-1.0.3.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

wow_commodities-1.0.3-py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page