Project

General

Profile

Statistics
| Revision:

# Date Author Comment
5632 10/18/2012 12:04 PM Aaron Marcuse-Kubitza

mappings: Renamed *scientificNameWithAuthorship to *scientificName because scientificNameWithAuthorship is actually a synonym of DwC's scientificName ("The full scientific name, with authorship and date information if known" <http://rs.tdwg.org/dwc/terms/#scientificName&gt;)

5631 10/18/2012 11:57 AM Aaron Marcuse-Kubitza

mappings: Renamed *scientificName to *binomial because DwC defines the scientificName as "The full scientific name, with authorship and date information if known", but many datasources do not include the author in their scientific name, and the fields scientificName is mapped to in VegBIEN assume it does not include the author

5630 10/18/2012 11:44 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added verbatimBinomial

5629 10/18/2012 11:41 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Redefined *binomial to "Taxonomic name without author", rather than genus+species

5628 10/18/2012 11:32 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept.taxonlabel_id: Changed type from serial to integer because this is a subclass, and therefore each taxonconcept must first have a corresponding entry in taxonlabel

5627 10/18/2012 11:29 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: Moved taxonlabel.concept_reference_id to new taxonconcept table, which is a subclass of taxonlabel that adds information about who the taxon concept is according to

5626 10/18/2012 11:13 AM Aaron Marcuse-Kubitza

taxonlabel: Renamed accepted_label_id to canon_label_id to allow any taxonlabel to be the canonical taxonlabel for this taxonlabel, whether or not its status is accepted

5625 10/18/2012 11:01 AM Aaron Marcuse-Kubitza

schemas/filter_ERD.csv: Remove the methodtaxonclass.submethod_id fkey to taxonlabel, to make room in the ERD for additional taxon tables

5624 10/18/2012 10:52 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: establishmentmeans_dwc: Corrected source comment

5623 10/18/2012 10:51 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonomic_status enum: Added source comment

5622 10/18/2012 10:49 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonlabel_relationship: Added relationship, with relationship enum

5621 10/18/2012 10:21 AM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped taxonomicStatus

5620 10/18/2012 10:20 AM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/test.xml.ref: Updated inserted row count

5619 10/18/2012 10:15 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Removed duplicate entry for taxonomicStatus, which is also a DwC term

5618 10/18/2012 10:14 AM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added taxonomicStatus

5617 10/18/2012 10:13 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonlabel: Added taxonstatus, with taxonomic_status enum

5616 10/18/2012 09:40 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonlabel.creator_id comment: Removed no longer accurate comment that this is the "according to" and "Name sec. x", which is now stored in concept_reference_id

5615 10/18/2012 09:37 AM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonlabel: Added concept_reference_id, which is the entity that defined the taxon concept (who the taxon label is according to)

5614 10/18/2012 09:22 AM Aaron Marcuse-Kubitza

schemas/vegbien.ERD.mwb: Moved taxonlabel_relationship to the right of taxonlabel to provide room for taxonlabel to grow

5613 10/17/2012 04:27 PM Aaron Marcuse-Kubitza

Regenerated vegbien.ERD exports

5612 10/17/2012 04:25 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Remapped morphospecies to new taxonlabel.morphospecies per today's conference call

5611 10/17/2012 04:23 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonlabel: Added separate morphospecies field per today's conference call, where it was decided it could not go in taxonepithet (the lowest-rank component of the name)

5610 10/17/2012 04:17 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: Deleted taxonusage table per today's conference call, where it was decided that it was not needed

5609 10/17/2012 04:14 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: Renamed taxonlabel_ancestor to taxonlabel_relationship per today's conference call, where it was decided that it would eventually contain asserted relationships (such as synonym and parent) in addition to autopopulated ancestor relationships

5608 10/17/2012 04:12 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: Renamed taxonconcept to taxonlabel per today's conference call, where it was decided that taxonconcept contained too many unrelated fields to be purely a taxon concept

5607 10/17/2012 04:01 PM Aaron Marcuse-Kubitza

inputs/import.stats.xls: Updated import times

5606 10/17/2012 04:01 PM Aaron Marcuse-Kubitza

