<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[DataBites: Cheatsheets 🧩]]></title><description><![CDATA[Get all my cheatsheets organized in a single place! 🔥]]></description><link>https://www.databites.tech/s/cheatsheets</link><image><url>https://substackcdn.com/image/fetch/$s_!kyJ6!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe930fbab-b8df-40ef-9676-3d9ca5d49eae_714x714.png</url><title>DataBites: Cheatsheets 🧩</title><link>https://www.databites.tech/s/cheatsheets</link></image><generator>Substack</generator><lastBuildDate>Tue, 05 May 2026 16:00:36 GMT</lastBuildDate><atom:link href="https://www.databites.tech/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Josep Ferrer]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[databites.hi@gmail.com]]></webMaster><itunes:owner><itunes:email><![CDATA[databites.hi@gmail.com]]></itunes:email><itunes:name><![CDATA[Josep Ferrer]]></itunes:name></itunes:owner><itunes:author><![CDATA[Josep Ferrer]]></itunes:author><googleplay:owner><![CDATA[databites.hi@gmail.com]]></googleplay:owner><googleplay:email><![CDATA[databites.hi@gmail.com]]></googleplay:email><googleplay:author><![CDATA[Josep Ferrer]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[How to Actually Get Started with SQL]]></title><description><![CDATA[CS16 - A clear (and human) guide to get started without drowning]]></description><link>https://www.databites.tech/p/how-to-actually-get-started-with-228</link><guid isPermaLink="false">https://www.databites.tech/p/how-to-actually-get-started-with-228</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Wed, 22 Oct 2025 10:02:42 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/e79bace7-d73f-409e-9830-c05b7103c75a_976x704.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Many of you have been asking how to get started in the data world. I know it can seem <strong>complex</strong> and <strong>intimidating</strong>, <em>but fear often clouds our vision. </em></p><p>That&#8217;s why I want to remind you all that SQL is still the number one data language and the easiest one to learn. </p><p>If you&#8217;re looking to break into this field, there&#8217;s not better advice than&#8230;</p><blockquote><p>START</p><p>LEARNING</p><p>SQL</p><p>RIGHT</p><p>&#8230;</p></blockquote>
      <p>
          <a href="https://www.databites.tech/p/how-to-actually-get-started-with-228">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How to Actually Get Started with Python]]></title><description><![CDATA[CS15 - A clear (and human) guide to get started without drowning]]></description><link>https://www.databites.tech/p/how-to-actually-get-started-with-5e7</link><guid isPermaLink="false">https://www.databites.tech/p/how-to-actually-get-started-with-5e7</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Tue, 14 Oct 2025 10:02:52 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/eaa3293c-87f6-405a-985f-7f92a93b27f2_976x704.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>You&#8217;ve wanted to learn Python for a while&#8230;</strong></p><p><em>Too many tabs, not enough progress? </em></p><blockquote><p>This guide cuts the noise and gives you a shippable path. </p></blockquote><p><strong>Only the pieces that actually move you forward.</strong></p><h1>Why this, why now</h1><p>Python is the most versatile &#8220;one language, many careers&#8221; tool: analytics, ML, web, scripting, automation, LLM apps&#8212;you name it.<br>If you learn it now, you co&#8230;</p>
      <p>
          <a href="https://www.databites.tech/p/how-to-actually-get-started-with-5e7">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[ML - What It Is, How It Works & Why It Matters]]></title><description><![CDATA[CS14 - An ML beginner-friendly guide with a visual cheatsheet.]]></description><link>https://www.databites.tech/p/ml-what-it-is-how-it-works-and-why</link><guid isPermaLink="false">https://www.databites.tech/p/ml-what-it-is-how-it-works-and-why</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Mon, 05 May 2025 14:02:28 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/736707c9-9eda-46d2-ab01-ff9b20f5ef19_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Machine learning is all around us, from your Netflix recommendations to the voice behind your phone&#8217;s assistant.<br>But how does it work? </p><p>And how can you get started?</p><p>Today I&#8217;m bringing a simple introduction to <strong>Machine Learning</strong>, <strong>its</strong> <strong>types</strong>, and <strong>real-world examples</strong> &#8212; plus giving you a cheatsheet to keep things crystal clear. &#128588;&#127995;</p><p>So let&#8217;s get started with the full-resolution cheatsheet &#128071;&#127995;</p>
      <p>
          <a href="https://www.databites.tech/p/ml-what-it-is-how-it-works-and-why">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How Python Manages Data in Memory ]]></title><description><![CDATA[CS13 - Types, Values, Variables and Names]]></description><link>https://www.databites.tech/p/how-python-manages-data-in-memory</link><guid isPermaLink="false">https://www.databites.tech/p/how-python-manages-data-in-memory</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Mon, 28 Apr 2025 12:05:32 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/dfa3a0ee-116c-4730-9b00-add0338656d5_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Python often feels magical, but behind the scenes, it&#8217;s built on very tangible rules of memory and object management.</p><p>Understanding how Python handles data internally <strong>can make you a </strong><em><strong>better</strong></em><strong> coder</strong>: it helps you write cleaner code, debug faster, and optimize performance.</p><p>Before diving in, here&#8217;s the full-resolution cheatsheet for you to explore &#128071;&#127995;</p>
      <p>
          <a href="https://www.databites.tech/p/how-python-manages-data-in-memory">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The Art and Science of Data Visualization]]></title><description><![CDATA[Transforming raw data into compelling visual stories.]]></description><link>https://www.databites.tech/p/cs12-the-art-and-science-of-data</link><guid isPermaLink="false">https://www.databites.tech/p/cs12-the-art-and-science-of-data</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Sun, 13 Apr 2025 10:02:48 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/59419f6a-17ba-4c0a-b890-159900051b5a_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In today&#8217;s digital world, it&#8217;s easy to imagine the average individual feeling adrift in a sea of numbers and information, unable to make any sense. </p><p>This is where data visualization (or DataViz for friends) kicks in and serves as a lifeline in this scenario. </p><p>As Alberto Cairo defines in his book The Functional Art:</p><blockquote><p>Data visualization is a collection of methods that use visual representations to explore, make sense of, and communicate quantitative data.</p></blockquote><p>Think of Data Visualization as our compass, guiding us through this numeric ocean, translating vast datasets into meaningful and understandable insights.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><div class="pullquote"><p>3 DataViz Cheatsheets in the end &#8252;&#65039;</p></div><p><em>So, what constitutes an effective visualization?</em></p><p><em>What differentiates a visualization that illuminates from one that only adds to the confusion?</em></p><p>In our journey today, we delve into the core principles of Data Visualization.</p><p>This article aims to unravel the mysteries of this crucial skill, uncovering how it illuminates the path through the data-driven landscape we navigate daily.</p><p>So let&#8217;s try to understand together the theory behind Data Visualization &#128071;&#127995;</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p>&#127881; <strong>Just crossed 8,000 subscribers &amp; hit #76 in </strong><em><strong>Rising Tech</strong></em><strong> on Substack &#8212; thank you so much!</strong><br>To celebrate, I&#8217;m offering <strong>20% off for life</strong> on the paid plan, but only for the next <strong>12 hours</strong>.</p><p>&#128073;&#127995; <a href="https://www.databites.tech/8kbiters">Grab it here</a> to unlock full access to guides and cheatsheets, support my work so I can keep creating valuable content for you and get all my gratitude &#128154;</p><div><hr></div><h2>The Basics Behind Data Visualization</h2><p>In the Data Science field, <strong>one of the most vital yet challenging skills is the art of storytelling through data.</strong> And this is precisely the field of Data Visualization. A glance at the dictionary definition gives us a clear starting point:</p><blockquote><p><em>&#8220;The act of representing information as a picture, diagram or chart, or a picture that represents information in this way&#8221;</em></p></blockquote><p>At its core, Data Visualization is about shaping a narrative from a dataset. </p><p><strong>It transforms data into a form that is not only digestible and visually appealing but also delivers a powerful impact.</strong></p><p>While it may not have the same reputation (or appeal) as other fields like Machine Learning, Data Visualization is a fundamental aspect of a data scientist&#8217;s toolkit.</p><p>In our modern, data-centric world, think of Data Visualization as a pair of glasses that brings clarity to a blurry scene.</p><p><em>So&#8230; a natural question that arises is, why do we need Data Visualization?</em></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h2>A Brief Overview of the Data Visualization Field</h2><p>During the XX century, data was predominantly displayed in stark tables, with little consideration for ease of interpretation.</p><p>Not long ago,<strong> the types of charts and graphs we instantly recognize today would have been foreign to people.</strong></p><p>Modern concepts like Pie Charts, Bar Charts, and trend lines are quite modern developments. William Playfair is heralded as one of the pioneers of modern Data Visualization, credited with creating many of the graphical formats we use today.</p><p>And the big question is&#8230; <em>why did he do so?</em></p><p>When trying to identify Scotland&#8217;s most significant economic ties, Playfair realised that crafting a visualization with bars representing the number of importations and exportations for each partner smoothed the process.</p><p>And this is how the Bar Chart was born.</p><h3>Bar Chart&#8202;&#8212;&#8202;1781</h3><p>Bar Chart Playfair&#8217;s bar chart depicted Scotland&#8217;s trade balance with various European territories and the New World.</p><p>A glance at this chart revealed Scotland&#8217;s major trading partners and their respective trade volumes and balances.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fO0k!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fO0k!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 424w, https://substackcdn.com/image/fetch/$s_!fO0k!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 848w, https://substackcdn.com/image/fetch/$s_!fO0k!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 1272w, https://substackcdn.com/image/fetch/$s_!fO0k!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fO0k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png" width="500" height="336" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:336,&quot;width&quot;:500,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;William Playfair&#8217;s bar chart representing the most important scottish economic partners.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="William Playfair&#8217;s bar chart representing the most important scottish economic partners." title="William Playfair&#8217;s bar chart representing the most important scottish economic partners." srcset="https://substackcdn.com/image/fetch/$s_!fO0k!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 424w, https://substackcdn.com/image/fetch/$s_!fO0k!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 848w, https://substackcdn.com/image/fetch/$s_!fO0k!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 1272w, https://substackcdn.com/image/fetch/$s_!fO0k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">William Playfair&#8217;s bar chart represents the most important Scottish economic partners.</figcaption></figure></div><h3>Line Chart&#8202;&#8212;&#8202;1786</h3><p>For England, with more data at his disposal, Playfair was able to produce time-series graphs.</p><p>At a glance, it highlights that until 1755, England had an unfavorable trade balance, which shifted to a favorable one from that year onwards.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iad0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iad0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 424w, https://substackcdn.com/image/fetch/$s_!iad0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 848w, https://substackcdn.com/image/fetch/$s_!iad0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 1272w, https://substackcdn.com/image/fetch/$s_!iad0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iad0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png" width="1280" height="946" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:946,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;William Playfair&#8217;s line chart representing the trade balance between England and Norway and Denmark.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="William Playfair&#8217;s line chart representing the trade balance between England and Norway and Denmark." title="William Playfair&#8217;s line chart representing the trade balance between England and Norway and Denmark." srcset="https://substackcdn.com/image/fetch/$s_!iad0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 424w, https://substackcdn.com/image/fetch/$s_!iad0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 848w, https://substackcdn.com/image/fetch/$s_!iad0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 1272w, https://substackcdn.com/image/fetch/$s_!iad0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">William Playfair&#8217;s line chart represents the trade balance between England, Norway and Denmark.</figcaption></figure></div><h3>Pie Chart&#8202;&#8212;&#8202;1801</h3><p>Fifteen years later, in 1801, Playfair designed the first known pie chart. This chart illustrates the proportions of England&#8217;s total trade volume with various regions of the world.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-WGb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-WGb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 424w, https://substackcdn.com/image/fetch/$s_!-WGb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 848w, https://substackcdn.com/image/fetch/$s_!-WGb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 1272w, https://substackcdn.com/image/fetch/$s_!-WGb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-WGb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png" width="400" height="462" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c67633fa-c07c-401d-992e-451425163a06_400x462.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:462,&quot;width&quot;:400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;William Playfair&#8217;s pie chart representing Englan&#8217;d total trade volume with different regions.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="William Playfair&#8217;s pie chart representing Englan&#8217;d total trade volume with different regions." title="William Playfair&#8217;s pie chart representing Englan&#8217;d total trade volume with different regions." srcset="https://substackcdn.com/image/fetch/$s_!-WGb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 424w, https://substackcdn.com/image/fetch/$s_!-WGb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 848w, https://substackcdn.com/image/fetch/$s_!-WGb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 1272w, https://substackcdn.com/image/fetch/$s_!-WGb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">William Playfair&#8217;s pie chart represents England's total trade volume with different regions.</figcaption></figure></div><p>So basically, Data Visualization was born as a way to smooth the process of interpreting data.</p><p>It serves as a vital bridge, particularly for those who aren&#8217;t fluent in the complex languages of numbers and algorithms, allowing them to navigate and comprehend intricate data stories with ease.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h2>Data Visualization Basics</h2><p>One of the foundational concepts of the field of Data Visualization is that every chart or graphical representation we encounter is fundamentally constructed from two primary elements:</p><ul><li><p>Data</p></li><li><p>Visual elements</p></li></ul><p>It is quite difficult to attribute this specific statement to a single individual, as this is a basic idea held and expressed by many experts in the field.</p><p>However, one notable figure in Data Visualization who has emphasized the importance of combining data and visual elements effectively is Edward Tufte.</p><p>He has extensively written regarding the principles of good graphical representation, highlighting the interplay between data and visuals in creating meaningful and clear presentations of information.</p><h3>1. The key element&#8202;&#8212;&#8202;Data</h3><p>When contemplating Data Visualization, it&#8217;s common to first think of numerical data. However, this represents just a fraction of the wide variety of data types at our disposal. For effective visualization, it&#8217;s crucial to recognize and utilize the full spectrum of data types available.</p><p>This spectrum includes both continuous and discrete numerical values. According to Clause O. Wilke, beyond these, data can also manifest as discrete categories, temporal elements (like dates and times), and even textual information.</p><p>Each of these data types brings its own nuances and requires different visualization approaches. To categorize these data types further, we can consider:</p><ul><li><p>Numerical data as <strong>Quantitative,</strong> offering measurable and countable characteristics.</p></li><li><p>Categorical data as <strong>Qualitative</strong>, which includes dates, times, and text. It emphasizes non-numeric aspects and qualities.</p></li></ul><p>Recognizing these categories is fundamental in data visualization as it guides us in choosing the most appropriate and effective methods to represent our data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!q-IB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!q-IB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 424w, https://substackcdn.com/image/fetch/$s_!q-IB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 848w, https://substackcdn.com/image/fetch/$s_!q-IB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 1272w, https://substackcdn.com/image/fetch/$s_!q-IB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!q-IB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png" width="1200" height="685" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:685,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!q-IB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 424w, https://substackcdn.com/image/fetch/$s_!q-IB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 848w, https://substackcdn.com/image/fetch/$s_!q-IB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 1272w, https://substackcdn.com/image/fetch/$s_!q-IB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by Author. Classification extracted from Fundamentals of Data Visualization, O&#8217;Reilly.</figcaption></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h3>2. The Art of Encoding Data&#8202;&#8212;&#8202;Visual Encodings&#127912;</h3><p>At the heart of Data Visualization lies the skill of visual encoding, where abstract numerical data is transformed into easily understandable graphical forms. This is akin to speaking a universal visual language, where everyone, regardless of their background in data analysis, can interpret the information at a glance.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G3vp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G3vp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 424w, https://substackcdn.com/image/fetch/$s_!G3vp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 848w, https://substackcdn.com/image/fetch/$s_!G3vp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 1272w, https://substackcdn.com/image/fetch/$s_!G3vp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G3vp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png" width="1456" height="987" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:987,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Visual Encoding of data. Image by the author.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Visual Encoding of data. Image by the author." title="Visual Encoding of data. Image by the author." srcset="https://substackcdn.com/image/fetch/$s_!G3vp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 424w, https://substackcdn.com/image/fetch/$s_!G3vp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 848w, https://substackcdn.com/image/fetch/$s_!G3vp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 1272w, https://substackcdn.com/image/fetch/$s_!G3vp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Interestingly, diverse visualization types, such as scatterplots, pie charts, and heatmaps, share a common visual dialect.</p><p>This shared language is all about converting data values into visual elements&#8202;&#8212;&#8202;think of it as turning cold numbers into vivid, colorful representations on your screen or paper.</p><p>Yet, here&#8217;s a fascinating aspect: <em>There&#8217;s an almost endless array of methods to visually represent data!</em></p><p>To simplify these methods, and according to <a href="https://www.cs.ubc.ca/~tmm/">T.Munzner</a>, there is a primary encoding type called Retinal Encoding.</p><ul><li><p><strong>Retinal Encodings: </strong>This category includes visual characteristics like shape, size, color, and intensity. These are the attributes that immediately grab our attention, acting as the visual &#8216;hook&#8217; of the data story. Each element&#8217;s distinct appearance plays a crucial role in how we perceive and interpret the data.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BN5m!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BN5m!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 424w, https://substackcdn.com/image/fetch/$s_!BN5m!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 848w, https://substackcdn.com/image/fetch/$s_!BN5m!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 1272w, https://substackcdn.com/image/fetch/$s_!BN5m!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BN5m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png" width="1456" height="961" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:961,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Retinal Encodings. Image by the author.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Retinal Encodings. Image by the author." title="Retinal Encodings. Image by the author." srcset="https://substackcdn.com/image/fetch/$s_!BN5m!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 424w, https://substackcdn.com/image/fetch/$s_!BN5m!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 848w, https://substackcdn.com/image/fetch/$s_!BN5m!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 1272w, https://substackcdn.com/image/fetch/$s_!BN5m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><strong>Retinal Encodings. Image by the author.</strong></figcaption></figure></div><p>On the other hand, and commonly associated with our brain&#8217;s spatial skills, there is a second group that some people call &#8220;spatial encodings&#8221;.</p><ul><li><p><strong>Spatial Encodings: </strong>These leverage the spatial awareness capabilities of our brain&#8217;s cortex to represent information. This encoding approach can be realized by utilizing a position on a scale, establishing a specific sequence, or employing relative sizes for representation.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VcbM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VcbM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 424w, https://substackcdn.com/image/fetch/$s_!VcbM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 848w, https://substackcdn.com/image/fetch/$s_!VcbM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 1272w, https://substackcdn.com/image/fetch/$s_!VcbM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VcbM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png" width="1456" height="477" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:477,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Spatial Encodings. Image by the author.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Spatial Encodings. Image by the author." title="Spatial Encodings. Image by the author." srcset="https://substackcdn.com/image/fetch/$s_!VcbM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 424w, https://substackcdn.com/image/fetch/$s_!VcbM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 848w, https://substackcdn.com/image/fetch/$s_!VcbM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 1272w, https://substackcdn.com/image/fetch/$s_!VcbM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><strong>Spatial Encodings. Image by the author.</strong></figcaption></figure></div><p>Incorporating various encodings into a single chart is technically feasible, yet it risks overwhelming the viewer. Simplicity in data visualization is key, too many encodings can muddle the message.</p><p>Ideally, limiting to one or two retinal encodings per chart enhances clarity and comprehension.</p><p>Remember, in Data Visualization, embracing minimalism often yields the most impactful results.</p><p><em>It&#8217;s akin to seasoning a meal&#8202;&#8212;&#8202;a judicious sprinkle of salt and pepper can elevate the dish, whereas an excessive amount can spoil it.</em></p><p>The choice of encoding should align with the narrative you aim to convey with your data. Therefore, a more pertinent question to ponder is not just which encoding to use, but how it serves the story your data tells.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h2>Choosing the Right Visualization</h2><p>In the wide landscape of Data Visualization, it&#8217;s essential to select the most effective visual encodings that match the nature of your data.</p><p>Not all visualization methods suit every kind of data, so it&#8217;s crucial to pair the right type of visualization with the specific characteristics of the data you&#8217;re working with.</p><p>For instance, when dealing with continuous variables like weight and height, their best representation often comes from positioning them on a scatter plot. This approach effectively communicates variations and relationships within the data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MNoN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MNoN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 424w, https://substackcdn.com/image/fetch/$s_!MNoN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 848w, https://substackcdn.com/image/fetch/$s_!MNoN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 1272w, https://substackcdn.com/image/fetch/$s_!MNoN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MNoN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png" width="1456" height="1156" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1156,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image by the author. Scatter plot of numerical variables.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image by the author. Scatter plot of numerical variables." title="Image by the author. Scatter plot of numerical variables." srcset="https://substackcdn.com/image/fetch/$s_!MNoN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 424w, https://substackcdn.com/image/fetch/$s_!MNoN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 848w, https://substackcdn.com/image/fetch/$s_!MNoN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 1272w, https://substackcdn.com/image/fetch/$s_!MNoN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by the author. Scatter plot of numerical variables.</figcaption></figure></div><p>On the other hand, categorical variables, which include categories like gender or nationality, are more effectively represented through distinct visual elements such as color coding or shape. This distinction allows these variables to stand out clearly and be easily interpreted in the context of the visualization.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZDwA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZDwA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 424w, https://substackcdn.com/image/fetch/$s_!ZDwA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 848w, https://substackcdn.com/image/fetch/$s_!ZDwA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 1272w, https://substackcdn.com/image/fetch/$s_!ZDwA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZDwA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png" width="1456" height="1194" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1194,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image by the author. Scatter plot of numerical variables with a categorical variable legend.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image by the author. Scatter plot of numerical variables with a categorical variable legend." title="Image by the author. Scatter plot of numerical variables with a categorical variable legend." srcset="https://substackcdn.com/image/fetch/$s_!ZDwA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 424w, https://substackcdn.com/image/fetch/$s_!ZDwA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 848w, https://substackcdn.com/image/fetch/$s_!ZDwA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 1272w, https://substackcdn.com/image/fetch/$s_!ZDwA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by the author. Scatter plot of numerical variables with a categorical variable legend.</figcaption></figure></div><p>Underpinning the effectiveness of these choices are fundamental theories that explain why certain visual encodings resonate more intuitively with us.</p><p>Understanding these underlying principles can guide us in creating more impactful and comprehensible visualizations.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h2>The Core of Effective Data Visualization</h2><p>In Data Visualization, striking a harmonious balance between aesthetic appeal and practical functionality is essential. Sometimes, choosing certain visual encodings, even if they appear less efficient, is intentional to convey a specific message or evoke emotions.</p><p>In our contemporary world, where data streams are ever-expanding, the significance of crafting visual stories that resonate is paramount, particularly when our audience comprises individuals not well-versed in data.</p><p>Effective data visualization transcends mere number presentation, it involves weaving a compelling narrative with our data.</p><p>It&#8217;s about animating our data, interweaving stories that establish a link between abstract figures and tangible, real-world consequences and insights.</p><p>For those of us passionate about technology and data, Data Visualization is more than a skill&#8202;&#8212;<em>&#8202;it&#8217;s an art form, a unique language, and a bridge connecting us to the wider world.</em></p><div><hr></div><p>&#127881; <strong>Just crossed 8,000 subscribers &amp; hit #76 in </strong><em><strong>Rising Tech</strong></em><strong> on Substack &#8212; thank you so much!</strong><br>To celebrate, I&#8217;m offering <strong>20% off for life</strong> on the paid plan, but only for the next <strong>14 hours</strong>.</p><p>&#128073;&#127995; <a href="https://www.databites.tech/8kbiters">Grab it here</a> to unlock full access to guides and cheatsheets, support my work so I can keep creating valuable content for you and get all my gratitude &#128154;</p><div><hr></div><p>Now&#8230; what you have been waiting all along&#8230; Here goes our weekly cheatsheet(s)&#128071;&#127995;</p><h4><strong>1. The Concept of Chart</strong></h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!1r6e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda7f66fa-ede3-4aba-93bc-42ca6a64a83a_3693x4133.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!1r6e!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda7f66fa-ede3-4aba-93bc-42ca6a64a83a_3693x4133.png 424w, https://substackcdn.com/image/fetch/$s_!1r6e!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda7f66fa-ede3-4aba-93bc-42ca6a64a83a_3693x4133.png 848w, https://substackcdn.com/image/fetch/$s_!1r6e!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda7f66fa-ede3-4aba-93bc-42ca6a64a83a_3693x4133.png 1272w, https://substackcdn.com/image/fetch/$s_!1r6e!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda7f66fa-ede3-4aba-93bc-42ca6a64a83a_3693x4133.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!1r6e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda7f66fa-ede3-4aba-93bc-42ca6a64a83a_3693x4133.png" width="1456" height="1629" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/da7f66fa-ede3-4aba-93bc-42ca6a64a83a_3693x4133.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1629,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1885561,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/161218886?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda7f66fa-ede3-4aba-93bc-42ca6a64a83a_3693x4133.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!1r6e!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda7f66fa-ede3-4aba-93bc-42ca6a64a83a_3693x4133.png 424w, https://substackcdn.com/image/fetch/$s_!1r6e!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda7f66fa-ede3-4aba-93bc-42ca6a64a83a_3693x4133.png 848w, https://substackcdn.com/image/fetch/$s_!1r6e!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda7f66fa-ede3-4aba-93bc-42ca6a64a83a_3693x4133.png 1272w, https://substackcdn.com/image/fetch/$s_!1r6e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fda7f66fa-ede3-4aba-93bc-42ca6a64a83a_3693x4133.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>2. Visual Encodings</h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!D1Qu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1dd5557-c892-4e35-af43-d47a4672b83c_3693x4217.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!D1Qu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1dd5557-c892-4e35-af43-d47a4672b83c_3693x4217.png 424w, https://substackcdn.com/image/fetch/$s_!D1Qu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1dd5557-c892-4e35-af43-d47a4672b83c_3693x4217.png 848w, https://substackcdn.com/image/fetch/$s_!D1Qu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1dd5557-c892-4e35-af43-d47a4672b83c_3693x4217.png 1272w, https://substackcdn.com/image/fetch/$s_!D1Qu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1dd5557-c892-4e35-af43-d47a4672b83c_3693x4217.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!D1Qu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1dd5557-c892-4e35-af43-d47a4672b83c_3693x4217.png" width="1456" height="1663" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f1dd5557-c892-4e35-af43-d47a4672b83c_3693x4217.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1663,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1756793,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/161218886?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1dd5557-c892-4e35-af43-d47a4672b83c_3693x4217.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!D1Qu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1dd5557-c892-4e35-af43-d47a4672b83c_3693x4217.png 424w, https://substackcdn.com/image/fetch/$s_!D1Qu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1dd5557-c892-4e35-af43-d47a4672b83c_3693x4217.png 848w, https://substackcdn.com/image/fetch/$s_!D1Qu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1dd5557-c892-4e35-af43-d47a4672b83c_3693x4217.png 1272w, https://substackcdn.com/image/fetch/$s_!D1Qu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff1dd5557-c892-4e35-af43-d47a4672b83c_3693x4217.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>3. The Data</h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tmtn!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08d2f596-f8dc-47d9-b229-aec92ff56d57_3693x4016.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tmtn!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08d2f596-f8dc-47d9-b229-aec92ff56d57_3693x4016.png 424w, https://substackcdn.com/image/fetch/$s_!tmtn!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08d2f596-f8dc-47d9-b229-aec92ff56d57_3693x4016.png 848w, https://substackcdn.com/image/fetch/$s_!tmtn!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08d2f596-f8dc-47d9-b229-aec92ff56d57_3693x4016.png 1272w, https://substackcdn.com/image/fetch/$s_!tmtn!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08d2f596-f8dc-47d9-b229-aec92ff56d57_3693x4016.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tmtn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08d2f596-f8dc-47d9-b229-aec92ff56d57_3693x4016.png" width="1456" height="1583" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/08d2f596-f8dc-47d9-b229-aec92ff56d57_3693x4016.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1583,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2944246,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/161218886?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08d2f596-f8dc-47d9-b229-aec92ff56d57_3693x4016.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!tmtn!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08d2f596-f8dc-47d9-b229-aec92ff56d57_3693x4016.png 424w, https://substackcdn.com/image/fetch/$s_!tmtn!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08d2f596-f8dc-47d9-b229-aec92ff56d57_3693x4016.png 848w, https://substackcdn.com/image/fetch/$s_!tmtn!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08d2f596-f8dc-47d9-b229-aec92ff56d57_3693x4016.png 1272w, https://substackcdn.com/image/fetch/$s_!tmtn!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F08d2f596-f8dc-47d9-b229-aec92ff56d57_3693x4016.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2>Are you still here? &#129488;</h2><p>&#128073;&#127995; I want this newsletter to be useful, so please let me know your feedback!</p><div class="poll-embed" data-attrs="{&quot;id&quot;:302439}" data-component-name="PollToDOM"></div><div><hr></div><p>Before you go,<strong> tap the &#128154; button at the bottom of this email to show your support</strong>&#8212;<em>it really helps and means a lot!</em></p><p><strong>Any doubt? Let&#8217;s start a conversation! &#128071;&#127995;</strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/p/the-transformers-architecture/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.databites.tech/p/the-transformers-architecture/comments"><span>Leave a comment</span></a></p><div><hr></div><h2>Want to get more of my content? &#128587;&#127995;&#8205;&#9794;&#65039;</h2><p>Reach me on:</p><ul><li><p><strong><a href="https://www.linkedin.com/in/josep-ferrer-sanchez/">LinkedIn</a>,</strong> <strong><a href="https://x.com/rfeers">X (Twitter)</a></strong>, or <strong><a href="https://www.threads.net/@rfeers">Threads</a> to get daily posts about Data Science.</strong></p></li><li><p>My <strong><a href="https://medium.com/@rfeers">Medium</a></strong><a href="https://medium.com/@rfeers"> </a><strong><a href="https://medium.com/@rfeers">Blog</a></strong> to learn more about Data Science, Machine Learning, and AI.</p></li><li><p>Just email me at rfeers@gmail.com for any inquiries or to ask for help! &#129299;</p></li></ul><div><hr></div><p>Remember now that DataBites has an official <a href="https://x.com/databitestech">X (Twitter)</a> account and <a href="https://www.linkedin.com/search/results/all/?fetchDeterministicClustersOnly=true&amp;heroEntityKey=urn%3Ali%3Aorganization%3A104285500&amp;keywords=databites&amp;origin=RICH_QUERY_TYPEAHEAD_HISTORY&amp;position=0&amp;searchId=2b268e19-1da0-4357-a42a-9d7f7fba7772&amp;sid=S_G&amp;spellCorrectionEnabled=true">LinkedIn</a> page. Follow us there to stay updated and help spread the word! &#128588;&#127995;</p>]]></content:encoded></item><item><title><![CDATA[CS11 - Understanding Data Collection with APIs]]></title><description><![CDATA[A hands-on guide to collecting structured data with Python and real-world APIs]]></description><link>https://www.databites.tech/p/cs11-understanding-data-collection</link><guid isPermaLink="false">https://www.databites.tech/p/cs11-understanding-data-collection</guid><pubDate>Sun, 06 Apr 2025 10:34:29 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/5f7a06e9-223c-4091-94cd-b556d5f0e735_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In today&#8217;s world, knowing how to collect clean, relevant, and timely data is essential for any data professional. While there are many ways to gather data, one of the most reliable and scalable methods is through <strong>APIs (Application Programming Interfaces)</strong>.</p><div class="pullquote"><p>Cheatsheet &amp; Code in the end &#8252;&#65039;</p></div><p>In this issue, we&#8217;ll break down the essentials of using APIs for data collection, from how they work to how you can start using them in Python, complete with a practical example using <strong>Eurostat</strong>, the EU&#8217;s official statistics portal.</p><p>Let&#8217;s dive in! &#128071;&#127995;</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h2>&#129300; What&#8217;s an API, and Why Should You Care?</h2><p>An <strong>API</strong> (Application Programming Interface) is a set of rules that lets two software systems communicate. </p><blockquote><p><strong>Imagine a restaurant &#129489;&#127995;&#8205;&#127859;</strong><br>You don&#8217;t go into the kitchen to prepare your food&#8212;you place your order with the waiter, who passes your request to the chef and brings your food back.</p></blockquote><p>Similarly, <strong>an API receives your request, fetches the data from a source, and returns it in a structured format (usually JSON or XML)</strong>. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qRLP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba08c2e-4db3-463d-849b-4648f6a39c0b_1600x819.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qRLP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba08c2e-4db3-463d-849b-4648f6a39c0b_1600x819.png 424w, https://substackcdn.com/image/fetch/$s_!qRLP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba08c2e-4db3-463d-849b-4648f6a39c0b_1600x819.png 848w, https://substackcdn.com/image/fetch/$s_!qRLP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba08c2e-4db3-463d-849b-4648f6a39c0b_1600x819.png 1272w, https://substackcdn.com/image/fetch/$s_!qRLP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba08c2e-4db3-463d-849b-4648f6a39c0b_1600x819.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qRLP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba08c2e-4db3-463d-849b-4648f6a39c0b_1600x819.png" width="1456" height="745" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0ba08c2e-4db3-463d-849b-4648f6a39c0b_1600x819.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:745,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!qRLP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba08c2e-4db3-463d-849b-4648f6a39c0b_1600x819.png 424w, https://substackcdn.com/image/fetch/$s_!qRLP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba08c2e-4db3-463d-849b-4648f6a39c0b_1600x819.png 848w, https://substackcdn.com/image/fetch/$s_!qRLP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba08c2e-4db3-463d-849b-4648f6a39c0b_1600x819.png 1272w, https://substackcdn.com/image/fetch/$s_!qRLP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0ba08c2e-4db3-463d-849b-4648f6a39c0b_1600x819.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This makes it easy to integrate external data into your apps or analyses.</p><h3>Anatomy of an API Call &#128295; </h3><p>Every API interaction typically includes:</p><ul><li><p><strong>Client</strong>: The software requesting the data (e.g. your Python script)</p></li><li><p><strong>Request</strong>: The structure of what you&#8217;re asking for</p></li><li><p><strong>Request</strong>: Send extra info like API keys.</p></li><li><p><strong>The API Server</strong>: The system that responds to your request</p></li><li><p><strong>The API Endpoint</strong>: URL to access specific data or actions.</p></li><li><p><strong>Response</strong>: The result you get, often in a machine-readable format</p></li></ul><p>This communication allows applications to share information or functionalities efficiently, enabling tasks like fetching data from a database or interacting with third-party services.</p><h3>Why Use APIs for Data Collection?</h3><p>APIs offer several advantages for data collection:&#8203;</p><ul><li><p><strong>Efficiency</strong>: They provide direct access to data, eliminating the need for manual data gathering.&#8203;</p></li><li><p><strong>Real-time Access</strong>: APIs often deliver up-to-date information, which is essential for time-sensitive analyses.&#8203;</p></li><li><p><strong>Automation</strong>: They enable automated data retrieval processes, reducing human intervention and potential errors.&#8203;</p></li><li><p><strong>Scalability</strong>: APIs can handle large volumes of requests, making them suitable for extensive data collection tasks.</p></li></ul><h3><strong>Implementing API Calls in Python</strong></h3><p>Making an introductory API call in Python is one of the easiest and most practical exercises to get started with data collection. The popular requests library makes it simple to send HTTP requests and handle responses.</p><p>A simple API call request would look as follows &#128071;&#127995;</p><pre><code>import requests

