Month: February 2018

Spatial Objects Using TERR

A key part of analytics in the oil and gas industry is evaluating opportunities at different locations. Space is always present when looking for profitable development projects. We usually look at the already in production wells and try to find some spatial trends. To stay competitive, we need to find better ways  to access the  data of different areas and its wells. For instance, we can transform the spatial information to compact objects that store the location and shape of each well and lease. These objects can be feed  to different calculations and analyses as geometries. For Spotfire, it also has some advantages, you can use the feature layers of the map chart. In this case, we can visualize the leases as polygons and wells as lines.

Read More

NFL: Predicting 2018 Win Totals with Data Science

With the Super Bowl just behind us, it’s time to predict wins for the 2018 NFL Season.  At the start of the playoffs, we looked at a model which predicted how many games NFL teams should have won in 2017 and compared our results to Football Outsider’s Pythagorean Win Expectancy.  We were able to improve on Pythagorean Win Expectancy for last year’s results, aka how many games a team should have won, but our backwards looking models were unable to beat Pythagorean Win Expectancy in predicting next year’s wins.  Today, we will build some models trying specifically to predict how many games teams will win next year.

If you simply want to know how many games your team will win in 2018, strictly for recreational purposes of course, you can skim to the end or check out our Spotfire Template.  But, for Football Outsiders fans, those interested in what makes up wins and losses, or those interested in the Data Science process, read on.

Read More

HTML Tag Attributes – Part 2

Last week, I kicked off a HTML series with the post — Intro to HTML.  The Intro article discusses the languages users can employ in Text Areas and introduced the concept of HTML tags.  It concluded by specifying a few tags to practice with in order to get comfortable with HTML.  This week, I will talk HTML tag attributes because you won’t get very far in HTML without attributes.  I started this post thinking I was also going to dive into what CSS is and how it fits in with HTML, but the post got long quickly.  That will be the subject for next week.  So, let’s look at attributes!

HTML Tag Attributes Examples

I’m going to explain what an attribute is, but before I do that, here are two examples in the code.

Example 1

<img> — used for images, such as this easy button image

width and height are attributes of the <img> tag

HTML Tag Attributes Example 1

Example 2

<a> — used to create links

href is an attribute of the <a> tag

HTML Tag Attributes Example 2

Characteristics of Attributes

Now that you know what you are looking at, here are the important things to know about attributes (sourced from W3Schools HTML Attributes).

  • All HTML elements (tags) can have attributes.
  • Attributes provide additional information about an element.
  • They are always specified in the start tag.
  • Attribute syntax is usually a name/value pair like: name=”value“.  Separate the name from the value with an equals sign and put the value in double quotes.
    • <h1 align=”center;”>Header</h1>
    • <p align = “center;” </p>
    • <a href=”hope.html”>Computer Hope</a>
  • Add multiple attributes to a single tag.  Separate them with a space as shown in Example 1.
  • Some attributes can be used across multiple elements, such as the align attribute shown above.  Other attributes may be unique to a tag.
  • Not all tags and attributes are supported in Spotfire.

Googling attributes for individual tags is very easy, and W3Schools has a great attribute reference.  To help you get started, here is a list of a few common attributes that users will employ in Spotfire.

  • Attributes for <div>, <p> and <h1-h6>
    • align — to specify text alignment
  • Attributes for <img>
    • height — to specify the height of images
    • width — to specify the width of images
    • border — to specify whether or not an image should have a border and how thick it should be
  • Attributes for <hr>
    • size — changes the size or width of the line
    • color — changes the color of the line
  • Attributes for <font>
    • size — changes font size
    • face — changes font style
    • color — changes font color

Here is an example of each of these attributes.

HTML Tag Attributes Example 3

Now, I am intentionally not diving very deep into attributes, and that is because next week, I will talk about CSS and formatting.  You will do much more with CSS than with simple HTML tag attributes.  Until then, take a look at the tags used in your existing DXPs.  Google their associated attributes and see what you can add to the Text Area.