inputs/test_taxonomic_names/_scrub/public.sql, TNRS.sql: Regenerated with schema changes

5605 10/17/2012 01:47 PM Aaron Marcuse-Kubitza

schemas/vegbien.ERD.mwb: Fixed lines

5604 10/17/2012 01:45 PM Aaron Marcuse-Kubitza

Regenerated vegbien.ERD exports

5603 10/17/2012 01:44 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept_ancestor: Renamed taxonconcept_id to descendant_id to emphasize the direction of the relationship between the two taxonconcepts

5602 10/17/2012 01:35 PM Aaron Marcuse-Kubitza

schemas/vegbien.ERD.mwb: Added taxonconcept_ancestor to the diagram since it is now a core table for storing taxonomic information

5601 10/17/2012 01:15 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped accordingTo to taxonconcept.creator_id, and have it take the place of identifiedBy when both are present

5600 10/17/2012 01:12 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Remapped people's names split apart into name components in party to new party.fullname, which does not require splitting or make assumptions about the number of people who may be listed in a particular name field and which components of their name(s) are present

5599 10/17/2012 01:02 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: party: Added fullname

5598 10/17/2012 12:55 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added accordingTo

5597 10/17/2012 12:47 PM Aaron Marcuse-Kubitza

inputs/.TNRS/tnrs/map.csv: Mapped Name_matched_url to scientificNameID, since the URL uniquely identifies the matched taxonconcept

5596 10/17/2012 12:43 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Renamed taxonname to taxonepithet for clarity and to be consistent with TCS's use of "epithet" to denote what the taxonname was intended to be (http://www.tdwg.org/standards/117/download/#/UserGuidev_1.3.pdf)

5595 10/17/2012 12:18 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept.creator_id: Documented that this is the concept reference for a taxon concept with an "according to", or the identifier's name for a nominal concept, and is equivalent to "Name sec. x"

5594 10/17/2012 11:50 AM Aaron Marcuse-Kubitza

