New offer! Get 30% off your first 2 months of Unlimited Monthly. Start your subscription for just £35.99 £24.99. New subscribers only T&Cs apply

# Modelling Real World Data

How do we represent measurements from the real world using data scientific techniques? Lovisa Sundin and Jeremy Singer discuss standard approaches.
6.3
JEREMY: Hey, Lovisa. When we’re modelling data in the real world, sometimes it’s a bit confusing to know exactly how to model the attributes. Can you give us an example, maybe?
16.4
LOVISA: It’s very true. If we just take these lollipops that I happened to find in my pocket, then we will find out how we choose to model it depends very much on who we are, what our goals are, and what the context is. So if I were a physicist, for example, and I wanted to model the colour of these lollipops, then I know that colour is a physical wavelength, and a continuous attribute.
40.4
JEREMY: Yeah.
41.1
LOVISA: But if I were a computer scientist, then I would know that these colours would be encoded as discrete bit strings, so it would be a numerical, but discrete, attribute.
52.5
JEREMY: Or, if you’re using CSS, you could say colour equals purple, or colour equals red, and they’d be strings.
58.7
LOVISA: That’s true. See, it depends on context. But if I were an artist, then I would perhaps, categorise these as different pigments and it would be a categorical attribute. But I think we can all agree that what comes most naturally to us would be to model this as a categorical attribute in terms of the good ones, and the disgusting ones.
82.8
JEREMY: Oh, no, blackcurrant is my favourite. Thanks, Lovisa.
86.2
LOVISA: Thanks. That leaves me with three.

In general, data is either numbers (numerical data) or labelled values from a limited set of possible values (categorical data).

Numerical data may be discrete (whole numbers) or continuous (real numbers, with decimal points).

As a short exercise, think of an example of numerical data and categorical data for features from the following data sets:

1. Scotland’s 2001 census data
2. Bicycles in the Glasgow city bike hire scheme
3. Olympic Games athletes data

As a further thought experiment, can you see how values of these different kinds might map onto the concrete data types Jeremy introduced in an earlier video?