Archive for the ‘Methodology’ Category

Scraping Warcraft Data: First steps

June 9, 2010

It’s time for me to start writing my addons. I need at least two, possibly three. I have downloaded the API, but I am a novice programmer, so I’ve also purchased a book that I hope will get me to the skill level I need.

So, what addons will I be creating? The first one is an auction house tool. The second one is a census-taker. The third one, if/when I get around to building it, is also a census taker, but a very specialized one.

Auction house tool: This would be a totally stripped down version of Norganna’s Auctioneer. What we are interested in is just scraping everything – including character name – and storing it to a file. We can take this data and save it for later analysis. It needs to do this as frequently as possible. Because we want character name, the addon will be more complicated (probably the most complex I design). Otherwise, we could makes use of the much simpler Blizzard-defined function QueryAuctionItems().

Census-taker addon 1: This addon writes /who output to a SavedVariables file. It will scan the major cities and other known high population areas for characters and append the results to a file along with a time stamp. It will scan as often as the game will let it. That’s it. It can also be used for initial surveys to determine what constitutes ‘high population areas’.

Census-taker addon 2: This addon is a little trickier, and may not ever be implemented. What we’re looking for here is an addon that allows a correctly placed character to “observe” individuals who are most likely utilizing the auction house. The addon scrolls through friendly targets in the character’s field of vision, and for each target it records the name of its target, the target’s level, the locale in which the target is observed, and a time-stamp for the observation. Designed properly, this addon affords us two augmentations to our study. First, it can be used to increase the total number of characters seen at any one time in populous cities like Stormwind and Orgrimmar. Second, it can be used to capture auction-cancellation effects.

This latter point is a major obstacle. While my WoW player’s instinct is that few auctions are cancelled, the truth is that a character’s likelihood of cancelling an auction is probably positively correlated with their participation in that market. I haven’t yet worked through the preliminary math on this, but the basic strategy rests on the realization that if a bunch of auctions disappear between scans, and the player whose auctions they were is at the auctions house, and [insert some sort of decision-making calculus here], then there is a high probability that the missing auctions weren’t purchased, but rather cancelled. In the absolute worst case scenario, we can just ignore any sales that take place while the seller is online, but this is overkill. The point of this addon is to try to finesse things a little more.

Advertisements

Mathematics in Economics

November 17, 2007

I am entirely too impressed with myself at the moment. 

I have been working since this morning on trying to tease out a model from my various notes and ramblings on corruption, the topic of my economics thesis. Suffice to say that I spent a good portion of my time standing in front of a whiteboard jotting down equations, solving for n, binomially expanding, etc. 

I’ve been told (or is the word warned?) by my professors that mathematics is a tool of economics, but it is not required to do economics.  I buy that; however, had I not my knowledge of mathematics and the ability to apply it to economics, I would find it extremely difficult to formalize what would otherwise be a model weaved together by notions that often escape the notice or care of economists.  Economics has a language, and mathematics is a very important part of that lexicon. 

It is much easier for me to go to my professors, or other economists, with a set of descriptive equations, point at n, and say “That’s the state-civil society dissonance factor.  That’s what we need to find a way to measure.”  I am capable of weaving an analytic story, but why say with 1000 words what you can illustrate with a couple equations? 

Mathematics may only be a tool in economics, but more and more I find it to be an absolutely essential and integral tool for understanding and expanding on my field. 

Currently Reading – Greenspan’s “The Age of Turbulence”

October 14, 2007

I am not quite halfway through Alan Greenspan’s “The Age of Turbulence,” the central banking legend’s part memoir, part treatise, which was published just a few weeks ago.

It really is a fascinating book.  I am reading it not as someone who is of a particular political mindset, nor as someone who would feign to have the highly developed skill set that would be necessary to target the man with either criticism or approbation for his term as the chairman of the Federal Reserve.  Instead, I am reading it as a student of economics, and I am finding Greenspan to be a surprisingly lucid writer with a dry wit, a reasonably humble personality, a keen intellect, and a single-minded fascination with all that his field of study has to offer.  Whether or not he paints a rosy picture of himself, his techniques, or his attention to detail, at the very least I find his portrayal of a man devoted to uncovering the driving forces in markets to be both inspirational and educational. 

I am inclined to recommend this book as assigned reading in a classroom.  I think his methods are exemplary, and in that sense, certain chapters would give students a sense of the importance, limits, and possibilities for collecting and interpreting data.  At the same time, he has been on the front line of most economic booms and busts for the past 50 years, and as such much of the first half of his book would be an excellent supplement to more in-depth analyses and/or class discussions.  The latter half of his book (though I have not finished it yet, but I will be sure to comment on it later), provides a normative assessment of the world around him and the present and future of the global economy.  It is, as such, an excellent conversation starter for any class discussion on economic issues or policy for students at any level in the field.

I would not mind hearing the opinions of others on their take of this book, but regardless of how one feels about the man’s policies, he strikes me as a prolific thinker and an astute observer, and his thoughts are worth the trip to the library or the bookstore.   

Proposal Accepted

September 10, 2007

Today, Becca and I had our first meeting with my thesis committee:  Humphrey, Greenlaw, and Hansen.  I admit feeling a bit worried about how it would turn out because I have never had a class with Hansen before, and I had a feeling he would be the person that needed the most convincing.

In a strange twist, Hansen effectively talked us into doing precisely what we proposed to do:  develop a methodology.  Not to say he and the other professors did not help us narrow down the topic a bit more, rendering it more manageable; rather, the qualitative difference between what was proposed and what was decided would be a worthy thesis topic was not very significant. 

The thesis proposal, in its nearly final form, did not spend a great deal of time developing a model because that was never the intended focus of my thesis on political corruption.  The intention was to develop a schematism for translating the heavily descriptive work of anthropologists into the language of, at the very least, political economy, for the purposes of working out the ways in which social networks come into conflict with the state.  Humphrey, my main advisor for the thesis, seemed to think that the basis for desiring to develop this methodology needed more clarity, and so suggested that I spend more time formally developing and critiquing the model that characterizes the mainstream literature. 

It would appear, however, that this distracted unnecesarily from the main point: an alternative model is useless if it can not be tested, and since alternative models of corrution based on social networks appeared to lack an associated methodology, to even talk about testing  is premature.  We were proposing to develop that methodology, but with half the pages of the proposal devoted to developing models, the focus of the thesis was rendered unclear.  It struck Becca and I both as funny that in the end, Greenlaw, and Hansen especially, cared a lot less about models and a lot more about methods, and effectively talked us into focusing on the latter (our original plan), rather than the former.    

I have been warned, as mentioned before, that developing methodology does not provide the fame and fortune that an ambitious economist might seek.  Certainly my economics education these past four years has not explored alternative approaches (not so much a complaint – methods are rightly secondary to concepts in undergraduate work, methinks, and traditional methods are more than adequate for most of the problems that undergrads will take up).  Still, there is something to spending a class period or two to demonstrate that great strides are not always made in the synthesis of new concepts, but also in new approaches to familiar problems.  Stagnation of or dogmatic commitment to either concepts OR methods will doom any quest for knowledge.