Archive for the ‘Applications’ Category

Backup Specify 6 using Windows Scheduler (Part 1)

Friday, January 27th, 2012

Sometimes it is nice to know your Scientific Collection is safe. And yes Specify asks you to back up your system but wouldn’t be great if you can have the machine do it automatically, say every Friday night. Well here are a few tips to get a batch in place that does just that. This guide is for Windows only.

Step 1 is to make a folder (example: c:\_specify_backup\) on your same computer. This has to be on the same computer that is running the mysql specify server. We are assuming this machine is running Windows.

Step 2 you will need to make a “specify_backup.bat” in that folder and edit it using notepad. I will use { } to fill in your own information here. C:\_specify_backup can be changed to any folder name you made in step 1. Now paste and modify the code as needed to match your connection information. Note that this is not your Specify connection but your mysql db connection information.

mysqldump {specify_database_you_want_to_backup} -u {db_user_with_permission} -p{user_pass} > C:\_specify_backup\specify6_{collectioncode}_%date:~-4%%date:~-7,2%%date:~-7,2%.sql
c:\_specify_backup\gzip.exe C:\_specify_backup\specify6_{collectioncode}_%date:~-4%%date:~-7,2%%date:~-7,2%.sql

Step 3 is to go to the GZip website (http://www.gzip.org/#exe) and download http://www.gzip.org/gzip124xN.zip and move the gzip.exe into the same specify backup folder. So now you should have the specify_backup.bat and gzip.exe files in your folder.

Step 4, lets test that it is working by going to Dos and running the .bat. To do this you can go to Start > Run and type “cmd” and a black dos window should open. You will need to type:

cd C:\_specify_backup\
specify_backup.bat

If all the connection information was correct you should see a specify_{collectioncode}_year_month_day.gz file. This is a compressed zip file containing your database.

Step 5 go ahead and delete this file using “My Computer” or any other way you normally would know how to delete a file. In dos it is “rm {filename}”.

Step 6 go to Start and search for “Scheduler” and you should see Task Scheduler. Click that and go to the next step.

Step 7 you need to click the “Task Schedule Library” then click “Create Task…”

Now fill in the information:
General > Name: Specify 6 Backup
General > Description: Creates weekly backup for Specify 6 databases.
Check “Run whether user is logged in or not”
Check “Run with highest privileges”
Triggers > New… >
Check: Weekly, Friday and change the time to 22:00 (to run at 10pm every Friday)

Actions > New… > Program Script: C:\_specify_backup\specify_backup.bat
Click ok and you should see a new task in your “Task Schedule”.

If you did everything correctly you should see a backup of you database right after 10pm every Friday. Since each file keeps the date in the name you will be able to keep all the weekly backups. If you see that your file is 0 in filesize then something probably did not work correctly with the connection.

In “Part 2” to of this blog we will address how to add another Scheduled Task to send these backups to an online FTP location for offsite storage. QuickTip: If you use Dropbox (https://www.dropbox.com/) you can change the mysqldump path to point to a dropbox folder and it will automatically get synchronized and backed up using the Dropbox service. Note: If you make that folder public then anyone will be able to download your Specify backups which may or may not be a good thing. Also note that you are storing a user/password to connect to mysql on your machine which may produce some risks. It might be advised to consult with your IT department to have a special user that restricts this connection only to your collection db only.

Any questions or comments feel free to send me an email at mikegiddens (at) silverbiology.com

Static Maps for CartoDB

Monday, January 23rd, 2012

CartoDB (http://www.cartodb.com) has and will be a big game changer for 2012.  One thing it is great at  making are tiled, interactive maps for the web.  One of the important things with the projects we work on here at SilverBiology is being able to produce a single image of those tiles to be used with non interactive and offline projects.  And so we decided to write our own PHP static map program.


Git Hub Project: https://github.com/silverbiology/cartodb-staticmap-php

World map tiles are broken down into individual 256 pixel images called tiles.  The closer you get to the surface of the earth the more tiles (higher level of detail) exists.  Most online mapping engines, including CartoDB work in this manner.  What we have done is to take those generated tiles and reassemble them so that the end result is one single image of only what you want to see.

Our CartoDB static map program focuses on two techniques.  The first is what we call viewport mode.  In this mode we take two lat/lng points to form a geospatial box.  In this mode you can make use of any of the CartoDB features as you would when using their interface.  Two examples are shown below.  The first is only the tile cells joined together where the two points are found.  In this case you will find extra white space but should overlap with matching Google tiles.  The second example is having the image trimmed to the exact lat/lng pixels on those tile images.

One with trimming.

The second method that is most common is to select a single lat/lng point and center an image based on a zoom resolution and a width and height.  An example looks something like this.

The idea behind creating this project was to allow us to easily combine and generate a static image in real time or to write a script that would make use of this class to cache a set of images. CartoDB Static Maps works both as a image URL, as a included PHP class in your project, or directly from the command line interface on your server.  Some practical uses cases would be to:

  • Generate Static Distribution Maps
  • “Save as” feature from an interactive map
  • Generate images for downloading images of maps
  • Offline support

We hope others can make use of our work with this static map project and encourage you to help participate in making it better.  If you would like to contribute on this project please contact mikegiddens (at) silverbiology.com

Amazon EC2 + Tesseract + OCR = Thank You!

Thursday, March 10th, 2011

This day I took on the challenge of setting up a Amazon Micro (Free Tier) machine to run a simple web service for OCR using Tesseract (http://code.google.com/p/tesseract-ocr/).

There is a default web service setup with params:

img: uri to the jpg image that you want to transform
callback:
used for crossdomain services
format: deafults to json but you can also supply txt to get just raw text

To build a machine you can follow these steps or if you are interested in the image let us know and I will contact you with more information.

(more…)

SilverBiology Open Source Views & Policies

Tuesday, November 30th, 2010

We have been asked a few time recently about why we make license base software and what our views are on open source software.  So we decided to make a little video answering some of these questions.  The short answer is we do make open source software but not always under our name since it is normally funded by other organizations.  We make license based software to support a sustainable business model to development and support current and future projects. So each license is a portion of the funding needed to develop each application.  So the more user base we have the more the software will be improve.

SilverImage Overview

Friday, November 12th, 2010

With the Advancing Digitization of Biological Collections (ADBC) around the corner we thought it would be good to explain how to image a herbarium collection using a copy station and silver image.  If you are interested in learning more visit our product page or contact us directly.

HelpingScience Newsletter, March 2010

Tuesday, March 23rd, 2010

In this Issue:

  • Collections currently providing images
  • Where we are with the software
  • New this month
  • What are our plans for April
  • Summer Imaging Tour

Since our public announcement at TDWG 2009 we have had the chance to talk with a number of large and small collections interested in this method and technology for processing herbarium label images.  It is our goal to implement an international service that can help all herbaria.

(more…)

Nomina V Recap

Monday, August 24th, 2009

Another session of Nomina has been concluded.  EOL was nice enough to again host this workshop at the Marine Biological Laboratory in Woods Hole.  This time the focus was on methods for reconciling heterogeneous taxonomic data.  The group this time was made up of myself from SilverBiology, GBif, EOL, and Atlas of Living Australia (ALA).

(more…)

Nomina IV Recap

Thursday, June 4th, 2009

Last week was the fourth gathering for Nomina.  These meetings have been created by EOL & GBIF in collaboration with BHL (Biodiverstiy Heritage Library).  The goal for this meeting was to improve Taxonomic Name Recognition, discover the tools and algorithms that are currently being used and how to merge and improve what we are currently doing to make things faster and better.  With over 35,000 books and more then 14 million scientific pages from the BHL it is important to provide the most accurate tools to help discover information from the past.

The workspace used for this meeting includes links to web applications, source code, shared dictionaries, test files, and other useful resources for those in need of tools and services for finding, parsing, and processing taxonomic names. http://code.google.com/p/taxon-name-processing

The meeting was very productive and as changes and improvements are made to the individual projects the overall goals will be one step closer.

SilverBiology’s purpose at this meeting was to demonstrate and see how our TAXAMATCH web service can be used with fuzzy matching on scientific names that are misspelled.  Our goal is to implement this with the Global Names Index (globalnames.org) and GBIF’s species checklist.  These will be public web services so anyone can use to search for scientific names.

TAXAMATCH was originally developed by Tony Rees at OBIS and developed in PL/SQL.  Our open source version is a PHP/MySql implementation of the algorithm with a few additional configurations.  To learn more about Tony’s project and the continuation of our project just follow the links below.

Original TAXAMATCH: http://www.cmar.csiro.au/datacentre/taxamatch.htm
Our web service version: http://taxamatch.silverbiology.com (IN DEVELOPMENT)

If you would like to see more about the past Nomina workshops you can find them here:

Nomina 4: http://hickory.eol.org:8081/display/public/Nomina+IV
Nomina 2: http://blog.eol.org/2008/04/24/nomina-2-workshop-succeeded

County Lookup by Coordinates (Lat/Lng)

Monday, January 26th, 2009

Have you ever been doing field research, had your GPS, and searched for a locality or species? Well, what happens when you find and record the coordinates then later have no idea which county you where in?

(more…)

Visualization of the Biodiversity Collection Index

Sunday, January 4th, 2009

Ever wanted to know where all the historical plants are stored? How about bugs, insects, spiders, butterflies, or fish? Well with the help of Biodiversity Collection Index (BCI) and their wonderful resources of information we are finally able to get a true interactive visualization of how our world is collected and where that information is housed.

Visit the Interactive Map (http://labs.silverbiology.com/biocol)

Research into biodiversity relies on the use of specimens. These specimens are held in reference collections around the world. BCI is a central index to these collections. With the help of BCI’s Web Services, SilverBiology was able to use its new open source web tool SilverMapper to easily map the location of these collections.

This data source is directly based on the data from the Biodiversity Collection Index (BCI) and all geospatial data is estimated on Google Maps reverse geocoding service to establish a latitude and longitude.

Why did we do this?

We wanted to show a real world example of our new program SilverMapper and at the same time provide something useful for the community. Comments and suggestions are welcome.  I would also like to thank Roger Hyam for all his hard work over at the Royal Botanic Garden in Edinburgh for really bringing the Biodiversity Collection Index together.  I hope this little demonstration will encourage collection managers to update their information with the exact latitude and longitude position at BCI to help provide the precise location of where people can find their collection.