News
Tuesday
May062014

How much rock was erupted from Mt St Helens?

One of the reasons we struggle when learning a new skill is not necessarily because this thing is inherently hard, or that we are dim. We just don't yet have enough context for all the connecting ideas to, well, connect. With this in mind I wrote this introductory demo for my Creative Geocomputing class, and tried it out in the garage attached to START Houston, when we ran the course there a few weeks ago.

I walked through the process of transforming USGS text files to data graphics. The motivation was to try to answer the question: How much rock was erupted from Mount St Helens?

This gorgeous data set can be reworked to serve a lot of programming and data manipulation practice, and just have fun solving problems. My goal was to maintain a coherent stream of instructions, especially for folks who have never written a line of code before. The challenge, I found, is anticipating when words, phrases, and syntax are being heard like a foriegn language (as indeed they are), and to cope by augmenting with spoken narrative.

Text file to 3D plot

To start, we'll import a code library called NumPy that's great for crunching numbers, and we'll abbreviate it with the nickname np:

>>> import numpy as np

Then we can use one of its functions to load the text file into an array we'll call data:

>>> data = np.loadtxt('z_after.txt')

The variable data is a 2-dimensional array (matrix) of numbers. It has an attribute that we can call upon, called shape, that holds the number of elements it has in each dimension,

>>> data.shape
(1370, 949)

If we want to make a plot of this data, we might want to take a look at the range of the elements in the array, we can call the peak-to-peak method on data,

>>> data.ptp()
41134.0

Whoa, something's not right, there's not a surface on earth that has a min to max elevation that large. Let's dig a little deeper. The highest point on the surface is,

>>> np.amax(data)
8367.0

Which looks to the adequately trained eye like a reasonable elevation value with units of feet. Let's look at the minimum value of the array,

>>> np.amin(data)
-32767.0 

OK, here's the problem. GIS people might recognize this as a null value for elevation data, but since we aren't assuming any knowledge of GIS formats and data standards, we can simply replace the values in the array with not-a-number (NaN), so they won't contaminate our plot.

>>> data[data==-32767.0] = np.nan

To view this surface in 3D we can import the mlab module from Mayavi

>>> from mayavi import mlab

Finally we call the surface function from mlab, and pass the input data, and a colormap keyword to activate a geographically inspired colormap, and a vertical scale coefficient.

>>> mlab.surf(data,
              colormap='gist_earth',
              warp_scale=0.05)

After applying the same procedure to the pre-eruption digits, we're ready to do some calculations and visualize the result to reveal the output and its fascinating characteristics. Read more in the IPython Notebook.

If this 10 minute introduction is compelling and you'd like to learn how to wrangle data like this, sign up for the two-day version of this course next week in Calgary. 

Eventbrite - Agile Geocomputing

Wednesday
Apr302014

April linkfest

It's time for our regular linkfest!

There's a new book in town... Rob Simm and Mike Bacon have put together a great-looking text on seismic amplitude intepretation (Cambridge, 2014). Mine hasn't arrived yet, so I can't say much more — for now, you can preview it in Google Books. I should add it to my list.

Staying with new literature, I started editing a new column in SEG's magazine The Leading Edge in February. I wrote about the first instalment, and now the second is out, courtesy of Leo Uieda — check out his tutorial on Euler deconvolution, complete with code. Next up is Evan with a look at synthetics.

On a related note, Matteo Niccoli just put up a great blog post on his awesome perceptual colourmaps, showing how to port them to matplotlib, the MATLAB-like plotting environment lots of people use with the Python programming language. 

Dolf Seilacher, the German ichnologist and palaeontologist, died 4 days ago at the age of 89. For me at least, his name is associated with the mysterious trace fossil Palaeodictyon — easily one of the weirdest things on earth (right). 

Geoscience mysteries just got a little easier to solve. As I mentioned the other day, there's a new place on the Internet for geoscientists to ask questions and help each other out. Stack Exchange, the epic Q&A site, has a new Earth Science site — check out this tricky question about hydrocarbon generation.

And finally, who would have thought that waiting 13 years for a drop of bitumen could be an anticlimax? But in the end, the long (if not eagerly) awaited 9th drop in the University of Queensland's epic experiment just didn't have far enough to fall...

If you can't get enough of this, you can wait for the 10th drop here. Or check back here in 2027.

Thursday
Apr242014

A culture of asking questions

