Mining innovation

by Jelena Markov and Tom Horrocks

Jelena is a postgraduate student and Tom is a research assistant at the University of Western Australia, Perth. They competed in the recent RIIT Unearthed hackathon, and kindly offered to tell us all about it. Thank you, Jelena and Tom!


Two weeks ago Perth coworking space Spacecubed hosted a unique 54-hour-long hackathon focused on the mining industry. Most innovations in the mining industry are the result of long-term strategic planning in big mining companies, or collaboration with university groups. In contrast, the Unearthed hackathon provided different perspectives on problems in the mining domain by giving 'outsiders' a chance to work on industry problems.

The event attracted web-designers, software developers, data gurus, and few geology and geophysics geeks, all of whom worked together on data — both open and proprietary from the Western Australian Government and industry respectively — to deliver time-constrained solutions to problems in the mining domain. There were around 100 competitors divided into 18 teams, but just one underlying question: can web-designers and software developers create solutions that compete, on an innovative level, with those from the R&D divisions of mining companies? Well, according to panel of mining executives and entrepreneurs, they can.

Safe, seamless shutdown

The majority of the teams chose to work on logistic problems in mining production. For example, the Stockphiles worked on a Rio Tinto problem about how to efficiently and safely shut down equipment without majorly disturbing the overall system. Their solution used Directed Acyclic Graphs as the basis for an interactive web-based interface that visualised the impacted parts of the system. Outside of the mining production domain, however, two teams tackled problems focused on geology and geophysics...

Geoscience hacking

The team Ultramafia used augmented reality and cloud-based analysis to visualize geological mapping, with the underlying theme of the smartphone replacing the geological hammer, and also the boring task of joint logging!

The other team in this domain — and the team we were part of — was 50 Grades of Shale...

The team consisted of three PhD students and three staff members from the Centre for Exploration Targeting at the UWA. We created an app for real-time downhole petrophysical data analysis — dubbed Wireline Spelunker — that automatically classifies lithology types from wireline logs and correlates user-selected log segments across the drill holes. We used some public libraries for machine learning and signal analysis algorithms, and within 54 hours the team had implemented a workflow and interface, using data from the government database.

The boulder detection problem

The first prize, a 1 oz gold medal, was awarded to Applied Mathematics, who came up with an extraordinary use of accelerometers. They worked on Rio Tinto's 'boulder detection' problem — early detection of a large rocks loaded into mining trucks in order to prevent crusher malfunctions later in the process, which could ultimately cost $250,000 per hour in lost revenue. The team's solution was to detect large boulders by measuring the truck's vibrations during loading.

Second and third prizes went to Pit IQ and The Froys respectively. Both teams worked on data visualization problems on the mine site, and came up with interactive mobile dashboards.

A new role for Perth?

Besides having a chance to tackle problems that are costing the mining industry millions of dollars a year, this event has demonstrated that Perth is not just a mining hub but also has potential for something else.

This potential is recognized by event organizers Resources Innovation through Information Technology — Zane, Justin, Paul, and Kevin. They see potential in Perth as a centre for tech start-ups focused on the resource industry. Evidently, the potential is huge.

Follow Jelena on Twitter

Free the (seismic) data!

Yesterday afternoon Evan and I hosted the second unsession at the GeoConvention in Calgary. After last year exposing 'Free the data' as one of the unsolved problems in subsurface geoscience, we elected to explore this idea further. And we're addicted to this kind of guided, recorded conversation.

Attendance was a little thin, but those who came spent the afternoon deep in conversation about open data, open software, and greater industry transparency. And we unearthed an exciting and potentially epic conclusion that I hope leads to a small revolution.

What happened?

Rather than leaving the floor completely open, we again brought some structure to the proceedings. I'll post the full version to the wiki page, but here's the overview:

  1. Group seismic interpretation: 5 interpreters in 5 minutes.
  2. Stories about openness: which of 26 short stories resonate with you most?
  3. Open/closed, accessible/inaccessible: a scorecard for petroleum geoscience.
  4. Where are the opportunities? What should we move from closed to open?

As you might expect, the last part was the real point. We wanted to find some high-value areas to poke, or at least gather evidence around. And one area—one data type—was identified as being (a) closed and inaccessible in Canada and (b) much more impactful if it were open and accessible. I gave the punchline away in the title, but that data type is seismic data.

Open, public seismic data is much too juicy a topic to do justice to in this post, so stay tuned for a review of some the specifics of how that conversation went. Meanwhile, imagine a world with free, public seismic data...

Reflections on the 2nd edition

The afternoon went well, and the outcome was intriguing, but we were definitely disappointed by the turnout. We have multiple working hypotheses about it...

  • There may not be a strong appetite for this sort of session, especially on a 'soft' topic. Next time: seismic resolution?
  • The first day might not be the best time for it, because people are still in the mood for talks. Next time: Wednesday morning?
  • The programme maybe didn't reflect what the unsession was about, and the time was unclear. Next time: More visibility.
  • Three hours may be too much to ask from people, though you could say the same about any other session here.

