[Babase] Re: Ooops, census bug

kfenn kfenn at princeton.edu
Mon Nov 20 14:01:45 EST 2006


Karl,

This is real the data from July 2006.  Don't make too much of the fact 
that I labeled the file "old".  This is the first file I would have 
tried to upload in the next demography update.  Given this, I'm not sure 
I understand your comments about loading the "earlier" or files first.  
Can you give me an example with dates?

Any errors about individuals not appearing in biograph are probably 
because from new births or immigrant males.  I wouldn't have gotten the 
errors because it wasn't loading the individuals who were always 
present.  I think I added ADR and ZAN to biograph just to test the 
system, but I'm sure there were others that weren't in biograph that I 
needed to first add.

I noticed that when I saved the excel as tab-delimited, it looked kind 
of screwy.  Is there any magic to saving it aside from "Save As" > "Tab 
Delimited"?  The file looks fine in Excel (attached) so it sounds like a 
lot of the problems are coming from the conversion out of Excel.  I 
didn't deliberately end my file with a blank line....again everything 
looked OK in Excel but apparently it wasn't.   Any advice for me to 
improve this?


Tabby

Karl O. Pinc wrote:
>
> On 11/20/2006 08:47:31 AM, kfenn wrote:
>> Hi Karl,
>>
>> This is the file I uploaded to babase_copy while we were on the phone 
>> that day.  If I query census for ZAN, he is absent through July 20th, 
>> but he never shows up as present for the rest of the census days in 
>> that month.  Likewise, if I query APO, none of his July records show 
>> up at all.  It seems that the blanks in the file are not being 
>> interpreted as "presences".
>
> Should be fixed now.
>
> My concern is that it takes a ferociously long time.  Is that
> because the data is made up?  (I got the error:
> ERROR: insert or update on table "census" violates foreign key 
> constraint "Sname on BIOGRAPH" DETAIL: Key (sname)=(ZAW) is not 
> present in table "biograph".)
> The database is optimized to put later data in after earlier data,
> so it could be slow because the data is old.  If it's a problem
> let me know and I look into it.   (Even when you've a number of
> "old" months to update I think it will go much faster if you
> put in the earlier months before the later ones.)
>
> The real problem was that, for some reason, not all of the rows
> had the same number of columns.  Here's the data again, with
> ^I shown in place of all the tab characters.  Notice how some
> lines have no tabs.  I've fixed the program so it uses the number
> of dates in the first row to determine how many columns there are.
>
> One more thing.  I notice that your file ends with a blank line.
> This will make the program compain because there's no SNAME.
> If that's a problem let me know and I can see about ignoring
> trailing blank lines.
>
> 1.10^I2006-07-03^I2006-07-07^I2006-07-12^I2006-07-14^I2006-07-18^I2006-07-20^I2006-07-24^I2006-07-28 
>
> APO^I^I^I^I^I^I^I^I
> ARS^I^I^I^I^I^I^I^I
> AYU^I^I^I^I^I^I^I^I
> AZI^I^I^I^I^I^I^I^I
> EBA^I^I^I^I^I^I^I^I
> JOB^I^I^I^I^I^I^I^I
> LIB^I^I^I^I^I^I^I^I
> NYU^I^I^I^I^I^I^I^I
> OBR^I^I^I^I^I^I^I^I
> ORN^I^I^I^I^I^I^I^I
> OTI^I^I^I^I^I^I^I^I
> REX^I^I^I^I^I^I^I^I
> TAL^I^I^I^I^I^I^I^I
> YOB^I^I^I^I^I^I^I^I
> ZOR^I^I^I^I^I^I^I^I
> NIN
> TAP
> CRU
> GOM
> COO
> BUC
> FAB
> FAM
> SAT
> COS
> COT
> HAD
> SEE
> FIW
> NOS
> SAS
> SAG^I^I^I^I^I^I^I
> HOF^I^I^I^I^I^I^I
> FRU^I^I^I^I^I^I^I
> ZAW^I^I^I^I^I^I^I
> ZAN^I0^I0^I0^I0^I0^I0^I
> CAB^I^I^I^I^I^I^I
> CAI^I^I^I^I^I^I^I
> CHE^I^I^I^I^I^I^I
> COB^I^I^I^I^I^I^I
> DRO^I^I^I^I^I^I^I
> DUX^I^I^I^I^I^I^I
> FAC^I^I^I^I^I^I^I
> FAX^I^I^I^I^I^I^I
> FLA^I^I^I^I^I^I^I
> HOK^I^I^I^I^I^I^I
> HOL
> HON
> HUM
> HYM
> MON
> NIK
> NUT
> SCE
> SNA
> SOR
> SEI
> HAS
> HES
> DUR
> DAP
> HUC
> HAV^I^I
> DHO^I^I
> COD^I^I
> HIV^I^I
> DED^I^I
> HYP^I^I
> BAT^I^I
> CYC^I^I
> CON^I^I
>
>
>
> Karl <kop at meme.com>
> Free Software:  "You don't pay back, you pay forward."
>                  -- Robert A. Heinlein
>
> _______________________________________________
> Babase mailing list
> Babase at www.eco.princeton.edu
> http://www.eco.princeton.edu/mailman/listinfo/babase

-- 
Tabby Fenn
Research Assistant

Dept of Ecology and Evolutionary Biology
401 Guyot Hall
Princeton University
Princeton, NJ  08544

609 258-6898 (Ph)
609 258-2712 (Fx)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Nc0706.xls
Type: application/vnd.ms-excel
Size: 16384 bytes
Desc: not available
Url : http://www.eco.princeton.edu/pipermail/babase/attachments/20061120/8045e079/Nc0706-0001.xls


More information about the Babase mailing list