Showing posts with label theory. Show all posts
Showing posts with label theory. Show all posts

Thursday, July 20, 2017

Objects, pt. 2



If you haven't read part 1 of this tutorial here, do so before you proceed further.

When you open a project in Open Refine, the entire spreadsheet is broken up into rows. Each cell in the row is mapped into a cell object. What comes next is my best guess because I couldn't find documentation -- I believe that the cell objects are initialized into an array and that becomes part of object CellTuple.

Or, in pseudo-code:

object CellTuple
         array list = {array of cell objects for the current row}

Thursday, July 6, 2017

Tutorial on objects and the cell.recon object


What's an object?
You've probably seen this wiki page when trying to access the deeper reconciliation fields in Open Refine:

https://github.com/OpenRefine/OpenRefine/wiki/Variables

This is a pretty confusing page, so let me give a little background about objects. An object is a programming language structure that's basically a container for a bunch of other things, including other objects. The object itself cannot be manipulated, but everything contained in that object can.
Open Refine has a master object and then either objects or fields contained within it.

A field will either yield a string, a boolean, a null, a number, or it will have deeper fields.

Monday, July 3, 2017

Introduction to Arrays

Update 7/28/17: I've fixed up this post because when I first wrote it, I didn't realize what Open Refine's convention was for naming arrays.

You've probably heard a lot about arrays when working with Open Refine, but what exactly is it?

First of all, I need to explain how software computing works before I can explain the array functionality. When any sort of software needs to process data, it has to break it down into chunks that it can understand. The chunks are in the computer's equivalent of headspace -- much like when you're trying to figure things out in your head.

However, a computer can only process data using certain structures. There are several of these data structures, but I'm just going to cover the array.