The graduate secretary from PoliSci wanted a copy of the little formMail based websites I've done for English and Centre for Social and Political Thought which allow them to take PDFs of grad student applications and have committee members review them. I got a new departmental secondary account set up, copied the necessary files for MA and PhD programs, made trivial text changes.
Poli Sci is not a department we support, but I decided that the couple of hours work required was justified by the goodwill it would create. I've told them we can afford only a very small amount of time for tweaks they'll want to the weightings and other form elements.
Late again, struggling with XSL:FO and handling a late-arriving request for a departmental site update.
Quick tweak to a page on the Hispanital site, on DR's instructions.
Got the endnotes working properly, with somewhat simpler code than I used in ScanCan. Also managed to fix the basic-link to internal-destination problem; links within the document now work.
After that, I started work on tables. This is not simple, because the styling requirements for tables in APA are quite unusual and quite strict; you need to have top and bottom borders on tables and label rows, but no borders on cells, and no vertical borders at all. I have what I think is basically the right xsl:fo code going into FOP, but right now it's failing to do right by my borders. I'll have to hack around at it a bit more, but I may end up having to compromised and just go for a straight grid table.
Began adapting the calculation algorithms in JD's code (in stangeroo.db.php) for doing the actual calculation of D, the first of the three values we need to calculate. There are two possible ways to go about this. My initial approach is explained below. I'm using 1961 Sherbrooke as my basis for calculation:
Total population (T): 66545
Irish: 1286 (D = 0.2556)
Scottish: 808 (D = 0.4508)
Now, to create the combined grouping D, I do this:
Sum Irish and Scottish totals to give a total of 2094 (X).
Let S = the sum of:
for each tract:
for each ethnicity (ie each of Irish and Scottish):
let E = number of people in that ethnicity in that tract,
A = total people in that tract,
ABSOLUTE((T * E) - (X * A))
Let Divisor = (2 * X * (T - X))
Result = S / Divisor
which for Irish and Scottish gives me a D value of 0.626010383461.
However, I'm not sure whether we need an intermediate step which combines the data for the two ethnicities for each individual tract before we do the calculation which produces the enumerator, or whether it amounts to the same thing to do the two separate calculations as above, which are then combined through the summing process. I'm waiting for feedback from JS-R on this.