We'd love to hear your thoughts too... Are we barking up completely the wrong tree? Does our community even want to have these conversations? Should we try again in 2015?

Looking forward to #GeoCon14

Agile is off to Calgary on Sunday. We have three things on our List of Thing To Do: 

  1. We're hosting another Unsession on Monday... If you're in Calgary, please come along! It's just like any other session at the conference, only a bit more awesome.
  2. We'll be blogging from GeoConvention 2014. If there's a talk you'd like to send us to, we take requests! Just drop us a line or tweet at us!
  3. Evan is teaching his Creative Geocomputing class. Interested? There are still places. A transformative experience, or your money back.

What's hot at GeoCon14

Here's a run-down of what we're looking forward to catching:

  • Monday: Maybe it's just me, but I always find seismic acquisition talks stimulating. In the afternoon, the Unsession is the place to be. Not Marco Perez's probably awesome talk about brittleness and stress. Definitely not. 
  • Tuesday: If it wasn't for the fear of thrombosis, it'd be tempting to go to Glen 206 and stay in Log Analysis sessions all day. In the afternoon, the conference is trying something new and interesting — Jen Russel-Houston (a bright spark if ever there was one) is hosting a PechaKucha — lightning versions of the best of GeoConvention 2013. 
  • Wednesday: This year's conference is unusually promising, because there is yet another session being given over to 'something different' — two actually. A career-focused track will run all day in Macleod D, called (slightly weirdly) ‘On Belay’: FOCUSing on the Climb that is a Career in Geoscience. Outside of that, I'd head for the Core Analysis sessions.
  • Friday: We won't be there this year, but the Core Conference is always worth going to. I haven't been to anything like it at any other conference. It's open on Thursday too, but go on the Friday for the barbeque (tix required).

The GeoConvention is always a good conference. It surprises me how few geoscientists come from outside of Canada to this event. Adventurous geophysicists especially should consider trying it one year — Calgary is really the epicentre of seismic geophysics, and perhaps of petrophysics too.

And the ski hills are still open.

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

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!

Hacking logs

Over the weekend, 6 intrepid geologist-geeks gathered in a coworking space in the East Downtown area of Houston. With only six people, I wasn't sure we could generate the same kind of creative buzz we had at the geophysics hackathon last September. But sitting with other geoscientists and solving problems with code works at any scale. 

The theme of the event was 'Doing cool things with log data'. There were no formal teams and no judging round. Nonetheless, some paired up in loose alliances, according to their interests. Here's a taste of what we got done in 2 days...

Multi-scale display

Jacob Foshee and Ben Bougher worked on some JavaScript to display logs with the sort of adaptive scrolling feature you often see on finance sites for displaying time series. The challenge was to display not just one log with its zoomed version, but multiple logs at multiple scales — and ideally core photos too. They got the multiple logs, though not yet at multiple scales, and they got the core photo. The example (right) shows some real logs from Panuke, a real core photo from the McMurray, and a fake synthetic seismogram. 

Click on the image for a demo. And the code is all open, all the way. Thanks guys for an awesome effort!

Multi-scale log attributes

