Xbox LIVE Indie Games
Sort Discussions: Previous Discussion Next Discussion
Page 1 of 3 (61 posts) 1 2 3 Next >

XNA Sales Vizu

Last post 10/30/2013 3:25 PM by Maximinus. 60 replies.
  • 4/26/2010 9:42 PM

    XNA Sales Vizu

    New and better version V2 is available on the third page of this thread.

    Here is my program for crunching the sales data. It has the following features :

    • Histogram charts : for Sales Units, Sales Value, Trials Units
    • Plots : for conversion rate
    • Multiple games are stacked, can be unselected
    • Time Frame selection with multiple options
    • Currency conversion : MSP, US $, and every xna currency
    • Totals for selected period and games
    • Country Share : displayed with a pie chart

    It is licenced under the GPL V2 licence.

    Download link : here
    Screenshots :

    Usage :

    Create a folder, copy into it the script file and your CSV sales files. Then launch the python script, with a terminal : "python", or with the explorer.

    The locale (language) of the website when you download the file is important. This program is waiting for US date formatting, so you should download your sales data with this url : . Alternatively, you can use data downloaded with the website locale 'en-GB', if you change the python script : at line #43, from :
    [43] LOCALE=LOC_US
        to :
    [43] LOCALE=LOC_GB

    Requirements :

    Short story : python, gtk and matplotlib.

    For apt-based Linux : "sudo apt-get install python-gtk2 python-matplotlib python-numpy"

    For Windows, you need all the following components :


    You can use Python XY for example, it includes matplotlib : direct link, download page

    During the installation :
    - make sure Python/Matplolib and Python/NumPy are selected (should be by default)
    - you can unselect Python/VTK and Other/MinGW for space savings

    Matplotlib and NumPy
    They are included in Python XY.

    direct link, download page


    direct link, download page


    direct link, download page


    direct link, download page

    You need to start a fresh terminal after all these installations (unless you use a modern OS ;) ).

    It should work on MacOS, I could not test it.

    Hope you enjoy,
  • 4/28/2010 7:30 PM In reply to

    Re: XNA Sales Vizu

    Looks great, thanks!
  • 4/28/2010 9:13 PM In reply to

    Re: XNA Sales Vizu

    I know nothing about python, but is there a simple way to reconfigure the script to accept dates in other than US format?  I get my CSVs in DD/MM/YYYY format and yonder doohdad doesn't like it so much!
  • 4/28/2010 9:44 PM In reply to

    Re: XNA Sales Vizu

    Huhu. Yes it's possible, this translation is done at line 192.

    It reads
    [191]    dateData = dateStr.split('/')
    [192]    day = date(int(dateData[2]), int(dateData[0]), int(dateData[1]))

    The variable 'dateStr' contains the string in the csv file (first item of each line)

    The constructor date() has this prototype (doc):
    class, month, day)

    To use the format 'DD/MM/YYYY', you should change the line 192 to read

    [192]    day = date(int(dateData[2]), int(dateData[1]), int(dateData[0]))

    Hope it works :)
  • 4/28/2010 9:50 PM In reply to

    Re: XNA Sales Vizu

    @AwesomeGamesStudio and DrMistry : could you get it to work with your sales data? Would you be interested in publishing screenshots?
  • 4/28/2010 10:04 PM In reply to

    Re: XNA Sales Vizu

    The Mr Python Man he say no!  Getting an index out of range error on running the script:

    C:\Users\Mike\Desktop\Sales Vis>python
    Loading  . . .  3 files
    Traceback (most recent call last):
      File "", line 2188, in <module>
      File "", line 2123, in __init__
        (, self.ax2, self.totalline, self.totalline2, (self.legends1, self.le
    gends2)) = UpdatePlots(self.UIDataFormat, self.UITrials, self.UIValue, self.UICu
    mul, self.UISmooth, self.UISales, self.UIConvRate)
      File "", line 295, in UpdatePlots
        if ( UIGamesEnabled[gameindex] ):
    IndexError: list index out of range

    I got 3 CSVs, one of which is pretty big (about a year of data), one smallish (3 months) and one small (4 weeks).  Trying with only the small file, it still doesn't seem to like the data.  I've made the change to line 192.  With "All" activated, I see false data all the way along from the correct start date until the end of 2010. 

    Do the csv files need to be monthly, or can I use the complete figures?

  • 4/28/2010 10:09 PM In reply to

    Re: XNA Sales Vizu

  • 4/28/2010 10:31 PM In reply to

    Re: XNA Sales Vizu

    Reply Quote
    Ok, that's a nice bug!

    It should work with either the monthly, or the complete figures. Obviously it does not.

    Are you using the en-GB locales to download your sales data? I am going to test with my own sales, downloaded with this locale, see if I can reproduce this bug.

    If you're ok with this, you can send me crashing data. If you don't want to communicate your sales, you can remove most of the lines, and keep only a crashing version. My personal email is at the top of the python file, my other email is .
  • 4/28/2010 10:33 PM In reply to

    Re: XNA Sales Vizu

    Thanks for the screenshot. It's great to see this software displaying big numbers!
  • 4/28/2010 10:36 PM In reply to

    Re: XNA Sales Vizu

    I can reproduce the bug with my own data and the en-GB locale. Reproducable bug = fixed bug. Update coming soon.
  • 4/28/2010 10:57 PM In reply to

    Re: XNA Sales Vizu

    Oh excellent, you're a star!  Thanks very much for providing this, it's much appreciated.  I could have written another game in the time I've spent fiddling with the data in Excel!
  • 4/28/2010 11:50 PM In reply to

    Re: XNA Sales Vizu

    Updated version is available at the same link : .

    To use data formatted with the locale en-GB, change line #43

    from :

    [43] LOCALE=LOC_US

    to :

    [43] LOCALE=LOC_GB
  • 4/29/2010 12:01 AM In reply to

    Re: XNA Sales Vizu

    BANG and the bug was gone!  Thanks a lot!  I'll post some pics soon!
  • 4/29/2010 12:32 AM In reply to

    Re: XNA Sales Vizu

    Great. As a side note : python and gtk are more fun than excel :)
  • 5/14/2010 4:00 PM In reply to

    Re: XNA Sales Vizu

    I've been meaning to try this for a while but never had time to go through all of it's dependencies. It took a while to download and install all of them, but it was well worth it! Thanks for an awesome little tool. :)
  • 5/14/2010 7:34 PM In reply to

    Re: XNA Sales Vizu

    Hello, and thanks for the nice coments. Installing all the python dependencies is not very convenient on the windows platform, isn't it?
  • 5/14/2010 7:46 PM In reply to

    Re: XNA Sales Vizu

    No, not at all. I Also got an error message with two of the installers (I think it was the third and fourth ones?) but your program runs anyway. I'm on Win7 Home Premium 64 bit.
  • 5/14/2010 7:58 PM In reply to

    Re: XNA Sales Vizu

    This tool looks really useful, but it's all the dependencies that turn me away. Any possibility that we could get a version of this some day that doesn't require so many other moving pieces?
  • 5/14/2010 9:19 PM In reply to

    Re: XNA Sales Vizu

    Hu. I won't develop another version, if that's what you're asking :) . As for the dependencies long list, it is very easy to install all of them with a modern operating system (one that ships with a python interpreter for example ;) ). Having said that, there is a program called "python2exe" that compiles python script files into windows binaries, shipping the python interpreter into the exe. I will look into this, and see if I can make another release that doesn't need to install the libraries.

    Enable email subscription to this thread if you want to be notified when it is available.

    Bye all
  • 5/27/2010 2:56 PM In reply to

    Re: XNA Sales Vizu

    When I try to run the script (through IDLE), I get the following error: Inconsistent Indentation detected. Then it halts at line 497. If I try fixing the indentation, things just degenerate from there into many more indentation errors. I am running Python 2.6.5. Not sure how to proceed as I am very new to python.
  • 5/27/2010 4:39 PM In reply to

    Re: XNA Sales Vizu

    Hello Gloud, and thanks for the feedback.

    The script has been fixed, it is available at the same address : link.

    This software IDLE is very strict : his problem was that I was using both tabulations and white spaces. Without downloading the new version, you can have the old version to work, by launching it outside of IDLE (with the command line or the explorer). Or you can download the updated version, and launch it within IDLE, I tested with this software.

    Good luck,

  • 5/28/2010 1:25 PM In reply to

    Re: XNA Sales Vizu

    Quick question: how is the "Sales value" field calculated? Is it gross or net? If it's net, it is following the standard Total Sales * MSP Price * MSP Conversion Rate * .70 formula, correct?
  • 5/28/2010 1:35 PM In reply to

    Re: XNA Sales Vizu

    Quick answer : you are correct, it is net, ( * .70). There is a small hint as a tooltip, if you hover the "$" button, it says

    "1 US$ = 118.064 MSP, developer share"

    which would be simpler to understand the other way "1 MSP = 0.008469 US$"

    I found this formula with the payments I received.
  • 6/28/2010 7:08 PM In reply to

    Re: XNA Sales Vizu

    I have to say, this is completely awesome, and exceptionally useful for tracking how much stuff's *actually* selling (Cumulative + Sales Value is brililant)

    Just one complaint/question : is there anything you can do to make it any faster? With 8 games and over a year's sales data, it takes a good 30-60 seconds to do ANYTHING after pressing a buttong :( I did have a look at optimising it, but Python is so much Greek to me :(

    Still totally brilliant tho!
  • 6/28/2010 8:10 PM In reply to

    Re: XNA Sales Vizu

    Hello and thanks for the nice words!

    As for the (poor) performance, I'll work on improving it once my current game project is released. I'll try the python2exe tool that should compile python scripts into executables. Maybe this would improve performance?
Page 1 of 3 (61 posts) 1 2 3 Next > Previous Discussion Next Discussion