sql_io.py: import_csv(): Add a row_num column at the beginning of the table, which is autopopulated by csvs.RowNumFilter (it cannot be autopopulated by the serial datatype, because this does not support COPY FROM with a NULL-equivalent value in the serial field). This fixes a bug in csv2db where rows would not stay in inserted order upon querying the table, and would be returned in a different order each query, which prevented LIMIT/OFFSET based subsetting from returning consistent, nonoverlapping results. This occurs because PostgreSQL unfortunately does not return rows in inserted order (or any stable order: "If sorting is not chosen, the rows will be returned in an unspecified order [which] must not be relied on" <http://www.postgresql.org/docs/8.3/static/queries-order.html&gt;), so an explicit ORDER BY is always needed to ensure staging table rows are retrievable in the order they were inserted.

5593 10/17/2012 11:43 AM Aaron Marcuse-Kubitza

csvs.py: Added RowNumFilter, which adds a row # column at the beginning of each row

5592 10/17/2012 11:42 AM Aaron Marcuse-Kubitza

streams.py: LineCountStream, LineCountInputStream: Fixed bug where line_num was 1 too high because it started at 1 and was incremented before each line is returned. It now properly starts at 1, but the initial line_num value is 0 to increment to 1 upon encountering the first line. This off-by-one behavior may have been needed for code that associates an error message with a line #, but such code should add 1 to the line_num to get the line # of the error if the error prevents the next line from being read by the LineCount*Stream.

5591 10/17/2012 11:04 AM Aaron Marcuse-Kubitza

sql_io.py: import_csv(): Take a reader and header rather than a stream to allow callers to pass in a wrapped CSV reader for filtering, etc.

5590 10/17/2012 11:00 AM Aaron Marcuse-Kubitza

sql_io.py: append_csv(): Take a reader and header rather than a stream_info and stream to allow callers to use the simpler csvs.reader_and_header() function. This also allows callers to pass in a wrapped CSV reader for filtering, etc.

5589 10/17/2012 10:44 AM Aaron Marcuse-Kubitza

csv2db, tnrs_db: Removed ProgressInputStream wrapper around input stream, which is no longer needed (and causes overlapping output) now that sql_io.append_csv() prints # rows read

5588 10/17/2012 10:42 AM Aaron Marcuse-Kubitza

sql_io.py: append_csv(): Wrap input stream in a ProgressInputStream that reports rows (rather than lines) read

5587 10/17/2012 10:40 AM Aaron Marcuse-Kubitza

csvs.py: InputRewriter: Use new StreamFilter to translate StopIteration EOF to ''

5586 10/17/2012 10:36 AM Aaron Marcuse-Kubitza

csvs.py: Added StreamFilter

5585 10/17/2012 10:36 AM Aaron Marcuse-Kubitza

csvs.py: InputRewriter: Also support stream inputs which report EOF as '' instead of StopIteration

5584 10/17/2012 09:55 AM Aaron Marcuse-Kubitza

sql_io.py: append_csv(): Removed no longer used INSERT mode, since all callers now use the default COPY FROM

5583 10/17/2012 09:53 AM Aaron Marcuse-Kubitza

sql_io.py: import_csv(): Removed no longer needed manual setting of use_copy_from, which defaults to True in append_csv()

5582 10/17/2012 09:50 AM Aaron Marcuse-Kubitza

csv2db: Removed no longer needed manual setting of use_copy_from, which defaults to True in sql_io.import_csv()

5581 10/17/2012 09:49 AM Aaron Marcuse-Kubitza

csv2db: Removed no longer needed separate handling of sql.DatabaseErrors, because all recoverable errors caused by COPY FROM (EncodingException and ragged rows) are now handled or avoided

5580 10/17/2012 09:46 AM Aaron Marcuse-Kubitza

csv2db: Handle EncodingException separately by changing the connection encoding to LATIN1 and retrying

5579 10/17/2012 09:45 AM Aaron Marcuse-Kubitza

sql.py: DbConn: Added set_encoding()

5578 10/17/2012 09:32 AM Aaron Marcuse-Kubitza

sql_io.py: append_csv(): Parse any exceptions generated by the COPY FROM using new sql.parse_exception()

5577 10/17/2012 09:28 AM Aaron Marcuse-Kubitza

sql.py: run_query(): Factored exception parsing out into new parse_exception()

5576 10/17/2012 09:22 AM Aaron Marcuse-Kubitza

sql.py: Added EncodingException and parse it in run_query()

5575 10/17/2012 09:14 AM Aaron Marcuse-Kubitza

sql.py: Removed no longer used NameException

5574 10/17/2012 09:14 AM Aaron Marcuse-Kubitza

csvs.py: Filter: Added empty close() method to support using it as a stream (such as with streams.ProgressInputStream)

5573 10/17/2012 09:01 AM Aaron Marcuse-Kubitza

sql_io.py: append_csv(): Don't disable COPY FROM for TSVs, which are now supported using csvs.InputRewriter

5572 10/17/2012 08:59 AM Aaron Marcuse-Kubitza

sql_io.py: append_csv(): COPY FROM: Wrap provided stream in standardizing stream to fix ragged rows (with unequal # columns) and nonstandard CSV dialects (such as TSV with \-escaped newlines)

5571 10/17/2012 08:56 AM Aaron Marcuse-Kubitza

csvs.py: Added InputRewriter, which wraps a reader, writing each row back to CSV

5570 10/17/2012 08:54 AM Aaron Marcuse-Kubitza

csvs.py: Added ColCtFilter, which gives all rows the same # columns

5569 10/17/2012 07:25 AM Aaron Marcuse-Kubitza

sql_io.py: row_num_col_def: Changed type to integer so the row_num can be populated directly by the insert process

5568 10/17/2012 07:19 AM Aaron Marcuse-Kubitza

sql_io.py: Added row_num_col_def for use by import_csv(). The row_num column will be necessary again because PostgreSQL unfortunately does not return rows in inserted order (or any stable order: "If sorting is not chosen, the rows will be returned in an unspecified order [which] must not be relied on" <http://www.postgresql.org/docs/8.3/static/queries-order.html&gt;), so an explicit ORDER BY is always needed to ensure staging table rows are retrievable in the order they were inserted.

5567 10/16/2012 10:58 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Removed unit-ambiguous height. Use height_m, height_ft instead.

5566 10/16/2012 10:57 PM Aaron Marcuse-Kubitza

mappings/Veg+-VegCore.csv: Added height

5565 10/16/2012 10:57 PM Aaron Marcuse-Kubitza

mappings/Veg+-VegCore.csv: Added height

5564 10/16/2012 10:52 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Removed no longer used height mapping. Use height_m, height_ft instead.

5563 10/16/2012 10:39 PM Aaron Marcuse-Kubitza

README.TXT: Data import: import_all: Added NCBI backbone to note about import_all not immediately returning control to the shell

5562 10/16/2012 10:30 PM Aaron Marcuse-Kubitza

inputs/FIA/Organism/map.csv: Height: Remapped to height_ft, assuming units based on the range of values, the height of the tallest tree, and location inside the U.S.

5561 10/16/2012 10:23 PM Aaron Marcuse-Kubitza

inputs/FIA/Organism/test.xml.ref: Accepted new inserted row count

5560 10/16/2012 10:01 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped height_ft

5559 10/16/2012 09:58 PM Aaron Marcuse-Kubitza

schemas/functions.sql: Added _ft_to_m()

5558 10/16/2012 09:52 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added height_ft

5557 10/16/2012 09:38 PM Aaron Marcuse-Kubitza

inputs/SALVIAS/stems/map.csv: stem_height_m: Remapped to height_m using units from <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>

5556 10/16/2012 09:37 PM Aaron Marcuse-Kubitza

inputs/SALVIAS-CSV/Organism/map.csv: stem_height_m: Re-sourced units to stem_height_m rather than height_m definition in SALVIAS data dictionary

5555 10/16/2012 09:29 PM Aaron Marcuse-Kubitza

Regenerated vegbien.ERD exports

5554 10/16/2012 09:23 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: taxonconcept_update_ancestors() trigger: Fixed bug where matched_concept_id needed to be changed to NULL when equal to taxonconcept_id, to avoid including the node itself with its parent's ancestors (which would violate the taxonconcept_ancestor pkey)

5553 10/16/2012 09:19 PM Aaron Marcuse-Kubitza

sql_io.py: put_table(): Ensuring into's out_pkey is different from in_pkey: Prepend "out." instead of out_table to avoid long column names for the output pkey

5552 10/16/2012 09:18 PM Aaron Marcuse-Kubitza

sql_gen.py: concat(): Allow multiple "column" suffixes with "." when matching the existing suffix

5551 10/16/2012 08:47 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: taxonconcept_update_ancestors() trigger: Corrected comment explaining why we don't need an ON DELETE trigger to say that this is because the foreign key for taxonconcept_ancestor.ancestor_id, not taxonconcept.parent_id, is ON DELETE CASCADE. The auto-deletion will also occur if taxonconcept.parent_id is ON DELETE CASCADE, because taxonconcept_ancestor.taxonconcept_id is ON DELETE CASCADE, but it is not actually necessary to have cascading deletes on taxonconcept.parent_id (and SET NULL may in fact sometimes be more appropriate).

5550 10/16/2012 08:33 PM Aaron Marcuse-Kubitza

schemas/tree_cross-links.sql: Removed header comments added by pgAdmin

5549 10/16/2012 08:30 PM Aaron Marcuse-Kubitza

schemas/tree_cross-links.sql: Updated for new taxonconcept_update_ancestors() trigger

5548 10/16/2012 08:21 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Rewrote taxonconcept() trigger to avoid completely reinserting the taxonconcept_ancestor entries of all descendants every time taxonconcept changes or using trigger recursion to find descendants. Instead, just delete the old parent's ancestors from and add the new parent's ancestors to each descendant, using taxonconcept_ancestor itself (with the new taxonconcept_ancestor_descendants index) to find all descendants. As an additional optimization, only update taxonconcept_ancestor if the parent_id or matched_concept_id has actually changed. This fixes a bug in NCBI where inserting taxonconcepts out of dependency order caused taxonconcept_ancestor entries to be repeatedly regenerated, slowing the import down to a crawl.

5547 10/16/2012 07:42 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept: Added taxonconcept_3_parent_id_avoid_self_ref() trigger to avoid recursive references in root taxonconcepts (taxonconcepts with no parent). This will simplify the new taxonconcept_update_ancestors() trigger.

5546 10/16/2012 06:32 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: taxonconcept_ancestor: Added taxonconcept_ancestor_descendants index to support looking up all the descendants for a taxonconcept. This will be used by the new taxonconcept_update_ancestors() trigger, which will support inserting taxonconcepts out of dependency order (such as for NCBI).

5545 10/16/2012 04:35 PM Aaron Marcuse-Kubitza

schemas/vegbien.sql: *_update_ancestors(): Made trigger deferred, so that it would run after all rows have been inserted in a bulk insert, such as during column-based import. This ensures that ancestors lists are not populated until all parents are inserted, which may occur out of order for datasources (such as NCBI) whose nodes are not in dependency order. (A node that newly acquires a parent will have to update all its descendants, which will then be updated again when its parent acquires its own parent.)

5544 10/16/2012 04:28 PM Aaron Marcuse-Kubitza

lib/PostgreSQL-MySQL.csv: Also filter out constraint triggers in addition to regular triggers

5543 10/15/2012 05:37 PM Aaron Marcuse-Kubitza

inputs/Madidi/Organism/map.csv: Total height: Remapped to height_m, assuming units based on the range and precision of values

5542 10/15/2012 05:33 PM Aaron Marcuse-Kubitza

inputs/VegBank/stemcount/map.csv: stemheight: Remapped to height_m using units from <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>

5541 10/15/2012 05:29 PM Aaron Marcuse-Kubitza

inputs/SALVIAS/plotObservations/map.csv, inputs/SALVIAS-CSV/Organism/map.csv: height_m, stem_height_m: Remapped to height_m using units from <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>

5540 10/15/2012 05:24 PM Aaron Marcuse-Kubitza

mappings/VegCore-VegBIEN.csv: Mapped height_m

5539 10/15/2012 05:15 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv: Added height_m

5538 10/15/2012 04:20 PM Aaron Marcuse-Kubitza

mappings/VegCore.csv, VegCore-VegBIEN.csv: Removed no longer used and unit-ambiguous organismX, organismY. Use organismX_m, organismY_m instead.

5537 10/15/2012 04:18 PM Aaron Marcuse-Kubitza

inputs/VegBank/stemlocation/map.csv: stemxposition, stemyposition: Remapped to organismX_m/organismY_m using units from <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemlocation&entity=dba_tabledescription&where=where_tablename>

5536 10/15/2012 04:06 PM Aaron Marcuse-Kubitza

inputs/TEAM/*/map.csv: 1ha Plot X Coordinate, 1ha Plot Y Coordinate: Remapped to organismX_m/organismY_m using units from <https://projects.nceas.ucsb.edu/nceas/projects/bien/repository/raw/inputs/TEAM/_src/TEAM-DataPackage-20120920191251_3859/Vegetation+-+Trees+&+Lianas/Vegetation-Tree-and-Liana-Metadata-1.5.pdf>

5535 10/15/2012 03:59 PM Aaron Marcuse-Kubitza

inputs/SALVIAS/plotObservations/map.csv, inputs/SALVIAS-CSV/Organism/map.csv: x_position, y_position: Remapped to organismX_m/organismY_m using units from <http://salvias.net/Documents/salvias_data_dictionary.html#Plot+data>

5534 10/15/2012 03:51 PM Aaron Marcuse-Kubitza

inputs/Madidi/Organism/map.csv: Subplot X, Subplot Y: Remapped to organismX_m/organismY_m, assuming units based on the size of values relative to the plot area, which has units of ha

5533 10/15/2012 03:44 PM Aaron Marcuse-Kubitza

inputs/CTFS/StemObservation/map.csv: x, y: Remapped to organismX_m/organismY_m, assuming units based on the size of values relative to plot area, which has units of ha