Evan and Mark Dahl (ConocoPhillips) — who was new to Python on Friday — built some fascinating displays (right). The idea was to explore stratigraphic stacking patterns in scale space. It's a little like spectral decomposition for 1D data. They averaged a log at a range of window sizes, increasing exponentially (musicians and geophysicists know that scale is best thought of in octaves). Then they made a display that ranges from short windows on the left-hand side to long ones on the right. Once you get your head around what exactly you're looking at here, you naturally want to ask questions about what these gothic-window patterns mean geologically (if anything), and what we can do with them. Can we use them to help train a facies classifier, for example? [Get Evan's code]

Facies from logs

In between running for tacos, I worked on computing grey-level co-occurence matrices (GLCMs) for logs, which are a prerequisite for computing certain texture attributes. Why would anyone do this? We'd often like to predict facies from well logs; maybe log textures (spiky vs flat, upwards-fining vs barrel-shaped) can help us discriminate facies better. [Download my IPython Notebook]

Wassim Benhallam (of Lisa Stright's Rocks to Models lab at University of Utah) worked on machine learning algorithms for computing facies from core. He started pursuing self-organizing maps as an interesting line of attack, and plans to use MATLAB to get something working. I hope he tells us how it goes!

We didn't have a formal contest at this event, but our friend Maitri Erwin was kind enough to stop by with some excellent wine and her characteristically insightful and inquisitive demeanour. After two days rattling around with nothing but geeks and tacos for company, she provided some much-needed objectivity and gave us all good ideas about how to develop our efforts in the coming weeks. 

We'll be doing this again in Denver this autumn, some time around the SEG Annual Meeting. If it appeals to your creativity — maybe there's a tool you've always wished for — why not plan to join us?  

As I get around to it, I'll be dumping more info and pictures over on the wiki

Looking forward to AAPG

Today we're en route to the AAPG Annual Convention & Exhibition (the ACE) in Houston. We have various things going on before it and after it too, so we're in Houston for 10 days of geoscience. Epic!

The appetizers

On Friday we're hosting a 'learning geoscience programming' bootcamp at START, our favourite Houston coworking space. Then we roll straight into our weekend programming workshop — Rock Hack — also at START. Everyone is welcome — programming newbies, established hackers. We want to build tools for working with well logs. You don't need any special skills, just ideas. Bring whatever you have! We'll be there from 8 am on Saturday. (Want more info?)

At least come for the breakfast tacos.

Conference highlight forecast

Regular readers will know that I'm a bit of a jaded conference-goer. But I haven't been to AAPG since Calgary in 2005, and I am committed to reporting the latest in geoscience goodness — so I promise to go to some talks and report back on this very blog. I'm really looking forward to it since Brian Romans whet my appetite with a round-up of his group's research offerings last week. 

I thought I'd share what else I'll be trying to get to. I can't find a way to link to the abstracts — you'll have to hunt them down in the Itinerary Planner... 

  • Monday am. Communicating our science. Jim Reilly, Iain Stewart, and others.
  • Monday pm. Case Studies of Geological and Geophysical Integration sounds okay, but might under-deliver. And there's a talk called 3-D Printing Artificial Reservoir Rocks to Test Their Petrophysical Properties, by Sergey Ishutov that should be worth checking out.
  • Tuesday am.  Petroleum Geochemistry and Source Rock Characterization, in honour of Wally Dow
  • Tuesday pm. Turbidites and Contourites, Room 360, is the place to be. Zane Jobe is your host.
  • Wednesday am. I'll probably end up in Seismic Visualization of Hydrocarbon Play Fairways.
  • Wednesday pm. Who can resist Space and Energy Frontiers? Not me.

That's about it. I'm teaching my geoscience writing course at a client's offices on Friday, then heading home. Evan will be hanging out and hacking some more I expect. Expect some updates to modelr.io!

If you're reading this, and you will be at AAPG — look out for us! We'll be the ones sitting on the floor near electrical outlets, frantically typing blog posts.

A long weekend of creative geoscience computing

The Rock Hack is in three weeks. If you're in Houston, for AAPG or otherwise, this is going to be a great opportunity to learn some new computer skills, build some tools, or just get some serious coding done. The Agile guys — me, Evan, and Ben — will be hanging out at START Houston, laptops open, all say 5 and 6 April, about 8:30 till 5. The breakfast burritos and beers are on us.

Unlike the geophysics hackathon last September, this won't be a contest. We're going to try a more relaxed, unstructured event. So don't be shy! If you've always wanted to try building something but don't know where to start, or just want to chat about The Next Big Thing in geoscience or technology — please drop in for an hour, or a day.

Here are some ideas we're kicking around for projects to work on:

  • Sequence stratigraphy calibration app to tie events to absolute geologic time and to help interpret systems tracts.
  • Wireline log 'attributes'.
  • Automatic well-to-well correlation.
  • Facies recognition from core.
  • Automatic photomicrograph interpretation: grain size, porosity, sorting, and so on.
  • A mobile app for finding and capturing data about outcrops.
  • An open source basin modeling tool.

Short course

If you feel like a short course would get you started faster, then come along on Friday 4 April. Evan will be hosting a 1-day course, leading you through getting set up for learning Python, learning some syntax, and getting started on the path to scientific computing. You won't have super-powers by the end of the day, but you'll know how to get them.

Eventbrite - Agile Geocomputing

The course includes food and drink, and lots of code to go off and play with. If you've always wanted to get started programming, this is your chance!

Purposeful discussion in geoscience

Regular readers will remember the Unsolved Problems Unsession at the GeoConvention in Calgary last May. We think these experiments in collaboration are one possible way to get people more involved in progressing geoscience at conferences, and having something to show for it. We plan to do more — and are here to support you if you'd like to try one in your community.

Last Thursday was the 2014 CSEG Symposium. The organizers asked me for a short video to sum up what happened at the unsession for the crowd, and to help get them in the mood for some discussion. I hope it helped...

Getting better

Conferences seem so crammed with talks these days. No time for good conversation, in or out of the sessions. The only decent discussion I remember recently (apart from the unsession, obvsly) was at EAGE in 2012, when a talk finished early and the space filled with a fascinating discussion between two compressed sensing clever-clogs.

I think there are a few ways to get better at it:

  • Make more time for it, preferably at least 40 minutes.
  • Get people into smaller groups, about 4–12 people is good.
  • Facilitate with some ground rules, provocative questions, and conversation management.
  • Capture what was said, preferably in real time and using the participants' own words.
  • Use lots of methods: drawing, sticky notes, tweets, video, and so on.
  • Reflect the conversation back at the participants, and let them respond.
  • Read up on open space, knowledge café, charrettes, and other methods.
  • Don't shut it down with "I guess we're out of time..." — review or sum up first.

Think about when you have been part of a really good conversation. How it feels, how it flows, and how you remember it for days afterwards, and mention it to others later. I think we can have more of those about our work, and conferences are a great place to help them happen.

Stay tuned for details of the next unsession — again, at the Calgary GeoConvention.