# Define the API endpoint
url = "https://api.example.com/data"

# Optional headers (e.g., for authentication)
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}

# Optional parameters or payload
params = {
    "query": "example",
    "limit": 10
}

# Make the GET request
response = requests.get(url, headers=headers, params=params)

# Print the response
if response.status_code == 200:
    print("Success:", response.json())
else:
    print("Error:", response.status_code, response.text)</code></pre><h3>Example 1: Using random user API</h3><p>To demonstrate how it works, we'll use the<a href="https://randomuser.me/documentation"> Random User Generator API</a>, a free service that provides dummy user data in JSON format, perfect for testing and learning.</p><p>Here&#8217;s a step-by-step guide to making your first API call in Python.</p><h4><strong>STEP 1 - Install the Requests Library</strong>:</h4><pre><code>pip install requests</code></pre><h4><strong>STEP 2 - Import the Library</strong>:</h4><pre><code>import requests
import pandas as pd</code></pre><h4><strong>STEP 3 - </strong>Check the documentation page</h4><p>Before making any requests, it's important to understand how the API works. This includes reviewing available endpoints, parameters, and response structure. Start by visiting the<a href="https://randomuser.me/documentation"> Random User API documentation</a>.</p><h4><strong>STEP 4 - </strong>Define the API Endpoint and Parameters:</h4><p>Based on the documentation, we can construct a simple request. In this example, we fetch user data limited to users from the United States:</p><pre><code>url = 'https://randomuser.me/api/'
params = {'nat': 'us'}</code></pre><h4><strong>STEP 5 - Make the GET Request</strong>:</h4><p>Use the requests.get() function with the URL and parameters:</p><pre><code>response = requests.get(url, params=params)</code></pre><h4><strong>STEP 6 - Handle the Response</strong>:</h4><p>Check whether the request was successful, then process the data:</p><pre><code>if response.status_code == 200:
    data = response.json()
    # Process the data as needed
else:
    print(f"Error: {response.status_code}")</code></pre><h4><strong>STEP 7 - </strong>Convert our data into a dataframe</h4><p>To work with the data easily, we can convert it into a pandas DataFrame:</p><pre><code>if response.status_code == 200:
    data = response.json()
    # Process the data as needed
else:
    print(f"Error: {response.status_code}")</code></pre><p>Now, let&#8217;s exemplify it with a real case.</p><h3>Example 2: Working with Eurostats API</h3><p>Eurostat is the statistical office of the European Union. It provides high-quality, harmonized statistics on a wide range of topics such as economics, demographics, environment, industry, and tourism&#8212;covering all EU member states.</p><p>Through its API, Eurostat offers public access to a vast collection of datasets in machine-readable formats, making it a valuable resource for data professionals, researchers, and developers interested in analyzing European-level data.</p><h4>STEP 0 - Understand the data contained in the API</h4><p>If you go check the Data section of EUROSTATS, you will find a navigation tree as follows.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!P6oK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe884e585-8e87-445a-8507-14ef99b46816_1144x365.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!P6oK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe884e585-8e87-445a-8507-14ef99b46816_1144x365.png 424w, https://substackcdn.com/image/fetch/$s_!P6oK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe884e585-8e87-445a-8507-14ef99b46816_1144x365.png 848w, https://substackcdn.com/image/fetch/$s_!P6oK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe884e585-8e87-445a-8507-14ef99b46816_1144x365.png 1272w, https://substackcdn.com/image/fetch/$s_!P6oK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe884e585-8e87-445a-8507-14ef99b46816_1144x365.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!P6oK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe884e585-8e87-445a-8507-14ef99b46816_1144x365.png" width="1144" height="365" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e884e585-8e87-445a-8507-14ef99b46816_1144x365.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:365,&quot;width&quot;:1144,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!P6oK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe884e585-8e87-445a-8507-14ef99b46816_1144x365.png 424w, https://substackcdn.com/image/fetch/$s_!P6oK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe884e585-8e87-445a-8507-14ef99b46816_1144x365.png 848w, https://substackcdn.com/image/fetch/$s_!P6oK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe884e585-8e87-445a-8507-14ef99b46816_1144x365.png 1272w, https://substackcdn.com/image/fetch/$s_!P6oK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe884e585-8e87-445a-8507-14ef99b46816_1144x365.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We can try to identify some data of interest in the following subsections:</p><ul><li><p><strong>Detailed Datasets</strong>: Full Eurostat data in multi-dimensional format.</p></li><li><p><strong>Selected Datasets</strong>: Simplified datasets with fewer indicators, in 2&#8211;3 dimensions.</p></li><li><p><strong>EU Policies</strong>: Data grouped by specific EU policy areas.</p></li><li><p><strong>Cross-cutting</strong>: Thematic data compiled from multiple sources.</p></li></ul><h4>STEP 1 - Checking its documentation</h4><p>Always start with the documentation. You can find Eurostat&#8217;s API guide<a href="https://wikis.ec.europa.eu/display/EUROSTATHELP/API+-+Getting+started+with+statistics+API"> [here</a>]((https://wikis.ec.europa.eu/display/EUROSTATHELP/API+-+Getting+started+with+statistics+API). It explains the API structure, available endpoints, and how to form valid requests.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kZXg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcff00a09-1a3a-4fd4-83e6-4853f4734a11_1600x635.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kZXg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcff00a09-1a3a-4fd4-83e6-4853f4734a11_1600x635.png 424w, https://substackcdn.com/image/fetch/$s_!kZXg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcff00a09-1a3a-4fd4-83e6-4853f4734a11_1600x635.png 848w, https://substackcdn.com/image/fetch/$s_!kZXg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcff00a09-1a3a-4fd4-83e6-4853f4734a11_1600x635.png 1272w, https://substackcdn.com/image/fetch/$s_!kZXg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcff00a09-1a3a-4fd4-83e6-4853f4734a11_1600x635.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kZXg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcff00a09-1a3a-4fd4-83e6-4853f4734a11_1600x635.png" width="1456" height="578" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cff00a09-1a3a-4fd4-83e6-4853f4734a11_1600x635.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:578,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kZXg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcff00a09-1a3a-4fd4-83e6-4853f4734a11_1600x635.png 424w, https://substackcdn.com/image/fetch/$s_!kZXg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcff00a09-1a3a-4fd4-83e6-4853f4734a11_1600x635.png 848w, https://substackcdn.com/image/fetch/$s_!kZXg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcff00a09-1a3a-4fd4-83e6-4853f4734a11_1600x635.png 1272w, https://substackcdn.com/image/fetch/$s_!kZXg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcff00a09-1a3a-4fd4-83e6-4853f4734a11_1600x635.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>STEP 2 - Generating the first call request</h4><p>To generate an API request using Python, the first step is installing and importing the requests library. Remember, we already installed it in the previous simple example. Then, we can easily generate a call request using a demo dataset from the EUROSTATS documentation.</p><pre><code># We import the requests library
import requests

# Define the URL endpoint -&gt; We use the demo URL in the EUROSTATS API documentation.
url = "https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/DEMO_R_D3DENS?lang=EN"

# Make the GET request
response = requests.get(url)

# Print the status code and response data
print(f"Status Code: {response.status_code}")
print(response.json())  # Print the JSON response</code></pre><p>Pro tip: We can split the URL into the base URL and parameters, to make it easier to understant what data are we requesting from the API.</p><pre><code># We import the requests library
import requests

# Define the URL endpoint -&gt; We use the demo URL in the EUROSTATS API documentation.
url = "https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/DEMO_R_D3DENS"

# Define the parameters -&gt; We define the parameters to add in the URL.
params = {
   'lang': 'EN'  # Specify the language as English
}

# Make the GET request
response = requests.get(url, params=params)

# Print the status code and response data
print(f"Status Code: {response.status_code}")
print(response.json())  # Print the JSON response</code></pre><h4>STEP 3 - Determining what dataset to call</h4><p>Instead of using the demo dataset, you can select any dataset from the Eurostat database. For example, let's query the dataset TOUR_OCC_ARN2, which contains tourism accommodation data.</p><pre><code># We import the requests library
import requests

# Define the URL endpoint -&gt; We use the demo URL in the EUROSTATS API documentation.
base_url = "https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/"
dataset = "TOUR_OCC_ARN2"

url = base_url + dataset
# Define the parameters -&gt; We define the parameters to add in the URL.
params = {
    'lang': 'EN'  # Specify the language as English
}

# Make the GET request -&gt; we generate the request and obtain the response
response = requests.get(url, params=params)

# Print the status code and response data
print(f"Status Code: {response.status_code}")
print(response.json())  # Print the JSON response</code></pre><h4>STEP 4 - Understand the response</h4><p>Eurostat&#8217;s API returns data in <strong>JSON-stat format</strong>, a standard for multidimensional statistical data. You can save the response to a file and explore its structure:</p><pre><code>import requests
import json

# Define the URL endpoint and dataset
base_url = "https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/"
dataset = "TOUR_OCC_ARN2"

url = base_url + dataset

# Define the parameters to add in the URL
params = {
    'lang': 'EN',
    "time": 2019  # Specify the language as English
}

# Make the GET request and obtain the response
response = requests.get(url, params=params)

# Check the status code and handle the response
if response.status_code == 200:
    # Parse the JSON response
    data = response.json()

    # Generate a JSON file and write the response data into it
    with open("eurostat_response.json", "w") as json_file:
        json.dump(data, json_file, indent=4)  # Save JSON with pretty formatting

    print("JSON file 'eurostat_response.json' has been successfully created.")
else:
    print(f"Error: Received status code {response.status_code} from the API.")</code></pre><h4>STEP 5 - Transform the response into usable data.</h4><p>Now that we got the data, we can find a way to save it up into a tabular format (CSV) in order to smooth the process of analyzing it.</p><pre><code>import requests
import pandas as pd

# Step 1: Make the GET request to the Eurostat API
base_url = "https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/"
dataset = "TOUR_OCC_ARN2"  # Tourist accommodation statistics dataset
url = base_url + dataset
params = {'lang': 'EN'}  # Request data in English

# Make the API request
response = requests.get(url, params=params)

# Step 2: Check if the request was successful
if response.status_code == 200:
   data = response.json()

   # Step 3: Extract the dimensions and metadata
   dimensions = data['dimension']
   dimension_order = data['id']  # ['geo', 'time', 'unit', 'indic', etc.]

   # Extract labels for each dimension dynamically
   dimension_labels = {dim: dimensions[dim]['category']['label'] for dim in dimension_order}

   # Step 4: Determine the size of each dimension
   dimension_sizes = {dim: len(dimensions[dim]['category']['index']) for dim in dimension_order}

   # Step 5: Create a mapping for each index to its respective label
   # For example, if we have 'geo', 'time', 'unit', and 'indic', map each index to the correct label
   index_labels = {
       dim: list(dimension_labels[dim].keys())
       for dim in dimension_order
   }

   # Step 6: Create a list of rows for the CSV
   rows = []
   for key, value in data['value'].items():
       # `key` is a string like '123', we need to break it down into the corresponding labels
       index = int(key)  # Convert string index to integer

       # Calculate the indices for each dimension
       indices = {}
       for dim in reversed(dimension_order):
           dim_index = index % dimension_sizes[dim]
           indices[dim] = index_labels[dim][dim_index]
           index //= dimension_sizes[dim]

       # Construct a row with labels from all dimensions
       row = {f"{dim.capitalize()} Code": indices[dim] for dim in dimension_order}
       row.update({f"{dim.capitalize()} Name": dimension_labels[dim][indices[dim]] for dim in dimension_order})
       row["Value (Tourist Accommodations)"] = value
       rows.append(row)

   # Step 7: Create a DataFrame and save it as CSV
   if rows:
       df = pd.DataFrame(rows)
       csv_filename = "eurostat_tourist_accommodation.csv"
       df.to_csv(csv_filename, index=False)
       print(f"CSV file '{csv_filename}' has been successfully created.")
   else:
       print("No valid data to save as CSV.")
else:
   print(f"Error: Received status code {response.status_code} from the API.")</code></pre><h4>STEP 6 - Generate a specific view</h4><p>In our, imagine we just want to keep those records corresponding to Campings, Apartments or Hotels. We can generate a final table with this condition, and obtain a Pandas DataFrame we can work with.</p><pre><code># Check the unique values in the 'Nace_r2 Name' column
set(df["Nace_r2 Name"])

# List of options to filter
options = ['Camping grounds, recreational vehicle parks and trailer parks',
          'Holiday and other short-stay accommodation',
          'Hotels and similar accommodation']

# Filter the DataFrame based on whether the 'Nace_r2 Name' column values are in the options list
df = df[df["Nace_r2 Name"].isin(options)]
df</code></pre><h2>Best Practices When Working with APIs</h2><ul><li><p><strong>Read the Docs</strong>: Always check the official API documentation to understand endpoints and parameters.</p></li><li><p><strong>Handle Errors</strong>: Use conditionals and logging to gracefully handle failed requests.</p></li><li><p><strong>Respect Rate Limits</strong>: Avoid overwhelming the server&#8212;check if rate limits apply.</p></li><li><p><strong>Secure Credentials</strong>: If the API requires authentication, never expose your API keys in public code.</p></li></ul><div><hr></div><h3>&#127881; Limited-Time Offer: Celebrate 8,000+ Subscribers!</h3><p>Woke up today to <strong>8,000 amazing subscribers</strong> on DataBites &#8212; and I want to say <em>thank you!</em> &#129401;</p><p>To celebrate, I'm giving <strong>20% off for life</strong> to anyone who upgrades to a <strong>paid plan this week only</strong>. You'll get access to:</p><ul><li><p>&#128221; Read all my paywalled articles and in-depth guides.</p></li><li><p>&#129513; Access to all my cheatsheets in the <a href="https://www.databites.tech/s/cheatsheets">Cheatsheet Hub</a>.</p></li><li><p>&#128172; Post comments and questions on premium content.</p></li></ul><p>This offer is only available until <strong>April 13th</strong>, so don&#8217;t miss it!</p><p>&#128073;&#127995; <a href="https://www.databites.tech/8kbiters">Grab your lifetime discount now</a></p><div><hr></div><p>And now&#8230; what you have been waiting all along&#8230; Here goes our weekly cheatsheet &#128071;&#127995;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!R9TA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb46047a-7431-4175-8870-fa9b5a1940af_3693x4956.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!R9TA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb46047a-7431-4175-8870-fa9b5a1940af_3693x4956.png 424w, https://substackcdn.com/image/fetch/$s_!R9TA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb46047a-7431-4175-8870-fa9b5a1940af_3693x4956.png 848w, https://substackcdn.com/image/fetch/$s_!R9TA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb46047a-7431-4175-8870-fa9b5a1940af_3693x4956.png 1272w, https://substackcdn.com/image/fetch/$s_!R9TA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb46047a-7431-4175-8870-fa9b5a1940af_3693x4956.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!R9TA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb46047a-7431-4175-8870-fa9b5a1940af_3693x4956.png" width="1456" height="1954" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/bb46047a-7431-4175-8870-fa9b5a1940af_3693x4956.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1954,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2443620,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/160636360?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb46047a-7431-4175-8870-fa9b5a1940af_3693x4956.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!R9TA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb46047a-7431-4175-8870-fa9b5a1940af_3693x4956.png 424w, https://substackcdn.com/image/fetch/$s_!R9TA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb46047a-7431-4175-8870-fa9b5a1940af_3693x4956.png 848w, https://substackcdn.com/image/fetch/$s_!R9TA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb46047a-7431-4175-8870-fa9b5a1940af_3693x4956.png 1272w, https://substackcdn.com/image/fetch/$s_!R9TA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fbb46047a-7431-4175-8870-fa9b5a1940af_3693x4956.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Conclusion</h2><p>Eurostat&#8217;s API is a powerful gateway to a wealth of structured, high-quality European statistics. By learning how to navigate its structure, query datasets, and interpret responses, you can automate access to critical data for analysis, research, or decision-making&#8212;right from your Python scripts.</p><p>You can go check the corresponding code in my <a href="https://github.com/rfeers/DataBites/blob/main/simple-code-along/CS11_Understanding_APIs.ipynb">brand-new DataBites GitHub repository </a>where I&#8217;ll share the associated codes for coming code-alongs and projects.</p><div><hr></div><h2>Are you still here? &#129488;</h2><p>&#128073;&#127995; I want this newsletter to be useful, so please let me know your feedback!</p><div class="poll-embed" data-attrs="{&quot;id&quot;:298975}" data-component-name="PollToDOM"></div><div><hr></div><p>Before you go,<strong> tap the &#128154; button at the bottom of this email to show your support</strong>&#8212;<em>it really helps and means a lot!</em></p><p><strong>Any doubt? Let&#8217;s start a conversation! &#128071;&#127995;</strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/p/the-transformers-architecture/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.databites.tech/p/the-transformers-architecture/comments"><span>Leave a comment</span></a></p><div><hr></div><h2>Want to get more of my content? &#128587;&#127995;&#8205;&#9794;&#65039;</h2><p>Reach me on:</p><ul><li><p><strong><a href="https://www.linkedin.com/in/josep-ferrer-sanchez/">LinkedIn</a>,</strong> <strong><a href="https://x.com/rfeers">X (Twitter)</a></strong>, or <strong><a href="https://www.threads.net/@rfeers">Threads</a> to get daily posts about Data Science.</strong></p></li><li><p>My <strong><a href="https://medium.com/@rfeers">Medium</a></strong><a href="https://medium.com/@rfeers"> </a><strong><a href="https://medium.com/@rfeers">Blog</a></strong> to learn more about Data Science, Machine Learning, and AI.</p></li><li><p>Just email me at rfeers@gmail.com for any inquiries or to ask for help! &#129299;</p></li></ul><div><hr></div><p>Remember now that DataBites has an official <a href="https://x.com/databitestech">X (Twitter)</a> account and <a href="https://www.linkedin.com/search/results/all/?fetchDeterministicClustersOnly=true&amp;heroEntityKey=urn%3Ali%3Aorganization%3A104285500&amp;keywords=databites&amp;origin=RICH_QUERY_TYPEAHEAD_HISTORY&amp;position=0&amp;searchId=2b268e19-1da0-4357-a42a-9d7f7fba7772&amp;sid=S_G&amp;spellCorrectionEnabled=true">LinkedIn</a> page. Follow us there to stay updated and help spread the word! &#128588;&#127995;</p>]]></content:encoded></item><item><title><![CDATA[CS10 - Understanding The Decoder 🤖 (Part III) ]]></title><description><![CDATA[Decoding the Encoder: A Deep Dive into Transformer Architecture]]></description><link>https://www.databites.tech/p/cs10-understanding-the-decoder-part</link><guid isPermaLink="false">https://www.databites.tech/p/cs10-understanding-the-decoder-part</guid><pubDate>Sun, 30 Mar 2025 10:01:20 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/211d3db9-7160-4a92-ab4b-4050cbbbdd6d_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This article is the third (and last!) part of a <strong>three-part deep dive</strong> into one of the most revolutionary AI architectures of our time:</p><blockquote><p><strong>Transformers.</strong></p></blockquote><p>Here&#8217;s what&#8217;s coming your way:</p><p>&#9989; <strong>Week 1:</strong> Understanding the Transformers architecture &#8594;<strong> <a href="https://www.databites.tech/p/cs8-the-transformers-architecture">Link</a></strong><br>&#9989; <strong>Week 2: </strong>The Encoder &#8594; <strong><a href="https://www.databites.tech/p/cs9-the-transformers-architecture">Link</a></strong><br>&#9989; <strong>Week 3:</strong> The Decoder</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h2><strong>Understanding the Decoder - Part III</strong></h2><p>The <strong>decoder's primary role</strong> is to <strong>g&#8230;</strong></p>
      <p>
          <a href="https://www.databites.tech/p/cs10-understanding-the-decoder-part">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[CS9 - Understanding The Encoder 🤖 (Part II) ]]></title><description><![CDATA[Decoding the Encoder: A Deep Dive into Transformer Architecture]]></description><link>https://www.databites.tech/p/cs9-the-transformers-architecture</link><guid isPermaLink="false">https://www.databites.tech/p/cs9-the-transformers-architecture</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Sun, 23 Mar 2025 11:00:39 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/faa3c49f-d92a-4b07-b3d8-caef3d2d3b30_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This article is the second part of a <strong>three-part deep dive</strong> into one of the most revolutionary AI architectures of our time:</p><blockquote><p><strong>Transformers.</strong></p></blockquote><p>Here&#8217;s what&#8217;s coming your way:</p><p>&#9989; <strong>Week 1:</strong> Understanding the Transformers architecture &#8594;<strong> <a href="https://www.databites.tech/p/cs8-the-transformers-architecture">Link</a></strong><br>&#9989; <strong>Week 2: </strong>The Encoder<br>&#9989; <strong>Week 3:</strong> The Decoder  &#8594; <strong><a href="https://www.databites.tech/p/cs10-understanding-the-decoder-part">Link</a></strong></p><h2><strong>Understanding the Encoder - Part II</strong></h2><p>The encoder is a<strong> fundamental component</strong> of the&#8230;</p>
      <p>
          <a href="https://www.databites.tech/p/cs9-the-transformers-architecture">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Welcome to my Cheatsheets Archive! 👋🏻]]></title><description><![CDATA[Your Go-To Hub for Data & AI Cheatsheets&#8212;Stay Organized, Stay Ahead!]]></description><link>https://www.databites.tech/p/welcome-to-my-cheatsheets-archive</link><guid isPermaLink="false">https://www.databites.tech/p/welcome-to-my-cheatsheets-archive</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Mon, 17 Mar 2025 20:19:17 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/978ec4ff-d327-4755-b976-1ed584bf1b9c_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hey everyone! Josep here&#8212;I&#8217;m thrilled to have you on board! &#10024;</p><p>If you've made it to this site, chances are you've already come across my visuals and cheatsheets. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9_fs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e04778-3373-46e9-8298-1e4eb1300e87_4437x1755.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9_fs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e04778-3373-46e9-8298-1e4eb1300e87_4437x1755.png 424w, https://substackcdn.com/image/fetch/$s_!9_fs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e04778-3373-46e9-8298-1e4eb1300e87_4437x1755.png 848w, https://substackcdn.com/image/fetch/$s_!9_fs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e04778-3373-46e9-8298-1e4eb1300e87_4437x1755.png 1272w, https://substackcdn.com/image/fetch/$s_!9_fs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e04778-3373-46e9-8298-1e4eb1300e87_4437x1755.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9_fs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e04778-3373-46e9-8298-1e4eb1300e87_4437x1755.png" width="1456" height="576" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/01e04778-3373-46e9-8298-1e4eb1300e87_4437x1755.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:576,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2857656,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159283693?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e04778-3373-46e9-8298-1e4eb1300e87_4437x1755.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9_fs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e04778-3373-46e9-8298-1e4eb1300e87_4437x1755.png 424w, https://substackcdn.com/image/fetch/$s_!9_fs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e04778-3373-46e9-8298-1e4eb1300e87_4437x1755.png 848w, https://substackcdn.com/image/fetch/$s_!9_fs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e04778-3373-46e9-8298-1e4eb1300e87_4437x1755.png 1272w, https://substackcdn.com/image/fetch/$s_!9_fs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01e04778-3373-46e9-8298-1e4eb1300e87_4437x1755.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I know many of you love them, which is why I&#8217;ve created this dedicated space to <strong>organize my most popular and well-known cheatsheets&#8212;all in one place!</strong></p><h3>&#128233; Not a Subscriber Yet?</h3><p>What are you waiting for? <strong>Subscribe now</strong> and get a fresh cheatsheet delivered straight to your inbox every week!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h2>&#128293; What to Expect?</h2><p>Every week, a <strong>new cheatsheet</strong> will be released, covering essential topics in: </p><p>&#9989; <strong>SQL</strong> &#8211; Queries, optimization, and best practices<br>&#9989; <strong>Data Visualization</strong> &#8211; Making charts that tell a story<br>&#9989; <strong>Machine Learning</strong> &#8211; Key models and techniques<br>&#9989; <strong>Python</strong> &#8211; Essential data science workflows<br>&#9989; <strong>AI &amp; Deep Learning</strong> &#8211; Understanding cutting-edge architectures</p><p>Whether you&#8217;re sharpening your <strong>SQL skills, mastering data visualization, or diving deep into AI</strong>, you&#8217;ll find <strong>practical, easy-to-digest</strong> insights here.</p><p>&#128161; <strong>Have a cheatsheet request or an idea for future content?</strong> Drop your suggestions in the comments below! &#128071;&#127995;</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/p/welcome-to-my-cheatsheets-archive/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/p/welcome-to-my-cheatsheets-archive/comments"><span>Leave a comment</span></a></p><h2>&#128640; Unlock Exclusive Content</h2><p><strong>Remember:</strong> From now on, part of my cheatsheets will be under a paywall.</p><ul><li><p><strong>Cheatsheets marked with &#10024;</strong> &#8594; Open for everyone (and free forever)</p></li><li><p><strong>Cheatsheets marked with &#128274;</strong> &#8594; Exclusive for premium members</p></li></ul><p>Want <strong>full access</strong> to all cheatsheets? <strong>Upgrade now</strong> and never miss out!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h2>&#128220; Available Cheatsheets</h2><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zvtB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfcbe8ea-febe-4c88-b010-3b54a696276d_2133x440.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zvtB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfcbe8ea-febe-4c88-b010-3b54a696276d_2133x440.png 424w, https://substackcdn.com/image/fetch/$s_!zvtB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfcbe8ea-febe-4c88-b010-3b54a696276d_2133x440.png 848w, https://substackcdn.com/image/fetch/$s_!zvtB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfcbe8ea-febe-4c88-b010-3b54a696276d_2133x440.png 1272w, https://substackcdn.com/image/fetch/$s_!zvtB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfcbe8ea-febe-4c88-b010-3b54a696276d_2133x440.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zvtB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfcbe8ea-febe-4c88-b010-3b54a696276d_2133x440.png" width="1456" height="300" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dfcbe8ea-febe-4c88-b010-3b54a696276d_2133x440.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:300,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:79899,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159283693?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfcbe8ea-febe-4c88-b010-3b54a696276d_2133x440.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zvtB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfcbe8ea-febe-4c88-b010-3b54a696276d_2133x440.png 424w, https://substackcdn.com/image/fetch/$s_!zvtB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfcbe8ea-febe-4c88-b010-3b54a696276d_2133x440.png 848w, https://substackcdn.com/image/fetch/$s_!zvtB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfcbe8ea-febe-4c88-b010-3b54a696276d_2133x440.png 1272w, https://substackcdn.com/image/fetch/$s_!zvtB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfcbe8ea-febe-4c88-b010-3b54a696276d_2133x440.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><ul><li><p><strong>&#128274; CS5 - <a href="https://www.databites.tech/p/cs5-mastering-sql-execution-order">Mastering SQL execution order with JOINs</a></strong></p></li><li><p><strong>&#10024; CS6 - <a href="https://www.databites.tech/p/cs6-mastering-sql-joins">Mastering SQL JOINs</a></strong></p></li><li><p><strong>&#128274; CS7 - <a href="https://www.databites.tech/p/cs7-crafting-modular-sql-queries">Crafting modular SQL queries</a></strong></p></li><li><p><strong>&#10024; CS16 - <a href="https://www.databites.tech/p/how-to-actually-get-started-with-228">How to Actually Get Started with SQL</a></strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bZWr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F370c4619-63fb-4d78-b543-889aad970564_2133x477.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bZWr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F370c4619-63fb-4d78-b543-889aad970564_2133x477.png 424w, https://substackcdn.com/image/fetch/$s_!bZWr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F370c4619-63fb-4d78-b543-889aad970564_2133x477.png 848w, https://substackcdn.com/image/fetch/$s_!bZWr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F370c4619-63fb-4d78-b543-889aad970564_2133x477.png 1272w, https://substackcdn.com/image/fetch/$s_!bZWr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F370c4619-63fb-4d78-b543-889aad970564_2133x477.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bZWr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F370c4619-63fb-4d78-b543-889aad970564_2133x477.png" width="1456" height="326" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/370c4619-63fb-4d78-b543-889aad970564_2133x477.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:326,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:90830,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159283693?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F370c4619-63fb-4d78-b543-889aad970564_2133x477.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bZWr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F370c4619-63fb-4d78-b543-889aad970564_2133x477.png 424w, https://substackcdn.com/image/fetch/$s_!bZWr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F370c4619-63fb-4d78-b543-889aad970564_2133x477.png 848w, https://substackcdn.com/image/fetch/$s_!bZWr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F370c4619-63fb-4d78-b543-889aad970564_2133x477.png 1272w, https://substackcdn.com/image/fetch/$s_!bZWr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F370c4619-63fb-4d78-b543-889aad970564_2133x477.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><ul><li><p><strong>&#10024; CS1 - <a href="https://www.databites.tech/p/cs1-understanding-the-essentials">Understanding the Essentials of Time Series</a></strong></p></li><li><p><strong>&#128274; CS2 - <a href="https://www.databites.tech/p/cs2-dealing-with-outliers">Dealing with Outliers</a></strong></p></li><li><p><strong>&#128274; CS3 - <a href="https://www.databites.tech/p/cs3-unlocking-the-power-of-geospatial">Unlocking the Power of Geospatial Data</a></strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NPo9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde90e45a-c2ca-4119-aec8-9b7fa01c2fe2_2133x456.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NPo9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde90e45a-c2ca-4119-aec8-9b7fa01c2fe2_2133x456.png 424w, https://substackcdn.com/image/fetch/$s_!NPo9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde90e45a-c2ca-4119-aec8-9b7fa01c2fe2_2133x456.png 848w, https://substackcdn.com/image/fetch/$s_!NPo9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde90e45a-c2ca-4119-aec8-9b7fa01c2fe2_2133x456.png 1272w, https://substackcdn.com/image/fetch/$s_!NPo9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde90e45a-c2ca-4119-aec8-9b7fa01c2fe2_2133x456.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NPo9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde90e45a-c2ca-4119-aec8-9b7fa01c2fe2_2133x456.png" width="1456" height="311" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de90e45a-c2ca-4119-aec8-9b7fa01c2fe2_2133x456.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:311,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:88666,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159283693?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde90e45a-c2ca-4119-aec8-9b7fa01c2fe2_2133x456.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NPo9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde90e45a-c2ca-4119-aec8-9b7fa01c2fe2_2133x456.png 424w, https://substackcdn.com/image/fetch/$s_!NPo9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde90e45a-c2ca-4119-aec8-9b7fa01c2fe2_2133x456.png 848w, https://substackcdn.com/image/fetch/$s_!NPo9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde90e45a-c2ca-4119-aec8-9b7fa01c2fe2_2133x456.png 1272w, https://substackcdn.com/image/fetch/$s_!NPo9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde90e45a-c2ca-4119-aec8-9b7fa01c2fe2_2133x456.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p><strong>Transformers Series: </strong></p><ul><li><p><strong>&#10024; CS8 - <a href="https://www.databites.tech/p/cs8-the-transformers-architecture">The Transformers Architecture &#129302;</a></strong></p></li><li><p><strong>&#128274; CS9 - <a href="https://www.databites.tech/p/cs9-the-transformers-architecture">Understanding The Encoder</a> &#10145;&#65039;<a href="https://www.databites.tech/p/cs8-the-transformers-architecture">&#129302;</a></strong></p></li><li><p><strong>&#128274; CS10 - <a href="https://www.databites.tech/p/cs10-understanding-the-decoder-part">Understanding The Decoder</a> <a href="https://www.databites.tech/p/cs8-the-transformers-architecture">&#129302;</a>&#10145;&#65039;</strong></p></li></ul><p><strong>ML Most Common Models Series</strong> <em>(Under Construction! &#9888;&#65039;)</em></p><ul><li><p><strong>&#128274; CS14 - <a href="https://www.databites.tech/p/ml-what-it-is-how-it-works-and-why">What It Is, How It Works &amp; Why It Matters</a></strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!m8gN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc07bcef-f04d-4a08-9088-547ecc7abeb1_2133x434.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!m8gN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc07bcef-f04d-4a08-9088-547ecc7abeb1_2133x434.png 424w, https://substackcdn.com/image/fetch/$s_!m8gN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc07bcef-f04d-4a08-9088-547ecc7abeb1_2133x434.png 848w, https://substackcdn.com/image/fetch/$s_!m8gN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc07bcef-f04d-4a08-9088-547ecc7abeb1_2133x434.png 1272w, https://substackcdn.com/image/fetch/$s_!m8gN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc07bcef-f04d-4a08-9088-547ecc7abeb1_2133x434.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!m8gN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc07bcef-f04d-4a08-9088-547ecc7abeb1_2133x434.png" width="1456" height="296" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fc07bcef-f04d-4a08-9088-547ecc7abeb1_2133x434.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:296,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:83968,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159283693?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc07bcef-f04d-4a08-9088-547ecc7abeb1_2133x434.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!m8gN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc07bcef-f04d-4a08-9088-547ecc7abeb1_2133x434.png 424w, https://substackcdn.com/image/fetch/$s_!m8gN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc07bcef-f04d-4a08-9088-547ecc7abeb1_2133x434.png 848w, https://substackcdn.com/image/fetch/$s_!m8gN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc07bcef-f04d-4a08-9088-547ecc7abeb1_2133x434.png 1272w, https://substackcdn.com/image/fetch/$s_!m8gN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc07bcef-f04d-4a08-9088-547ecc7abeb1_2133x434.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><ul><li><p><strong>&#128274; CS4 - <a href="https://www.databites.tech/p/cs4-why-charts-speak-louder-than">Why Charts Speak Louder Than Numbers? &#128202;</a></strong></p></li><li><p><strong>&#10024; CS12 - <a href="https://www.databites.tech/p/cs12-the-art-and-science-of-data">The Art and Science of Data Visualization</a></strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jMfD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc8cb5a-40b5-4843-8e1c-20737b3d18b5_2133x444.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jMfD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc8cb5a-40b5-4843-8e1c-20737b3d18b5_2133x444.png 424w, https://substackcdn.com/image/fetch/$s_!jMfD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc8cb5a-40b5-4843-8e1c-20737b3d18b5_2133x444.png 848w, https://substackcdn.com/image/fetch/$s_!jMfD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc8cb5a-40b5-4843-8e1c-20737b3d18b5_2133x444.png 1272w, https://substackcdn.com/image/fetch/$s_!jMfD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc8cb5a-40b5-4843-8e1c-20737b3d18b5_2133x444.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jMfD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc8cb5a-40b5-4843-8e1c-20737b3d18b5_2133x444.png" width="1456" height="303" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6dc8cb5a-40b5-4843-8e1c-20737b3d18b5_2133x444.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:303,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:105864,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159283693?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc8cb5a-40b5-4843-8e1c-20737b3d18b5_2133x444.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jMfD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc8cb5a-40b5-4843-8e1c-20737b3d18b5_2133x444.png 424w, https://substackcdn.com/image/fetch/$s_!jMfD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc8cb5a-40b5-4843-8e1c-20737b3d18b5_2133x444.png 848w, https://substackcdn.com/image/fetch/$s_!jMfD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc8cb5a-40b5-4843-8e1c-20737b3d18b5_2133x444.png 1272w, https://substackcdn.com/image/fetch/$s_!jMfD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6dc8cb5a-40b5-4843-8e1c-20737b3d18b5_2133x444.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><ul><li><p><strong>&#10024; CS11 - <a href="https://www.databites.tech/p/cs11-understanding-data-collection">Understanding Data Collection with APIs &#9939;&#65039;&#8205;&#128165;</a></strong></p></li><li><p><strong>&#128274; CS13 - <a href="https://www.databites.tech/p/how-python-manages-data-in-memory">How Python Manages Data In Memory</a> &#128191;</strong></p></li><li><p><strong>&#10024; CS15 - <a href="https://www.databites.tech/p/how-to-actually-get-started-with-5e7">Understanding Data Collection with APIs &#9939;&#65039;&#8205;&#128165;</a></strong></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><p></p><h3>&#128640; Stay Ahead!</h3><p>Upgrade to <strong>unlock all premium cheatsheets</strong> and ensure you have the latest insights at your fingertips.</p><p></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><p>More cheatsheets are coming soon&#8212;stay tuned! &#127919;</p><div><hr></div><p><strong>Any suggestions or recommended topics for future cheatsheets? &#129300;</strong></p><p>Write me an email at rfeers@gmail.com or leave a message below! &#128071;&#127995;</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/p/the-transformers-architecture/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.databites.tech/p/the-transformers-architecture/comments"><span>Leave a comment</span></a></p><div><hr></div><h2>Want to get more of my content? &#128587;&#127995;&#8205;&#9794;&#65039;</h2><p>Reach me on:</p><ul><li><p><strong><a href="https://www.linkedin.com/in/josep-ferrer-sanchez/">LinkedIn</a>,</strong> <strong><a href="https://x.com/rfeers">X (Twitter)</a></strong>, or <strong><a href="https://www.threads.net/@rfeers">Threads</a> to get daily posts about Data Science.</strong></p></li><li><p>My <strong><a href="https://medium.com/@rfeers">Medium</a></strong><a href="https://medium.com/@rfeers"> </a><strong><a href="https://medium.com/@rfeers">Blog</a></strong> to learn more about Data Science, Machine Learning, and AI.</p></li><li><p>Just email me at rfeers@gmail.com for any inquiries or to ask for help! &#129299;</p></li></ul><div><hr></div><p>Remember now that DataBites has an official <a href="https://x.com/databitestech">X (Twitter)</a> account and <a href="https://www.linkedin.com/search/results/all/?fetchDeterministicClustersOnly=true&amp;heroEntityKey=urn%3Ali%3Aorganization%3A104285500&amp;keywords=databites&amp;origin=RICH_QUERY_TYPEAHEAD_HISTORY&amp;position=0&amp;searchId=2b268e19-1da0-4357-a42a-9d7f7fba7772&amp;sid=S_G&amp;spellCorrectionEnabled=true">LinkedIn</a> page. Follow us there to stay updated and help spread the word! &#128588;&#127995;</p><p></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[CS8 - The Transformers Architecture 🤖 (Part I)]]></title><description><![CDATA[Demystifying Transformers: A Three-Part Deep Dive into AI&#8217;s Most Powerful Architecture]]></description><link>https://www.databites.tech/p/cs8-the-transformers-architecture</link><guid isPermaLink="false">https://www.databites.tech/p/cs8-the-transformers-architecture</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Mon, 17 Mar 2025 19:41:35 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/f8e2dca1-4f84-497f-99a9-e808b983bae5_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This article aims to  kicking off a <strong>three-part deep dive</strong> into one of the most revolutionary AI architectures of our time:</p><blockquote><p><strong>Transformers.</strong></p></blockquote><p>Here&#8217;s what&#8217;s coming your way:</p><p>&#9989; <strong>Week 1:</strong> Understanding the Transformers architecture <br>&#9989; <strong>Week 2:</strong> The Encoder &#8594;<strong> <a href="https://www.databites.tech/p/cs9-the-transformers-architecture">Link</a></strong><br>&#9989; <strong>Week 3:</strong> The Decoder &#8594;<strong> <a href="https://www.databites.tech/p/cs10-understanding-the-decoder-part">Link</a></strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h2><strong>The Transformers Architecture - Part I</strong></h2><p>With <strong>GPT-3.5</strong> gaining <strong>1 million users in a week</strong>, it&#8217;s clear AI is reshaping our world.</p><p>But <strong>how do these models actually work?</strong></p><p>&#128161; <strong>The magic lies in the Transformer architecture</strong>, introduced in <strong>Google&#8217;s 2017 paper,</strong> <em><a href="https://arxiv.org/abs/1706.03762">"Attention is All You Need."</a></em></p><p>Before starting, here you have the full-resolution cheatsheet &#128071;&#127995;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Y-N8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b6f347-84b1-484b-af0f-c3cf6e3041f5_3733x4986.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Y-N8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b6f347-84b1-484b-af0f-c3cf6e3041f5_3733x4986.png 424w, https://substackcdn.com/image/fetch/$s_!Y-N8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b6f347-84b1-484b-af0f-c3cf6e3041f5_3733x4986.png 848w, https://substackcdn.com/image/fetch/$s_!Y-N8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b6f347-84b1-484b-af0f-c3cf6e3041f5_3733x4986.png 1272w, https://substackcdn.com/image/fetch/$s_!Y-N8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b6f347-84b1-484b-af0f-c3cf6e3041f5_3733x4986.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Y-N8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b6f347-84b1-484b-af0f-c3cf6e3041f5_3733x4986.png" width="728" height="972.5" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/22b6f347-84b1-484b-af0f-c3cf6e3041f5_3733x4986.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1945,&quot;width&quot;:1456,&quot;resizeWidth&quot;:728,&quot;bytes&quot;:3083092,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159082280?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b6f347-84b1-484b-af0f-c3cf6e3041f5_3733x4986.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!Y-N8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b6f347-84b1-484b-af0f-c3cf6e3041f5_3733x4986.png 424w, https://substackcdn.com/image/fetch/$s_!Y-N8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b6f347-84b1-484b-af0f-c3cf6e3041f5_3733x4986.png 848w, https://substackcdn.com/image/fetch/$s_!Y-N8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b6f347-84b1-484b-af0f-c3cf6e3041f5_3733x4986.png 1272w, https://substackcdn.com/image/fetch/$s_!Y-N8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F22b6f347-84b1-484b-af0f-c3cf6e3041f5_3733x4986.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>And now&#8230; let&#8217;s break it down!</p><h3>1 What is a Transformer?</h3><p>A transformer model is neural network that excels at understanding the context of sequential data and generating new data from it. Initially developed for <strong>machine translation</strong>, it has evolved to become the backbone of nearly all modern AI models.</p><p>The <strong>key innovation?</strong></p><p>Unlike traditional models that process words sequentially (like RNNs), <strong>Transformers process entire sequences at once</strong> using <strong>self-attention </strong>without using recurrence, allowing them to focus on relevant parts of the input sequence and understand the dependencies between them.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5Mm2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F126bc376-11ca-4c8d-a248-b37df59a6b21_2838x512.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5Mm2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F126bc376-11ca-4c8d-a248-b37df59a6b21_2838x512.png 424w, https://substackcdn.com/image/fetch/$s_!5Mm2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F126bc376-11ca-4c8d-a248-b37df59a6b21_2838x512.png 848w, https://substackcdn.com/image/fetch/$s_!5Mm2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F126bc376-11ca-4c8d-a248-b37df59a6b21_2838x512.png 1272w, https://substackcdn.com/image/fetch/$s_!5Mm2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F126bc376-11ca-4c8d-a248-b37df59a6b21_2838x512.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5Mm2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F126bc376-11ca-4c8d-a248-b37df59a6b21_2838x512.png" width="1456" height="263" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/126bc376-11ca-4c8d-a248-b37df59a6b21_2838x512.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:263,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:149962,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159282974?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F126bc376-11ca-4c8d-a248-b37df59a6b21_2838x512.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5Mm2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F126bc376-11ca-4c8d-a248-b37df59a6b21_2838x512.png 424w, https://substackcdn.com/image/fetch/$s_!5Mm2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F126bc376-11ca-4c8d-a248-b37df59a6b21_2838x512.png 848w, https://substackcdn.com/image/fetch/$s_!5Mm2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F126bc376-11ca-4c8d-a248-b37df59a6b21_2838x512.png 1272w, https://substackcdn.com/image/fetch/$s_!5Mm2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F126bc376-11ca-4c8d-a248-b37df59a6b21_2838x512.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h3>2 What is the Transformer Architecture?</h3><p>Transformers <strong>convert natural language input into natural language output</strong> without relying on RNNs or convolutions.</p><p>At a high level, a Transformer acts like a <strong>black box</strong> that deals with natural language. For instance, to translate a sentence we would have:</p><p>&#9989; <strong>Input:</strong> Spanish sentence "&#191;De qui&#233;n es?"<br>&#9989; <strong>Processing:</strong> The model encodes the meaning<br>&#9989; <strong>Output:</strong> English translation: "Whose is it?"</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!biGD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde1cdfdd-c6a3-4967-884b-73906fe5e9c2_3327x876.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!biGD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde1cdfdd-c6a3-4967-884b-73906fe5e9c2_3327x876.png 424w, https://substackcdn.com/image/fetch/$s_!biGD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde1cdfdd-c6a3-4967-884b-73906fe5e9c2_3327x876.png 848w, https://substackcdn.com/image/fetch/$s_!biGD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde1cdfdd-c6a3-4967-884b-73906fe5e9c2_3327x876.png 1272w, https://substackcdn.com/image/fetch/$s_!biGD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde1cdfdd-c6a3-4967-884b-73906fe5e9c2_3327x876.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!biGD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde1cdfdd-c6a3-4967-884b-73906fe5e9c2_3327x876.png" width="1456" height="383" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de1cdfdd-c6a3-4967-884b-73906fe5e9c2_3327x876.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:383,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:163298,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159282974?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde1cdfdd-c6a3-4967-884b-73906fe5e9c2_3327x876.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!biGD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde1cdfdd-c6a3-4967-884b-73906fe5e9c2_3327x876.png 424w, https://substackcdn.com/image/fetch/$s_!biGD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde1cdfdd-c6a3-4967-884b-73906fe5e9c2_3327x876.png 848w, https://substackcdn.com/image/fetch/$s_!biGD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde1cdfdd-c6a3-4967-884b-73906fe5e9c2_3327x876.png 1272w, https://substackcdn.com/image/fetch/$s_!biGD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde1cdfdd-c6a3-4967-884b-73906fe5e9c2_3327x876.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Inside this <strong>black box</strong>, we find two key components:</p><p>1&#65039;&#8419; <strong>The Encoder</strong> &#8211; Converts the input into a structured representation.<br>2&#65039;&#8419; <strong>The Decoder</strong> &#8211; Transforms this representation into the final output.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h4>2.1. The Encoder</h4><p>This part takes our input and converts it into a matrix representation. For example, it processes the Spanish sentence <em>"&#191;De qui&#233;n es?"</em> and transforms it into a structured format that captures the essence of the input.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uiS-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3308cd11-4aea-4c94-9f4e-d475bb576aa6_2575x1763.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uiS-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3308cd11-4aea-4c94-9f4e-d475bb576aa6_2575x1763.png 424w, https://substackcdn.com/image/fetch/$s_!uiS-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3308cd11-4aea-4c94-9f4e-d475bb576aa6_2575x1763.png 848w, https://substackcdn.com/image/fetch/$s_!uiS-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3308cd11-4aea-4c94-9f4e-d475bb576aa6_2575x1763.png 1272w, https://substackcdn.com/image/fetch/$s_!uiS-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3308cd11-4aea-4c94-9f4e-d475bb576aa6_2575x1763.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uiS-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3308cd11-4aea-4c94-9f4e-d475bb576aa6_2575x1763.png" width="1456" height="997" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3308cd11-4aea-4c94-9f4e-d475bb576aa6_2575x1763.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:997,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:282176,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159282974?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3308cd11-4aea-4c94-9f4e-d475bb576aa6_2575x1763.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uiS-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3308cd11-4aea-4c94-9f4e-d475bb576aa6_2575x1763.png 424w, https://substackcdn.com/image/fetch/$s_!uiS-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3308cd11-4aea-4c94-9f4e-d475bb576aa6_2575x1763.png 848w, https://substackcdn.com/image/fetch/$s_!uiS-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3308cd11-4aea-4c94-9f4e-d475bb576aa6_2575x1763.png 1272w, https://substackcdn.com/image/fetch/$s_!uiS-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3308cd11-4aea-4c94-9f4e-d475bb576aa6_2575x1763.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h4>2.2. The Decoder</h4><p>This component receives the encoded representation and iteratively generates the output. In our case, it takes the encoded data and produces the translated sentence <em>"Whose is it?"</em> in English.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!743s!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4282fe-950d-4d20-8f2d-f8de6dae8510_2549x1783.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!743s!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4282fe-950d-4d20-8f2d-f8de6dae8510_2549x1783.png 424w, https://substackcdn.com/image/fetch/$s_!743s!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4282fe-950d-4d20-8f2d-f8de6dae8510_2549x1783.png 848w, https://substackcdn.com/image/fetch/$s_!743s!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4282fe-950d-4d20-8f2d-f8de6dae8510_2549x1783.png 1272w, https://substackcdn.com/image/fetch/$s_!743s!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4282fe-950d-4d20-8f2d-f8de6dae8510_2549x1783.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!743s!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4282fe-950d-4d20-8f2d-f8de6dae8510_2549x1783.png" width="1456" height="1018" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2c4282fe-950d-4d20-8f2d-f8de6dae8510_2549x1783.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1018,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:284520,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159282974?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4282fe-950d-4d20-8f2d-f8de6dae8510_2549x1783.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!743s!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4282fe-950d-4d20-8f2d-f8de6dae8510_2549x1783.png 424w, https://substackcdn.com/image/fetch/$s_!743s!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4282fe-950d-4d20-8f2d-f8de6dae8510_2549x1783.png 848w, https://substackcdn.com/image/fetch/$s_!743s!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4282fe-950d-4d20-8f2d-f8de6dae8510_2549x1783.png 1272w, https://substackcdn.com/image/fetch/$s_!743s!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2c4282fe-950d-4d20-8f2d-f8de6dae8510_2549x1783.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h2><strong>3. The Encoder-Decoder Structure &#128260;</strong></h2><p>Each Transformer consists of multiple <strong>encoder and decoder layers</strong> that refine and process the data step by step.</p><p>&#9989; <strong>Encoders</strong> process input sequentially through multiple layers.<br>&#9989; <strong>Decoders</strong> generate the output, using both the encoded data and previous decoder layers.</p><p>The original Transformer had <strong>6 Encoders &amp; 6 Decoders</strong>, but this structure is <strong>flexible.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jpS3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b7095fd-beff-479c-8630-4849b9297586_2496x1683.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jpS3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b7095fd-beff-479c-8630-4849b9297586_2496x1683.png 424w, https://substackcdn.com/image/fetch/$s_!jpS3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b7095fd-beff-479c-8630-4849b9297586_2496x1683.png 848w, https://substackcdn.com/image/fetch/$s_!jpS3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b7095fd-beff-479c-8630-4849b9297586_2496x1683.png 1272w, https://substackcdn.com/image/fetch/$s_!jpS3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b7095fd-beff-479c-8630-4849b9297586_2496x1683.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jpS3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b7095fd-beff-479c-8630-4849b9297586_2496x1683.png" width="523" height="352.7376373626374" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3b7095fd-beff-479c-8630-4849b9297586_2496x1683.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:982,&quot;width&quot;:1456,&quot;resizeWidth&quot;:523,&quot;bytes&quot;:317160,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159282974?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b7095fd-beff-479c-8630-4849b9297586_2496x1683.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!jpS3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b7095fd-beff-479c-8630-4849b9297586_2496x1683.png 424w, https://substackcdn.com/image/fetch/$s_!jpS3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b7095fd-beff-479c-8630-4849b9297586_2496x1683.png 848w, https://substackcdn.com/image/fetch/$s_!jpS3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b7095fd-beff-479c-8630-4849b9297586_2496x1683.png 1272w, https://substackcdn.com/image/fetch/$s_!jpS3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3b7095fd-beff-479c-8630-4849b9297586_2496x1683.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h2><strong>4. Why Self-Attention Matters &#129327;</strong></h2><p>Instead of reading words in order, <strong>Transformers evaluate the entire sentence at once</strong>&#8212;focusing on the most relevant words.</p><p>&#128214; <strong>Example:</strong> <em>"The cat sat on the mat."</em><br>&#128269; The Transformer immediately understands <strong>"cat"</strong> as the subject and <strong>"mat"</strong> as the object.</p><p>This makes <strong>translation, text generation, and AI-powered chatbots possible!</strong></p><p>The overall Transformers architecture looks something like follows &#128071;&#127995;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZxPH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82dc173a-8187-4094-8996-3f5cb06dd1c5_1200x1361.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZxPH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82dc173a-8187-4094-8996-3f5cb06dd1c5_1200x1361.png 424w, https://substackcdn.com/image/fetch/$s_!ZxPH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82dc173a-8187-4094-8996-3f5cb06dd1c5_1200x1361.png 848w, https://substackcdn.com/image/fetch/$s_!ZxPH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82dc173a-8187-4094-8996-3f5cb06dd1c5_1200x1361.png 1272w, https://substackcdn.com/image/fetch/$s_!ZxPH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82dc173a-8187-4094-8996-3f5cb06dd1c5_1200x1361.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZxPH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82dc173a-8187-4094-8996-3f5cb06dd1c5_1200x1361.png" width="578" height="655.5483333333333" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/82dc173a-8187-4094-8996-3f5cb06dd1c5_1200x1361.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1361,&quot;width&quot;:1200,&quot;resizeWidth&quot;:578,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!ZxPH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82dc173a-8187-4094-8996-3f5cb06dd1c5_1200x1361.png 424w, https://substackcdn.com/image/fetch/$s_!ZxPH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82dc173a-8187-4094-8996-3f5cb06dd1c5_1200x1361.png 848w, https://substackcdn.com/image/fetch/$s_!ZxPH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82dc173a-8187-4094-8996-3f5cb06dd1c5_1200x1361.png 1272w, https://substackcdn.com/image/fetch/$s_!ZxPH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F82dc173a-8187-4094-8996-3f5cb06dd1c5_1200x1361.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>But no worries, we will focus on both the Encoder and the Decoder.</p><p><strong>Next Week: The Encoder Deep Dive </strong>&#8212;so stay tuned!</p><div><hr></div><p>Before you go,<strong> tap the &#128154; button at the bottom of this email to show your support</strong>&#8212;<em>it really helps and means a lot!</em></p><p><strong>Any doubt? Let&#8217;s start a conversation! &#128071;&#127995;</strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/p/the-transformers-architecture/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.databites.tech/p/the-transformers-architecture/comments"><span>Leave a comment</span></a></p><div><hr></div><h2>Want to get more of my content? &#128587;&#127995;&#8205;&#9794;&#65039;</h2><p>Reach me on:</p><ul><li><p><strong><a href="https://www.linkedin.com/in/josep-ferrer-sanchez/">LinkedIn</a>,</strong> <strong><a href="https://x.com/rfeers">X (Twitter)</a></strong>, or <strong><a href="https://www.threads.net/@rfeers">Threads</a> to get daily posts about Data Science.</strong></p></li><li><p>My <strong><a href="https://medium.com/@rfeers">Medium</a></strong><a href="https://medium.com/@rfeers"> </a><strong><a href="https://medium.com/@rfeers">Blog</a></strong> to learn more about Data Science, Machine Learning, and AI.</p></li><li><p>Just email me at rfeers@gmail.com for any inquiries or to ask for help! &#129299;</p></li></ul><div><hr></div><p>Remember now that DataBites has an official <a href="https://x.com/databitestech">X (Twitter)</a> account and <a href="https://www.linkedin.com/search/results/all/?fetchDeterministicClustersOnly=true&amp;heroEntityKey=urn%3Ali%3Aorganization%3A104285500&amp;keywords=databites&amp;origin=RICH_QUERY_TYPEAHEAD_HISTORY&amp;position=0&amp;searchId=2b268e19-1da0-4357-a42a-9d7f7fba7772&amp;sid=S_G&amp;spellCorrectionEnabled=true">LinkedIn</a> page. Follow us there to stay updated and help spread the word! &#128588;&#127995;</p>]]></content:encoded></item><item><title><![CDATA[CS7 - Crafting modular SQL queries]]></title><description><![CDATA[Writing Modular, Reusable, and Readable SQL Queries]]></description><link>https://www.databites.tech/p/cs7-crafting-modular-sql-queries</link><guid isPermaLink="false">https://www.databites.tech/p/cs7-crafting-modular-sql-queries</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Mon, 17 Mar 2025 19:30:20 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/703e1186-7f17-43f2-bcba-d181ecafa81d_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1><strong>Writing Cleaner SQL Queries with CTEs</strong></h1><p>SQL queries can quickly become a tangled mess&#8212;hard to read, difficult to maintain, and nearly impossible to debug. But what if you could break them down into clear, modular steps? Enter <strong>Common Table Expressions (CTEs)</strong>, a powerful SQL feature that makes queries more structured, readable, and reusable.</p><p>In this article, we&#8217;ll explore how CTEs help standardize metrics, improve collaboration, and make SQL logic easier to follow. </p><p>Before starting, here you have the full-resolution cheatsheet &#128071;&#127995;</p>
      <p>
          <a href="https://www.databites.tech/p/cs7-crafting-modular-sql-queries">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[CS6 - Mastering SQL JOINs]]></title><description><![CDATA[Unlock the Power of SQL JOINs]]></description><link>https://www.databites.tech/p/cs6-mastering-sql-joins</link><guid isPermaLink="false">https://www.databites.tech/p/cs6-mastering-sql-joins</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Mon, 17 Mar 2025 19:25:49 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/d12a2f43-76dc-4d0b-b009-797699371ee6_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Merging tables is at the heart of SQL, yet understanding how different JOINs work can be tricky. </p><p>Whether you're dealing with LEFT, RIGHT, INNER, or FULL JOINs, knowing how they interact with your data is crucial for extracting meaningful insights. </p><p>And this leads us to today&#8217;s main focus&#8230;</p><p><strong>SQL JOINs</strong></p><p>Before starting, here you have the full-resolution cheatsheet &#128071;&#127995;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GSfN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e82d4d6-c9db-4794-9d0d-d470236f8317_3693x4054.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GSfN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e82d4d6-c9db-4794-9d0d-d470236f8317_3693x4054.png 424w, https://substackcdn.com/image/fetch/$s_!GSfN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e82d4d6-c9db-4794-9d0d-d470236f8317_3693x4054.png 848w, https://substackcdn.com/image/fetch/$s_!GSfN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e82d4d6-c9db-4794-9d0d-d470236f8317_3693x4054.png 1272w, https://substackcdn.com/image/fetch/$s_!GSfN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e82d4d6-c9db-4794-9d0d-d470236f8317_3693x4054.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GSfN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e82d4d6-c9db-4794-9d0d-d470236f8317_3693x4054.png" width="1456" height="1598" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2e82d4d6-c9db-4794-9d0d-d470236f8317_3693x4054.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1598,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2219510,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!GSfN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e82d4d6-c9db-4794-9d0d-d470236f8317_3693x4054.png 424w, https://substackcdn.com/image/fetch/$s_!GSfN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e82d4d6-c9db-4794-9d0d-d470236f8317_3693x4054.png 848w, https://substackcdn.com/image/fetch/$s_!GSfN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e82d4d6-c9db-4794-9d0d-d470236f8317_3693x4054.png 1272w, https://substackcdn.com/image/fetch/$s_!GSfN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2e82d4d6-c9db-4794-9d0d-d470236f8317_3693x4054.png 1456w" sizes="100vw" loading="lazy" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h1>The Magic of SQL Joins</h1><p>In the world of databases, data often resides in separate tables. SQL Joins allow you to combine these tables in meaningful ways, giving you the power to extract insights that would otherwise remain buried.</p><p>But let&#8217;s face it&#8212;Joins can be confusing.</p><p><em>Which one do you use? What happens to rows that don&#8217;t match?</em></p><p>This week, we break it all down with the <strong>SQL Joins Cheatsheet</strong> to clarify these concepts. To do so, we will use two dummy tables as example:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bJ_6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52740b3b-f4b3-4d6b-a7d7-9bd128a8fe01_3372x1214.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bJ_6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52740b3b-f4b3-4d6b-a7d7-9bd128a8fe01_3372x1214.png 424w, https://substackcdn.com/image/fetch/$s_!bJ_6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52740b3b-f4b3-4d6b-a7d7-9bd128a8fe01_3372x1214.png 848w, https://substackcdn.com/image/fetch/$s_!bJ_6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52740b3b-f4b3-4d6b-a7d7-9bd128a8fe01_3372x1214.png 1272w, https://substackcdn.com/image/fetch/$s_!bJ_6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52740b3b-f4b3-4d6b-a7d7-9bd128a8fe01_3372x1214.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bJ_6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52740b3b-f4b3-4d6b-a7d7-9bd128a8fe01_3372x1214.png" width="1456" height="524" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/52740b3b-f4b3-4d6b-a7d7-9bd128a8fe01_3372x1214.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:524,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:307783,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!bJ_6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52740b3b-f4b3-4d6b-a7d7-9bd128a8fe01_3372x1214.png 424w, https://substackcdn.com/image/fetch/$s_!bJ_6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52740b3b-f4b3-4d6b-a7d7-9bd128a8fe01_3372x1214.png 848w, https://substackcdn.com/image/fetch/$s_!bJ_6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52740b3b-f4b3-4d6b-a7d7-9bd128a8fe01_3372x1214.png 1272w, https://substackcdn.com/image/fetch/$s_!bJ_6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F52740b3b-f4b3-4d6b-a7d7-9bd128a8fe01_3372x1214.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>#1. <strong>Left Join</strong></h2><ul><li><p><strong>What it does:</strong> Returns all records from table A and the matching records from table B. Rows in A without matches in B will still appear, with NULL values for B.</p></li><li><p><strong>Use case:</strong> When you want all data from the left table, regardless of matches in the right table.</p></li></ul><pre><code><code>SELECT *  
FROM A  
LEFT JOIN B  
ON A.KEY = B.KEY  </code></code></pre><p><strong>Query Example:</strong></p><pre><code><code>SELECT
    A.A_KEY,
    A.A_NAME,
    A.CITY,
    B.B_KEY,
    B.DEPARTMENT,
    B.EMPLOYMENT_STATUS
FROM TableA A
LEFT JOIN TableB B
    ON A.A_KEY = B.B_KEY;</code></code></pre><p><strong>What it does:</strong><br>Returns all rows from <strong>TableA</strong>, along with the matching rows from <strong>TableB</strong>. Rows in <strong>A</strong> that have no matching <strong>B_KEY</strong> will have NULL for columns from <strong>B</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!KInE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc3eeb8-5fcf-40d7-9554-8d1e916b1ab9_1028x370.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!KInE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc3eeb8-5fcf-40d7-9554-8d1e916b1ab9_1028x370.png 424w, https://substackcdn.com/image/fetch/$s_!KInE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc3eeb8-5fcf-40d7-9554-8d1e916b1ab9_1028x370.png 848w, https://substackcdn.com/image/fetch/$s_!KInE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc3eeb8-5fcf-40d7-9554-8d1e916b1ab9_1028x370.png 1272w, https://substackcdn.com/image/fetch/$s_!KInE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc3eeb8-5fcf-40d7-9554-8d1e916b1ab9_1028x370.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!KInE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc3eeb8-5fcf-40d7-9554-8d1e916b1ab9_1028x370.png" width="1028" height="370" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/acc3eeb8-5fcf-40d7-9554-8d1e916b1ab9_1028x370.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:370,&quot;width&quot;:1028,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:51045,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!KInE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc3eeb8-5fcf-40d7-9554-8d1e916b1ab9_1028x370.png 424w, https://substackcdn.com/image/fetch/$s_!KInE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc3eeb8-5fcf-40d7-9554-8d1e916b1ab9_1028x370.png 848w, https://substackcdn.com/image/fetch/$s_!KInE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc3eeb8-5fcf-40d7-9554-8d1e916b1ab9_1028x370.png 1272w, https://substackcdn.com/image/fetch/$s_!KInE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc3eeb8-5fcf-40d7-9554-8d1e916b1ab9_1028x370.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>#2. <strong>Right Join</strong></h2><ul><li><p><strong>What it does:</strong> Similar to Left Join but focuses on the right table (B). All rows from B are included, and unmatched rows from A appear as NULL.</p></li><li><p><strong>Use case:</strong> When your primary focus is on the right table.</p></li></ul><pre><code><code>SELECT *  
FROM A  
RIGHT JOIN B  
ON A.KEY = B.KEY  </code></code></pre><p><strong>Query Example:</strong></p><pre><code><code>SELECT
    A.A_KEY,
    A.A_NAME,
    A.CITY,
    B.B_KEY,
    B.DEPARTMENT,
    B.EMPLOYMENT_STATUS
FROM TableA A
RIGHT JOIN TableB B
    ON A.A_KEY = B.B_KEY;
</code></code></pre><p><strong>What it does:</strong><br>Returns all rows from <strong>TableB</strong>, plus the matching rows from <strong>TableA</strong>. Rows in <strong>B</strong> with no matching <strong>A_KEY</strong> will have NULL for columns from <strong>A</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!jQbS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fecfb71-ee57-43d3-bd75-f02a8895b036_1028x306.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!jQbS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fecfb71-ee57-43d3-bd75-f02a8895b036_1028x306.png 424w, https://substackcdn.com/image/fetch/$s_!jQbS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fecfb71-ee57-43d3-bd75-f02a8895b036_1028x306.png 848w, https://substackcdn.com/image/fetch/$s_!jQbS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fecfb71-ee57-43d3-bd75-f02a8895b036_1028x306.png 1272w, https://substackcdn.com/image/fetch/$s_!jQbS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fecfb71-ee57-43d3-bd75-f02a8895b036_1028x306.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!jQbS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fecfb71-ee57-43d3-bd75-f02a8895b036_1028x306.png" width="1028" height="306" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0fecfb71-ee57-43d3-bd75-f02a8895b036_1028x306.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:306,&quot;width&quot;:1028,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:45954,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!jQbS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fecfb71-ee57-43d3-bd75-f02a8895b036_1028x306.png 424w, https://substackcdn.com/image/fetch/$s_!jQbS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fecfb71-ee57-43d3-bd75-f02a8895b036_1028x306.png 848w, https://substackcdn.com/image/fetch/$s_!jQbS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fecfb71-ee57-43d3-bd75-f02a8895b036_1028x306.png 1272w, https://substackcdn.com/image/fetch/$s_!jQbS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fecfb71-ee57-43d3-bd75-f02a8895b036_1028x306.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>We can replicate the same JOINs as before, but this time without overlapping!</p><h3>#3. <strong>Left Join (Without Overlapping)</strong></h3><ul><li><p><strong>What it does:</strong> Retrieves rows from table A that don&#8217;t have a match in table B.</p></li><li><p><strong>Use case:</strong> Finding records in A that are missing corresponding data in B.</p></li></ul><pre><code><code>SELECT *  
FROM A  
LEFT JOIN B  
ON A.KEY = B.KEY  
WHERE B.KEY IS NULL  </code></code></pre><p><strong>Query Example</strong></p><pre><code><code>SELECT
    A.A_KEY,
    A.A_NAME,
    A.CITY,
    B.B_KEY,
    B.DEPARTMENT,
    B.EMPLOYMENT_STATUS
FROM TableA A
LEFT JOIN TableB B
    ON A.A_KEY = B.B_KEY
WHERE B.B_KEY IS NULL;</code></code></pre><p><strong>What it does:</strong><br>Fetches only the rows from <strong>TableA</strong> that <strong>do not</strong> have a match in <strong>TableB</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sFFM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d0ef79-f026-42ca-b291-43c59acd5773_1028x242.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sFFM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d0ef79-f026-42ca-b291-43c59acd5773_1028x242.png 424w, https://substackcdn.com/image/fetch/$s_!sFFM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d0ef79-f026-42ca-b291-43c59acd5773_1028x242.png 848w, https://substackcdn.com/image/fetch/$s_!sFFM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d0ef79-f026-42ca-b291-43c59acd5773_1028x242.png 1272w, https://substackcdn.com/image/fetch/$s_!sFFM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d0ef79-f026-42ca-b291-43c59acd5773_1028x242.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sFFM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d0ef79-f026-42ca-b291-43c59acd5773_1028x242.png" width="1028" height="242" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/83d0ef79-f026-42ca-b291-43c59acd5773_1028x242.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:242,&quot;width&quot;:1028,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:38690,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!sFFM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d0ef79-f026-42ca-b291-43c59acd5773_1028x242.png 424w, https://substackcdn.com/image/fetch/$s_!sFFM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d0ef79-f026-42ca-b291-43c59acd5773_1028x242.png 848w, https://substackcdn.com/image/fetch/$s_!sFFM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d0ef79-f026-42ca-b291-43c59acd5773_1028x242.png 1272w, https://substackcdn.com/image/fetch/$s_!sFFM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F83d0ef79-f026-42ca-b291-43c59acd5773_1028x242.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h3>#4. <strong>Right Join (Without Overlapping)</strong></h3><ul><li><p><strong>What it does:</strong> The reverse of the above&#8212;returns rows in table B without matches in table A.</p></li><li><p><strong>Use case:</strong> Finding records in B that don&#8217;t correspond to A.</p></li></ul><pre><code><code>SELECT *  
FROM A  
RIGHT JOIN B  
ON A.KEY = B.KEY  
WHERE A.KEY IS NULL  </code></code></pre><p><strong>Query Example:</strong></p><pre><code><code>SELECT
    A.A_KEY,
    A.A_NAME,
    A.CITY,
    B.B_KEY,
    B.DEPARTMENT,
    B.EMPLOYMENT_STATUS
FROM TableA A
RIGHT JOIN TableB B
    ON A.A_KEY = B.B_KEY
WHERE A.A_KEY IS NULL;</code></code></pre><p><strong>What it does:</strong><br>Fetches only the rows from <strong>TableB</strong> that <strong>do not</strong> have a match in <strong>TableA</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qbfw!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F602424b3-12b9-4e09-826e-2539dc655167_1022x188.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qbfw!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F602424b3-12b9-4e09-826e-2539dc655167_1022x188.png 424w, https://substackcdn.com/image/fetch/$s_!qbfw!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F602424b3-12b9-4e09-826e-2539dc655167_1022x188.png 848w, https://substackcdn.com/image/fetch/$s_!qbfw!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F602424b3-12b9-4e09-826e-2539dc655167_1022x188.png 1272w, https://substackcdn.com/image/fetch/$s_!qbfw!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F602424b3-12b9-4e09-826e-2539dc655167_1022x188.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qbfw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F602424b3-12b9-4e09-826e-2539dc655167_1022x188.png" width="1022" height="188" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/602424b3-12b9-4e09-826e-2539dc655167_1022x188.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:188,&quot;width&quot;:1022,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:33189,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!qbfw!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F602424b3-12b9-4e09-826e-2539dc655167_1022x188.png 424w, https://substackcdn.com/image/fetch/$s_!qbfw!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F602424b3-12b9-4e09-826e-2539dc655167_1022x188.png 848w, https://substackcdn.com/image/fetch/$s_!qbfw!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F602424b3-12b9-4e09-826e-2539dc655167_1022x188.png 1272w, https://substackcdn.com/image/fetch/$s_!qbfw!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F602424b3-12b9-4e09-826e-2539dc655167_1022x188.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h3>#5. <strong>Full Join</strong></h3><ul><li><p><strong>What it does:</strong> Combines all records from both tables. Rows with no match in either table appear with NULLs.</p></li><li><p><strong>Use case:</strong> When you need a complete overview of data in both tables.</p></li></ul><pre><code><code>SELECT *  
FROM A  
FULL OUTER JOIN B  
ON A.KEY = B.KEY  
</code></code></pre><p><strong>Query Example:</strong></p><pre><code><code>SELECT
    A.A_KEY,
    A.A_NAME,
    A.CITY,
    B.B_KEY,
    B.DEPARTMENT,
    B.EMPLOYMENT_STATUS
FROM TableA A
FULL OUTER JOIN TableB B
    ON A.A_KEY = B.B_KEY;</code></code></pre><p><strong>What it does:</strong><br>Returns all rows from both <strong>TableA</strong> and <strong>TableB</strong>. Rows without matches in the other table will show NULL in those table&#8217;s columns.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bmOC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b083f78-eec0-4b99-a997-fc92f82486bb_1022x438.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bmOC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b083f78-eec0-4b99-a997-fc92f82486bb_1022x438.png 424w, https://substackcdn.com/image/fetch/$s_!bmOC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b083f78-eec0-4b99-a997-fc92f82486bb_1022x438.png 848w, https://substackcdn.com/image/fetch/$s_!bmOC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b083f78-eec0-4b99-a997-fc92f82486bb_1022x438.png 1272w, https://substackcdn.com/image/fetch/$s_!bmOC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b083f78-eec0-4b99-a997-fc92f82486bb_1022x438.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bmOC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b083f78-eec0-4b99-a997-fc92f82486bb_1022x438.png" width="1022" height="438" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6b083f78-eec0-4b99-a997-fc92f82486bb_1022x438.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:438,&quot;width&quot;:1022,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:60768,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!bmOC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b083f78-eec0-4b99-a997-fc92f82486bb_1022x438.png 424w, https://substackcdn.com/image/fetch/$s_!bmOC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b083f78-eec0-4b99-a997-fc92f82486bb_1022x438.png 848w, https://substackcdn.com/image/fetch/$s_!bmOC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b083f78-eec0-4b99-a997-fc92f82486bb_1022x438.png 1272w, https://substackcdn.com/image/fetch/$s_!bmOC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b083f78-eec0-4b99-a997-fc92f82486bb_1022x438.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>#6. <strong>Inner Join</strong></h3><ul><li><p><strong>What it does:</strong> Returns only the rows with matching keys in both tables.</p></li><li><p><strong>Use case:</strong> Perfect for extracting overlapping data.</p></li></ul><pre><code><code>SELECT *  
FROM A  
INNER JOIN B  
ON A.KEY = B.KEY  </code></code></pre><p><strong>Query Example:</strong></p><pre><code><code>SELECT
    A.A_KEY,
    A.A_NAME,
    A.CITY,
    B.B_KEY,
    B.DEPARTMENT,
    B.EMPLOYMENT_STATUS
FROM TableA A
INNER JOIN TableB B
    ON A.A_KEY = B.B_KEY;</code></code></pre><p><strong>What it does:</strong><br>Returns only rows where <strong>TableA</strong> and <strong>TableB</strong> share the same key. Rows that don&#8217;t overlap on <strong>A_KEY = B_KEY</strong> are excluded entirely.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9tel!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1b3e1cd-1031-429f-96fd-7d4e7dd3e1f2_1022x242.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9tel!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1b3e1cd-1031-429f-96fd-7d4e7dd3e1f2_1022x242.png 424w, https://substackcdn.com/image/fetch/$s_!9tel!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1b3e1cd-1031-429f-96fd-7d4e7dd3e1f2_1022x242.png 848w, https://substackcdn.com/image/fetch/$s_!9tel!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1b3e1cd-1031-429f-96fd-7d4e7dd3e1f2_1022x242.png 1272w, https://substackcdn.com/image/fetch/$s_!9tel!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1b3e1cd-1031-429f-96fd-7d4e7dd3e1f2_1022x242.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9tel!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1b3e1cd-1031-429f-96fd-7d4e7dd3e1f2_1022x242.png" width="1022" height="242" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c1b3e1cd-1031-429f-96fd-7d4e7dd3e1f2_1022x242.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:242,&quot;width&quot;:1022,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:35728,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!9tel!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1b3e1cd-1031-429f-96fd-7d4e7dd3e1f2_1022x242.png 424w, https://substackcdn.com/image/fetch/$s_!9tel!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1b3e1cd-1031-429f-96fd-7d4e7dd3e1f2_1022x242.png 848w, https://substackcdn.com/image/fetch/$s_!9tel!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1b3e1cd-1031-429f-96fd-7d4e7dd3e1f2_1022x242.png 1272w, https://substackcdn.com/image/fetch/$s_!9tel!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc1b3e1cd-1031-429f-96fd-7d4e7dd3e1f2_1022x242.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h3>#7. <strong>Full Join (Without Overlapping)</strong></h3><ul><li><p><strong>What it does:</strong> Shows all records from both tables, excluding matches. Think of it as highlighting the differences between the two tables.</p></li><li><p><strong>Use case:</strong> Identifying discrepancies between datasets.</p></li></ul><pre><code><code>SELECT *  
FROM A  
FULL OUTER JOIN B  
ON A.KEY = B.KEY  
WHERE A.KEY IS NULL OR B.KEY IS NULL  

</code></code></pre><p><strong>Query Example:</strong></p><pre><code><code>SELECT
    A.A_KEY,
    A.A_NAME,
    A.CITY,
    B.B_KEY,
    B.DEPARTMENT,
    B.EMPLOYMENT_STATUS
FROM TableA A
FULL OUTER JOIN TableB B
    ON A.A_KEY = B.B_KEY
WHERE A.A_KEY IS NULL
   OR B.B_KEY IS NULL;
</code></code></pre><p><strong>What it does:</strong><br>Returns <strong>only</strong> rows that do <strong>not</strong> match (show the differences) across <strong>TableA</strong> and <strong>TableB</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GZIV!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F089f8ec1-2ced-4315-a6eb-ccf159b1354a_1022x314.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GZIV!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F089f8ec1-2ced-4315-a6eb-ccf159b1354a_1022x314.png 424w, https://substackcdn.com/image/fetch/$s_!GZIV!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F089f8ec1-2ced-4315-a6eb-ccf159b1354a_1022x314.png 848w, https://substackcdn.com/image/fetch/$s_!GZIV!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F089f8ec1-2ced-4315-a6eb-ccf159b1354a_1022x314.png 1272w, https://substackcdn.com/image/fetch/$s_!GZIV!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F089f8ec1-2ced-4315-a6eb-ccf159b1354a_1022x314.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GZIV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F089f8ec1-2ced-4315-a6eb-ccf159b1354a_1022x314.png" width="1022" height="314" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/089f8ec1-2ced-4315-a6eb-ccf159b1354a_1022x314.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:314,&quot;width&quot;:1022,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:48165,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!GZIV!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F089f8ec1-2ced-4315-a6eb-ccf159b1354a_1022x314.png 424w, https://substackcdn.com/image/fetch/$s_!GZIV!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F089f8ec1-2ced-4315-a6eb-ccf159b1354a_1022x314.png 848w, https://substackcdn.com/image/fetch/$s_!GZIV!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F089f8ec1-2ced-4315-a6eb-ccf159b1354a_1022x314.png 1272w, https://substackcdn.com/image/fetch/$s_!GZIV!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F089f8ec1-2ced-4315-a6eb-ccf159b1354a_1022x314.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>How to Read the Results &#129300;</h3><ul><li><p><strong>Left Join</strong>: Everything from <strong>A</strong> plus matches from <strong>B</strong>. Unmatched rows in <strong>A</strong> still appear.</p></li><li><p><strong>Right Join</strong>: Everything from <strong>B</strong> plus matches from <strong>A</strong>. Unmatched rows in <strong>B</strong> still appear.</p></li><li><p><strong>Left/Right Join (Without Overlapping)</strong>: Only the unmatched rows from <strong>A</strong> or <strong>B</strong>, respectively.</p></li><li><p><strong>Full Join</strong>: All rows from both tables, showing NULLs where no match is found.</p></li><li><p><strong>Inner Join</strong>: Only overlapping rows (keys present in <strong>both</strong> tables).</p></li><li><p><strong>Full Join (Without Overlapping)</strong>: All rows that <strong>don&#8217;t</strong> overlap&#8212;so we can check the discrepancies between the tables.</p></li></ul><div><hr></div><p>Before you go,<strong> tap the &#128154; button at the bottom of this email to show your support</strong>&#8212;<em>it really helps and means a lot!</em></p><p><strong>Any doubt? Let&#8217;s start a conversation! &#128071;&#127995;</strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/p/the-transformers-architecture/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.databites.tech/p/the-transformers-architecture/comments"><span>Leave a comment</span></a></p><div><hr></div><h2>Want to get more of my content? &#128587;&#127995;&#8205;&#9794;&#65039;</h2><p>Reach me on:</p><ul><li><p><strong><a href="https://www.linkedin.com/in/josep-ferrer-sanchez/">LinkedIn</a>,</strong> <strong><a href="https://x.com/rfeers">X (Twitter)</a></strong>, or <strong><a href="https://www.threads.net/@rfeers">Threads</a> to get daily posts about Data Science.</strong></p></li><li><p>My <strong><a href="https://medium.com/@rfeers">Medium</a></strong><a href="https://medium.com/@rfeers"> </a><strong><a href="https://medium.com/@rfeers">Blog</a></strong> to learn more about Data Science, Machine Learning, and AI.</p></li><li><p>Just email me at rfeers@gmail.com for any inquiries or to ask for help! &#129299;</p></li></ul><div><hr></div><p>Remember now that DataBites has an official <a href="https://x.com/databitestech">X (Twitter)</a> account and <a href="https://www.linkedin.com/search/results/all/?fetchDeterministicClustersOnly=true&amp;heroEntityKey=urn%3Ali%3Aorganization%3A104285500&amp;keywords=databites&amp;origin=RICH_QUERY_TYPEAHEAD_HISTORY&amp;position=0&amp;searchId=2b268e19-1da0-4357-a42a-9d7f7fba7772&amp;sid=S_G&amp;spellCorrectionEnabled=true">LinkedIn</a> page. Follow us there to stay updated and help spread the word! &#128588;&#127995;</p>]]></content:encoded></item><item><title><![CDATA[CS5 - Mastering SQL Execution Order with JOINs 🔗]]></title><description><![CDATA[Mastering SQL Execution Order: How Queries Really Run Behind the Scenes]]></description><link>https://www.databites.tech/p/cs5-mastering-sql-execution-order</link><guid isPermaLink="false">https://www.databites.tech/p/cs5-mastering-sql-execution-order</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Mon, 17 Mar 2025 19:22:00 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/b1065e5e-bfed-4bde-b734-bf6f993a275b_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2><strong>Why Understanding Execution Order Matters?</strong></h2><p>When writing SQL queries, <strong>what you see isn&#8217;t always what happens first</strong>. SQL <strong>processes queries in a specific order</strong>, and understanding this <strong>can make or break your queries</strong>&#8212;especially when JOINs enter the scene.</p><p>In my previous databites issue, we broke down SQL&#8217;s <strong>execution order</strong>.</p><p>But what happens when <strong>multiple tables are involved</strong>?</p><p>That&#8217;s what we&#8217;ll explore in this article.</p><h2><strong>SQL Execution Order - Recap</strong></h2><p>SQL isn&#8217;t read top-to-bottom as we write it&#8212;it has its own execution order!</p><p>Here&#8217;s how a basic query is processed:</p><p>1&#65039;&#8419; <strong>FROM</strong> &#8211; Identify the data source &#128230;<br>2&#65039;&#8419; <strong>WHERE</strong> &#8211; Filter rows &#128269;<br>3&#65039;&#8419; <strong>GROUP BY</strong> &#8211; Group similar data &#128202;<br>4&#65039;&#8419; <strong>HAVING</strong> &#8211; Filter groups &#9986;&#65039;<br>5&#65039;&#8419; <strong>SELECT</strong> &#8211; Pick the columns &#127912;<br>6&#65039;&#8419; <strong>ORDER BY</strong> &#8211; Sort the results &#128218;<br>7&#65039;&#8419; <strong>LIMIT</strong> &#8211; Keep only a certain number of rows &#128290;</p><p>Simple enough, right? But <strong>JOINs</strong> introduce a twist! &#127744;</p><p><strong>But before we start&#8230;</strong></p><p>Before starting, here you have the full-resolution cheatsheet &#128071;&#127995;</p>
      <p>
          <a href="https://www.databites.tech/p/cs5-mastering-sql-execution-order">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[CS4 - Why Charts Speak Louder Than Numbers? 📊]]></title><description><![CDATA[The Psychology of DataViz: Why Some Charts Just Make Sense]]></description><link>https://www.databites.tech/p/cs4-why-charts-speak-louder-than</link><guid isPermaLink="false">https://www.databites.tech/p/cs4-why-charts-speak-louder-than</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Mon, 17 Mar 2025 19:16:44 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/78ead484-33a4-48eb-85a1-a259ecfc2430_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>The Intuition Behind Data Visualization</h2><p><strong>Many technical experts often overlook how profoundly our understanding of the world is shaped by the workings of our brains.</strong></p><p>Today, let's reconnect with our human side and explore why some charts resonate more intuitively with us than others &#128165;</p><p>And this leads us to today&#8217;s main focus&#8230;</p><p><strong>The Intuition Behind DataViz</strong></p><p>Before starting, here you have the full-resolution cheatsheet &#128071;&#127995;</p>
      <p>
          <a href="https://www.databites.tech/p/cs4-why-charts-speak-louder-than">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[CS3 - Unlocking the Power of Geospatial Data 🌍]]></title><description><![CDATA[What is Geospatial Data?]]></description><link>https://www.databites.tech/p/cs3-unlocking-the-power-of-geospatial</link><guid isPermaLink="false">https://www.databites.tech/p/cs3-unlocking-the-power-of-geospatial</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Mon, 17 Mar 2025 19:10:13 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/b0b09df5-7225-46e5-ac87-1a71e7f01b38_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3><strong>What is Geospatial Data?</strong></h3><p>In simple terms, geospatial data refers to <strong>information tied to specific geographic locations</strong> on Earth&#8217;s surface.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PrU8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc601f762-40ff-47a9-a216-a62849021de8_1910x979.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PrU8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc601f762-40ff-47a9-a216-a62849021de8_1910x979.png 424w, https://substackcdn.com/image/fetch/$s_!PrU8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc601f762-40ff-47a9-a216-a62849021de8_1910x979.png 848w, https://substackcdn.com/image/fetch/$s_!PrU8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc601f762-40ff-47a9-a216-a62849021de8_1910x979.png 1272w, https://substackcdn.com/image/fetch/$s_!PrU8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc601f762-40ff-47a9-a216-a62849021de8_1910x979.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PrU8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc601f762-40ff-47a9-a216-a62849021de8_1910x979.png" width="1456" height="746" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c601f762-40ff-47a9-a216-a62849021de8_1910x979.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:746,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:935822,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!PrU8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc601f762-40ff-47a9-a216-a62849021de8_1910x979.png 424w, https://substackcdn.com/image/fetch/$s_!PrU8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc601f762-40ff-47a9-a216-a62849021de8_1910x979.png 848w, https://substackcdn.com/image/fetch/$s_!PrU8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc601f762-40ff-47a9-a216-a62849021de8_1910x979.png 1272w, https://substackcdn.com/image/fetch/$s_!PrU8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc601f762-40ff-47a9-a216-a62849021de8_1910x979.png 1456w" sizes="100vw" loading="lazy" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Think of:</p><ul><li><p><strong>Maps</strong> showing streets and terrain</p></li><li><p><strong>Addresses</strong> linked to latitude and longitude</p></li><li><p><strong>Satellite images</strong> revealing land use or vegetation</p></li></ul><p>With its ability to connect data to physical locations, geospatial data has become essential in industries like logistics, urban planning, and environmental science.</p><p>And this leads us to our main focus&#8230;</p><p><strong>Understanding Geospatial Data</strong></p><p>Before starting, here you have the full-resolution cheatsheet &#128071;&#127995;</p>
      <p>
          <a href="https://www.databites.tech/p/cs3-unlocking-the-power-of-geospatial">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[CS2 - Dealing with Outliers]]></title><description><![CDATA[Detecting, Handling, and Leveraging Anomalies in Data]]></description><link>https://www.databites.tech/p/cs2-dealing-with-outliers</link><guid isPermaLink="false">https://www.databites.tech/p/cs2-dealing-with-outliers</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Mon, 17 Mar 2025 19:04:37 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/718b5325-cfb3-4b5b-8cb3-f9e31b917651_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Outliers: What, Why, and How?</h2><p><strong>Outliers</strong> are the peculiar data points that don&#8217;t quite fit with the rest of the dataset. These anomalies can arise from:</p><ul><li><p>Data entry errors &#128395;&#65039;</p></li><li><p>Measurement issues &#128736;&#65039;</p></li><li><p>Genuine rare events &#127775;</p></li></ul><p>While they can skew your analysis and lead to incorrect conclusions, they can also hold valuable insights (think fraud detection or identifying unique customer segments).</p><p>This leads us to the main question&#8230;</p><p><strong>So, what&#8217;s the best way to approach them?</strong></p><p><em>So let&#8217;s dive into how to deal with outliers!</em></p><p>Before starting, here you have the full-resolution cheatsheet &#128071;&#127995;</p>
      <p>
          <a href="https://www.databites.tech/p/cs2-dealing-with-outliers">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[CS1 - Understanding the Essentials of Time Series]]></title><description><![CDATA[What Is a Time Series?]]></description><link>https://www.databites.tech/p/cs1-understanding-the-essentials</link><guid isPermaLink="false">https://www.databites.tech/p/cs1-understanding-the-essentials</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Mon, 17 Mar 2025 18:52:53 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/416da452-6072-4dfa-9f68-49c1f9f948b5_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>What Is a Time Series?</h2><p>A <strong>time series</strong> is a special type of dataset:</p><ul><li><p>It&#8217;s an <strong>ordered sequence of values</strong> collected at consistent time intervals.</p></li><li><p>Think of it as data with a built-in clock!</p></li></ul><p>You&#8217;ll find time series data everywhere:</p><p><em>Stock prices, weather patterns, website traffic, and even your Spotify listening history.</em></p><p>Analyzing this kind of data helps us uncover <strong>trends</strong>, predict future behavior, and identify unexpected changes.<br><em>So let&#8217;s dive into Time Series!</em></p><p>Before starting, here you have the full-resolution cheatsheet &#128071;&#127995;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fx9_!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c5269-5cea-48e5-b479-e9020ef56c19_3581x3862.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fx9_!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c5269-5cea-48e5-b479-e9020ef56c19_3581x3862.png 424w, https://substackcdn.com/image/fetch/$s_!fx9_!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c5269-5cea-48e5-b479-e9020ef56c19_3581x3862.png 848w, https://substackcdn.com/image/fetch/$s_!fx9_!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c5269-5cea-48e5-b479-e9020ef56c19_3581x3862.png 1272w, https://substackcdn.com/image/fetch/$s_!fx9_!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c5269-5cea-48e5-b479-e9020ef56c19_3581x3862.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fx9_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c5269-5cea-48e5-b479-e9020ef56c19_3581x3862.png" width="1456" height="1570" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e95c5269-5cea-48e5-b479-e9020ef56c19_3581x3862.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1570,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1224753,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!fx9_!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c5269-5cea-48e5-b479-e9020ef56c19_3581x3862.png 424w, https://substackcdn.com/image/fetch/$s_!fx9_!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c5269-5cea-48e5-b479-e9020ef56c19_3581x3862.png 848w, https://substackcdn.com/image/fetch/$s_!fx9_!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c5269-5cea-48e5-b479-e9020ef56c19_3581x3862.png 1272w, https://substackcdn.com/image/fetch/$s_!fx9_!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe95c5269-5cea-48e5-b479-e9020ef56c19_3581x3862.png 1456w" sizes="100vw" loading="lazy" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>The Four Pillars of Time Series</h2><h4><strong>1. Trend &#128200;</strong></h4><p>This is the <strong>long-term movement</strong> in the data. Does it rise, fall, or stay stable over time?</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fnSZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b4c3d6f-6c25-40a2-87b4-d460a6a83eef_1696x1143.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fnSZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b4c3d6f-6c25-40a2-87b4-d460a6a83eef_1696x1143.png 424w, https://substackcdn.com/image/fetch/$s_!fnSZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b4c3d6f-6c25-40a2-87b4-d460a6a83eef_1696x1143.png 848w, https://substackcdn.com/image/fetch/$s_!fnSZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b4c3d6f-6c25-40a2-87b4-d460a6a83eef_1696x1143.png 1272w, https://substackcdn.com/image/fetch/$s_!fnSZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b4c3d6f-6c25-40a2-87b4-d460a6a83eef_1696x1143.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fnSZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b4c3d6f-6c25-40a2-87b4-d460a6a83eef_1696x1143.png" width="1456" height="981" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7b4c3d6f-6c25-40a2-87b4-d460a6a83eef_1696x1143.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:981,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:152527,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!fnSZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b4c3d6f-6c25-40a2-87b4-d460a6a83eef_1696x1143.png 424w, https://substackcdn.com/image/fetch/$s_!fnSZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b4c3d6f-6c25-40a2-87b4-d460a6a83eef_1696x1143.png 848w, https://substackcdn.com/image/fetch/$s_!fnSZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b4c3d6f-6c25-40a2-87b4-d460a6a83eef_1696x1143.png 1272w, https://substackcdn.com/image/fetch/$s_!fnSZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7b4c3d6f-6c25-40a2-87b4-d460a6a83eef_1696x1143.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p><strong>Example: </strong>A company&#8217;s annual revenue increasing steadily.</p></li><li><p><strong>Pro Tip:</strong> Use tools like moving averages to isolate the trend from other components.</p></li></ul><h4><strong>2. Seasonality &#127793;</strong></h4><p>Seasonality captures <strong>recurring patterns</strong> that happen over a fixed period, like days, months, or years.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sKB3!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ccebc0e-c554-4808-a095-81b41a2af5a6_1676x1148.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sKB3!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ccebc0e-c554-4808-a095-81b41a2af5a6_1676x1148.png 424w, https://substackcdn.com/image/fetch/$s_!sKB3!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ccebc0e-c554-4808-a095-81b41a2af5a6_1676x1148.png 848w, https://substackcdn.com/image/fetch/$s_!sKB3!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ccebc0e-c554-4808-a095-81b41a2af5a6_1676x1148.png 1272w, https://substackcdn.com/image/fetch/$s_!sKB3!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ccebc0e-c554-4808-a095-81b41a2af5a6_1676x1148.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sKB3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ccebc0e-c554-4808-a095-81b41a2af5a6_1676x1148.png" width="1456" height="997" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3ccebc0e-c554-4808-a095-81b41a2af5a6_1676x1148.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:997,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:194969,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!sKB3!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ccebc0e-c554-4808-a095-81b41a2af5a6_1676x1148.png 424w, https://substackcdn.com/image/fetch/$s_!sKB3!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ccebc0e-c554-4808-a095-81b41a2af5a6_1676x1148.png 848w, https://substackcdn.com/image/fetch/$s_!sKB3!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ccebc0e-c554-4808-a095-81b41a2af5a6_1676x1148.png 1272w, https://substackcdn.com/image/fetch/$s_!sKB3!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3ccebc0e-c554-4808-a095-81b41a2af5a6_1676x1148.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p><strong>Example:</strong> E-commerce sales spiking every Black Friday.</p></li><li><p><strong>Pro Tip: </strong>Seasonal decomposition (using libraries like <code>statsmodels</code>) helps separate seasonal patterns from raw data.</p></li></ul><h4><strong>3. Cyclical &#127744;</strong></h4><p>Unlike seasonality, cyclical patterns occur over <strong>longer and irregular intervals</strong>, often tied to economic or environmental factors.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6GPx!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d4981cc-c01f-4286-81d2-6e7922e67e81_1669x1143.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6GPx!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d4981cc-c01f-4286-81d2-6e7922e67e81_1669x1143.png 424w, https://substackcdn.com/image/fetch/$s_!6GPx!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d4981cc-c01f-4286-81d2-6e7922e67e81_1669x1143.png 848w, https://substackcdn.com/image/fetch/$s_!6GPx!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d4981cc-c01f-4286-81d2-6e7922e67e81_1669x1143.png 1272w, https://substackcdn.com/image/fetch/$s_!6GPx!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d4981cc-c01f-4286-81d2-6e7922e67e81_1669x1143.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6GPx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d4981cc-c01f-4286-81d2-6e7922e67e81_1669x1143.png" width="1456" height="997" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5d4981cc-c01f-4286-81d2-6e7922e67e81_1669x1143.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:997,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:124886,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!6GPx!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d4981cc-c01f-4286-81d2-6e7922e67e81_1669x1143.png 424w, https://substackcdn.com/image/fetch/$s_!6GPx!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d4981cc-c01f-4286-81d2-6e7922e67e81_1669x1143.png 848w, https://substackcdn.com/image/fetch/$s_!6GPx!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d4981cc-c01f-4286-81d2-6e7922e67e81_1669x1143.png 1272w, https://substackcdn.com/image/fetch/$s_!6GPx!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5d4981cc-c01f-4286-81d2-6e7922e67e81_1669x1143.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p><strong>Example:</strong> Housing market cycles lasting several years.</p></li><li><p><strong>Pro Tip: </strong>Cyclical behavior is harder to predict, so combine it with trend analysis for better forecasts.</p></li></ul><h4><strong>4. Irregular &#129335;&#8205;&#9794;&#65039;</strong></h4><p>These are the <strong>random, unpredictable fluctuations</strong> that don&#8217;t follow any pattern.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!EGMG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21afd854-7955-4d30-a9cb-eed4a6c43623_1669x1143.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!EGMG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21afd854-7955-4d30-a9cb-eed4a6c43623_1669x1143.png 424w, https://substackcdn.com/image/fetch/$s_!EGMG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21afd854-7955-4d30-a9cb-eed4a6c43623_1669x1143.png 848w, https://substackcdn.com/image/fetch/$s_!EGMG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21afd854-7955-4d30-a9cb-eed4a6c43623_1669x1143.png 1272w, https://substackcdn.com/image/fetch/$s_!EGMG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21afd854-7955-4d30-a9cb-eed4a6c43623_1669x1143.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!EGMG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21afd854-7955-4d30-a9cb-eed4a6c43623_1669x1143.png" width="1456" height="997" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/21afd854-7955-4d30-a9cb-eed4a6c43623_1669x1143.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:997,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:178817,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!EGMG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21afd854-7955-4d30-a9cb-eed4a6c43623_1669x1143.png 424w, https://substackcdn.com/image/fetch/$s_!EGMG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21afd854-7955-4d30-a9cb-eed4a6c43623_1669x1143.png 848w, https://substackcdn.com/image/fetch/$s_!EGMG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21afd854-7955-4d30-a9cb-eed4a6c43623_1669x1143.png 1272w, https://substackcdn.com/image/fetch/$s_!EGMG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F21afd854-7955-4d30-a9cb-eed4a6c43623_1669x1143.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p><strong>Example: </strong>A sudden sales spike after a celebrity endorsement.</p></li><li><p><strong>Pro Tip:</strong> Use smoothing techniques to filter out noise for clearer insights.</p></li></ul><h3>Why You Should Care About Time Series Analysis</h3><p>Time series analysis isn&#8217;t just a tool&#8212;it&#8217;s a <strong>superpower</strong> for making data-driven decisions. From forecasting future sales to detecting anomalies in IoT devices, time series opens doors to a whole new level of analytics.</p><p>Here&#8217;s where it shines:</p><ul><li><p><strong>Forecasting</strong>: Predict stock prices, weather, or customer demand.</p></li><li><p><strong>Anomaly Detection</strong>: Spot unusual activity, like fraud or system failures.</p></li><li><p><strong>Optimization</strong>: Understand patterns to schedule resources or improve workflows.</p></li></ul><h3>Ready to Dive In?</h3><p>If you&#8217;re new to time series, don&#8217;t worry&#8212;I&#8217;ll be sharing a detailed beginner&#8217;s guide soon! In the meantime, here are a few tips to get you started:</p><ol><li><p><strong>Explore Your Data</strong><br>Visualize it! Tools like <code>Matplotlib</code> and <code>Seaborn</code> make it easy to spot trends and patterns.</p></li><li><p><strong>Decompose Your Series</strong><br>Break it into trend, seasonality, and residuals using Python libraries like <code>statsmodels</code>.</p></li><li><p><strong>Master Key Models</strong></p><ul><li><p><strong>ARIMA/SARIMA</strong> for forecasting.</p></li><li><p><strong>Prophet</strong> for handling missing data and seasonality.</p></li><li><p><strong>LSTMs</strong> for complex patterns in deep learning.</p></li></ul></li></ol><p>And this is all for now! &#10024;</p><div><hr></div><p>Before you go,<strong> tap the &#128154; button at the bottom of this email to show your support</strong>&#8212;<em>it really helps and means a lot!</em></p><p><strong>Any doubt? Let&#8217;s start a conversation! &#128071;&#127995;</strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/p/the-transformers-architecture/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.databites.tech/p/the-transformers-architecture/comments"><span>Leave a comment</span></a></p><div><hr></div><h2>Want to get more of my content? &#128587;&#127995;&#8205;&#9794;&#65039;</h2><p>Reach me on:</p><ul><li><p><strong><a href="https://www.linkedin.com/in/josep-ferrer-sanchez/">LinkedIn</a>,</strong> <strong><a href="https://x.com/rfeers">X (Twitter)</a></strong>, or <strong><a href="https://www.threads.net/@rfeers">Threads</a> to get daily posts about Data Science.</strong></p></li><li><p>My <strong><a href="https://medium.com/@rfeers">Medium</a></strong><a href="https://medium.com/@rfeers"> </a><strong><a href="https://medium.com/@rfeers">Blog</a></strong> to learn more about Data Science, Machine Learning, and AI.</p></li><li><p>Just email me at rfeers@gmail.com for any inquiries or to ask for help! &#129299;</p></li></ul><div><hr></div><p>Remember now that DataBites has an official <a href="https://x.com/databitestech">X (Twitter)</a> account and <a href="https://www.linkedin.com/search/results/all/?fetchDeterministicClustersOnly=true&amp;heroEntityKey=urn%3Ali%3Aorganization%3A104285500&amp;keywords=databites&amp;origin=RICH_QUERY_TYPEAHEAD_HISTORY&amp;position=0&amp;searchId=2b268e19-1da0-4357-a42a-9d7f7fba7772&amp;sid=S_G&amp;spellCorrectionEnabled=true">LinkedIn</a> page. Follow us there to stay updated and help spread the word! &#128588;&#127995;</p>]]></content:encoded></item></channel></rss>