[Babase] revised ranker ready for testing
Jun Yang
junyang at gmail.com
Thu May 8 16:09:48 EDT 2008
> > 1. In general, we will turn off the check that requires ranking
> > start/end dates to fall on the beginning and the end of a month. In
> > other words, you can create rankings that span an arbitrary period.
> >
> >
> You mean that the list of individuals to appear in the column and row
> headings will be created using all the snames that appear in my specified
> ranking period, correct? That should be fine, I think. Can you just
> explain to me where RANKER is drawing the names from? I am guessing it
> compiling the snames list from census data since it seems that female
> infants are showing up in the interaction matrices....but I would like to
> confirm this.
Ranker draws the names using queries stored inside the RNKTYPES table.
(Changing these query definitions will conveniently change the ranker
behavior.) For example, the query currently being used for ADM (adult
males) is:
SELECT DISTINCT(biograph.sname) from biograph, members, rankdates
where biograph.sname = members.sname AND members.date >= %s AND
members.date<= %f AND members.grp= %g AND biograph.sex='M' and
rankdates.sname=biograph.sname and rankdates.ranked <= %f
In the above %s and %f refer to the ranking start/end dates,
respectively. It seems do to exactly what you want (please confirm); I
just need to remove the ranker check that %s and %f be the first and
last days of the same month.
> > (Note, however, that there is still a difference between the ranking
> > period and interaction matrix period---the former specifies whom to
> > include in the ranking, and the latter specifies the period from which
> > interactions will be counted. We do not enforce that the two periods
> > are the same.)
> >
> >
> Yes, that distinction makes sense and I think answers my question above. I
> just need a way to include ALL the individuals that were present for any
> part of my specified time period...even if they were only present for a
> fraction of the time and/or had no "A" interactions during that time.
Since there is a row in MEMBERS for every individual on every day, I
think the SQL query above gives you exactly that.
> > 2. The interface will not allow you to save a ranking if its ranking
> > start/end dates do not fall on the beginning and the end of the same
> > month. (Currently the database design is hard-coded to assume that a
> > ranking must be for one specific month.)
> >
> That constraint is fine. I need to create cumulative matrices for printout
> to .txt so that we can see the context in which the monthly interactions are
> occurring. We never save the ranks from the cumulative matrices.
Yes. Printing to .txt and saving to .xml shouldn't be a problem.
--- Jun Y.
More information about the Babase
mailing list