« October 2009 | Main | December 2009 »

November 25, 2009

Creating a final version of the UMBS bibliography

Here's a laundry list of things that need to happen in order to get the UMBS bibliography into a final version that will be meticulously maintained and updated:

- Meet with Melissa Gomis/ Laurie Sutch of the UM library to address the following:

- What are the pro's and con's of different software options? EndNote,
Refworks, a relational database built from scratch.

- How to guard against loss of information when transferring between
tagging formats (e.g., EndNote to RIS)?

- Other best practices to implement to protect the integrity of the
bibliography as it grows?

Other points to address:
- Need to develop a final version of Gazetteer where the exact spelling is noted.
- Then adjust the Gaz locations in the Bibliography to match exactly.
- Gaz locations in Bibliography will be moved to Research notes (Field %< in Endnote, RN in RIS)

- Remove reference to any Procite Fields
- What is "ProCite Field [11]"? Usually has an "e" or "f" and is called "Title" inside ProCite software.

- Add Accession Numbers with pattern umbs.x (where 'x' is a unique, incremented number: umbs.1, umbs.2, umbs.3)

- Remove Short Title (%! in EndNote, ST in RIS) if it exactly matches Title (%T/TI)
- Remove Date (%8/DA) if it exactly matches Year (%D/PY)
- Add any articles Bob has added to his version of the Bibliography
- Place a copy of the Final version of the Bibliography onto DeepBlue
- Maintain ONE working copy, store it on the department space so it is accessible to Bob and Kyle

- Go to UMBS to meet with Bob and hammer out the approximately 50 entrees that are still unresolved. Also add any entrees that Bob has added to his version since August.

Posted by kkwaiser at 10:57 AM | Comments (0)

November 17, 2009

Format Water Profile Data

This is the code I'm using to format some of our water quality data. It was in an Excel workbook where it occupied 132 worksheets. Once I am done it will be in 5 .csv files (1 file per variable.)

Cool things to notice with this R code is the dateTimeToStr() translates the Excel date/time value to an actual date/time value.

It also took me a while to figure out the as.numeric(levels())[as.integer()] line which was necessary because R was reading the data in as a Factor rather than Numerically.

# To run from the R Console command line:
# source("C:/workspace/web/data/rScripts/welchProfilesPh.r")


dir = "C:/workspace/web/data/"
input = "welchsfbprofiles.xls"
output = "pH_Profile_Douglas.csv"

cNames <- paste("pH_", paste(0:21, "m", sep=""), sep="")

d<-matrix(nrow=133, ncol= 23 )
d[1,1] <- "Date"
d[1,2:23]<- cNames

for (i in 1:132) {

     dset = read.xls(paste(dir, input, sep=""), colNames = TRUE, sheet = i, dateTimeAs = "numeric")

     d[i+1,1] <- dateTimeToStr(dset[1,2])
     # This link is where the following code came from.
    & d[i+1,2:23] <-as.numeric(levels(dset[4:25,3]))[as.integer(dset[4:25,3])]


write.table(d, file=paste(dir, output, sep=""), sep=",", col.names = FALSE, row.names = FALSE, quote = FALSE)

Posted by kkwaiser at 02:19 PM | Comments (0)

November 16, 2009

Work with Excel sheets in R

Documentation of the mundane follows...

I am going to reformat one of our larger datasets, the Welch-Eggleton limnological dataset for South Fishtail Bay that spans from 1913-1950 with temperature, dissolved oxygen and more variables measured.

Good things to know thus far:

Using the R stats package, the xlsReadWrite package can import the worksheets from an Excel file. Use the read.xls command.

The dataTimeToStr routine documented here is useful for getting the Excel date/time number (4970??) into an actual date. Another reason not to use Excel, you need a special function to read dates.

Also, I am using Notepad++ to write scripts and downloaded this .exe file to tell Notepad++ about the R syntax.

Posted by kkwaiser at 03:45 PM | Comments (0)

November 03, 2009

Study sites of the UMBS

The University of Michigan Biological Station has conducted study in a whole host of locations. Here's a quick map of 529 of these sites from the gazetteer developed by Bob Vande Kopple, our Resident Biologist.

leaf graphic
(Right Click > View image for full size.)

Posted by kkwaiser at 04:43 PM | Comments (0)

November 02, 2009

Import a Content Type in Drupal 6

One of the advantages of Drupal is the ease with which you can avoid reinventing the wheel. For example, the LTER folks have created the following Content Types in Drupal:

Data Set - Title, abstracts, geo-temporal references are all part of the basics of a metadata collection
Data File - links to a csv/txt file and includes basic header information
Variable - describes the unites of measurement behind a Data File
Person - Name, contact info, etc.
Research Sites - Places where research is done
Research Project - with project title and abstract

Things to consider:

You can only import fields that do not already exist.

You need the Content Copy module in CCK. Go to Administer > Site Building > Modules > CCK > Click Content Copy > Save. See this entry for more on adding a module.

1) Administer > Content Management > Content Types > Import

2) Content Type: Create Content

3) Copy contents from the exported Content Type you received from your benefactor into the text square and press import.

4) Fail!

leaf graphic
(Right Click > View image for full size.)

The import did not go through because I did not have all of the correct Modules enabled. Note, if the sharing of custom content types is to become widespread we will need sufficient module documentation.

Enable FieldGroup under the CCK Module and reimport:

leaf graphic

5) Go to Administer > Content Management > Content Types to view the Data Set content type. It is there but I'm missing some fields because I don't have all of the modules enabled.

leaf graphic

To fix:
Administer > Site Building > Modules > Date/Time > Date Popup > Save

Posted by kkwaiser at 01:02 PM | Comments (0)