Amazon Author Central Sales Rank Graphs

   If you publish on Amazon and keep up with the sales rank for your book(s) on the Author Central website, you will recognize this figure:

   While this graph is much appreciated, it would be nice to have the raw data in order to track one or more books over time and also compare one book to another. There is no "right-click and save as Excel spreadsheet" option. You can copy the graphic and save that, but the data is not readily available.

   In the past, I have used my digitizing program (free on my other website) to convert the lines to data, but this can be quite tedious. One of the challenges in this process is the dates, which aren't a simple linearly progressing variable. These must be converted to Julian day or Microsoft day (which is set to one on 1 January 1900).

   Thankfully, the data (of sorts) is embedded in the html, which is read by the web browser along with a whole pile of java script to create the figure. So I wrote a little program (getgraph.c), which reads through the html, extracts the date labels at the bottom along with their horizontal location, the rank labels up the left side along with their vertical location, calculates the transformation (y=a*x+b) of the graph, uses this to convert the points along the line to their original coordinates, and writes out a list of date,rank to a file (getgraph.csv). All you have to do is save the html and "drop" it onto the executable (getgraph.exe) to get this:

title

date,rank

12/6/2023,1345582

12/7/2023,1378944

12/8/2023,1391376

...

1/4/2024,1553438

   This can be imported directly into Excel™ to produce a similar graph:

   Download getgraph (source code and Windows™ executable) here getgraph.zip


Instructions for GetGraph

1) Log into Author Central

2) On the home page click on VIEW SALES RANK

3) Scroll down to book

4) Click on View historical Sales Rank

5) Select interval (i.e., 2 Weeks, 1 Month, 6 Months, 1 Year, 2 Years, All Available)

6) Right click on graph

7) Select (in your browser) "save as" and so create: name.html

8) Launch GetGraph and pass it the name of the file (name.html). This is the same as "dropping" the file (name.html) onto the executable (getgraph.exe).

9) This will create a new file (getgraph.csv). Double-click on this new file (getgraph.csv) to open in Excel.

Note: The new file (getgraph.csv) must not already exist in this folder to avoid over-writing existing data. This is a Windows executable program. If you are not running Windows, you probably don't have Excel either. After you have extracted the data, you can delete the html file and the associated folder (name_files).