Top Banner
Presented at Drupal WA Meetup, 2/10/2012 GAIA RESOURCES Waminals Species Databases, Mungeing, Maps and Drupal Kehan Harman Gaia Resources Andrew Rowe, Morgan Strong Western Australian Museum
24
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Waminals Project

Presented at Drupal WA Meetup, 2/10/2012

GAIA RESOURCES

WaminalsSpecies Databases, Mungeing, Maps and Drupal

Kehan HarmanGaia Resources

Andrew Rowe, Morgan StrongWestern Australian Museum

Page 2: The Waminals Project

OVERVIEW● What do we have?● What do we want?● How do we get it?

Page 3: The Waminals Project

WHAT DO WE HAVE?● Collections

Page 4: The Waminals Project

WHAT DO WE HAVE?● Data(bases)

Page 5: The Waminals Project

WHAT DO WE HAVE?

● Just like children● Started out similar but grew up to be

totally different

Page 6: The Waminals Project

WHAT DO WE HAVE?● Consultants● Curators● Knowledge

Page 7: The Waminals Project

WHAT DO WE WANT?● Data Available

● To the right people

● Updated regularly● Maps

● Related Species

● Be able to identify species

● Minimise duplication of effort

Page 8: The Waminals Project

HOW DO WE GET IT?● Data exchange format

● DarwinCore– DublinCore for biology

● Global Initialitves

● Data Mungeing● Pentaho Data

Integration● http://kettle.pentaho.com

Page 9: The Waminals Project

Munge Munge Munge● Google Refine?● Pentaho

● Connect to SQL Server

● Transformations● Validations

Page 10: The Waminals Project

Munge Munge Munge● Google Refine?● Pentaho

● Connect to SQL Server

● Transformations● Validations

Page 11: The Waminals Project

HOW DO WE GET IT?● Drupal Modules

● Core

– Fields

● Contrib

– Drush, drush, drush

– Features

– Migrate

– Geofield

– Openlayers

– Views

– Rules

– Flag

– Display Suite

Page 12: The Waminals Project

ID Tool● Species Profiles in

a node type● Attribute field

● (hook_field_info)– Field Name– Field Value

Page 13: The Waminals Project

Adding Value● Collection is

dynamic● Identifications

change● Names change

● Curators check identifications

● Correct where necessary

Page 14: The Waminals Project

Adding Value● Node type for

specimens● Taxonomy for

names

● Geofield to store spatial data● http://drupal.org/

project/geofield

Page 15: The Waminals Project

Migrations● Base class to define

a migration● Run Pentaho

– exec();

– escapeshellcmd();

● Import Names● Import Specimens

Page 16: The Waminals Project

Migrations● Dynamic Migration

● Extend DynamicMigration● MigrationBase::registerMigration();

Page 17: The Waminals Project

Migrations● Gotchas

● modulename.info– files[]=my_custom

_migration.inc● Don't believe

everything you find in a database– Eg Date Changed

● Feeds?● Migrate more

flexible vs● Store hash of

data

Page 18: The Waminals Project

OpenLayers● Customisable map layers

● Google● OpenStreetMap● Mapbox● http://drupal.org/project/

openlayers

Page 19: The Waminals Project

OpenLayers● Map

● Center & Bounds● Layers & Styles

– External Sources– Data in the site

● Behaviors– Popup– Geolocation– Draw

● Gotchas● Define a map per

view● Expose view's output

in that map

● Try MapBox & TileMill● developmentseed

Page 20: The Waminals Project
Page 21: The Waminals Project
Page 22: The Waminals Project

● Views Hacks● Flag● Custom module

Page 23: The Waminals Project

ConclusionsDrupal ready for spatial data? Yes

Do I like the Migrate module? Yes

Do I like Pentaho? Yes

Did I have any trouble?

What's my favourite module? Features

Or maybe drush

Or maybe views

~$ drush fe waminals node:species_factsheet taxonomy:taxon_name views_view:waminals* dependencies:openlayers

~$ git diff~$ git commit~$ git push

Page 24: The Waminals Project

QUESTIONS?● If you want to know more, please contact me

● Blog article coming

[email protected]

@kehan

● Web site:

www.gaiaresources.com.au