Skip to content

Instantly share code, notes, and snippets.

@wndxlori
Created January 10, 2017 23:53
Show Gist options
  • Save wndxlori/1f47ee6259114f41a84247584c5b24a8 to your computer and use it in GitHub Desktop.
Save wndxlori/1f47ee6259114f41a84247584c5b24a8 to your computer and use it in GitHub Desktop.
Example of displaying a lot of formatted text, styled using https://github.com/colinta/teacup
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>About</title>
<style>
p {color:#ff9400;}
h2 {color: #ffa428; text-align: center;}
</style>
</head>
<body>
<h2>Wells In My Back Yard</h2>
<p>
WIMBY was an idea I had, quite a few years ago, after reading about an incident w.r.t. an
improperly abandoned well in the community of Calmar, AB (more on that later). At the time,
as a software developer working with oil & gas data every day (in the development of
<a href="http://etriever.com">etriever.com</a> and <a href="http://welltriever.com">welltriever.com</a>),
I was appalled at the idea people could have an abandoned well in their back yard, and not
be aware of it.
</p>
<p>
As of the time this blurb was written, there were 803928 licensed wells in Canada (numbers courtesy of
etriever.com). That includes water/steam wells, but there were only ~16K of those, so they
hardly count against that somewhat mind-boggling total.
</p>
<p>
Of those 800K wells, over 250K of them were “abandoned”. This is an official oil industry
designation, wherein the wells are no longer being operated, and the mineral leases have been
terminated. These “abandoned" wells are not the “inactive” or "orphaned" wells about
which there has been much coverage in the news recently.<br/>
<a href="http://www.ecojustice.ca/wp-content/uploads/2014/12/IWCP-Paper-FINAL-20-Nov-2014.pdf">Inactive Well Compliance Program</a><br/>
<a href="http://boereport.com/2016/04/19/albertas-inactive-well-problem-incentives-needed-to-kickstart-reclamations-who-can-afford-to-sign-blank-cheques/">Incentives Needed</a><br/>
<a href="http://calgaryherald.com/business/energy/5-things-abandoned-and-inactive-wells-in-alberta">Abandoned and Inactive Wells in Alberta</a><br/>
<a href="http://globalnews.ca/news/2301432/map-shows-nearly-every-corner-of-alberta-littered-with-inactive-oil-and-gas-wells/">Alberta Littered with Inactive Oil & Gas Wells</a><br/>
</p>
<p>
In fact, there’s another 90K+ wells that have been “suspended”, which means they are not producing,
but the operating company still maintains the mineral lease. In some cases, these wells are just
awaiting improved economics, for them to be viable again. In others, the operating companies
have been bankrupted, and they are orphaned. In both these cases, there would still be a caveat
on any surface land title related to these wells, so they aren’t exactly “invisible".
</p>
<p>
It’s those abandoned wells that are the problem WIMBY is intended to address, and most especially
the old ones. Once the operating company plugs the well, cleans up the surface equipment, and
the mineral lease is terminated, there is no requirement for the caveats to remain on the
associated surface land title, so it falls off. At this point, it is difficult to know that
these wells even existed. They are, in effect, invisible.
</p>
<p>
In the wild-west past of the oil industry, there were no regulations about the abandonment of
wells. In the 1960’s the rules and regulations around the abandonment of wells gained some teeth
(1963, 1966), and have only become more stringent with time, so wells abandoned after that time
are less likely to cause problems (although it’s still nice to know where they were, just in case).
<br/>
<a href="https://www.aer.ca/abandonment-and-reclamation/why-are-wells-abandoned">Why Are Wells Abandoned</a><br/>
<a href="https://www.aer.ca/documents/directives/Directive020.pdf">Directive 020 - Alberta Energy Regulator</a><br/>
<a href="http://www.ieaghg.org/docs/WBI3Presentations/TWatson.pdf">Presentation on Abandonment Regulation History</a>
</p>
<p>
Previous to those regulations coming into effect, though, is a grey area. Some companies were good
about properly closing these wells in, while others… were not. Thus the debacle at Calmar, AB.
Although the original story link has disappeared, I documented some of the details in a
<a href="http://www.wndx.com/blog/gas-leak-forces-out-families">blog post here</a>,
when I first created a web application called WIMBY (that web app no longer exists).
</p>
<p>
And there is ongoing coverage of the Calmar saga in many places:<br/>
<a href="http://o.canada.com/news/national/five-years-five-homes-demolished-and-gas-keeps-bubbling-from-the-deep">Trying to plug the leak in Calmar</a><br/>
<a href="http://www.theglobeandmail.com/news/national/abandoned-oil-wells-jeopardize-alberta-homes/article1372745/">Abandoned Oil Wells Jeopardize Alberta Homes</a><br/>
<a href="https://web.archive.org/web/20110507002525/http://www.imperialoil.ca/Canada-English/operations_community_other_calmar.aspx">Calmar well re-abandonment (no longer avail on imperialoil.ca)</a>
</p>
<p>
All the data presented in WIMBY (and much more) is available from the various provincial governments<br/>
BC - <a href="https://www.bcogc.ca">https://www.bcogc.ca</a><br/>
AB - <a href="https://www.aer.ca">https://www.aer.ca</a><br/>
SK - <a href="http://www.economy.gov.sk.ca/oilgas">http://www.economy.gov.sk.ca/oilgas</a>
</p>
<p>
But it remains difficult to find things, unless you already know where to look (go ahead and try:
<a href="http://mapviewer.aer.ca/Html5/Index.html?viewer=aerabnwells">AER Mapviewer</a>).
</p>
<p>
And please, (really PLEASE), don’t expect me, the creator of WIMBY, to do anything about
abandoned wells you might be concerned about. You should take those concerns & questions to the
relevant provincial authority (as listed above).
</p>
<p>
One of the important things I would ask you to remember, is that the currently responsible
operator of these wells may or may not even be aware of their existence.
</p>
<p style="text-align: justify; margin-left: 3%; margin-right: 3%;">
"All three wells were initially drilled by Texaco, and have been out of use since the 1950’s.
Imperial came into ownership of the wells in 1989, but was not aware of their presence until
late 2007."<br/>
<a href="http://www.devondispatch.ca/2013/07/02/imperial-oil-starting-third-calmar-well-re-abandonment">&dash; Devon Dispatch</a><br/>
</p>
<p>
I guess what I am trying to say here is, some of these wells were abandoned before the people
currently responsible were even born, so try not to make them out as villains, ok?
</p>
<p>
WIMBY is my attempt to make the information about Abandoned Wells in Canada easy to find and to
put that information directly in the hands of anyone who wants to look. Hopefully, with this
information in hand, we won’t ever need to have another Calmar incident.
</p>
<p>
Hey, and if you like this app, please go and give it a nice rating in the app store!
</p>
</body>
</html>
Teacup::Stylesheet.new(:about_sheet) do
style :root,
backgroundColor: UIColor.colorWithRed(0.25, green: 0.21, blue: 0.19, alpha: 1.00),
landscape: true
style :text_view,
backgroundColor: UIColor.colorWithRed(0.25, green: 0.21, blue: 0.19, alpha: 1.00),
dataDetectorTypes: UIDataDetectorTypeLink,
font: UIFont.fontWithName('Avenir-Light', size: 15.0),
editable: false,
autoresizingMask: autoresize.fill,
constraints: [
constrain(:left).equals(:superview, :left).plus(10),
constrain(:right).equals(:superview, :right).minus(10),
constrain(:top).equals(:superview, :top),
constrain(:bottom).equals(:superview, :bottom)
]
end
@text_label = subview UITextView, :text_view, attributedText: about_text
def about_text
html = NSBundle.mainBundle.URLForResource('about', withExtension:'html')
NSAttributedString.alloc.initWithFileURL(
html,
options:{NSDocumentTypeDocumentAttribute:NSHTMLTextDocumentType},
documentAttributes:nil,
error:nil
)
end
@wndxlori
Copy link
Author

wndxlori commented Jan 11, 2017

And it looks like this, with working links:
screen shot 2017-01-10 at 4 59 08 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment