<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Kwiz Research</title>
<link>https://research.kwizresearch.com/blog/</link>
<atom:link href="https://research.kwizresearch.com/blog/index.xml" rel="self" type="application/rss+xml"/>
<description>Insights on environmental data science, climate analytics, biodiversity, R programming, and production-grade enterprise data systems.</description>
<generator>quarto-1.4.554</generator>
<lastBuildDate>Sun, 15 Mar 2026 00:00:00 GMT</lastBuildDate>
<item>
  <title>Where Environmental Science Meets Finance: Quantitative Methods for Carbon Markets</title>
  <dc:creator>Kwizera Jean</dc:creator>
  <link>https://research.kwizresearch.com/blog/carbon-markets-quant-methods/</link>
  <description><![CDATA[ 




<section id="the-convergence" class="level2">
<h2 class="anchored" data-anchor-id="the-convergence">The Convergence</h2>
<p>At Kwiz Computing Technologies, our two deepest areas of expertise — environmental data science and quantitative finance — are converging in an unexpected place: <strong>carbon markets</strong>.</p>
<p>Carbon markets are financial instruments built on environmental science. A carbon credit represents a tonne of CO2 equivalent that has been avoided or removed. Its value depends on environmental integrity (was the emission reduction real?) and market dynamics (what will buyers pay?). Analysing these markets requires both environmental domain knowledge and quantitative financial methods.</p>
<p>This post explores how the same statistical frameworks we use in systematic trading — time series analysis, regime detection, cross-validation — apply to the emerging carbon market ecosystem.</p>
</section>
<section id="the-carbon-market-landscape" class="level2">
<h2 class="anchored" data-anchor-id="the-carbon-market-landscape">The Carbon Market Landscape</h2>
<section id="compliance-markets" class="level3">
<h3 class="anchored" data-anchor-id="compliance-markets">Compliance Markets</h3>
<p>Regulated carbon markets — the EU Emissions Trading System (EU ETS), California’s cap-and-trade, and emerging systems in China and elsewhere — set a cap on total emissions and allow companies to trade emission allowances. These markets are mature, liquid, and behave like traditional financial instruments.</p>
</section>
<section id="voluntary-carbon-markets" class="level3">
<h3 class="anchored" data-anchor-id="voluntary-carbon-markets">Voluntary Carbon Markets</h3>
<p>Voluntary markets allow organisations to purchase carbon credits (offsets) to compensate for emissions they cannot eliminate. These markets are less liquid, more heterogeneous, and face significant challenges around credit quality, additionality, and permanence.</p>
<p>Both markets generate time series data amenable to quantitative analysis, but with very different statistical properties.</p>
</section>
</section>
<section id="quantitative-approaches" class="level2">
<h2 class="anchored" data-anchor-id="quantitative-approaches">Quantitative Approaches</h2>
<section id="time-series-analysis-of-carbon-prices" class="level3">
<h3 class="anchored" data-anchor-id="time-series-analysis-of-carbon-prices">Time Series Analysis of Carbon Prices</h3>
<p>Carbon allowance prices (particularly EU ETS) exhibit many of the same statistical properties as other financial time series: volatility clustering, regime shifts, and sensitivity to policy announcements.</p>
<div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(forecast)</span>
<span id="cb1-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(tseries)</span>
<span id="cb1-3"></span>
<span id="cb1-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Load EU ETS carbon price data</span></span>
<span id="cb1-5">carbon_prices <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">read_csv</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"eu_ets_prices.csv"</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb1-6">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">log_return =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">log</span>(price <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">lag</span>(price)))</span>
<span id="cb1-7"></span>
<span id="cb1-8"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Test for stationarity</span></span>
<span id="cb1-9"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">adf.test</span>(carbon_prices<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>log_return, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">alternative =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"stationary"</span>)</span>
<span id="cb1-10"></span>
<span id="cb1-11"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># GARCH modelling for volatility dynamics</span></span>
<span id="cb1-12"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(rugarch)</span>
<span id="cb1-13"></span>
<span id="cb1-14">spec <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ugarchspec</span>(</span>
<span id="cb1-15">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">variance.model =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">model =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"sGARCH"</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">garchOrder =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">c</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>)),</span>
<span id="cb1-16">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">mean.model =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">list</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">armaOrder =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">c</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>)),</span>
<span id="cb1-17">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">distribution.model =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"std"</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Student-t for fat tails</span></span>
<span id="cb1-18">)</span>
<span id="cb1-19"></span>
<span id="cb1-20">fit <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ugarchfit</span>(spec, carbon_prices<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>log_return)</span></code></pre></div>
<p>GARCH models capture the volatility clustering that characterises carbon markets — periods of low volatility interrupted by policy-driven spikes. This is directly analogous to our forex strategy work, where volatility regime modelling informs position sizing and risk management.</p>
</section>
<section id="regime-detection-with-hidden-markov-models" class="level3">
<h3 class="anchored" data-anchor-id="regime-detection-with-hidden-markov-models">Regime Detection with Hidden Markov Models</h3>
<p>Carbon markets exhibit distinct regimes driven by policy changes, economic cycles, and regulatory announcements. Hidden Markov Models (HMMs) identify these regimes statistically:</p>
<div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(depmixS4)</span>
<span id="cb2-2"></span>
<span id="cb2-3"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Fit a 3-state HMM to carbon returns</span></span>
<span id="cb2-4">hmm_model <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">depmix</span>(</span>
<span id="cb2-5">  log_return <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>,</span>
<span id="cb2-6">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">data =</span> carbon_prices,</span>
<span id="cb2-7">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">nstates =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>,</span>
<span id="cb2-8">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">family =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">gaussian</span>()</span>
<span id="cb2-9">)</span>
<span id="cb2-10"></span>
<span id="cb2-11">hmm_fit <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">fit</span>(hmm_model)</span>
<span id="cb2-12"></span>
<span id="cb2-13"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Extract regime probabilities</span></span>
<span id="cb2-14">regimes <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">posterior</span>(hmm_fit)</span>
<span id="cb2-15">carbon_prices<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>regime <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> regimes<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>state</span></code></pre></div>
<p>Typical findings reveal:</p>
<ul>
<li><strong>Low-volatility regime</strong> — stable pricing during “business as usual” periods</li>
<li><strong>Transition regime</strong> — moderate volatility during policy deliberation</li>
<li><strong>High-volatility regime</strong> — sharp price movements around regulatory decisions</li>
</ul>
<p>This is the same HMM framework we use for carry strategy regime detection in Kwiz Quants. The mathematics is identical; only the domain interpretation changes.</p>
</section>
<section id="seasonal-decomposition" class="level3">
<h3 class="anchored" data-anchor-id="seasonal-decomposition">Seasonal Decomposition</h3>
<p>Carbon markets exhibit strong seasonal patterns driven by compliance cycles. EU ETS prices typically rise toward April surrender deadlines and experience sell-offs afterward.</p>
<div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(feasts)</span>
<span id="cb3-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(tsibble)</span>
<span id="cb3-3"></span>
<span id="cb3-4">carbon_tsibble <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> carbon_prices <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-5">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">as_tsibble</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">index =</span> date)</span>
<span id="cb3-6"></span>
<span id="cb3-7">decomposition <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> carbon_tsibble <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-8">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">model</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">STL</span>(price <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">season</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">period =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">252</span>))) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Trading days</span></span>
<span id="cb3-9">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">components</span>()</span>
<span id="cb3-10"></span>
<span id="cb3-11"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">autoplot</span>(decomposition)</span></code></pre></div>
<p>Understanding seasonal patterns helps both market participants (timing purchases) and environmental project developers (timing credit issuance).</p>
</section>
</section>
<section id="environmental-data-meets-market-data" class="level2">
<h2 class="anchored" data-anchor-id="environmental-data-meets-market-data">Environmental Data Meets Market Data</h2>
<section id="linking-monitoring-to-valuation" class="level3">
<h3 class="anchored" data-anchor-id="linking-monitoring-to-valuation">Linking Monitoring to Valuation</h3>
<p>The most interesting analytical opportunity in carbon markets lies at the intersection of environmental monitoring data and market data. Satellite-derived vegetation indices (NDVI), ground-sensor emissions data, and weather patterns all affect the <em>supply side</em> of carbon credits, while regulatory and economic factors drive <em>demand</em>.</p>
<div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb4-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(terra)</span>
<span id="cb4-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(sf)</span>
<span id="cb4-3"></span>
<span id="cb4-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Process satellite data for reforestation project</span></span>
<span id="cb4-5">ndvi_timeseries <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rast</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"project_ndvi_2020_2025.tif"</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb4-6">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">extract</span>(project_boundary) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb4-7">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">summarise</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">mean_ndvi =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mean</span>(NDVI, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">na.rm =</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>), <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">.by =</span> date)</span>
<span id="cb4-8"></span>
<span id="cb4-9"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Correlate vegetation growth with credit issuance</span></span>
<span id="cb4-10">correlation_analysis <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">merge</span>(</span>
<span id="cb4-11">  ndvi_timeseries,</span>
<span id="cb4-12">  credit_issuance,</span>
<span id="cb4-13">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">by =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"date"</span></span>
<span id="cb4-14">)</span>
<span id="cb4-15"></span>
<span id="cb4-16"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cor.test</span>(</span>
<span id="cb4-17">  correlation_analysis<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>mean_ndvi,</span>
<span id="cb4-18">  correlation_analysis<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>credits_issued</span>
<span id="cb4-19">)</span></code></pre></div>
<p>This analysis connects our environmental remote sensing capabilities (satellite data processing, geospatial analysis) with financial valuation — a combination that is rare in the market and increasingly valuable.</p>
</section>
<section id="statistical-verification-of-additionality" class="level3">
<h3 class="anchored" data-anchor-id="statistical-verification-of-additionality">Statistical Verification of Additionality</h3>
<p>“Additionality” — whether a carbon project’s emission reductions would have happened anyway — is the central credibility question in voluntary carbon markets. Statistical methods can help assess this:</p>
<div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb5-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Synthetic control method for additionality assessment</span></span>
<span id="cb5-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(Synth)</span>
<span id="cb5-3"></span>
<span id="cb5-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Compare project region against similar non-project regions</span></span>
<span id="cb5-5"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># to estimate counterfactual emissions</span></span>
<span id="cb5-6">synth_result <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">synth</span>(</span>
<span id="cb5-7">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">dataprep.out =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dataprep</span>(</span>
<span id="cb5-8">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">foo =</span> emissions_data,</span>
<span id="cb5-9">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">predictors =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">c</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"gdp"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"population"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"forest_cover"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"temperature"</span>),</span>
<span id="cb5-10">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">dependent =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"emissions"</span>,</span>
<span id="cb5-11">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">unit.variable =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"region_id"</span>,</span>
<span id="cb5-12">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">time.variable =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"year"</span>,</span>
<span id="cb5-13">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">treatment.identifier =</span> project_region,</span>
<span id="cb5-14">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">controls.identifier =</span> control_regions,</span>
<span id="cb5-15">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">time.predictors.prior =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2015</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2019</span>,</span>
<span id="cb5-16">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">time.optimize.ssr =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2015</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2019</span>,</span>
<span id="cb5-17">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">time.plot =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2015</span><span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2025</span></span>
<span id="cb5-18">  )</span>
<span id="cb5-19">)</span></code></pre></div>
<p>Synthetic control methods create a statistical counterfactual — what would emissions have been without the project? — by constructing a weighted combination of similar regions. This is more rigorous than the simple before-and-after comparisons that many carbon projects use for verification.</p>
</section>
</section>
<section id="the-kwiz-approach" class="level2">
<h2 class="anchored" data-anchor-id="the-kwiz-approach">The Kwiz Approach</h2>
<p>Carbon markets represent a natural convergence of our two core competencies:</p>
<ol type="1">
<li><p><strong>Environmental data science</strong> provides the domain knowledge to assess project quality, process satellite monitoring data, and understand the science behind emission reductions.</p></li>
<li><p><strong>Quantitative finance</strong> provides the statistical framework for price modelling, regime detection, risk assessment, and systematic analysis of market dynamics.</p></li>
</ol>
<p>We see carbon markets as a domain where interdisciplinary expertise — rather than pure financial engineering or pure environmental science alone — creates the most value. Organisations navigating these markets need partners who understand both the environmental integrity of carbon credits and the financial dynamics of the markets where they trade.</p>
</section>
<section id="looking-forward" class="level2">
<h2 class="anchored" data-anchor-id="looking-forward">Looking Forward</h2>
<p>As carbon markets mature and expand — the voluntary market alone is projected to grow substantially over the coming decade — the demand for rigorous, data-driven analysis will only increase. The organisations and projects that adopt quantitative methods for monitoring, verification, and market analysis will have a significant advantage over those relying on qualitative assessments and rules of thumb.</p>
<p>At Kwiz Computing, we are positioning ourselves at this intersection — applying the same engineering discipline and statistical rigour that characterises our trading infrastructure and environmental analytics to the carbon market ecosystem. It is, in many ways, the project that best represents what we do: building intelligent systems at the boundary between environmental science and finance.</p>


</section>

 ]]></description>
  <category>Environmental Data Science</category>
  <category>Quantitative Finance</category>
  <category>Carbon Markets</category>
  <category>R</category>
  <guid>https://research.kwizresearch.com/blog/carbon-markets-quant-methods/</guid>
  <pubDate>Sun, 15 Mar 2026 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Assessing Biodiversity Data Quality: A GBIF Kenya Case Study</title>
  <dc:creator>Kwizera Jean</dc:creator>
  <link>https://research.kwizresearch.com/blog/gbif-kenya-data-quality/</link>
  <description><![CDATA[ 




<section id="the-data-quality-challenge-in-biodiversity-science" class="level2">
<h2 class="anchored" data-anchor-id="the-data-quality-challenge-in-biodiversity-science">The Data Quality Challenge in Biodiversity Science</h2>
<p>The Global Biodiversity Information Facility (GBIF) aggregates hundreds of millions of species occurrence records from institutions worldwide. For Kenya alone, GBIF holds millions of records spanning decades of observation. But aggregation at this scale introduces systematic data quality challenges that can undermine conservation decisions if left unaddressed.</p>
<p>In our work with environmental impact assessments and biodiversity monitoring across East Africa, we have seen how uncritical use of GBIF data leads to flawed baseline assessments. This post walks through our approach to systematic data quality assessment — a reproducible R pipeline that we apply to every biodiversity project.</p>
</section>
<section id="why-data-quality-matters" class="level2">
<h2 class="anchored" data-anchor-id="why-data-quality-matters">Why Data Quality Matters</h2>
<p>Biodiversity data feeds directly into conservation planning, EIA baseline studies, and policy decisions. When that data contains coordinate errors, taxonomic misidentifications, or temporal gaps, the downstream consequences are real: protected areas drawn around phantom populations, impact assessments that miss genuinely sensitive species, and monitoring programmes built on unreliable baselines.</p>
<p>The challenge is that GBIF data comes from heterogeneous sources — museum collections, citizen science platforms, academic surveys — each with different quality standards and error profiles.</p>
</section>
<section id="a-reproducible-quality-assessment-workflow" class="level2">
<h2 class="anchored" data-anchor-id="a-reproducible-quality-assessment-workflow">A Reproducible Quality Assessment Workflow</h2>
<p>Our pipeline operates in four stages, each implemented as testable R functions:</p>
<section id="stage-1-data-retrieval-and-initial-profiling" class="level3">
<h3 class="anchored" data-anchor-id="stage-1-data-retrieval-and-initial-profiling">Stage 1: Data Retrieval and Initial Profiling</h3>
<p>We use the <code>rgbif</code> package to access GBIF’s API programmatically, then profile the dataset to understand its composition before applying any filters.</p>
<div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(rgbif)</span>
<span id="cb1-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(dplyr)</span>
<span id="cb1-3"></span>
<span id="cb1-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Retrieve occurrence data for Kenya</span></span>
<span id="cb1-5">occurrences <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">occ_search</span>(</span>
<span id="cb1-6">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">country =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KE"</span>,</span>
<span id="cb1-7">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">hasCoordinate =</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,</span>
<span id="cb1-8">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">limit =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">50000</span></span>
<span id="cb1-9">)<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span>data</span>
<span id="cb1-10"></span>
<span id="cb1-11"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Initial profiling</span></span>
<span id="cb1-12">profiling <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> occurrences <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb1-13">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">summarise</span>(</span>
<span id="cb1-14">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">n_records =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">n</span>(),</span>
<span id="cb1-15">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">n_species =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">n_distinct</span>(species),</span>
<span id="cb1-16">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">date_range =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">min</span>(year, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">na.rm =</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>), <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">max</span>(year, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">na.rm =</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>), <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">sep =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"-"</span>),</span>
<span id="cb1-17">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">pct_with_coords =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mean</span>(<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">is.na</span>(decimalLatitude)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span></span>
<span id="cb1-18">  )</span></code></pre></div>
</section>
<section id="stage-2-coordinate-validation" class="level3">
<h3 class="anchored" data-anchor-id="stage-2-coordinate-validation">Stage 2: Coordinate Validation</h3>
<p>Coordinate errors are the most common and consequential data quality issue. We check for:</p>
<ul>
<li><strong>Country centroid records</strong> — coordinates that fall exactly on Kenya’s geographic centroid, typically indicating missing data that was auto-filled</li>
<li><strong>Zero coordinates</strong> — records at (0, 0) or with zero latitude/longitude</li>
<li><strong>Precision issues</strong> — coordinates rounded to integer degrees, indicating low spatial precision</li>
<li><strong>Out-of-boundary records</strong> — coordinates that fall outside Kenya’s borders despite being tagged as Kenyan occurrences</li>
</ul>
<div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(sf)</span>
<span id="cb2-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(CoordinateCleaner)</span>
<span id="cb2-3"></span>
<span id="cb2-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Flag coordinate issues</span></span>
<span id="cb2-5">cleaned <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> occurrences <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb2-6">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cc_val</span>() <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span>         <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Remove invalid coordinates</span></span>
<span id="cb2-7">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cc_zero</span>() <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span>        <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Flag zero coordinates</span></span>
<span id="cb2-8">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cc_cen</span>() <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span>         <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Flag country centroids</span></span>
<span id="cb2-9">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cc_dupl</span>() <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span>        <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Flag exact duplicates</span></span>
<span id="cb2-10">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cc_gbif</span>() <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span>        <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Flag GBIF headquarters</span></span>
<span id="cb2-11">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cc_inst</span>()           <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Flag biodiversity institutions</span></span></code></pre></div>
</section>
<section id="stage-3-taxonomic-verification" class="level3">
<h3 class="anchored" data-anchor-id="stage-3-taxonomic-verification">Stage 3: Taxonomic Verification</h3>
<p>Taxonomic names change over time as species are reclassified. We validate names against the GBIF backbone taxonomy and flag records with unresolved or disputed classifications.</p>
<div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Verify taxonomy against GBIF backbone</span></span>
<span id="cb3-2">taxa_check <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> occurrences <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-3">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">distinct</span>(species, taxonomicStatus, taxonRank) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-4">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">filter</span>(</span>
<span id="cb3-5">    taxonomicStatus <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ACCEPTED"</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|</span></span>
<span id="cb3-6">    taxonRank <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"SPECIES"</span></span>
<span id="cb3-7">  )</span></code></pre></div>
</section>
<section id="stage-4-temporal-and-sampling-bias-assessment" class="level3">
<h3 class="anchored" data-anchor-id="stage-4-temporal-and-sampling-bias-assessment">Stage 4: Temporal and Sampling Bias Assessment</h3>
<p>Even clean data can be misleading if it is unevenly distributed in time or space. We assess:</p>
<ul>
<li><strong>Temporal coverage</strong> — Are records concentrated in particular years or seasons?</li>
<li><strong>Spatial sampling bias</strong> — Are records clustered near roads, cities, or research stations?</li>
<li><strong>Taxonomic bias</strong> — Are certain taxa over-represented relative to expected diversity?</li>
</ul>
</section>
</section>
<section id="key-findings-from-the-kenya-dataset" class="level2">
<h2 class="anchored" data-anchor-id="key-findings-from-the-kenya-dataset">Key Findings from the Kenya Dataset</h2>
<p>Applying this pipeline to Kenyan GBIF data consistently reveals several patterns:</p>
<ul>
<li>A significant fraction of records fall on country or county centroids, indicating geocoding from administrative labels rather than actual observation coordinates</li>
<li>Temporal coverage is heavily skewed toward recent decades, with sparse data before 2000</li>
<li>Spatial sampling is concentrated along major transport corridors and near Nairobi, with large areas of northern Kenya essentially unsampled</li>
<li>Bird records dominate the dataset, with invertebrates and plants substantially under-represented relative to their actual diversity</li>
</ul>
</section>
<section id="implications-for-practice" class="level2">
<h2 class="anchored" data-anchor-id="implications-for-practice">Implications for Practice</h2>
<p>These findings have direct implications for how GBIF data should be used in environmental assessments:</p>
<ol type="1">
<li><p><strong>Never use raw GBIF data without quality filtering.</strong> The proportion of records flagged by our pipeline typically ranges from 15-30% — enough to materially change any analysis.</p></li>
<li><p><strong>Document your filtering decisions.</strong> Reproducible pipelines ensure that quality decisions are transparent and auditable — critical for EIA submissions.</p></li>
<li><p><strong>Acknowledge sampling gaps.</strong> Absence of records does not mean absence of species. Reporting what the data <em>cannot</em> tell you is as important as what it can.</p></li>
<li><p><strong>Combine sources.</strong> GBIF data should be supplemented with targeted field surveys, especially in under-sampled regions.</p></li>
</ol>
</section>
<section id="building-better-tools" class="level2">
<h2 class="anchored" data-anchor-id="building-better-tools">Building Better Tools</h2>
<p>This work informs our broader commitment to environmental data transparency. Our open-source <a href="https://github.com/kwizresearch/kenyaEIAFetcher">kenyaEIAFetcher</a> R package applies similar principles to EIA data access, and we are working on additional tools to make environmental data quality assessment more accessible to practitioners across East Africa.</p>
<p>Reproducible, transparent data quality assessment is not just good practice — it is essential for environmental governance that works.</p>


</section>

 ]]></description>
  <category>Environmental Data Science</category>
  <category>Biodiversity</category>
  <category>Data Quality</category>
  <category>R</category>
  <guid>https://research.kwizresearch.com/blog/gbif-kenya-data-quality/</guid>
  <pubDate>Tue, 25 Nov 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>R for Green Architecture: Data-Driven Design in Informal Settlements</title>
  <dc:creator>Kwizera Jean</dc:creator>
  <link>https://research.kwizresearch.com/blog/r-green-architecture-slums/</link>
  <description><![CDATA[ 




<section id="the-challenge-sustainable-design-in-resource-limited-contexts" class="level2">
<h2 class="anchored" data-anchor-id="the-challenge-sustainable-design-in-resource-limited-contexts">The Challenge: Sustainable Design in Resource-Limited Contexts</h2>
<p>Urban informal settlements house a significant and growing share of the world’s urban population. These communities face compounding environmental challenges: flooding, heat stress, poor air quality, water scarcity, and inadequate sanitation. Green architecture — environmentally conscious design that maximises human welfare while minimising environmental impact — offers promising solutions, but implementation requires data-driven planning that accounts for the unique constraints of informal settlement contexts.</p>
<p>R programming, with its statistical depth and geospatial capabilities, provides a powerful analytical framework for understanding these challenges and designing effective interventions.</p>
</section>
<section id="why-data-matters-in-informal-settlements" class="level2">
<h2 class="anchored" data-anchor-id="why-data-matters-in-informal-settlements">Why Data Matters in Informal Settlements</h2>
<p>Formal urban development benefits from extensive data: cadastral records, utility maps, building permits, and environmental monitoring networks. Informal settlements typically lack all of these. Planning green infrastructure in data-scarce environments requires creative analytical approaches — exactly where R’s ecosystem excels.</p>
<p>R enables practitioners to:</p>
<ul>
<li>Map and analyse settlement patterns using satellite imagery and spatial data, even without official documentation</li>
<li>Identify environmental vulnerabilities through statistical modelling and spatial analysis</li>
<li>Optimise resource distribution using mathematical optimisation</li>
<li>Establish rigorous evaluation frameworks for measuring intervention effectiveness</li>
</ul>
</section>
<section id="use-case-1-spatial-analysis-for-green-infrastructure-planning" class="level2">
<h2 class="anchored" data-anchor-id="use-case-1-spatial-analysis-for-green-infrastructure-planning">Use Case 1: Spatial Analysis for Green Infrastructure Planning</h2>
<p>Determining where to place green infrastructure (community gardens, bio-swales, tree planting, green roofs) requires understanding complex spatial relationships. We use <code>sf</code> and <code>leaflet</code> to model site suitability based on multiple factors:</p>
<div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(sf)</span>
<span id="cb1-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(leaflet)</span>
<span id="cb1-3"></span>
<span id="cb1-4"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Score potential sites based on multiple criteria</span></span>
<span id="cb1-5">sites <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> potential_locations <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb1-6">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(</span>
<span id="cb1-7">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">suitability =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.3</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> drainage_score <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span id="cb1-8">                  <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.25</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> access_score <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span id="cb1-9">                  <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.2</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> sunlight_score <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span id="cb1-10">                  <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.15</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> soil_quality <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span id="cb1-11">                  <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.1</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> community_proximity,</span>
<span id="cb1-12">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">priority =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">case_when</span>(</span>
<span id="cb1-13">      suitability <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.7</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"High"</span>,</span>
<span id="cb1-14">      suitability <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.4</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Medium"</span>,</span>
<span id="cb1-15">      <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Low"</span></span>
<span id="cb1-16">    )</span>
<span id="cb1-17">  )</span>
<span id="cb1-18"></span>
<span id="cb1-19"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Interactive mapping for stakeholder engagement</span></span>
<span id="cb1-20"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">leaflet</span>(sites) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb1-21">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addTiles</span>() <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb1-22">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">addCircleMarkers</span>(</span>
<span id="cb1-23">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">color =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">priority_palette</span>(priority),</span>
<span id="cb1-24">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">popup =</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">paste</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Type:"</span>, infrastructure_type,</span>
<span id="cb1-25">                   <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;br&gt;Score:"</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">round</span>(suitability, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>))</span>
<span id="cb1-26">  )</span></code></pre></div>
<p>Interactive maps are particularly valuable for stakeholder engagement in communities where technical reports may not be accessible. A visual tool that residents can interact with drives better participation and more informed decision-making.</p>
</section>
<section id="use-case-2-climate-vulnerability-and-green-roof-modelling" class="level2">
<h2 class="anchored" data-anchor-id="use-case-2-climate-vulnerability-and-green-roof-modelling">Use Case 2: Climate Vulnerability and Green Roof Modelling</h2>
<p>Informal settlements experience disproportionate climate risks. Green roofs offer a relatively low-cost intervention for heat reduction, but planners need to understand the cost-benefit tradeoffs at different scales.</p>
<p>We model the relationship between green roof coverage and temperature reduction, then estimate the economic implications:</p>
<div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(ggplot2)</span>
<span id="cb2-2"></span>
<span id="cb2-3"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Model temperature reduction vs coverage</span></span>
<span id="cb2-4">coverage_model <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tibble</span>(</span>
<span id="cb2-5">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">coverage_pct =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">seq</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">by =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span>),</span>
<span id="cb2-6">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">temp_reduction =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> (coverage_pct <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>),  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Simplified linear model</span></span>
<span id="cb2-7">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">avoided_heat_days =</span> temp_reduction <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">8</span>,       <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Days above threshold</span></span>
<span id="cb2-8">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">cost_per_sqm =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">45</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.15</span> <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> coverage_pct      <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Economies of scale</span></span>
<span id="cb2-9">)</span>
<span id="cb2-10"></span>
<span id="cb2-11"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ggplot</span>(coverage_model, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">aes</span>(coverage_pct, temp_reduction)) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span id="cb2-12">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">geom_line</span>(<span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">color =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#14b8a6"</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">linewidth =</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1.2</span>) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span id="cb2-13">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">labs</span>(</span>
<span id="cb2-14">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">title =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Green Roof Coverage vs Temperature Reduction"</span>,</span>
<span id="cb2-15">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">x =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Coverage (%)"</span>,</span>
<span id="cb2-16">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">y =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Temperature Reduction (°C)"</span></span>
<span id="cb2-17">  )</span></code></pre></div>
<p>The analysis typically reveals diminishing cost-efficiency returns at higher coverage percentages — helping planners identify optimal intervention scales that maximise impact per unit of investment.</p>
</section>
<section id="use-case-3-water-resource-optimisation" class="level2">
<h2 class="anchored" data-anchor-id="use-case-3-water-resource-optimisation">Use Case 3: Water Resource Optimisation</h2>
<p>Many settlements experience simultaneous water scarcity during dry periods and flooding during rains. Rainwater harvesting systems can address both, but optimal tank sizing requires statistical modelling of rainfall patterns:</p>
<div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(forecast)</span>
<span id="cb3-2"></span>
<span id="cb3-3"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Model rainfall and harvesting potential</span></span>
<span id="cb3-4">rainfall_model <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> rainfall_data <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-5">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">group_by</span>(month) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-6">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">summarise</span>(</span>
<span id="cb3-7">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">mean_rain =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mean</span>(rainfall_mm),</span>
<span id="cb3-8">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">p25 =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">quantile</span>(rainfall_mm, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.25</span>),</span>
<span id="cb3-9">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">p75 =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">quantile</span>(rainfall_mm, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.75</span>)</span>
<span id="cb3-10">  )</span>
<span id="cb3-11"></span>
<span id="cb3-12"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Optimise tank capacity for reliability</span></span>
<span id="cb3-13">tank_optimisation <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tibble</span>(</span>
<span id="cb3-14">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">capacity_litres =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">seq</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">500</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">10000</span>, <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">by =</span> <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">500</span>)</span>
<span id="cb3-15">) <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span id="cb3-16">  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mutate</span>(</span>
<span id="cb3-17">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">reliability =</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">map_dbl</span>(capacity_litres, <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">simulate_tank</span>(., rainfall_data)),</span>
<span id="cb3-18">    <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">cost =</span> capacity_litres <span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> cost_per_litre</span>
<span id="cb3-19">  )</span></code></pre></div>
</section>
<section id="use-case-4-air-quality-and-vegetation-impact" class="level2">
<h2 class="anchored" data-anchor-id="use-case-4-air-quality-and-vegetation-impact">Use Case 4: Air Quality and Vegetation Impact</h2>
<p>Informal settlements frequently suffer from poor air quality. We use spatial correlation analysis to quantify the relationship between vegetation cover (measured by NDVI from satellite imagery) and particulate matter concentrations:</p>
<div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb4-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(terra)</span>
<span id="cb4-2"></span>
<span id="cb4-3"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Correlate vegetation with air quality</span></span>
<span id="cb4-4">ndvi <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rast</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"settlement_ndvi.tif"</span>)</span>
<span id="cb4-5">pm25 <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rast</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pm25_measurements.tif"</span>)</span>
<span id="cb4-6"></span>
<span id="cb4-7">correlation <span class="ot" style="color: #003B4F;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">layerCor</span>(<span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">c</span>(ndvi, pm25), <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">fun =</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pearson"</span>)</span></code></pre></div>
<p>This analysis consistently shows that increased vegetation significantly reduces particulate pollution — providing an evidence base for prioritising tree planting and green space creation in the most polluted areas.</p>
</section>
<section id="the-broader-vision" class="level2">
<h2 class="anchored" data-anchor-id="the-broader-vision">The Broader Vision</h2>
<p>R enables a level of analytical rigour in informal settlement planning that was previously accessible only to well-resourced formal development projects. By making these tools open and reproducible, we aim to democratise evidence-based environmental planning for the communities that need it most.</p>
<p>This work sits at the intersection of our environmental data science practice and our commitment to using technology for social impact. The same spatial analysis capabilities we use for EIA assessments and biodiversity monitoring translate directly to urban environmental challenges — different domain, same engineering discipline.</p>


</section>

 ]]></description>
  <category>Environmental Data Science</category>
  <category>Urban Planning</category>
  <category>R</category>
  <category>Geospatial</category>
  <guid>https://research.kwizresearch.com/blog/r-green-architecture-slums/</guid>
  <pubDate>Fri, 07 Nov 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>The Complete Guide to Hosting R Shiny Applications</title>
  <dc:creator>Kwizera Jean</dc:creator>
  <link>https://research.kwizresearch.com/blog/rshiny-hosting-guide/</link>
  <description><![CDATA[ 




<section id="the-deployment-challenge" class="level2">
<h2 class="anchored" data-anchor-id="the-deployment-challenge">The Deployment Challenge</h2>
<p>Creating a brilliant Shiny app is only half the battle. Moving from a working prototype on your laptop to a production application that serves users reliably is where many R developers get stuck. The hosting landscape for Shiny applications has matured significantly, but choosing the right platform requires understanding the tradeoffs between simplicity, cost, control, and scalability.</p>
<p>This guide walks through the major hosting options, helps you choose the right one for your situation, and provides practical deployment guidance.</p>
</section>
<section id="the-hosting-landscape" class="level2">
<h2 class="anchored" data-anchor-id="the-hosting-landscape">The Hosting Landscape</h2>
<section id="shinyapps.io-managed-cloud" class="level3">
<h3 class="anchored" data-anchor-id="shinyapps.io-managed-cloud">1. shinyapps.io — Managed Cloud</h3>
<p><strong>Best for:</strong> Quick prototypes, small teams, minimal DevOps overhead</p>
<p>Posit’s managed hosting platform is the fastest path from development to deployment. Upload your app with a single function call and Posit handles infrastructure, scaling, and SSL.</p>
<div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">library</span>(rsconnect)</span>
<span id="cb1-2">rsconnect<span class="sc" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">deployApp</span>(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"my_app/"</span>)</span></code></pre></div>
<p><strong>Free tier:</strong> 5 applications, 25 active hours per month. Sufficient for demos and personal projects, but production applications will need a paid plan.</p>
<p><strong>Limitations:</strong> Limited customisation, shared infrastructure, and costs scale quickly at higher tiers. No control over the server environment.</p>
</section>
<section id="posit-connect-enterprise-platform" class="level3">
<h3 class="anchored" data-anchor-id="posit-connect-enterprise-platform">2. Posit Connect — Enterprise Platform</h3>
<p><strong>Best for:</strong> Organisations running multiple R/Python applications with enterprise security requirements</p>
<p>Posit Connect supports Shiny apps, R Markdown, Plumber APIs, and Python content. It integrates with LDAP/Active Directory for authentication and provides scheduled execution for reports.</p>
<p><strong>Cost:</strong> Approximately $20,000+/year. This is the enterprise option — appropriate when the organisation is standardised on R and needs a managed platform with authentication, access control, and multi-content support.</p>
</section>
<section id="self-hosted-shiny-server-open-source" class="level3">
<h3 class="anchored" data-anchor-id="self-hosted-shiny-server-open-source">3. Self-Hosted Shiny Server (Open Source)</h3>
<p><strong>Best for:</strong> Teams with Linux administration skills who want zero licensing costs</p>
<p>Shiny Server Open Source is free and gives you full control over the environment. The tradeoff is that you manage everything: installation, configuration, updates, security, and monitoring.</p>
<p>Key setup steps include R installation, Shiny Server configuration, Nginx reverse proxy for SSL termination, and authentication (which must be implemented separately, as open-source Shiny Server does not include built-in auth).</p>
</section>
<section id="docker-containerisation" class="level3">
<h3 class="anchored" data-anchor-id="docker-containerisation">4. Docker Containerisation</h3>
<p><strong>Best for:</strong> Reproducible deployments, cloud-native architecture, CI/CD integration</p>
<p>Docker is our recommended approach for production Shiny applications. It provides environment isolation, reproducibility via <code>renv</code>, and portability across cloud providers.</p>
<div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode dockerfile code-with-copy"><code class="sourceCode dockerfile"><span id="cb2-1"><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">FROM</span> rocker/shiny-verse:4.3.0</span>
<span id="cb2-2"></span>
<span id="cb2-3"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Install system dependencies</span></span>
<span id="cb2-4"><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">RUN</span> <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">apt-get</span> update <span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">&amp;&amp;</span> <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">apt-get</span> install <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-y</span> libpq-dev</span>
<span id="cb2-5"></span>
<span id="cb2-6"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Copy renv lockfile and restore packages</span></span>
<span id="cb2-7"><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">COPY</span> renv.lock /app/renv.lock</span>
<span id="cb2-8"><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">WORKDIR</span> /app</span>
<span id="cb2-9"><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">RUN</span> <span class="ex" style="color: null;
background-color: null;
font-style: inherit;">R</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-e</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"renv::restore()"</span></span>
<span id="cb2-10"></span>
<span id="cb2-11"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Copy application code</span></span>
<span id="cb2-12"><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">COPY</span> . /app</span>
<span id="cb2-13"></span>
<span id="cb2-14"><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">EXPOSE</span> 3838</span>
<span id="cb2-15"><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">CMD</span> [<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"R"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"-e"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"shiny::runApp('/app', port = 3838, host = '0.0.0.0')"</span>]</span></code></pre></div>
<p>This approach pairs well with cloud platforms like DigitalOcean, AWS ECS, or Google Cloud Run.</p>
</section>
<section id="cloud-platforms-aws-azure-gcp" class="level3">
<h3 class="anchored" data-anchor-id="cloud-platforms-aws-azure-gcp">5. Cloud Platforms (AWS, Azure, GCP)</h3>
<p><strong>Best for:</strong> Maximum control, enterprise scale, existing cloud infrastructure</p>
<p>Running Shiny on cloud VMs gives you complete control but requires DevOps expertise. AWS EC2, Azure VMs, and Google Compute Engine all work well, typically paired with a Docker container and a load balancer for production use.</p>
</section>
</section>
<section id="decision-framework" class="level2">
<h2 class="anchored" data-anchor-id="decision-framework">Decision Framework</h2>
<table class="table">
<thead>
<tr class="header">
<th>Priority</th>
<th>Recommended Platform</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Fastest deployment</td>
<td>shinyapps.io</td>
</tr>
<tr class="even">
<td>Lowest cost</td>
<td>Self-hosted open source</td>
</tr>
<tr class="odd">
<td>Enterprise auth &amp; governance</td>
<td>Posit Connect</td>
</tr>
<tr class="even">
<td>Maximum control &amp; reproducibility</td>
<td>Docker + cloud provider</td>
</tr>
</tbody>
</table>
</section>
<section id="essential-production-considerations" class="level2">
<h2 class="anchored" data-anchor-id="essential-production-considerations">Essential Production Considerations</h2>
<section id="authentication" class="level3">
<h3 class="anchored" data-anchor-id="authentication">Authentication</h3>
<p>For apps that need access control, options include:</p>
<ul>
<li><strong>ShinyProxy</strong> — open-source container-based solution that provides authentication and user management</li>
<li><strong>Nginx basic auth</strong> — simple but functional for internal tools</li>
<li><strong>OAuth integration</strong> — for applications requiring Google, GitHub, or enterprise SSO login</li>
</ul>
</section>
<section id="performance-optimisation" class="level3">
<h3 class="anchored" data-anchor-id="performance-optimisation">Performance Optimisation</h3>
<p>Production Shiny apps need careful attention to performance:</p>
<ul>
<li><strong>Caching</strong> — use <code>bindCache()</code> or <code>memoise</code> for expensive computations</li>
<li><strong>Async processing</strong> — <code>promises</code> and <code>future</code> for long-running operations</li>
<li><strong>Database connection pooling</strong> — <code>pool</code> package for efficient database access</li>
<li><strong>Profiling</strong> — <code>profvis</code> to identify bottlenecks before deployment</li>
</ul>
</section>
<section id="monitoring-and-logging" class="level3">
<h3 class="anchored" data-anchor-id="monitoring-and-logging">Monitoring and Logging</h3>
<p>Production applications need observability:</p>
<ul>
<li>Application-level logging with <code>logger</code> or <code>futile.logger</code></li>
<li>Server-level monitoring with uptime checks</li>
<li>Error tracking and alerting</li>
<li>Usage analytics for capacity planning</li>
</ul>
</section>
<section id="cicd-automation" class="level3">
<h3 class="anchored" data-anchor-id="cicd-automation">CI/CD Automation</h3>
<p>Automated deployment removes human error and speeds iteration:</p>
<div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode yaml code-with-copy"><code class="sourceCode yaml"><span id="cb3-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># GitHub Actions: deploy on push to main</span></span>
<span id="cb3-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">name</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> Deploy Shiny App</span></span>
<span id="cb3-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">on</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span></span>
<span id="cb3-4"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">  </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">push</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span></span>
<span id="cb3-5"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">    </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">branches</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">[</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">main</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">]</span></span>
<span id="cb3-6"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">jobs</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span></span>
<span id="cb3-7"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">  </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">deploy</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span></span>
<span id="cb3-8"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">    </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">runs-on</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> ubuntu-latest</span></span>
<span id="cb3-9"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">    </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">steps</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span></span>
<span id="cb3-10"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">      </span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">-</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">uses</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> actions/checkout@v4</span></span>
<span id="cb3-11"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">      </span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">-</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">uses</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> r-lib/actions/setup-r@v2</span></span>
<span id="cb3-12"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">      </span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">-</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">run</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> Rscript -e "rsconnect::deployApp('.')"</span></span></code></pre></div>
</section>
</section>
<section id="our-recommendation" class="level2">
<h2 class="anchored" data-anchor-id="our-recommendation">Our Recommendation</h2>
<p>Start with shinyapps.io for prototyping and stakeholder demos. When you need production stability, move to Docker containers deployed on your preferred cloud provider. This progression gives you speed early and control when it matters.</p>
<p>The key principle: <strong>get your app in front of users first, then optimise the infrastructure.</strong> Over-engineering the hosting before validating the application is a common mistake that slows the path to value.</p>


</section>

 ]]></description>
  <category>R</category>
  <category>Shiny</category>
  <category>DevOps</category>
  <category>Enterprise Applications</category>
  <guid>https://research.kwizresearch.com/blog/rshiny-hosting-guide/</guid>
  <pubDate>Mon, 27 Oct 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Deploying Quarto Websites to the Cloud: A Practical Guide</title>
  <dc:creator>Kwizera Jean</dc:creator>
  <link>https://research.kwizresearch.com/blog/quarto-cloud-deployment/</link>
  <description><![CDATA[ 




<section id="why-quarto-for-technical-websites" class="level2">
<h2 class="anchored" data-anchor-id="why-quarto-for-technical-websites">Why Quarto for Technical Websites</h2>
<p>Quarto has emerged as the go-to publishing system for data scientists and technical teams. It renders R, Python, Julia, and Observable code into beautiful websites, documents, and presentations — all from plain text source files. But once you’ve built your Quarto site locally, you need to get it online.</p>
<p>This guide covers the major deployment options, from zero-config platforms to enterprise cloud infrastructure.</p>
</section>
<section id="understanding-quarto-outputs" class="level2">
<h2 class="anchored" data-anchor-id="understanding-quarto-outputs">Understanding Quarto Outputs</h2>
<p>Before choosing a platform, understand what you’re deploying:</p>
<ul>
<li><strong>Static websites</strong> (HTML/CSS/JS) — the most common output. These are just files that any web server can host.</li>
<li><strong>Interactive documents</strong> — Quarto docs with embedded Shiny components require a server-side R process. These need specialised hosting.</li>
<li><strong>Non-web outputs</strong> — PDFs, Word documents, and presentations are generated locally and don’t need hosting.</li>
</ul>
<p>Most Quarto projects produce static websites, which gives you the widest range of hosting options.</p>
</section>
<section id="quick-start-platforms" class="level2">
<h2 class="anchored" data-anchor-id="quick-start-platforms">Quick Start Platforms</h2>
<section id="github-pages-free-and-simple" class="level3">
<h3 class="anchored" data-anchor-id="github-pages-free-and-simple">GitHub Pages — Free and Simple</h3>
<p>The most straightforward option for open-source projects and personal sites. GitHub Pages serves static files directly from your repository.</p>
<p><strong>Setup with GitHub Actions:</strong></p>
<div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode yaml code-with-copy"><code class="sourceCode yaml"><span id="cb1-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># .github/workflows/publish.yml</span></span>
<span id="cb1-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">name</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> Render and Deploy Quarto</span></span>
<span id="cb1-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">on</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span></span>
<span id="cb1-4"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">  </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">push</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span></span>
<span id="cb1-5"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">    </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">branches</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">[</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">main</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">]</span></span>
<span id="cb1-6"></span>
<span id="cb1-7"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">jobs</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span></span>
<span id="cb1-8"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">  </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">build-deploy</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span></span>
<span id="cb1-9"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">    </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">runs-on</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> ubuntu-latest</span></span>
<span id="cb1-10"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">    </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">permissions</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span></span>
<span id="cb1-11"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">      </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">contents</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> write</span></span>
<span id="cb1-12"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">    </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">steps</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span></span>
<span id="cb1-13"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">      </span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">-</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">uses</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> actions/checkout@v4</span></span>
<span id="cb1-14"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">      </span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">-</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">uses</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> quarto-dev/quarto-actions/setup@v2</span></span>
<span id="cb1-15"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">      </span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">-</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">name</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> Render</span></span>
<span id="cb1-16"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">        </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">run</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> quarto render</span></span>
<span id="cb1-17"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">      </span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">-</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">name</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> Deploy</span></span>
<span id="cb1-18"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">        </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">uses</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> peaceiris/actions-gh-pages@v4</span></span>
<span id="cb1-19"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">        </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">with</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span></span>
<span id="cb1-20"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">          </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">github_token</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> ${{ secrets.GITHUB_TOKEN }}</span></span>
<span id="cb1-21"><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">          </span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">publish_dir</span><span class="kw" style="color: #003B4F;
background-color: null;
font-style: inherit;">:</span><span class="at" style="color: #657422;
background-color: null;
font-style: inherit;"> ./_site</span></span></code></pre></div>
<p><strong>Pros:</strong> Completely free, unlimited bandwidth, integrated with your repo. <strong>Cons:</strong> Public repos only (for free tier), no server-side processing.</p>
</section>
<section id="netlify-developer-friendly" class="level3">
<h3 class="anchored" data-anchor-id="netlify-developer-friendly">Netlify — Developer-Friendly</h3>
<p>Netlify offers a generous free tier (100 GB bandwidth/month) with excellent developer experience. Connect your repository and Netlify builds and deploys automatically on every push.</p>
<p><strong>Setup:</strong></p>
<ol type="1">
<li>Connect your GitHub/GitLab repository to Netlify</li>
<li>Set build command: <code>quarto render</code></li>
<li>Set publish directory: <code>_site</code></li>
</ol>
<p>Netlify also supports deploy previews for pull requests — invaluable for team collaboration.</p>
</section>
<section id="cloudflare-pages-unlimited-bandwidth" class="level3">
<h3 class="anchored" data-anchor-id="cloudflare-pages-unlimited-bandwidth">Cloudflare Pages — Unlimited Bandwidth</h3>
<p>Cloudflare Pages offers unlimited bandwidth on its free tier, making it an attractive option for high-traffic sites. Setup is similar to Netlify.</p>
</section>
</section>
<section id="enterprise-cloud-deployments" class="level2">
<h2 class="anchored" data-anchor-id="enterprise-cloud-deployments">Enterprise Cloud Deployments</h2>
<section id="aws-s3-cloudfront" class="level3">
<h3 class="anchored" data-anchor-id="aws-s3-cloudfront">AWS: S3 + CloudFront</h3>
<p>For production deployments requiring maximum control, AWS’s combination of S3 (storage) and CloudFront (CDN) is the industry standard.</p>
<div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb2-1"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Render and sync to S3</span></span>
<span id="cb2-2"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">quarto</span> render</span>
<span id="cb2-3"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">aws</span> s3 sync _site/ s3://your-bucket-name <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--delete</span></span>
<span id="cb2-4"></span>
<span id="cb2-5"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Invalidate CloudFront cache</span></span>
<span id="cb2-6"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">aws</span> cloudfront create-invalidation <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb2-7">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--distribution-id</span> YOUR_DIST_ID <span class="dt" style="color: #AD0000;
background-color: null;
font-style: inherit;">\</span></span>
<span id="cb2-8">  <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--paths</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"/*"</span></span></code></pre></div>
<p><strong>Cost:</strong> Typically under $5/month for moderate-traffic sites. S3 storage is pennies; CloudFront charges per request.</p>
</section>
<section id="google-cloud-firebase-hosting" class="level3">
<h3 class="anchored" data-anchor-id="google-cloud-firebase-hosting">Google Cloud: Firebase Hosting</h3>
<p>Firebase Hosting is Google’s easiest path for static sites. It provides a global CDN, automatic SSL, and simple CLI deployment.</p>
<div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb3-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">firebase</span> init hosting</span>
<span id="cb3-2"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Set public directory to _site</span></span>
<span id="cb3-3"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">quarto</span> render</span>
<span id="cb3-4"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">firebase</span> deploy</span></code></pre></div>
</section>
<section id="azure-static-web-apps" class="level3">
<h3 class="anchored" data-anchor-id="azure-static-web-apps">Azure: Static Web Apps</h3>
<p>Azure Static Web Apps provides free hosting with GitHub Actions integration, custom domains, and authentication support.</p>
</section>
</section>
<section id="cicd-best-practices" class="level2">
<h2 class="anchored" data-anchor-id="cicd-best-practices">CI/CD Best Practices</h2>
<p>Automate your deployment pipeline from day one. Manual deployment introduces human error and slows iteration.</p>
<p><strong>Key principles:</strong></p>
<ol type="1">
<li><strong>Render on CI, not locally.</strong> This ensures your site builds from a clean environment, catching dependency issues early.</li>
<li><strong>Pin your Quarto version.</strong> Use <code>quarto-dev/quarto-actions/setup@v2</code> with a specific version to avoid surprise breaking changes.</li>
<li><strong>Cache dependencies.</strong> R and Python package installation is the slowest part of most builds. Cache aggressively.</li>
<li><strong>Deploy previews for PRs.</strong> Netlify and Cloudflare Pages offer this out of the box. For other platforms, deploy to a staging URL on pull requests.</li>
</ol>
</section>
<section id="performance-optimisation" class="level2">
<h2 class="anchored" data-anchor-id="performance-optimisation">Performance Optimisation</h2>
<p>Once deployed, optimise for speed:</p>
<ul>
<li><strong>Image optimisation</strong> — Use modern formats (WebP, AVIF) and appropriate dimensions. Tools like <code>sharp</code> or <code>imagemagick</code> can automate this in your build pipeline.</li>
<li><strong>Asset minification</strong> — Quarto handles CSS/JS minification by default, but verify this in your <code>_quarto.yml</code> configuration.</li>
<li><strong>Caching headers</strong> — Configure your CDN to cache static assets aggressively (e.g., 1 year for hashed filenames).</li>
<li><strong>Compression</strong> — Enable gzip or Brotli compression at the server/CDN level.</li>
</ul>
</section>
<section id="choosing-the-right-platform" class="level2">
<h2 class="anchored" data-anchor-id="choosing-the-right-platform">Choosing the Right Platform</h2>
<table class="table">
<thead>
<tr class="header">
<th>Need</th>
<th>Platform</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Simplest setup, open source</td>
<td>GitHub Pages</td>
</tr>
<tr class="even">
<td>Best developer experience</td>
<td>Netlify</td>
</tr>
<tr class="odd">
<td>Unlimited free bandwidth</td>
<td>Cloudflare Pages</td>
</tr>
<tr class="even">
<td>Maximum control, enterprise</td>
<td>AWS S3 + CloudFront</td>
</tr>
<tr class="odd">
<td>Google ecosystem</td>
<td>Firebase Hosting</td>
</tr>
<tr class="even">
<td>Microsoft ecosystem</td>
<td>Azure Static Web Apps</td>
</tr>
</tbody>
</table>
</section>
<section id="our-approach" class="level2">
<h2 class="anchored" data-anchor-id="our-approach">Our Approach</h2>
<p>At Kwiz Computing, we use GitHub Pages for our public-facing Quarto sites (including this one) and AWS infrastructure for client projects requiring custom domains, access control, or integration with existing cloud environments.</p>
<p>The fundamental recommendation: <strong>deploy early, automate immediately.</strong> Getting your content online and iterating in production is more valuable than perfecting your local build. Start with a free tier platform, add CI/CD automation, and only move to enterprise infrastructure when you have a concrete reason.</p>


</section>

 ]]></description>
  <category>Quarto</category>
  <category>DevOps</category>
  <category>Cloud</category>
  <category>Web Development</category>
  <guid>https://research.kwizresearch.com/blog/quarto-cloud-deployment/</guid>
  <pubDate>Mon, 20 Oct 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Why R Matters for Business Leaders</title>
  <dc:creator>Kwizera Jean</dc:creator>
  <link>https://research.kwizresearch.com/blog/r-for-business-leaders/</link>
  <description><![CDATA[ 




<section id="the-misunderstood-powerhouse" class="level2">
<h2 class="anchored" data-anchor-id="the-misunderstood-powerhouse">The Misunderstood Powerhouse</h2>
<p>R consistently ranks among the top 20 most-used programming languages globally. Companies like Google, Meta, Microsoft, and every major pharmaceutical firm use R in production. Yet most business leaders still think of R as an academic statistics tool — something researchers use in universities, not something that belongs in enterprise software strategy.</p>
<p>This perception is outdated. Modern R supports production systems including interactive dashboards, automated reporting pipelines, REST APIs, and enterprise applications. The question is no longer whether R <em>can</em> build production software — it demonstrably can — but whether your organisation should invest in it.</p>
</section>
<section id="the-business-case" class="level2">
<h2 class="anchored" data-anchor-id="the-business-case">The Business Case</h2>
<section id="speed-to-value" class="level3">
<h3 class="anchored" data-anchor-id="speed-to-value">Speed to Value</h3>
<p>R’s most compelling business advantage is the speed from prototype to production. In most organisations, the workflow looks like this: a data scientist builds an analysis in R or Python, validates it with stakeholders, and then a separate engineering team rebuilds it in a production language. This handoff introduces delays, miscommunications, and bugs.</p>
<p>With modern R frameworks, the data scientist who built the prototype can deploy it directly as a production application. We have seen organisations reduce their analytics-to-production timeline from months to weeks by eliminating this translation step.</p>
</section>
<section id="specialist-talent-efficiency" class="level3">
<h3 class="anchored" data-anchor-id="specialist-talent-efficiency">Specialist Talent Efficiency</h3>
<p>Data scientists are expensive specialists. In the traditional workflow, they spend significant time communicating requirements to software engineers rather than doing the analytical work they were hired for. When R serves as both the analysis and production language, specialists spend more time on high-value work and less time on handoffs.</p>
</section>
<section id="the-ecosystem-advantage" class="level3">
<h3 class="anchored" data-anchor-id="the-ecosystem-advantage">The Ecosystem Advantage</h3>
<p>CRAN (the Comprehensive R Archive Network) hosts over 20,000 packages — peer-reviewed, tested, and maintained by domain experts. These packages represent decades of accumulated expertise in statistics, machine learning, bioinformatics, finance, geospatial analysis, and dozens of other fields.</p>
<p>Using these packages means building on battle-tested foundations rather than reimplementing from scratch. For organisations working in domains where R has deep ecosystem support (healthcare, finance, environmental science, social science), this is a genuine competitive advantage.</p>
</section>
<section id="reproducibility-and-auditability" class="level3">
<h3 class="anchored" data-anchor-id="reproducibility-and-auditability">Reproducibility and Auditability</h3>
<p>R’s script-based workflow creates transparent, auditable records of every analytical decision. For regulated industries — financial services, healthcare, environmental compliance — this is not a nice-to-have but a requirement.</p>
<p>We have worked with organisations that reduced their audit preparation time significantly by moving from spreadsheet-based analyses to reproducible R pipelines. When regulators ask “how did you arrive at this number?”, the answer is a version-controlled script, not a conversation about who did what in which spreadsheet.</p>
</section>
</section>
<section id="addressing-common-concerns" class="level2">
<h2 class="anchored" data-anchor-id="addressing-common-concerns">Addressing Common Concerns</h2>
<section id="r-is-too-slow-for-production" class="level3">
<h3 class="anchored" data-anchor-id="r-is-too-slow-for-production">“R is too slow for production”</h3>
<p>Modern R, when engineered properly, handles production workloads across many enterprise contexts. Performance bottlenecks that do arise are typically addressable through caching, database optimisation, or targeted C++ integration via <code>Rcpp</code>. For the vast majority of data-intensive business applications, R’s performance is more than adequate.</p>
</section>
<section id="we-cant-find-r-developers" class="level3">
<h3 class="anchored" data-anchor-id="we-cant-find-r-developers">“We can’t find R developers”</h3>
<p>The R developer pool is smaller than Python’s, but the quality bar tends to be higher. R developers typically come with domain expertise in statistics, data science, or a specific applied field — meaning you get analytical depth alongside engineering capability. Additionally, modern R development practices (Rhino, box, testthat) are familiar to developers from any language background.</p>
</section>
<section id="r-doesnt-integrate-with-our-existing-stack" class="level3">
<h3 class="anchored" data-anchor-id="r-doesnt-integrate-with-our-existing-stack">“R doesn’t integrate with our existing stack”</h3>
<p>R integrates with virtually every major technology platform. Plumber provides REST API development. Database connections are well-supported. Docker containerisation enables deployment alongside any infrastructure. R applications can be embedded in existing web platforms, connected to enterprise databases, and integrated into CI/CD pipelines.</p>
</section>
</section>
<section id="when-r-makes-strategic-sense" class="level2">
<h2 class="anchored" data-anchor-id="when-r-makes-strategic-sense">When R Makes Strategic Sense</h2>
<p>R is the right investment when your organisation:</p>
<ul>
<li>Is <strong>data-centric</strong> and analytics drives core business decisions</li>
<li>Employs <strong>domain specialists</strong> (statisticians, data scientists, researchers) who already think in R</li>
<li>Needs <strong>specialised statistical capabilities</strong> that R’s ecosystem provides uniquely</li>
<li>Operates in <strong>regulated industries</strong> where reproducibility and auditability are requirements</li>
<li>Prioritises <strong>speed from insight to production</strong> over infrastructure flexibility</li>
</ul>
</section>
<section id="when-r-is-not-the-answer" class="level2">
<h2 class="anchored" data-anchor-id="when-r-is-not-the-answer">When R Is Not the Answer</h2>
<p>R is not a general-purpose web development framework. If you’re building a consumer-facing web application, a mobile app, or a system where analytical computation is a minor component, other technologies are better suited. The key is recognising R as a specialised tool that excels in specific contexts — not a replacement for your entire technology stack.</p>
</section>
<section id="the-integration-approach" class="level2">
<h2 class="anchored" data-anchor-id="the-integration-approach">The Integration Approach</h2>
<p>Successful organisations don’t replace their existing technology portfolio with R. They integrate R as a specialised capability alongside their existing systems. R handles the analytical and statistical workloads where it excels, connected to the broader infrastructure through APIs and containerised deployments.</p>
<p>This is exactly how we work at Kwiz Computing Technologies. R is our primary language because our work — environmental data science, enterprise analytics, quantitative finance — sits squarely in R’s zone of excellence. For organisations with similar data-intensive, analytically complex workloads, R delivers genuine strategic value.</p>


</section>

 ]]></description>
  <category>R</category>
  <category>Business Analytics</category>
  <category>Data Strategy</category>
  <guid>https://research.kwizresearch.com/blog/r-for-business-leaders/</guid>
  <pubDate>Mon, 13 Oct 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Kenya’s Open Data Initiative: Building Tools for Access</title>
  <dc:creator>Kwiz Computing Technologies</dc:creator>
  <link>https://research.kwizresearch.com/blog/kenya-open-data/</link>
  <description><![CDATA[ 




<section id="the-promise-of-open-data" class="level2">
<h2 class="anchored" data-anchor-id="the-promise-of-open-data">The Promise of Open Data</h2>
<p>Kenya has been a leader in open data across the African continent, with government datasets spanning environmental assessments, demographic surveys, and economic indicators. However, accessing this data programmatically remains a challenge — most datasets require manual navigation of web portals, inconsistent file formats, and limited API access.</p>
</section>
<section id="building-bridges-with-r" class="level2">
<h2 class="anchored" data-anchor-id="building-bridges-with-r">Building Bridges with R</h2>
<p>Our approach is to build R packages that wrap these data sources into clean, documented, testable interfaces. The <a href="https://github.com/kwizresearch/kenyaEIAFetcher">kenyaEIAFetcher</a> package is our first public contribution — providing structured access to Kenya’s Environmental Impact Assessment database.</p>
<p>Each package follows enterprise-grade development standards: comprehensive documentation with roxygen2, full test suites with testthat, continuous integration via GitHub Actions, and pkgdown documentation sites.</p>
</section>
<section id="whats-next" class="level2">
<h2 class="anchored" data-anchor-id="whats-next">What’s Next</h2>
<p>We’re exploring additional packages for other Kenyan data sources, with a focus on environmental and governance data. If you’re working with Kenyan open data and want to collaborate, <a href="../../contact.html">get in touch</a>.</p>


</section>

 ]]></description>
  <category>Open Data</category>
  <category>Kenya</category>
  <category>R Packages</category>
  <guid>https://research.kwizresearch.com/blog/kenya-open-data/</guid>
  <pubDate>Sat, 20 Sep 2025 00:00:00 GMT</pubDate>
