<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pinn (Aiqi) Xu on pinn.xu</title><link>http://blog.mcp32.com/en/</link><description>Recent content in Pinn (Aiqi) Xu on pinn.xu</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 17 Oct 2026 00:00:00 +0000</lastBuildDate><atom:link href="http://blog.mcp32.com/en/index.xml" rel="self" type="application/rss+xml"/><item><title>Haste Makes Waste: Act More, Compare Less</title><link>http://blog.mcp32.com/en/blogs/2026-10-17-slow-is-fast/</link><pubDate>Sat, 17 Oct 2026 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/blogs/2026-10-17-slow-is-fast/</guid><description>&lt;h2 id="rushed-anxious-angry"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Rushed, Anxious, Angry&lt;/h2&gt;&#10;&lt;p&gt;Compared with the sad, gloomy kind of anxiety I used to feel, today (or lately) mine leans toward the impatient, frustrated kind. Sadness and gloom breed self-doubt, dull desire, and hold you back from acting. Anger and impatience, on the other hand, sharpen the craving for results, but bring rushed action, lost patience, and haste. From this I realized: &lt;strong&gt;the slower you go, the faster you get there — just like the tortoise and the hare.&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Notes on Trying the Muse Agent</title><link>http://blog.mcp32.com/en/blogs/2026-10-11-muse-agent-review/</link><pubDate>Sun, 11 Oct 2026 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/blogs/2026-10-11-muse-agent-review/</guid><description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Cheap and generous. The free tier is more than enough, and it&amp;rsquo;s worth a try as an everyday assistant.&lt;br&gt;&#10;&lt;strong&gt;Link:&lt;/strong&gt; &lt;a href="https://muse.ai/join"&gt;muse.ai/join&lt;/a&gt;&lt;br&gt;&#10;&lt;strong&gt;Invite code:&lt;/strong&gt; UNLCNM (comes with 1 billion tokens)&lt;/p&gt;&#10;&lt;h2 id="my-experience-a-life-assistant"&gt;&lt;span class="num"&gt;1&lt;/span&gt;My Experience: A Life Assistant&lt;/h2&gt;&#10;&lt;p&gt;Lately I&amp;rsquo;ve been letting agents and automation into more of my daily life. When I want to check what to prepare before my next class, I just ask the agent to read my Drive (for the syllabus) or my email (for announcements). It summarizes what I need to do and links the materials, so I don&amp;rsquo;t have to dig through course files and emails myself. (PS: For classes and assignments I also built a separate Notion panel connected to my calendar for automatic reminders and tracking, but that&amp;rsquo;s a story for another post.)&lt;/p&gt;</description></item><item><title>Don't Assume It's Hard: From Git LFS to Cloudflare R2</title><link>http://blog.mcp32.com/en/blogs/2026-08-19-cloudflare-r2-cdn/</link><pubDate>Wed, 19 Aug 2026 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/blogs/2026-08-19-cloudflare-r2-cdn/</guid><description>&lt;h2 id="introduction"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Introduction&lt;/h2&gt;&#10;&lt;p&gt;I used to keep all the images and videos for my personal website in the repository&amp;rsquo;s &lt;code&gt;src&lt;/code&gt; directory. That was convenient when there were only a few files. Once the media library grew to one or two gigabytes, however, the repository became unwieldy. Pushes slowed down, builds and deployments took longer, and &lt;code&gt;quarto publish gh-pages&lt;/code&gt; repeatedly stalled near the end.&lt;/p&gt;&#10;&lt;p&gt;The problem was clear: large media files should not ship with the source code. What slowed me down was my assumption that setting up object storage and a CDN would be difficult. Instead of testing that assumption, I tried several alternatives that appeared easier.&lt;/p&gt;</description></item><item><title>Convert and Compress Video with Apple Compressor</title><link>http://blog.mcp32.com/en/blogs/2026-08-17-compressor-tips/</link><pubDate>Mon, 17 Aug 2026 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/blogs/2026-08-17-compressor-tips/</guid><description>&lt;h2 id="convert-a-video-to-mp4"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Convert a video to MP4&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Open the panel on the left.&lt;/li&gt;&#10;&lt;li&gt;Click the &lt;code&gt;+&lt;/code&gt; button at the bottom to create a custom preset.&lt;/li&gt;&#10;&lt;li&gt;Select &lt;code&gt;MPEG-4&lt;/code&gt; as the format.&lt;/li&gt;&#10;&lt;li&gt;To reuse the preset, select &lt;code&gt;Custom &amp;gt; MPEG-4&lt;/code&gt; from the Presets menu.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;figure style="max-width:20rem"&gt;&lt;img src="https://cdn.mcp32.com/img/2026/09/1790011046.png" alt="Add New Custom Preset (MPEG-4)" loading="lazy"&gt;&lt;figcaption&gt;Add New Custom Preset (MPEG-4)&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;h2 id="reduce-file-size-while-preserving-quality"&gt;&lt;span class="num"&gt;2&lt;/span&gt;Reduce file size while preserving quality&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Select the video job that you want to compress.&lt;/li&gt;&#10;&lt;li&gt;Open the panel on the right and select &lt;code&gt;Video&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Under &lt;code&gt;Avg. Bit Rate&lt;/code&gt;, select &lt;code&gt;Custom&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Lower the bit rate while monitoring &lt;code&gt;Estimated File Size&lt;/code&gt;. Adjust it until the file size and visual quality meet your requirements.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;div class="frame" style="max-width:40rem"&gt;&#10;&lt;figure&gt;&lt;img src="https://cdn.mcp32.com/img/2026/09/1790011356.png" alt="Compress File Size with High Quality" loading="lazy"&gt;&lt;figcaption&gt;Compress File Size with High Quality&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;/div&gt;&#10;&lt;h2 id="adjust-the-audio-volume"&gt;&lt;span class="num"&gt;3&lt;/span&gt;Adjust the audio volume&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Select the video job whose volume you want to change.&lt;/li&gt;&#10;&lt;li&gt;Open the panel on the right and select &lt;code&gt;Audio&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Select &lt;code&gt;Add Audio Effect &amp;gt; Dynamic Range&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Adjust &lt;code&gt;Overall Gain&lt;/code&gt;. A value of &lt;code&gt;0&lt;/code&gt; preserves the original volume; positive values increase it, and negative values decrease it.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;div class="frame" style="max-width:35rem"&gt;&#10;&lt;figure&gt;&lt;img src="https://cdn.mcp32.com/img/2026/09/1790011543.png" alt="Adjust Video Volume" loading="lazy"&gt;&lt;figcaption&gt;Adjust Video Volume&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;/div&gt;</description></item><item><title>Notion Database Workflows</title><link>http://blog.mcp32.com/en/blogs/2026-07-16-ntn-workflows/</link><pubDate>Thu, 16 Jul 2026 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/blogs/2026-07-16-ntn-workflows/</guid><description>&lt;h2 id="project-progress-auto-tracking-workflow"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Project Progress Auto-Tracking Workflow&lt;/h2&gt;&#10;&lt;p&gt;This workflow records project progress with minimal effort. Three types of linked databases do the work: Tasks → Progress → Projects. I log tasks through Notion Calendar, the data populate automatically, and external applications can read the results through the Notion API.&lt;/p&gt;&#10;&lt;p&gt;For example, I use this workflow to track the development of this website. &lt;a href="http://blog.mcp32.com/en/blogs/ntn-db-auto-sync/"&gt;Notion Database Auto-Sync Tips&lt;/a&gt; explains how the sync is built, and the &lt;a href="https://app.notion.com/p/394a25f9fecd80b88fadc11537fb59b0"&gt;Quarto Website page on Notion&lt;/a&gt; shows the live databases.&lt;/p&gt;</description></item><item><title>VPS SSH Login Troubleshooting</title><link>http://blog.mcp32.com/en/blogs/2026-07-11-vps-ssh-login/</link><pubDate>Sat, 11 Jul 2026 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/blogs/2026-07-11-vps-ssh-login/</guid><description>&lt;h2 id="backgroud"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Backgroud&lt;/h2&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;&lt;strong&gt;Issue: SSH connection failed after changing the VPS username&lt;/strong&gt;&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Created a temporary sudo user to change the main VPS username&lt;/li&gt;&#10;&lt;li&gt;Tried connecting to VPS through new username&lt;/li&gt;&#10;&lt;li&gt;Failed to notice that my snippet of VPS connection was still using the old username&lt;/li&gt;&#10;&lt;li&gt;Tried connecting with an incorrect/non-existent username and password&lt;/li&gt;&#10;&lt;li&gt;After multiple failed attempts, SSH access stopped working&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h2 id="troubleshooting-process"&gt;&lt;span class="num"&gt;2&lt;/span&gt;Troubleshooting Process&lt;/h2&gt;&#10;&lt;h3 id="access-vps-via-remote-console"&gt;&lt;span class="num"&gt;2.1&lt;/span&gt;Access VPS via Remote Console&lt;/h3&gt;&#10;&lt;p&gt;Logged into the VPS through the provider&amp;rsquo;s Remote Console and started troubleshooting locally.&lt;/p&gt;</description></item><item><title>Notion Database Auto-Sync Tips</title><link>http://blog.mcp32.com/en/blogs/2026-07-08-ntn-db-auto-sync/</link><pubDate>Wed, 08 Jul 2026 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/blogs/2026-07-08-ntn-db-auto-sync/</guid><description>&lt;h2 id="introduction"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Introduction&lt;/h2&gt;&#10;&lt;p&gt;I recently restructured the Notion databases behind this website&amp;rsquo;s change log. The site originally relied on a single database with mostly manual properties. Although AI agents generated much of the cell content, maintaining the database by hand remained tedious.&lt;/p&gt;&#10;&lt;p&gt;Since I already tracked development tasks in a separate database through Notion Calendar, I linked the two databases and used &lt;a href="https://www.notion.com/help/relations-and-rollups#rollups"&gt;Rollups&lt;/a&gt; and &lt;a href="https://www.notion.com/help/formula-syntax"&gt;Formulas&lt;/a&gt; to populate the change log&amp;rsquo;s properties automatically.&lt;/p&gt;&#10;&lt;p&gt;&lt;a href="http://blog.mcp32.com/en/blogs/2026-07-08-ntn-db-auto-sync/#sec-db"&gt;Section 2&lt;/a&gt; covers the database structure and workflow, and &lt;a href="http://blog.mcp32.com/en/blogs/2026-07-08-ntn-db-auto-sync/#sec-tips"&gt;Section 3&lt;/a&gt; shares key lessons I learned while building the auto-sync.&lt;/p&gt;</description></item><item><title>Quarto Image Centering Styles</title><link>http://blog.mcp32.com/en/blogs/2026-06-15-quarto-img-styles/</link><pubDate>Mon, 15 Jun 2026 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/blogs/2026-06-15-quarto-img-styles/</guid><description>&lt;style&gt;&#10;&#9;figcaption {&#10;&#9;&#9;text-align: center;&#10;&#9;}&#10;&lt;/style&gt;&#10;&lt;h2 id="summary"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Summary&lt;/h2&gt;&#10;&lt;p&gt;To achieve all of the following in a Quarto Website:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Control image width with &lt;code&gt;rem&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;Cross-reference hover preview displays correctly&lt;/li&gt;&#10;&lt;li&gt;Image centering&lt;/li&gt;&#10;&lt;li&gt;Image caption centering&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Use the approach below.&lt;/p&gt;&#10;&lt;h3 id="step-1-external-css"&gt;&lt;span class="num"&gt;1.1&lt;/span&gt;Step 1: External CSS&lt;/h3&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;css&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;quarto-float&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;quarto-figure&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;quarto-figure-center&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;anchored&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt; &lt;span class="cp"&gt;!important&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Register it in &lt;code&gt;_quarto.yml&lt;/code&gt;:&lt;/p&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;yaml&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;html&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;&#9;&lt;/span&gt;&lt;span class="nt"&gt;css&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;&#9; &lt;/span&gt;- &lt;span class="l"&gt;path/to/style.css&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="step-2-page-level-internal-css"&gt;&lt;span class="num"&gt;1.2&lt;/span&gt;Step 2: Page-level Internal CSS&lt;/h3&gt;&#10;&lt;p&gt;Add a &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; tag at the top of the page (below the YAML block):&lt;/p&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;markdown&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt;style&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;figcaption {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;&#9;text-align: center;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#9;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="step-3-image-inline-styles"&gt;&lt;span class="num"&gt;1.3&lt;/span&gt;Step 3: Image Inline Styles&lt;/h3&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;markdown&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;![&lt;span class="nt"&gt;Caption a&lt;/span&gt;](&lt;span class="na"&gt;URL&lt;/span&gt;){&lt;span class="ni"&gt;#fig&lt;/span&gt;-a style=&amp;#34;width:20rem;&amp;#34;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;![&lt;span class="nt"&gt;Caption b&lt;/span&gt;](&lt;span class="na"&gt;URL&lt;/span&gt;){&lt;span class="ni"&gt;#fig&lt;/span&gt;-b style=&amp;#34;width:15rem;&amp;#34;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote&gt;&#10;&lt;p&gt;This post is implemented using the approach above. Click &lt;code&gt;&amp;lt;/&amp;gt; Code&lt;/code&gt; in the top-right corner of the page to view the full source.&lt;/p&gt;&#10;&lt;/blockquote&gt;</description></item><item><title>How to Use a Computer with Less Strain</title><link>http://blog.mcp32.com/en/blogs/2026-05-05-computer-ergonomics/</link><pubDate>Tue, 05 May 2026 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/blogs/2026-05-05-computer-ergonomics/</guid><description>&lt;h2 id="introduction"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Introduction&lt;/h2&gt;&#10;&lt;p&gt;Because I spend so much time on a computer, I have gradually made the following adjustments to keep my hands and arms more comfortable and reduce strain. &lt;strong&gt;These settings all serve the same goals: shortening the distance required for frequent actions, balancing the workload between both hands, and reducing fatigue from repetitive movements.&lt;/strong&gt; Start by noticing which actions you perform most often and which ones cause the most fatigue, then gradually adjust your pointer speed, key placement, and division of work between your hands.&lt;/p&gt;</description></item><item><title>Evolution of Online AI Discourse</title><link>http://blog.mcp32.com/en/projects/2026-05-01-ai-discourse/</link><pubDate>Fri, 01 May 2026 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/projects/2026-05-01-ai-discourse/</guid><description>&lt;details class="fold"&gt;&lt;summary&gt;Environment &amp;amp; Versions&lt;/summary&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;r&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;R&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;4.5.2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;MASS&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;7.3.65&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;tidyverse&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;2.0.0&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;tidytext&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;0.4.3&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;textdata&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;0.4.5&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;topicmodels&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;0.2.17&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;scales&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;1.4.0&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;broom&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;1.0.12&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;textutils&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;0.4.3&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;knitr&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;1.51&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;&#10;&lt;h2 id="introduction"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Introduction&lt;/h2&gt;&#10;&lt;p&gt;The rapid development of artificial intelligence (AI) over the past few years has fundamentally transformed how technology is embedded in daily life, reshaping industries, communication practices, and public discourse (Stone et al., 2022). As AI evolved from a niche technical field into a widely discussed social phenomenon, public opinion surrounding it has expanded significantly across digital platforms. Social media, particularly Twitter (now X), has played a central role in this transformation by providing a space where users, individual founders, and institutions actively discuss, evaluate, and negotiate the meaning and implications of AI technologies (Bruns &amp;amp; Highfield, 2015). Given this context, Twitter data offers a valuable lens for understanding how people&amp;rsquo;s perception and opinions toward AI develop over time, especially during periods of rapid technology progress. Analyzing such discourse through computational social data analysis is particularly meaningful for the social science field, enabling researchers to systematically examine how technological innovation is interpreted, debated, negotiated, and culturally integrated within society.&lt;/p&gt;</description></item><item><title>R Tips</title><link>http://blog.mcp32.com/en/tutorials/2026-03-27-r-tips/</link><pubDate>Fri, 27 Mar 2026 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/tutorials/2026-03-27-r-tips/</guid><description>&lt;h2 id="top-tips" class="unnumbered"&gt;Top Tips&lt;/h2&gt;&#10;&lt;div class="tablewrap"&gt;&lt;table&gt;&#10;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Tip&lt;/th&gt;&lt;th&gt;Notes&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&#10;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a href="http://blog.mcp32.com/en/tutorials/2026-03-27-r-tips/#relative-paths"&gt;Relative Paths&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Keep data and code in the same folder; use relative paths to avoid errors caused by spaces in paths&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Add &lt;code&gt;na.rm = TRUE&lt;/code&gt; to stats&lt;/td&gt;&lt;td&gt;Required for &lt;code&gt;sum&lt;/code&gt;, &lt;code&gt;mean&lt;/code&gt;, &lt;code&gt;sd&lt;/code&gt;, &lt;code&gt;IQR&lt;/code&gt;, etc.; otherwise returns NA when missing values exist&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Clarify unit of observation&lt;/td&gt;&lt;td&gt;Confirm what each row represents;&lt;br&gt;for mixed types (e.g. post/comment), filter first: &lt;code&gt;filter(type == &amp;quot;post&amp;quot;)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Name computed columns inside &lt;code&gt;count()&lt;/code&gt;&lt;/td&gt;&lt;td&gt;e.g. &lt;code&gt;count(&lt;span style="color:#d04255"&gt;month&lt;/span&gt; = month(date))&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Distinguish &lt;code&gt;filter()&lt;/code&gt; from &lt;code&gt;select()&lt;/code&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;filter(condition)&lt;/code&gt; filters rows; &lt;code&gt;select(col)&lt;/code&gt; selects columns &lt;a href="http://blog.mcp32.com/en/tutorials/2026-03-27-r-tips/#logical-operators-in-filter"&gt;(filter operators)&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Use &lt;code&gt;nrow()&lt;/code&gt; / &lt;code&gt;pull()&lt;/code&gt; to extract values&lt;/td&gt;&lt;td&gt;&lt;code&gt;nrow()&lt;/code&gt; returns row count; &lt;code&gt;pull()&lt;/code&gt; extracts a single value from a data frame&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Use stringr + Regex for text&lt;/td&gt;&lt;td&gt;&lt;code&gt;str_length()&lt;/code&gt; counts characters; &lt;code&gt;str_count(text, &amp;quot;\\S+&amp;quot;)&lt;/code&gt; counts words&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Reassign after adding columns&lt;/td&gt;&lt;td&gt;&lt;code&gt;data &lt;span style="color:#d04255"&gt;&amp;lt;-&lt;/span&gt; data |&amp;gt; mutate(&amp;hellip;)&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;TRUE&lt;/code&gt; / &lt;code&gt;FALSE&lt;/code&gt; aliases&lt;/td&gt;&lt;td&gt;Equivalent to &lt;code&gt;T&lt;/code&gt; / &lt;code&gt;F&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Use &lt;a href="http://blog.mcp32.com/en/tutorials/2026-03-27-r-tips/#rstudio-snippet"&gt;RStudio Snippets&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Use code templates to reduce repetitive typing&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&#10;&lt;/table&gt;&lt;/div&gt;&#10;&lt;h2 id="exploring-data"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Exploring Data&lt;/h2&gt;&#10;&lt;h3 id="dimensions"&gt;&lt;span class="num"&gt;1.1&lt;/span&gt;Dimensions&lt;/h3&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;r&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;nrow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# number of rows&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;ncol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# number of columns&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;dim&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# dimensions: rows &amp;amp; columns&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="filtering"&gt;&lt;span class="num"&gt;1.2&lt;/span&gt;Filtering&lt;/h3&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;Filter: Count observations (rows) matching a condition&lt;/p&gt;&#10;&lt;/blockquote&gt;</description></item><item><title>Spotify Most Streamed Songs</title><link>http://blog.mcp32.com/en/projects/2026-02-25-most-streamed-songs/</link><pubDate>Wed, 25 Feb 2026 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/projects/2026-02-25-most-streamed-songs/</guid><description>&lt;details class="fold"&gt;&lt;summary&gt;Environment &amp;amp; Versions&lt;/summary&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;r&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;R&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;4.5.2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plotly&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;4.12.0&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;sampling&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;2.11&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;tidyverse&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;2.0.0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;&#10;&lt;h2 id="dataset-overview"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Dataset Overview&lt;/h2&gt;&#10;&lt;p&gt;This project uses the dataset &lt;em&gt;Most Streamed Spotify Songs 2023&lt;/em&gt; from &lt;a href="https://www.kaggle.com/datasets/nelgiriyewithana/top-spotify-songs-2023/"&gt;Kaggle&lt;/a&gt;. It contains 953 Spotify&amp;rsquo;s most popular songs in 2023. Attributes involve &lt;em&gt;track name&lt;/em&gt;, &lt;em&gt;artist(s) name&lt;/em&gt;, &lt;em&gt;release date&lt;/em&gt;, &lt;em&gt;Spotify playlists and charts&lt;/em&gt;, &lt;em&gt;streaming statistics&lt;/em&gt;, &lt;em&gt;Apple Music presence&lt;/em&gt;, &lt;em&gt;Deezer presence&lt;/em&gt;, &lt;em&gt;Shazam charts&lt;/em&gt;, and several audio features.&lt;/p&gt;&#10;&lt;p&gt;Core numerical variables used in this project include &lt;em&gt;streams&lt;/em&gt;, &lt;em&gt;BPM&lt;/em&gt;, &lt;em&gt;valence index&lt;/em&gt;, and &lt;em&gt;presence count in Spotify and Deezer playlists&lt;/em&gt;. &lt;em&gt;Strems&lt;/em&gt; is the number of times a song being played over 2023, which should be positive integers. Likewise, the &lt;em&gt;presence counts&lt;/em&gt; are also count numbers (non-negative integers). &lt;em&gt;BPM&lt;/em&gt; refers to beats per minute, which determines the pace and speed of music. &lt;em&gt;Valence index&lt;/em&gt; indicates the degree of positivity of a song&amp;rsquo;s music content, which is coded from 0 to 100 (0 = no positivity, 100 = full positivity).&lt;/p&gt;</description></item><item><title>Student Social Media Usage and Well-being Analysis</title><link>http://blog.mcp32.com/en/projects/2026-02-23-student-media-usage/</link><pubDate>Mon, 23 Feb 2026 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/projects/2026-02-23-student-media-usage/</guid><description>&lt;details class="fold"&gt;&lt;summary&gt;Environment &amp;amp; Versions&lt;/summary&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;r&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;R&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;4.5.2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plotly&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;4.12.0&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;sampling&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;2.11&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;tidyverse&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="m"&gt;2.0.0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;&#10;&lt;h2 id="introduction"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Introduction&lt;/h2&gt;&#10;&lt;h3 id="environment-and-package-version"&gt;&lt;span class="num"&gt;1.1&lt;/span&gt;Environment and Package Version&lt;/h3&gt;&#10;&lt;p&gt;This project was conducted in R v4.5.2 using the &lt;em&gt;plotly&lt;/em&gt; (v4.12.0) and &lt;em&gt;sampling&lt;/em&gt; packages, and the package collection &lt;em&gt;tidyverse&lt;/em&gt; (v2.0.0), with packages such as &lt;em&gt;stringr&lt;/em&gt; (v1.6.0), &lt;em&gt;tibble&lt;/em&gt; (v3.3.1), and &lt;em&gt;dplyr&lt;/em&gt; (v1.1.4) included.&lt;/p&gt;&#10;&lt;details class="fold"&gt;&lt;summary&gt;Code&lt;/summary&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;r&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# view versions&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;getRversion&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c1"&gt;# [1] ‘4.5.2’&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;packageVersion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;plotly&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# [1] ‘4.12.0’&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;packageVersion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;sampling&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# [1] ‘2.11’&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;packageVersion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;tidyverse&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# [1] ‘2.0.0’&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;packageVersion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;stringr&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# [1] ‘1.6.0’&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;packageVersion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;tibble&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# [1] ‘3.3.1’&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;packageVersion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;#34;dplyr&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# [1] ‘1.1.4’&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;&#10;&lt;h3 id="dataset-overview"&gt;&lt;span class="num"&gt;1.2&lt;/span&gt;Dataset Overview&lt;/h3&gt;&#10;&lt;p&gt;The dataset named &lt;em&gt;Student Social Media &amp;amp; Relationships&lt;/em&gt; from &lt;a href="https://www.kaggle.com/datasets/adilshamim8/social-media-addiction-vs-relationships"&gt;Kaggle&lt;/a&gt; was used for this analysis. It provided anonymous cross-sectional survey data among students aged 16-25 in different educational background across multiple countries, capturing key dimensions such as social media usage intensity, platform preferences, and relationship dynamics, allowing researchers to examine how digital behaviors relate to personal and academic outcomes. Each observation represented an individual student&amp;rsquo;s response, making the dataset suitable for statistical analysis, with sufficient sample size (N = 705).&lt;/p&gt;</description></item><item><title>Bayanihan UI/UX Design</title><link>http://blog.mcp32.com/en/projects/2025-12-10-bayanihan/</link><pubDate>Wed, 10 Dec 2025 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/projects/2025-12-10-bayanihan/</guid><description>&lt;h2 id="bayanihan-ui-ux-design"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Bayanihan UI/UX Design&lt;/h2&gt;&#10;&lt;p&gt;&lt;em&gt;Bayanihan&lt;/em&gt; is a student-run Filipino arts and fashion magazine, affiliated with the Boston University Filipino Student Association (BUFSA). This project redesigns its website with &lt;a href="http://blog.mcp32.com/en/projects/2025-12-10-bayanihan/#fig-figma-prototype-structure"&gt;Figma&lt;/a&gt;, built for the course &lt;em&gt;Developing Interactivity&lt;/em&gt; in fall 2025. The goal was a site that&amp;rsquo;s easier to navigate on mobile, more engaging for readers, and more useful for the artists who contribute to it.&lt;/p&gt;&#10;&lt;div class=""&gt;&#10;&lt;p&gt;&lt;a href="https://pinn32.github.io/bayanihan/"&gt;View Live Prototype&lt;/a&gt;&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;!-- TODO: replace with an actual screenshot of the live prototype --&gt;&#10;&lt;div class="frame" style="max-width:35rem"&gt;&#10;&lt;figure&gt;&lt;img src="https://raw.githubusercontent.com/Pinn32/img/main/img/pic-go/20260704194910663.gif" alt="Bayanihan website redesign" loading="lazy"&gt;&lt;figcaption&gt;Bayanihan website redesign&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;/div&gt;&#10;&lt;h3 id="design-tokens"&gt;&lt;span class="num"&gt;1.1&lt;/span&gt;Design Tokens&lt;/h3&gt;&#10;&lt;p&gt;Color variables of the UI design for Bayanihan: a sage-and-marigold color palette. Click any swatch to copy its hex value.&lt;/p&gt;</description></item><item><title>Network Diagram Display in Google Colab</title><link>http://blog.mcp32.com/en/blogs/2025-10-07-fix-network-diagram/</link><pubDate>Tue, 07 Oct 2025 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/blogs/2025-10-07-fix-network-diagram/</guid><description>&lt;h2 id="problem"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Problem&lt;/h2&gt;&#10;&lt;p&gt;A pyvis network diagram should display both inside Google Colab and in the HTML file exported from the notebook, without relying on a separate &lt;code&gt;net.html&lt;/code&gt; file or other dependencies. None of the usual display methods handles all of these cases at once.&lt;/p&gt;&#10;&lt;h2 id="solution"&gt;&lt;span class="num"&gt;2&lt;/span&gt;Solution&lt;/h2&gt;&#10;&lt;p&gt;Call &lt;code&gt;Network()&lt;/code&gt; without parameters, generate the diagram&amp;rsquo;s HTML manually, and wrap it in an iframe through the &lt;code&gt;srcdoc&lt;/code&gt; attribute. Since the &lt;code&gt;srcdoc&lt;/code&gt; value is delimited by single quotes, replace all single quotes in the generated HTML with double quotes first.&lt;/p&gt;</description></item><item><title>Network Diagram Display in Google Colab</title><link>http://blog.mcp32.com/en/tutorials/2025-10-07-fix-network-diagram/</link><pubDate>Tue, 07 Oct 2025 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/tutorials/2025-10-07-fix-network-diagram/</guid><description>&lt;p&gt;Redirecting to &lt;a href="http://blog.mcp32.com/en/blogs/2025-10-07-fix-network-diagram/"&gt;Network Diagram Display in Google Colab&lt;/a&gt; in &lt;strong&gt;Blogs&lt;/strong&gt;…&lt;/p&gt;</description></item><item><title>Plotly Charts Display in Google Colab</title><link>http://blog.mcp32.com/en/blogs/2025-10-07-colab-plotly-export/</link><pubDate>Tue, 07 Oct 2025 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/blogs/2025-10-07-colab-plotly-export/</guid><description>&lt;h2 id="summary"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Summary&lt;/h2&gt;&#10;&lt;h3 id="problem"&gt;&lt;span class="num"&gt;1.1&lt;/span&gt;Problem&lt;/h3&gt;&#10;&lt;p&gt;After editing an ipynb file in Google Colab and exporting it to HTML, the Plotly charts fail to display.&lt;/p&gt;&#10;&lt;h3 id="solution"&gt;&lt;span class="num"&gt;1.2&lt;/span&gt;Solution&lt;/h3&gt;&#10;&lt;p&gt;After testing, in Google Colab the &lt;strong&gt;ipynb file&lt;/strong&gt; &lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt; behaves as follows:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;fig.show()&lt;/code&gt; displays the chart correctly.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;fig.show(renderer=&amp;quot;notebook_connected&amp;quot;)&lt;/code&gt; fails to display the chart.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;But once exported to &lt;strong&gt;HTML&lt;/strong&gt; &lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt; and opened in a browser:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Charts generated by &lt;code&gt;fig.show()&lt;/code&gt; fail to display.&lt;/li&gt;&#10;&lt;li&gt;Only charts generated by &lt;code&gt;fig.show(renderer=&amp;quot;notebook_connected&amp;quot;)&lt;/code&gt; display correctly.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;So when editing a notebook in Colab, use the default renderer (&lt;code&gt;fig.show()&lt;/code&gt;), and switch the &lt;code&gt;renderer&lt;/code&gt; to &lt;code&gt;&amp;quot;notebook_connected&amp;quot;&lt;/code&gt; right before exporting to HTML.&lt;/p&gt;</description></item><item><title>Plotly Charts Display in Google Colab</title><link>http://blog.mcp32.com/en/tutorials/2025-10-07-colab-plotly-export/</link><pubDate>Tue, 07 Oct 2025 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/tutorials/2025-10-07-colab-plotly-export/</guid><description>&lt;p&gt;Redirecting to &lt;a href="http://blog.mcp32.com/en/blogs/2025-10-07-colab-plotly-export/"&gt;Plotly Charts Display in Google Colab&lt;/a&gt; in &lt;strong&gt;Blogs&lt;/strong&gt;…&lt;/p&gt;</description></item><item><title>Fixing Easy Canvas Connection Problems</title><link>http://blog.mcp32.com/en/blogs/2024-12-22-easy-canvas-connection/</link><pubDate>Sun, 22 Dec 2024 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/blogs/2024-12-22-easy-canvas-connection/</guid><description>&lt;h2 id="connect-through-wi-fi"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Connect Through Wi-Fi&lt;/h2&gt;&#10;&lt;h3 id="amds-bonjour-services"&gt;&lt;span class="num"&gt;1.1&lt;/span&gt;AMDS &amp;amp; Bonjour Services&lt;/h3&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Press Win + R to open the Run dialog, type &lt;code&gt;services.msc&lt;/code&gt;, and click OK to open the Services window.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;figure style="max-width:25rem"&gt;&lt;img src="https://raw.githubusercontent.com/Pinn32/img/main/img/pic-go/20260713141049044.png" alt="Open services.msc" loading="lazy"&gt;&lt;figcaption&gt;Open services.msc&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;ol start="2"&gt;&#10;&lt;li&gt;Check that the Apple Mobile Device Service (AMDS), Bonjour, and EL Display Hub Service Application services are present, and confirm each one is Running with its startup type set to Automatic.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;div class="fig2"&gt;&#10;&lt;figure style="max-width:70%"&gt;&lt;img src="https://raw.githubusercontent.com/Pinn32/img/main/img/pic-go/20260713130516392.png" alt="Check the Bonjour service" loading="lazy"&gt;&lt;figcaption&gt;Check the Bonjour service&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;figure style="max-width:90%"&gt;&lt;img src="https://raw.githubusercontent.com/Pinn32/img/main/img/pic-go/20260713130818769.png" alt="Check the AMDS service" loading="lazy"&gt;&lt;figcaption&gt;Check the AMDS service&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;/div&gt;&#10;&lt;figure style="max-width:25rem"&gt;&lt;img src="https://raw.githubusercontent.com/Pinn32/img/main/img/pic-go/20260713131327750.png" alt="Check the EL Display Hub service" loading="lazy"&gt;&lt;figcaption&gt;Check the EL Display Hub service&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;ol start="3"&gt;&#10;&lt;li&gt;If a service is present but not running, right-click it and open Properties.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;figure style="max-width:20rem"&gt;&lt;img src="https://raw.githubusercontent.com/Pinn32/img/main/img/pic-go/20260713141143533.png" alt="Open Properties" loading="lazy"&gt;&lt;figcaption&gt;Open Properties&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;ol start="4"&gt;&#10;&lt;li&gt;Set Startup type to Automatic and click OK.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;figure style="max-width:30rem"&gt;&lt;img src="https://raw.githubusercontent.com/Pinn32/img/main/img/pic-go/20260713141545692.png" alt="Change the startup type" loading="lazy"&gt;&lt;figcaption&gt;Change the startup type&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;ol start="5"&gt;&#10;&lt;li&gt;Right-click the service again and choose Restart. (Do the same for AMDS.)&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;figure style="max-width:20rem"&gt;&lt;img src="https://raw.githubusercontent.com/Pinn32/img/main/img/pic-go/20260713141739672.png" alt="Restart the service" loading="lazy"&gt;&lt;figcaption&gt;Restart the service&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;h3 id="reinstall-itunes"&gt;&lt;span class="num"&gt;1.2&lt;/span&gt;Reinstall iTunes&lt;/h3&gt;&#10;&lt;p&gt;If AMDS and Bonjour services are missing, reinstall iTunes.&lt;/p&gt;</description></item><item><title>Global Visa Cost Geographical Analysis</title><link>http://blog.mcp32.com/en/projects/2024-12-12-global-visa-cost/</link><pubDate>Thu, 12 Dec 2024 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/projects/2024-12-12-global-visa-cost/</guid><description>&lt;details class="fold"&gt;&lt;summary&gt;Environment &amp;amp; Versions&lt;/summary&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;python&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;3.12&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;pandas&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;2.2.2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;matplotlib&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;3.9&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plotly&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;5.24.1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;&#10;&lt;h2 id="introduction"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Introduction&lt;/h2&gt;&#10;&lt;p&gt;This project uses the Global Visa Cost Dataset (Recchi et al., 2020) created by researchers from the European University Institute&amp;rsquo;s Migration Policy Centre, which provides detailed information on visa costs between country pairs for seven categories in 2019 (see &lt;a href="http://blog.mcp32.com/en/projects/2024-12-12-global-visa-cost/#appendix"&gt;Appendix&lt;/a&gt; for further explanation). Data was primarily collected manually from governmental websites. Three types of interactive graphs – Sankey diagram, bar chart, and choropleth – will be employed to visualize data in the following sections.&lt;/p&gt;</description></item><item><title>Sankey Diagrams and Network Graphs</title><link>http://blog.mcp32.com/en/tutorials/2024-12-05-sankey-and-network/</link><pubDate>Thu, 05 Dec 2024 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/tutorials/2024-12-05-sankey-and-network/</guid><description>&lt;details class="fold"&gt;&lt;summary&gt;Environment and Versions&lt;/summary&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;python&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;3.12&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;pandas&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;2.2.2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plotly&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;5.24.1&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;matplotlib&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;3.9&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;pyvis&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;0.3.2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;networkx&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;3.3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;&#10;&lt;h2 id="sankey-diagrams"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Sankey Diagrams&lt;/h2&gt;&#10;&lt;h3 id="what-is-a-sankey-diagram"&gt;&lt;span class="num"&gt;1.1&lt;/span&gt;What is a Sankey Diagram&lt;/h3&gt;&#10;&lt;p&gt;A &lt;strong&gt;Sankey diagram&lt;/strong&gt; is a specific type of flow chart where branch widths are proportional to the flow quantity, used to visualize the transfer of energy, money, or materials. It is named after Matthew Henry Phineas Riall Sankey&amp;rsquo;s 1898 diagram of steam engine energy efficiency &lt;a href="https://en.wikipedia.org/wiki/Sankey_diagram"&gt;(Wikipedia)&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;A Sankey diagram consists of &lt;strong&gt;nodes&lt;/strong&gt; and &lt;strong&gt;links&lt;/strong&gt;. Nodes represent stages or entities in a process; links represent the flow of resources between nodes, typically directed from a &lt;strong&gt;source node&lt;/strong&gt; to a &lt;strong&gt;target node&lt;/strong&gt;. The &lt;strong&gt;width&lt;/strong&gt; of a link represents the flow quantity, and colors can distinguish different stages or categories. Flow is conserved: the sum of branch widths at each stage is equal.&lt;/p&gt;</description></item><item><title>Twitter Sentiment Analysis of Catalan Referendum</title><link>http://blog.mcp32.com/en/projects/2024-11-01-catalan-referendum/</link><pubDate>Fri, 01 Nov 2024 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/projects/2024-11-01-catalan-referendum/</guid><description>&lt;details class="fold"&gt;&lt;summary&gt;Environment &amp;amp; Versions&lt;/summary&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;python&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;3.12&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;pandas&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;2.2.2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;matplotlib&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;3.9&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;seaborn&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;0.13.2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;&#10;&lt;h2 id="introduction"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Introduction&lt;/h2&gt;&#10;&lt;p&gt;This project uses a data set consisting of tweets about the Catalan referendum in Spain on Twitter, with attributes including basic information and emotional word counts of each tweet detected by different lexicons (Jiménez-Zafra et al., 2021) (see &lt;a href="http://blog.mcp32.com/en/projects/2024-11-01-catalan-referendum/#appendix-attributes"&gt;Appendix I&lt;/a&gt; for further description of attributes). A bar plot addresses performance differences between lexicons in detecting sentiment among tweets. In addition, the distribution of the author’s popularity among all tweets is illustrated by a histogram, distinguished by sentiments.&lt;/p&gt;</description></item><item><title>Multivariate Plots</title><link>http://blog.mcp32.com/en/tutorials/2024-10-27-multivariate-plots/</link><pubDate>Sun, 27 Oct 2024 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/tutorials/2024-10-27-multivariate-plots/</guid><description>&lt;details class="fold"&gt;&lt;summary&gt;Environment and Versions&lt;/summary&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;python&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;3.12&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;pandas&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;2.2.2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;matplotlib&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;3.9&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;seaborn&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;0.13.2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;&#10;&lt;h2 id="multivariate-data"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Multivariate Data&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;&amp;ldquo;Tidy/flat&amp;rdquo; tabular data:&lt;/strong&gt; Each row is one &lt;strong&gt;observation&lt;/strong&gt; (also called instance or record), and each column is one &lt;strong&gt;variable&lt;/strong&gt; (also called attribute, feature, or parameter).&lt;/p&gt;&#10;&lt;p&gt;Typically, &lt;strong&gt;multivariate&lt;/strong&gt; refers to data with more than two variables — a multivariate plot generally uses three or more columns from the original DataFrame.&lt;/p&gt;&#10;&lt;p&gt;When creating a bar chart, in addition to the x and y variables, you can also set the &lt;code&gt;hue&lt;/code&gt; parameter to include a third variable. For example, &lt;a href="http://blog.mcp32.com/en/tutorials/2024-10-27-multivariate-plots/#fig-bar-variables"&gt;Figure 1&lt;/a&gt; includes three variables: &lt;code&gt;'island'&lt;/code&gt;, &lt;code&gt;'body_mass_g'&lt;/code&gt;, and &lt;code&gt;'sex'&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Data Processing</title><link>http://blog.mcp32.com/en/tutorials/2024-10-10-data-processing/</link><pubDate>Thu, 10 Oct 2024 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/tutorials/2024-10-10-data-processing/</guid><description>&lt;details class="fold"&gt;&lt;summary&gt;Environment &amp;amp; Versions&lt;/summary&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;python&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;3.12&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;pandas&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;2.2.2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;&#10;&lt;h2 id="handling-missing-values"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Handling Missing Values&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;Reading CSV Files:&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Use &lt;code&gt;pd.read_csv(path)&lt;/code&gt; to load a CSV file into a Pandas DataFrame.&lt;/li&gt;&#10;&lt;li&gt;Ensure path separators use forward slashes &lt;code&gt;/&lt;/code&gt; (or escaped backslashes &lt;code&gt;\\&lt;/code&gt; for Win).&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;python&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# import data&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;pandas&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;pd&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;../../../src/data/beer-and-curry.csv&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# read csv file into a DataFrame&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# view first 2 rows&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="outhtml"&gt;&lt;div&gt;&#10;&lt;style scoped&gt;&#10; .dataframe tbody tr th:only-of-type {&#10; vertical-align: middle;&#10; }&#10; .dataframe tbody tr th {&#10; vertical-align: top;&#10; }&#10; .dataframe thead th {&#10; text-align: right;&#10; }&#10;&lt;/style&gt;&#10;&lt;table border="1" class="dataframe"&gt;&#10; &lt;thead&gt;&#10; &lt;tr style="text-align: right;"&gt;&#10; &lt;th&gt;&lt;/th&gt;&#10; &lt;th&gt;created_at&lt;/th&gt;&#10; &lt;th&gt;utc_time&lt;/th&gt;&#10; &lt;th&gt;mentions&lt;/th&gt;&#10; &lt;th&gt;text&lt;/th&gt;&#10; &lt;th&gt;url&lt;/th&gt;&#10; &lt;th&gt;retweet_count&lt;/th&gt;&#10; &lt;th&gt;favorite_count&lt;/th&gt;&#10; &lt;th&gt;user&lt;/th&gt;&#10; &lt;th&gt;user.location&lt;/th&gt;&#10; &lt;th&gt;user.followers_count&lt;/th&gt;&#10; &lt;th&gt;user.friends_count&lt;/th&gt;&#10; &lt;th&gt;user.created_at&lt;/th&gt;&#10; &lt;th&gt;user.favourites_count&lt;/th&gt;&#10; &lt;th&gt;user.verified&lt;/th&gt;&#10; &lt;/tr&gt;&#10; &lt;/thead&gt;&#10; &lt;tbody&gt;&#10; &lt;tr&gt;&#10; &lt;th&gt;0&lt;/th&gt;&#10; &lt;td&gt;06/05/2020&lt;/td&gt;&#10; &lt;td&gt;11:11:49&lt;/td&gt;&#10; &lt;td&gt;NaN&lt;/td&gt;&#10; &lt;td&gt;NINE SPICES?????????????????\n?9??SPICE????NIN...&lt;/td&gt;&#10; &lt;td&gt;https://t.co/wddjIaJTcD&lt;/td&gt;&#10; &lt;td&gt;24&lt;/td&gt;&#10; &lt;td&gt;12&lt;/td&gt;&#10; &lt;td&gt;9spices&lt;/td&gt;&#10; &lt;td&gt;??????????2-1-2 HANROKU??B1&lt;/td&gt;&#10; &lt;td&gt;3820&lt;/td&gt;&#10; &lt;td&gt;1961&lt;/td&gt;&#10; &lt;td&gt;10/02/2010&lt;/td&gt;&#10; &lt;td&gt;296&lt;/td&gt;&#10; &lt;td&gt;False&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;tr&gt;&#10; &lt;th&gt;1&lt;/th&gt;&#10; &lt;td&gt;07/07/2020&lt;/td&gt;&#10; &lt;td&gt;08:08:54&lt;/td&gt;&#10; &lt;td&gt;@lizzie_hubbard2 @JetsettersFlyin @suziday123 ...&lt;/td&gt;&#10; &lt;td&gt;Thanks for the invite to join #TravelWinePart...&lt;/td&gt;&#10; &lt;td&gt;https://t.co/6Z7GgkJE8v&lt;/td&gt;&#10; &lt;td&gt;6&lt;/td&gt;&#10; &lt;td&gt;17&lt;/td&gt;&#10; &lt;td&gt;ExpressionsSA&lt;/td&gt;&#10; &lt;td&gt;Cape Town South Africa&lt;/td&gt;&#10; &lt;td&gt;5088&lt;/td&gt;&#10; &lt;td&gt;5284&lt;/td&gt;&#10; &lt;td&gt;24/06/2011&lt;/td&gt;&#10; &lt;td&gt;15625&lt;/td&gt;&#10; &lt;td&gt;False&lt;/td&gt;&#10; &lt;/tr&gt;&#10; &lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&lt;/div&gt;&#10;&lt;h3 id="dropping-missing-values"&gt;&lt;span class="num"&gt;1.1&lt;/span&gt;Dropping Missing Values&lt;/h3&gt;&#10;&lt;p&gt;Use &lt;code&gt;dropna()&lt;/code&gt; to remove rows with missing values in the columns required for analysis.&lt;/p&gt;</description></item><item><title>Amounts and Distribution</title><link>http://blog.mcp32.com/en/tutorials/2024-10-01-amounts-and-distribution/</link><pubDate>Tue, 01 Oct 2024 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/tutorials/2024-10-01-amounts-and-distribution/</guid><description>&lt;details class="fold"&gt;&lt;summary&gt;Environment and Versions&lt;/summary&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;python&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;python&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;3.12&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;pandas&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;2.2.2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;matplotlib&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;3.9&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;seaborn&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mf"&gt;0.13.2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/details&gt;&#10;&lt;h2 id="seaborn-and-matplotlib"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Seaborn and Matplotlib&lt;/h2&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you are using a local environment such as Jupyter or VS Code, install Seaborn first. If you are using Google Colab, Seaborn is already available and does not need to be installed manually.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;python&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;pip&lt;/span&gt; &lt;span class="n"&gt;install&lt;/span&gt; &lt;span class="n"&gt;seaborn&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;python&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;seaborn&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;sns&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;matplotlib.pyplot&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;plt&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;matplotlib.pyplot&lt;/code&gt; is usually abbreviated as &lt;code&gt;plt&lt;/code&gt; so plotting functions can be called more conveniently. Using the full path is not recommended:&lt;/p&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;python&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;matplotlib.pyplot&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;matplotlib&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pyplot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;matplotlib&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pyplot&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Recommended style:&lt;/p&gt;&#10;&lt;div class="codeblk"&gt;&lt;div class="bar"&gt;&lt;span&gt;python&lt;/span&gt;&lt;button type="button" class="copy"&gt;copy&lt;/button&gt;&lt;/div&gt;&lt;pre class="chroma"&gt;&lt;code&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;matplotlib.pyplot&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nn"&gt;plt&lt;/span&gt; &lt;span class="c1"&gt;# Import with the alias &amp;#39;plt&amp;#39; for later use&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;mpl&lt;/code&gt;: an alias for &lt;code&gt;matplotlib&lt;/code&gt;, commonly used for global configuration, lower-level properties, and advanced submodules such as colormaps and 3D plotting.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;plt&lt;/code&gt;: an alias for &lt;code&gt;matplotlib.pyplot&lt;/code&gt;, the main everyday interface for quickly creating and managing figures.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;strong&gt;Reference: &lt;a href="https://matplotlib.org/stable/api/pyplot_summary.html"&gt;matplotlib.pyplot tutorial&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Fix Snipaste Stuck on Top of the Screen</title><link>http://blog.mcp32.com/en/blogs/2024-05-16-snipaste-fix/</link><pubDate>Thu, 16 May 2024 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/blogs/2024-05-16-snipaste-fix/</guid><description>&lt;h2 id="the-problem"&gt;&lt;span class="num"&gt;1&lt;/span&gt;The Problem&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Operating system: Windows 10&lt;/li&gt;&#10;&lt;li&gt;Snipaste version: 2.9.1&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Snipaste froze while taking a screenshot. The paste pinned itself over the entire screen and could not be closed, and it blocked every other window.&lt;/p&gt;&#10;&lt;div class="frame" style="max-width:40rem"&gt;&#10;&lt;figure&gt;&lt;img src="https://raw.githubusercontent.com/Pinn32/img/main/img/pic-go/20260716222648765.png" alt="The Frozen Paste Pinned over the Entire Screen" loading="lazy"&gt;&lt;figcaption&gt;The Frozen Paste Pinned over the Entire Screen&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;/div&gt;&#10;&lt;h2 id="method-1-kill-the-snipaste-process"&gt;&lt;span class="num"&gt;2&lt;/span&gt;Method 1: Kill the Snipaste Process&lt;/h2&gt;&#10;&lt;p&gt;This takes advantage of how Snipaste replaces pastes: swap the full-screen paste for a small one first, then end the process.&lt;/p&gt;</description></item><item><title>Recovering Misplaced Windows Shell Folders</title><link>http://blog.mcp32.com/en/blogs/2024-04-22-recover-shellfolder/</link><pubDate>Mon, 22 Apr 2024 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/blogs/2024-04-22-recover-shellfolder/</guid><description>&lt;style&gt;&#10;figcaption {&#10; text-align: center;&#10;}&#10;&lt;/style&gt;&#10;&lt;h2 id="preface"&gt;&lt;span class="num"&gt;1&lt;/span&gt;Preface&lt;/h2&gt;&#10;&lt;p&gt;This was the first extended troubleshooting write-up I kept in Notion, and it marked the start of my habit of documenting how I solve problems, both to share and to reference later.&lt;/p&gt;&#10;&lt;p&gt;The write-up prompted me to adopt Notion much more often as a regular tool. Investigating this particular problem also introduced me to VSCode, my first encounter with an IDE, and it is where my interest in programming began.&lt;/p&gt;</description></item><item><title>Pinn (Aiqi) Xu</title><link>http://blog.mcp32.com/en/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>http://blog.mcp32.com/en/about/</guid><description>&lt;figure style="max-width:220px"&gt;&lt;img src="https://raw.githubusercontent.com/Pinn32/img/refs/heads/main/personal-web/pinn32-portrait.png" alt="Portrait of Pinn" loading="lazy"&gt;&lt;figcaption&gt;Coding saves lifes.&lt;/figcaption&gt;&lt;/figure&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://github.com/pinn32"&gt;GitHub&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://www.linkedin.com/in/pinn-aiqi-xu/"&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item></channel></rss>