<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>The Final Artefact</title><link>https://www.thefinalartefact.xyz/</link><description>Recent content on The Final Artefact</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Thu, 30 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.thefinalartefact.xyz/index.xml" rel="self" type="application/rss+xml"/><item><title>Building Apache Superset Home Setup</title><link>https://www.thefinalartefact.xyz/post/building-apache-superset-home-setup/</link><pubDate>Thu, 30 Apr 2026 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/building-apache-superset-home-setup/</guid><description>&lt;p&gt;&lt;a href="https://www.thefinalartefact.xyz/post/building-apache-superset-home-setup/images/apache-superset-chart-editor.png" target="_blank" rel="noopener noreferrer"&gt;
&lt;img alt="Apache Superset chart editor showing a stacked area chart for synthetic transaction data" loading="lazy" src="https://www.thefinalartefact.xyz/post/building-apache-superset-home-setup/images/apache-superset-chart-editor.png"&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="background"&gt;Background&lt;/h2&gt;
&lt;p&gt;I was recently asked to help, pro bono, with analysing some life science data. From the outset I expected a steady stream of feedback along the lines of &lt;em&gt;can you show this like that&lt;/em&gt;, and that prospect pulled me back to my early career days working as a researcher and analyst for various outfits. What those years taught me is that the bottleneck is rarely the analysis itself; it is the loop of sharing a result, hearing how someone would prefer to see it, and turning that around quickly. A small, self-service tool that lets people poke at the data themselves removes most of that friction.&lt;/p&gt;</description></item><item><title>Codex Calendar Planning Tool</title><link>https://www.thefinalartefact.xyz/post/codex-calendar-app/</link><pubDate>Mon, 12 Jan 2026 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/codex-calendar-app/</guid><description>&lt;p&gt;After a small change in my son&amp;rsquo;s schedule, I wanted to keep everything consistent while making it easy to share. That kicked off a small calendar-planning tool with a few requirements: a clean, printable calendar view, no paid app or subscription for a one-off need, and a way to subscribe or export the calendar so it stays visible across all of my devices.&lt;/p&gt;
&lt;h2 id="background"&gt;Background&lt;/h2&gt;
&lt;p&gt;I first looked at Apple Calendar, but its printing options are limited and a presentable, readable calendar was non-negotiable. Fantastical would cover everything I needed, yet I was not keen to buy a license for a one-off need. I also considered using something like InDesign with scripting to build a polished calendar, but that felt like overkill and would have required learning additional tooling and writing a fairly complex calendar builder. Google Calendar had similar printing limitations. Given all of that, building a small software package felt like the right choice: I could script the visuals and color coding, export to ICS, and control schedule changes via versioned JSON files.&lt;/p&gt;</description></item><item><title>Using Xcode Pre- and Post-actions to Observe Changes to Defaults</title><link>https://www.thefinalartefact.xyz/post/build-pre-post-actions-observe-default/</link><pubDate>Mon, 24 Nov 2025 16:01:56 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/build-pre-post-actions-observe-default/</guid><description>Because UserDefaults persistence is opportunistic, it’s often hard to tell when values truly flush and what changed between runs. In the article I set up an app group prefs watcher with fswatch, convert the binary plist to XML via plutil, and log a timestamped diff for every write—no breakpoints, no in-app logging. If you’ve ever wondered “what did my app really persist?”, this workflow makes it obvious.</description></item><item><title>Review of the Machine Learning Engineer Datacamp Course</title><link>https://www.thefinalartefact.xyz/post/review-mlend/</link><pubDate>Sun, 31 Aug 2025 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/review-mlend/</guid><description>Review of MLEng course on Data Camp</description></item><item><title>Bring your Python ML Model to iOS App in under Three Minutes</title><link>https://www.thefinalartefact.xyz/post/python-models-app/</link><pubDate>Thu, 24 Jul 2025 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/python-models-app/</guid><description>&lt;p&gt;&lt;a href="https://www.thefinalartefact.xyz/post/python-models-app/images/phonedemo.gif" target="_blank" rel="noopener noreferrer"&gt;
&lt;img alt="Phone Model Demo" loading="lazy" src="https://www.thefinalartefact.xyz/post/python-models-app/images/phonedemo.gif"&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Integrating Python-based machine learning models into iOS applications can be challenging, particularly when converting models into a Swift-compatible format. This example will demonstrate a simple image classification task using the Fashion-MNIST dataset and CoreML conversion tools. The goal is to illustrate the effort required to deploy small-to-medium complexity ML models within iOS applications. The demonstration is based on a Convolutional Neural Network (CNN) built with PyTorch, but the concepts apply broadly to other Python-based models as well.&lt;/p&gt;</description></item><item><title>Automatically Refreshing NVim plugins</title><link>https://www.thefinalartefact.xyz/post/nvim-autoupdate/</link><pubDate>Fri, 28 Mar 2025 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/nvim-autoupdate/</guid><description>&lt;p&gt;One of the key benefits of modern editors like NVim, Vim, or Emacs is the rich plugin ecosystem. After years with Vim, I switched to NVim and was immediately impressed by its plugin landscape. The &lt;a href="https://github.com/folke/lazy.nvim"&gt;Lazy&lt;/a&gt; plugin manager—available for NVim &amp;gt; 0.8—quickly became my favourite. &lt;a href="https://github.com/folke/lazy.nvim"&gt;Lazy&lt;/a&gt; simplifies plugin discovery and management. It offers an intuitive interface and powerful commands that make it easy to add, remove, or update plugins.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.thefinalartefact.xyz/post/nvim-autoupdate/images/lazy_image.png" target="_blank" rel="noopener noreferrer"&gt;
&lt;img alt="Lazy Plugin in Actions" loading="lazy" src="https://www.thefinalartefact.xyz/post/nvim-autoupdate/images/lazy_image.png"&gt;
&lt;/a&gt;&lt;/p&gt;</description></item><item><title>One Line Docker Commands</title><link>https://www.thefinalartefact.xyz/post/one-line-docker/</link><pubDate>Wed, 19 Mar 2025 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/one-line-docker/</guid><description>&lt;p&gt;&lt;a href="https://www.thefinalartefact.xyz/post/one-line-docker/images/ast_docker.png" target="_blank" rel="noopener noreferrer"&gt;
&lt;img alt="Executing Python command across multiple versions" loading="lazy" src="https://www.thefinalartefact.xyz/post/one-line-docker/images/ast_docker.png"&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Setting up a robust data science development environment takes time, and it&amp;rsquo;s a process that’s rarely ever finished. If you’re the type who likes to get the most out of your tools, you’ll likely enjoy tweaking, optimising, and layering your workspace with productivity enhancements. That might mean refining your Python setup to easily manage multiple language versions and dependencies, or expanding your text editor with plugins for linting, code suggestions, unit test execution, and CI/CD integration.&lt;/p&gt;</description></item><item><title>Version Control your Dotfiles</title><link>https://www.thefinalartefact.xyz/post/git-dotfiles/</link><pubDate>Fri, 14 Mar 2025 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/git-dotfiles/</guid><description>&lt;p&gt;&lt;a href="https://www.thefinalartefact.xyz/post/git-dotfiles/images/imageGitStatus.png" target="_blank" rel="noopener noreferrer"&gt;
&lt;img alt="Using git to version control dotfiles" loading="lazy" src="https://www.thefinalartefact.xyz/post/git-dotfiles/images/imageGitStatus.png"&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="what-are-dotfiles"&gt;What are .dotfiles?&lt;/h2&gt;
&lt;p&gt;Dotfiles are hidden configuration files on Unix-like systems.&lt;br&gt;
Their filenames start with a dot (&lt;code&gt;.&lt;/code&gt;), making them hidden by default.&lt;br&gt;
They store preferences and settings for programs like shells, text editors, and version control systems.&lt;/p&gt;
&lt;p&gt;Many modern Linux applications follow the XDG Base Directory Specification.&lt;br&gt;
This guideline recommends placing user-specific configuration files in &lt;code&gt;~/.config&lt;/code&gt; (or &lt;code&gt;$XDG_CONFIG_HOME&lt;/code&gt;).&lt;br&gt;
Using this standard reduces clutter in home directories and simplifies managing configurations across systems.&lt;/p&gt;</description></item><item><title>Using Swift for Data Science Workflows</title><link>https://www.thefinalartefact.xyz/post/swift-data-science/</link><pubDate>Tue, 04 Mar 2025 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/swift-data-science/</guid><description>&lt;h2 id="why-swift"&gt;Why Swift?&lt;/h2&gt;
&lt;p&gt;Data science is dominated by Python and R, with some usage of Julia, Scala, Java, and C++. While Swift may not be the most popular choice, it offers several notable benefits—especially for developers already invested in the Apple ecosystem.&lt;/p&gt;
&lt;h2 id="key-advantages"&gt;Key Advantages&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Performance Considerations&lt;/strong&gt;&lt;br&gt;
As a compiled language, Swift often runs faster than languages like Python or R. This can be especially beneficial when handling large datasets or complex computations.&lt;/p&gt;</description></item><item><title>Aggressively formatting your Python files</title><link>https://www.thefinalartefact.xyz/post/aggressively-formatting-your-python-files/</link><pubDate>Sat, 30 Sep 2023 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/aggressively-formatting-your-python-files/</guid><description>&lt;p&gt;Vim provides a wide range of functions for file formatting, starting with basic features such as &lt;code&gt;reindent&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="viml-implementation"&gt;VimL Implementation&lt;/h2&gt;
&lt;p&gt;Creating a function within Vim to process the file is likely the most straightforward approach. The primary purpose of this function is to pass the filename to an external command for formatting. Leveraging the rich ecosystem of Python formatting tools available from the command line allows the function to efficiently and consistently format files, tapping into powerful, pre-existing solutions for code aesthetics and standardization. In effect, the role of the function is to pass the filename to the call below:&lt;/p&gt;</description></item><item><title>Showing ChatGPT How to Draw</title><link>https://www.thefinalartefact.xyz/post/drawing-chat-gpt/</link><pubDate>Wed, 14 Jun 2023 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/drawing-chat-gpt/</guid><description>&lt;h2 id="background"&gt;Background&lt;/h2&gt;
&lt;p&gt;For a computer, an image is collection of interpretable instructions that amount to a visual representation. Raster images are composed from using pixels, containing unique colours, whereas vector images keep track of points and equations that join them. In &lt;code&gt;\(\LaTeX\)&lt;/code&gt; PGF/TikZ is used to generate vector graphics from algebraic descriptions. TikZ is mostly used to conveniently draw various scientific figures. ChatGPT is capable of generating computer code in majority of popular languages. I wanted to test how far I can get with ChatGPT generating illustrations using TikZ.&lt;/p&gt;</description></item><item><title>On Structuring Python Projects</title><link>https://www.thefinalartefact.xyz/post/python-project-structure/</link><pubDate>Wed, 16 Mar 2022 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/python-project-structure/</guid><description>&lt;h2 id="types-of-projects"&gt;Types of Projects&lt;/h2&gt;
&lt;p&gt;The term &lt;em&gt;Python project&lt;/em&gt; can be somewhat misleading. While languages like Swift are designed for specific purposes such as generating macOS/iOS apps, components, and frameworks, Python is used in a much more versatile manner. A &lt;em&gt;Python project&lt;/em&gt; might range from an analytical solution developed across multiple Jupyter notebooks to a standalone script querying a database API and extracting results to an application or package facilitating the deployment of models. Each of these projects has its own key usability requirements. For instance, if end-users will utilize our project through a command-line interface, we will focus on argument parsing and other elements facilitating user-friendly execution.&lt;/p&gt;</description></item><item><title>Using RScript for R Installation Management</title><link>https://www.thefinalartefact.xyz/post/rscriptt-for-r-managment/</link><pubDate>Mon, 03 Jan 2022 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/rscriptt-for-r-managment/</guid><description>&lt;p&gt;Most frequently, users tend to undertake common R installation and management tasks from within the R session. Frequently making use of commands, like &lt;code&gt;install.packages&lt;/code&gt;, &lt;code&gt;update.packages&lt;/code&gt; or &lt;code&gt;old.packages&lt;/code&gt; to obtain or update packages or update/verify the existing packages. Those common tasks can also be accomplished via the GUI offered within RStudio, which provides an effortless mechanism for undertaking basic package management tasks. This is approach is usually sufficient for the vast majority of cases; however, there are some examples when working within REPL^[REPL stands for &lt;strong&gt;R&lt;/strong&gt;ead &lt;strong&gt;E&lt;/strong&gt;val &lt;strong&gt;P&lt;/strong&gt;rint &lt;strong&gt;L&lt;/strong&gt;oop and is usually delivered in a form of an interactive shell. While working in Python users would commonly access REPLY by running &lt;code&gt;python&lt;/code&gt; or &lt;code&gt;ipython&lt;/code&gt;, &lt;a href="https://pythonprogramminglanguage.com/repl/"&gt;more details&lt;/a&gt;.] to accomplish common installation tasks is not hugely convenient.&lt;/p&gt;</description></item><item><title>Beauty of R and Big-O</title><link>https://www.thefinalartefact.xyz/post/beauty-of-r-and-big-o/</link><pubDate>Thu, 09 Dec 2021 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/beauty-of-r-and-big-o/</guid><description>&lt;script src="index_files/kePrint/kePrint.js"&gt;&lt;/script&gt;
&lt;link href="index_files/lightable/lightable.css" rel="stylesheet" /&gt;
&lt;h2 id="big-o"&gt;Big-O&lt;/h2&gt;
&lt;p&gt;The purpose of this is not to provide yet another primer on the Big-O/$\Omega$/$\Theta$ notation but to share my enduring appreciation for working with R. I will introduce Big-O only briefly to provide context but I would refer all of those who are interested to the linked materials.&lt;/p&gt;
&lt;h2 id="what-is-big-sth-notation"&gt;What is Big-sth notation&lt;/h2&gt;
&lt;p&gt;When analysing functions, we may be interested in knowing how fast a function grows. For instance, for function &lt;code&gt;\(T(n)=4n^2-2n+2\)&lt;/code&gt;, after ignoring constants, we would say that &lt;code&gt;\(T(n)\)&lt;/code&gt; grows at the order of &lt;code&gt;\(n^2\)&lt;/code&gt;. With respect to the &lt;em&gt;Big-O&lt;/em&gt; notation we would write &lt;code&gt;\(T(n)=O(n^2)\)&lt;/code&gt;^[MIT. (2021, December 9). Big O notation. Introduction to Computers and Programming. Retrieved December 26, 2021, from &lt;a href="https://web.mit.edu/16.070/www/lecture/big_o.pdf"&gt;https://web.mit.edu/16.070/www/lecture/big_o.pdf&lt;/a&gt;]. Most commonly, in computer science, we would differentiate between Big O, Big Theta &lt;code&gt;\((\Theta)\)&lt;/code&gt; and Big Omega &lt;code&gt;\((\Omega)\)&lt;/code&gt;. In a nutshell, the differences between those common notations can be summarised as follows:&lt;/p&gt;</description></item><item><title>R-based metaprogramming strategies for handling Hive/CSV interaction (Part I, imports)</title><link>https://www.thefinalartefact.xyz/post/importing-csv-to-hive/</link><pubDate>Fri, 13 Aug 2021 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/importing-csv-to-hive/</guid><description>&lt;h2 id="background"&gt;Background&lt;/h2&gt;
&lt;p&gt;Handling Hive/CSV interaction is a common reality of many analytical and data environments. The question on exporting data from Hive to CSV and other formats is frequently raised on online forums with answers frequently suggestring making use of &lt;a href="https://en.wikipedia.org/wiki/Sed"&gt;&lt;code&gt;sed&lt;/code&gt;&lt;/a&gt; that combined with nifty regular expressions pipes Hive output into a flat CSV files as an exporting solution. Import of large amounts of data is best handled by suitable tools like &lt;a href="https://flume.apache.org"&gt;Apache Flume&lt;/a&gt;. That is fine for simpler tables but may prove problematic for tables with a large amount of unstructured text. Frequently analysts and data scientists are faced with a challenge with storing data Hive on a irregular semi-regular basis. For instance, a job may produce new forecastring scenarios that we may want to make available through a Hive tables.&lt;/p&gt;</description></item><item><title>Why regex is not fuzzy matching</title><link>https://www.thefinalartefact.xyz/post/why-regex-is-not-fuzzy-matching/</link><pubDate>Tue, 29 Jun 2021 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/why-regex-is-not-fuzzy-matching/</guid><description>&lt;p&gt;Recently, I cam across an interesting discussion on StackOverflow^[SO discussion on: &lt;a href="https://stackoverflow.com/a/68182330/1655567"&gt;&lt;em&gt;Fuzzy Join with Partial String Match in R&lt;/em&gt;&lt;/a&gt;] pertaining to approach to fuzzy matching tables in R. Good answer contributed by one of the most resilient and excellent contributors to whom I owe a lot of thanks for help suggested relying on regular expression, combining this with basic string removal and transformations like &lt;code&gt;toupper&lt;/code&gt; to deterministically match the tables. The solution solved the problem and was accepted.&lt;/p&gt;</description></item><item><title>On Sorting Arrays...or why it's good to read the actual assignment</title><link>https://www.thefinalartefact.xyz/post/fun-with-sortting-arrays/</link><pubDate>Sun, 23 May 2021 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/fun-with-sortting-arrays/</guid><description>&lt;h2 id="problem"&gt;Problem&lt;/h2&gt;
&lt;p&gt;Solving challenges on &lt;a href="https://projecteuler.net"&gt;project Euler&lt;/a&gt; or &lt;a href="https://www.hackerrank.com/"&gt;HackerRank&lt;/a&gt; is a good past time. For folks working in the wider analaytical / data science field, places like project Euler provide an excellent opportunity to work with academic programming concepts that do not frequently appear in real-life. I was looking at common problem:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You are given an unordered array consisting of consecutive integers [1, 2, 3, &amp;hellip;, n] without any duplicates. You are allowed to swap any two elements. Find the minimum number of swaps required to sort the array in ascending order.&lt;br&gt;
Example
Perform the following steps:&lt;/p&gt;</description></item><item><title>Using R for File Manipulation</title><link>https://www.thefinalartefact.xyz/post/file-manipulation-in-r/</link><pubDate>Mon, 29 Mar 2021 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/file-manipulation-in-r/</guid><description>&lt;h2 id="challenge"&gt;Challenge&lt;/h2&gt;
&lt;p&gt;File manipulation is a frequent task unavoidable in almost every IT business process. Traditionally, file manipulation tasks are accomplished within the ramifications of specific tools native to a given system. As such, the one may consider writing and scheduling shell scriptt to undertake frequent file operations or using more specific purpose-built tools like &lt;a href="https://linux.die.net/man/8/logrotate"&gt;&lt;code&gt;logrotate&lt;/code&gt;&lt;/a&gt; in order to archive logs or tools like &lt;a href="https://kafka.apache.org/20/documentation.html"&gt;Kafka&lt;/a&gt; are used to build streaming-data pipelines. R is usually though of as a statistical programming language or as an environment for a statistical analysis. The fact that R is a mature programming language able to successfully accomplish a wide array of traditional tasks is frequently ignored. What constitutes a &lt;em&gt;programming language&lt;/em&gt; is a valid question. Wikipedia offers somehow wide definition:&lt;/p&gt;</description></item><item><title>Inserting Data into Partitioned Table</title><link>https://www.thefinalartefact.xyz/post/inserting-data-into-partitioned-table/</link><pubDate>Fri, 26 Feb 2021 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/inserting-data-into-partitioned-table/</guid><description>&lt;h2 id="rationale"&gt;Rationale&lt;/h2&gt;
&lt;p&gt;Maintaining partitioned Hive tables is a frequent practice in a business. Properly structured tables are conducive to achieving robust performance through speeding up query execution (see Costa, Costa, and Santos 2019). Frequent use cases pertain to creating tables with hierarchical partition structure. In context of a data that is refreshed daily, the frequently utilised partition structure reflects years, months and dates.&lt;/p&gt;
&lt;h2 id="creating-partitioned-table"&gt;Creating partitioned table&lt;/h2&gt;
&lt;p&gt;In HiveQL we would create the table with the following structure using the syntax below. In order to keep the development tidy, I’m creating a separate database on Hive which I will use for the purpose of creating tables for this article.&lt;/p&gt;</description></item><item><title>Poor Man's Robust Shiny App Deployment (Part II)</title><link>https://www.thefinalartefact.xyz/post/sample-analytical-app-with-shiny/</link><pubDate>Fri, 12 Feb 2021 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/sample-analytical-app-with-shiny/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;This article draws on the past post concerned with utilisation of &lt;a href="https://github.com/ThinkR-open/golem"&gt;&lt;code&gt;golem&lt;/code&gt;&lt;/a&gt; for robust deployment of analytical and reporting solutions. For this article, we will assume that we are working with defined working requirements that utilise some of the Labour Market Statistics disseminated through the &lt;a href="https://www.nomisweb.co.uk"&gt;&lt;em&gt;nomis&lt;/em&gt;&lt;/a&gt; portal.&lt;/p&gt;
&lt;h2 id="change-plan"&gt;Change Plan&lt;/h2&gt;
&lt;h3 id="what-we-have"&gt;What we have&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Reporting requirements&lt;/li&gt;
&lt;li&gt;Past scriptts we used to create reports with accompanying instructions&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="what-we-want"&gt;What we want&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Stronger business continuity&lt;/em&gt; - we want to be able to give some access to this project and don&amp;rsquo;t be concerned with missing files, outdated unavailable documentation and questions on how to produce updated reports. We want self-encompassing entity that takes of care of its technical requirements and user-interaction^[Good parallel can be drawn between this approach and manuals available with life-saving equipment. Equipment delivers technical capacity and manual ensures operational capacity. In case of an inexperienced user one is not useful without the other. We want to ensure that user with minimum required capacity can use the tools correctly.]&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Better reproducibility&lt;/em&gt; - Easier way to re-run reports on custom parameters&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Improved efficiency&lt;/em&gt; - We want to have a possibility of quickly creating updated and re-running past reports using the app.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Better development:&lt;/em&gt;
&lt;ul&gt;
&lt;li&gt;We want to ensure that any change requests to our reporting/analytical stack won&amp;rsquo;t break crucial functionalities.&lt;/li&gt;
&lt;li&gt;We want to modularise development so new corporate branding or visualisation requirements can be applied with no (or minimal) integration in analytical function&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="framework"&gt;Framework&lt;/h2&gt;
&lt;h2 id="package"&gt;Package&lt;/h2&gt;
&lt;p&gt;Future robust development owes a lot to solid foundations. As the aim is to capitalise on the robust R package architecture, we will look to leverage available supporting packages. As a first step, we will construct a new Shiny/R package infrastructure using &lt;code&gt;golem&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Poor Man's Robust Shiny App Deployment</title><link>https://www.thefinalartefact.xyz/post/poor-man-s-robust-shiny-app-deployment/</link><pubDate>Thu, 23 Jul 2020 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/poor-man-s-robust-shiny-app-deployment/</guid><description>&lt;h2 id="not-so-uncommon-problem"&gt;Not so uncommon problem&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://rstudio.com/products/connect/"&gt;RStudio Connect&lt;/a&gt; and more modest &lt;a href="https://www.shinyproxy.io"&gt;Shiny Proxy&lt;/a&gt; come to mind as most obvious solutions for deploying Shiny applications in production. Application servers are ideal for deploying applications that are to be consumed on a regular basis by larger audiences. In addition to serving the application, managing dependencies and user access or logging user activity are common tasks we would expect for a publishing platform to address. Frequently, however, deployment of Shiny application is directed at smaller audiences and less frequent usage. In such a situation, are availability, accessibility and user access management requirements will be often more modest. Commonly,in business a modelling or analytical solution can be packaged in Shiny application facilitating periodical re-run of models with different parameters and updated data sets. Such solutions can be conveniently utilised to facilitated development of monthly or quarterly reports. If the app is used once per month/quarter by a narrow user group the need to deploy it on the server is not well articulated. In that particular case we are mostly interested in ensuring that we can:&lt;/p&gt;</description></item><item><title>Three-Way Operator in R</title><link>https://www.thefinalartefact.xyz/post/three-way-operator-in-r/</link><pubDate>Fri, 08 May 2020 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/three-way-operator-in-r/</guid><description>&lt;p&gt;Is there a merit for a three-way operator in R?&lt;/p&gt;
&lt;h2 id="background"&gt;Background&lt;/h2&gt;
&lt;p&gt;In C++20 revision added &amp;ldquo;spaceship operator&amp;rdquo;, &lt;a href="https://en.cppreference.com/w/cpp/language/operator_comparison#Three-way_comparison"&gt;which is defined as follows&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-r" data-lang="r"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="c1"&gt;# if lhs &amp;lt; rhs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="c1"&gt;# if lhs &amp;gt; rhs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="c1"&gt;# if lhs and rhs are equal/equivalent.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="r-implementation"&gt;R implementation&lt;/h2&gt;
&lt;p&gt;The behaviour can be achieved in R in multiple ways. A one straightforward approach would involve making use of the &lt;code&gt;ifelse&lt;/code&gt; statement&lt;/p&gt;
&lt;h2 id="ifelse-implementation"&gt;&lt;code&gt;ifelse&lt;/code&gt; implementation&lt;/h2&gt;
&lt;p&gt;Basic approach would involve comparing the two figures and respectively returning &lt;code&gt;-1&lt;/code&gt; or &lt;code&gt;1&lt;/code&gt; consistently with the definition above.&lt;/p&gt;</description></item><item><title>Installing Hortonworks Sanbox on Mac with Docker</title><link>https://www.thefinalartefact.xyz/post/installing-hortonworks-sanbox-deployment-hdp-on-docker-mac/</link><pubDate>Sat, 23 Feb 2019 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/installing-hortonworks-sanbox-deployment-hdp-on-docker-mac/</guid><description>&lt;h2 id="background"&gt;Background&lt;/h2&gt;
&lt;p&gt;The post covers installation of Hortonworks Sandbox (HD) on Mac using Docker. In software development, &lt;em&gt;sandbox&lt;/em&gt; describes a testing environment that can be used to isolate untested code changes from a production code. Hortonworks Sandbox provides such an environment with the Hortonworks Data Platform installed. Hortonworks Data Platform is an open source framework facilitating distributed storage and processing large volumes of data.&lt;/p&gt;
&lt;p&gt;Deploying system for distributed processing &lt;em&gt;within&lt;/em&gt; a single computer may seem like a counter-intuitive idea but it&amp;rsquo;s actually a very common practice. Most frequent use cases involve various learning / professional development activities where one may be interested in learning new technology or simply exploring available interfaces. Other frequent use case pertains to various demos, where there may be a need to demonstrate product capabilities and accessing proper, production environment could be cumbersome.&lt;/p&gt;</description></item><item><title>Interactively Loading Shiny Modules</title><link>https://www.thefinalartefact.xyz/post/interactive-module/</link><pubDate>Sat, 24 Nov 2018 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/interactive-module/</guid><description>&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;p&gt;If you want to see the implemented solution, please refer to:
GitHub repo.&lt;/p&gt;
&lt;h2 id="context"&gt;Context&lt;/h2&gt;
&lt;p&gt;Shiny is a widely popular web application framework for a R. In simple tearms it enables any R programmer to develop and deploy web application. This application could be simple - an interactive document consisting of a few charts and tables or a c complex &amp;ldquo;behemoth&amp;rdquo; with multiple functionalities enabling end-users to run models, query external data, generate exportable reports and sophisticated visuals.&lt;/p&gt;</description></item><item><title>ASCII charts in R</title><link>https://www.thefinalartefact.xyz/post/ascii-charts-in-r/</link><pubDate>Fri, 05 Jun 2015 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/ascii-charts-in-r/</guid><description>&lt;p&gt;In Stata it is possible to use function plot in order to get a simple scatter plot in Stata console. As of Stata eight, plot is no longer supported but remains a useful tool for quickly exploring relationships between variables. Using plot on the auto data provides the following results:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.thefinalartefact.xyz/post/ascii-charts-in-r/images/stata_text_plot.png" target="_blank" rel="noopener noreferrer"&gt;
&lt;img alt="Stata Textual Plot" loading="lazy" src="https://www.thefinalartefact.xyz/post/ascii-charts-in-r/images/stata_text_plot.png"&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now the question is: can we achieve the same level of convenience in R? Of course. The txtplot package authored by Bjoern Bornkamp provides similar functionality. Executing the code below will generate nice text plot straight in the R console:&lt;/p&gt;</description></item><item><title>Managing rows in the ggplot legend</title><link>https://www.thefinalartefact.xyz/post/managing-rows-in-the-ggplot-legend/</link><pubDate>Sat, 28 Mar 2015 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/managing-rows-in-the-ggplot-legend/</guid><description>&lt;p&gt;After developing the Shiny App sourcing live labour market data from NOMIS. I wanted to accommodate a convenient way of managing rows in the legend. In particular, I wanted to account for the situation where end-user may select a number of geographies that will only conveniently fit into two or more rows. After transposing the data to long format, guessing the number of elements in the legend is relatively simple as it will correspond to the number of unique geographies passed via the subset command.&lt;/p&gt;</description></item><item><title>Amusing way to get user input windows in R</title><link>https://www.thefinalartefact.xyz/post/amusing-way-to-get-user-input-windows-in-r/</link><pubDate>Wed, 01 Feb 2012 00:00:00 +0000</pubDate><guid>https://www.thefinalartefact.xyz/post/amusing-way-to-get-user-input-windows-in-r/</guid><description>&lt;p&gt;In an unlikely scenario that beautiful &lt;a href="http://shiny.rstudio.com/" target="_blank" rel="noopener"&gt;Shiny &lt;/a&gt;apps do not meet your analytical requirements and developing a full-blown user interface. in &lt;a href="http://www.ggobi.org/rgtk2/"&gt;RGtk2&lt;/a&gt; may seem to be a little too much, there is a third, often overlooked solution, - package &lt;a href="https://cran.r-project.org/web/packages/svDialogs/index.html"&gt;svDialogs&lt;/a&gt; by Philippe Grosjean. The package in a convenient way enables user to create various interface gadgets. For example the code:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-r" data-lang="r"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;svDialogs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;## Let&amp;#39;s keep some data in one place&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;user_figure&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="n"&gt;svDialogs&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;dlg_input&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;would result in the following window being presented to the user:&lt;/p&gt;</description></item></channel></rss>