When I worked at ConocoPhillips, I was quite involved in their knowledge sharing efforts (and I still am). The most important part of the online component is a set of 100 or so open discussion forums. These are much like the ones you find all over the Internet (indeed, they're a big part of what made the Internet what it is — many of us remember Usenet, now Google Groups). But they're better because they're highly relevant, well moderated, and free of trolls. They are an important part of an 'asking' culture, which is an essential prerequisite for a learning organization

Stack Exchange is awesome

Today, the Q&A site I use most is Stack Overflow. I read something on it almost every day. This is the place to get questions about programming answered fast. It is one of over 100 sites at Stack Exchange, all excellent — readers might especially like the GIS Stack Exchange. These are not your normal forums... Fields medallist Tim Gowers recognizes Math Overflow as an important research tool. The guy has a blog. He is awesome.

What's so great about the Stack Exchange family? A few things:

  • A simple system of up- and down-voting questions and answers that ensures good ones are easy to find.
  • A transparent system of user reputation that reflects engagement and expertise, and is not easy to game. 
  • A well defined path from proposal, to garnering support, to private testing, to public testing, to launch.
  • Like good waiters, the moderators keep a very low profile. I rarely notice them. 
  • There are lots of people there! This always helps.

The new site for earth science

The exciting news is that, two years after being proposed in Area 51, the Earth Science site has reached the minimum commitment, spent a week in beta, and is now open to all. What happens next is up to us — the community of geoscientists that want a well-run, well-populated place to ask and answer scientific questions.

You can sign in instantly with your Google or Facebook credentials. So go and take a look... Then take a deep breath and help someone. 

Tuesday
Apr222014

Private public data

Our recent trip to the AAPG Annual Convention in Houston was much enhanced by meeting some inspiring geoscientist–programmers. People like...

  • Our old friend Jacob Foshee hung out with us and built his customary awesomeness.
  • Wassim Benhallam, at the University of Utah, came to our Rock Hack and impressed everyone with his knowledge of clustering algorithms, and sedimentary geology.
  • Sebastian Good, of Palladium Consulting, is full of beans and big ideas — and is a much more accomplished programmer than most of us will ever be. If you're coding geoscience, you'll like his blog.
  • We had a laugh with Nick Thompson from Schlumberger, who we bumped into at a 100% geeky meet-up for Python programmers interested in web sockets. I cannot explain why we were there.

Perhaps the most animated person we met was Ted Kernan (right). A recent graduate of Colorado School of Mines, Ted has taught himself PHP, one of the most prevalent programming languages on the web (WordPress, Joomla, and MediaWiki are written in PHP). He's also up on all the important bits of web tech, like hosting, and HTML frameworks.

But the really cool thing is what he's built: a search utility for public well data in the United States. You can go and check it out at publicwelldata.com — and if you like it, let Ted know!

Actually, that's not even the really cool thing. The really cool thing is how passionate he is about exposing this important public resource, and making it discoverable and accessible. He highlights the stark difference between Colorado's easy access to digital well data, complete with well logs, and the sorry state of affairs in North Dakota, where he can't even get his app in to read well names. 'Public data' can no longer mean "we'll sell you a paper printout for $40". It belongs on the web — machines can read too.

More than just wells

There's so much potential power here — not only for human geoscientists looking for well data, but also for geoscientist–programmers building tools that need well data. For example, I imagine being able to point modelr.io at any public well to grab its curves and make a quick synthetic. Ready access to open services like Ted's will free subsurface software from the deadweight of corporate databases filled with years of junk, and make us all a bit more nimble. 

We'll be discussing open data, and openness in general, at the Openness Unsession in Calgary on the afternoon of 12 May — part of GeoConvention 2014. Join us!

Monday
Apr142014

Can openness make us better? Help us find out!

Last year's Unsolved Problems Unsession (above) identified two openness issues — Less secrecy, more sharing and Free the data — as the greatest unsolved problems in our community. This year, we'll dig into that problem. Here's the blurb:

At the Unsolved Problems Unsession last year, this community established that Too much secrecy is one of the top unsolved problems in our industry. This year, we will dig into this problem, and ask what kind of opportunities solving it could create. What forces cause closedness to persist? What are the advantages of being more open? Where is change happening today? Where can we effect change next?

We offer no agenda, no experts, no talks, and no answers. This is an open space for everyone to come and be their best and brightest self. So bring it.

GeoConvention Monday 12 May, afternoon in Telus 108 (ground floor on the north side)

No experts? No answers? What on earth are we up to? Well, we think bringing questions to a group of engaged professionals is more fun than bringing answers. The idea is to talk about our greatest aspirations for our discipline, and how we can find out if greater transparency and openness can help us achieve them.

If you know someone else who would enjoy this, please tell them about it or bring them along. I hope we see you there on 12 May!

Page 1 ... 5 6 7 8 9 ... 83 Next 5 Entries »