</item>
<item>
  <title>Reproducibility in ESIA Analyses: Why It Matters</title>
  <dc:creator>Kwiz Computing Technologies</dc:creator>
  <link>https://research.kwizresearch.com/blog/esia-reproducibility/</link>
  <description><![CDATA[ 




<section id="the-reproducibility-problem-in-eia" class="level2">
<h2 class="anchored" data-anchor-id="the-reproducibility-problem-in-eia">The Reproducibility Problem in EIA</h2>
<p>Environmental and Social Impact Assessments are critical decision-making documents, yet the analytical workflows behind them are often opaque: Excel spreadsheets passed between teams, manual copy-paste of results, and no version control. This makes it nearly impossible to verify, update, or audit the analyses that inform environmental decisions.</p>
</section>
<section id="a-better-approach" class="level2">
<h2 class="anchored" data-anchor-id="a-better-approach">A Better Approach</h2>
<p>At Kwiz Computing Technologies, we advocate for reproducible ESIA workflows built on R and Quarto. This means version-controlled code, automated data pipelines, parameterised reports, and transparent methodology that any qualified reviewer can verify.</p>
<p>Our <a href="https://github.com/kwizresearch/kenyaEIAFetcher">kenyaEIAFetcher</a> package is one step in this direction — providing programmatic access to Kenya’s EIA database so that researchers and practitioners can work with structured data rather than manual downloads.</p>
</section>
<section id="key-principles" class="level2">
<h2 class="anchored" data-anchor-id="key-principles">Key Principles</h2>
<p>The same engineering discipline we apply to our trading systems serves environmental data science: test your code, document your methods, version your analyses, and make your work reproducible by default.</p>
<p>Reproducibility isn’t just good science — it’s good engineering.</p>


</section>

 ]]></description>
  <category>Environmental Data Science</category>
  <category>Reproducibility</category>
  <category>R</category>
  <guid>https://research.kwizresearch.com/blog/esia-reproducibility/</guid>
  <pubDate>Fri, 15 Aug 2025 00:00:00 GMT</pubDate>
</item>
</channel>
</rss>
