<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>tiredlizard&apos;s Guide to Nothing of Import</title>
    <description>It&apos;s bloggin&apos; time.</description>
    <link>https://tiredlizard.github.io/</link>
    <atom:link href="https://tiredlizard.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Thu, 05 Dec 2024 20:21:02 +0000</pubDate>
    <lastBuildDate>Thu, 05 Dec 2024 20:21:02 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator><item>
        <title>Definitely Gaming for Scientific Reasons, Part 2: Electric Boogaloo</title>
        <description>&lt;p class=&quot;intro&quot;&gt;&lt;span class=&quot;dropcap&quot;&gt;W&lt;/span&gt;elcome back, unfortunate souls. Last time (...on Avatar), we gallivanted through the gathering and cleaning of some data from Moby Games, a website purely for collecting and managing game information. We did some basic EDA and thought a few things looked mildly interesting. Now, onto part two of this thrilling saga. &lt;/p&gt;

&lt;h3 id=&quot;key-insights&quot;&gt;Key Insights?&lt;/h3&gt;
&lt;p&gt;Honestly, there wasn’t anything jaw-dropping or super amazing in the data, at least not that I found. I mean, here’s a boxplot if you want it.&lt;/p&gt;

&lt;figure&gt;
	&lt;img src=&quot;https://tiredlizard.github.io//a-typical-blog/assets/img/ScorebyGenrebox.png&quot; alt=&quot;&quot; /&gt; 
	&lt;figcaption&gt;Figure 1. - Look, geometry.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;A majority of the games were rated in the 7.9-8.2 range. Since these games are the top 550 from the Moby list of Nintendo Switch games, that doesn’t surprise me. Action seems to have the most outliers, though none of the genres have a Moby score (a “number based on a bayesian scale critic and plater ratings”) above 9.4. But we all know what critics are like, so again, that isn’t a shocking development.&lt;/p&gt;

&lt;p&gt;Unsurprisingly, fantasy seemed to be the most popular genre among the games. The most common perspectives among the genres were third-person and side view. (So, not Minecraft.)&lt;/p&gt;

&lt;figure&gt;
	&lt;img src=&quot;https://tiredlizard.github.io//a-typical-blog/assets/img/settingvspersp.png&quot; alt=&quot;&quot; /&gt; 
	&lt;figcaption&gt;Figure 2. - I am aware that the labels are weird. &apos;East&apos; was supposed to be Middle-East, &apos;North&apos; was North America, etc... until Data Cleaning attacked. But who knows, maybe you wouldn&apos;t have noticed if I hadn&apos;t pointed it out. &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;In my previous post, I mentioned that there was a noticeable dip where there weren’t as many games being released in 2020. Take a guess as to why. (Oddly enough, the one gambling game I have in my dataset was released in 2020. Go figure?) This is easily seen in the ‘Explore’ tab of my streamlit app, specifically the first graph. But that’s a topic for… now, actually.&lt;/p&gt;

&lt;h3 id=&quot;napp-time&quot;&gt;(N)App Time&lt;/h3&gt;

&lt;p&gt;I present to you… &lt;a href=&quot;https://geepersitsgamedata.streamlit.app&quot;&gt;Playing with Game Data&lt;/a&gt;, the app. I know, the name’s so clever. Hilarious. It makes for a lot less work to filter the data set (if you didn’t code it, at least) and see cool graphs with the click of a button.&lt;/p&gt;

&lt;h4 id=&quot;tab-1&quot;&gt;Tab 1&lt;/h4&gt;
&lt;p&gt;It’s relatively self-explanatory. The first tab is just a few widgets for people to mess around with to their heart’s content, aka for ten seconds. For the first plot, you select a genre and it displays a simple graph depicting the number of games released per year in that genre.&lt;/p&gt;

&lt;figure&gt;
	&lt;img src=&quot;https://tiredlizard.github.io//a-typical-blog/assets/img/newplot.png&quot; alt=&quot;&quot; /&gt; 
	&lt;figcaption&gt;Figure 3. - Those aren&apos;t mountains...&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;As the title says, I selected ‘Role-playing (RPG)’ from the genre list and got this lovely little curve back.&lt;/p&gt;

&lt;p&gt;The second plot is a stacked bar graph. You can select multiple game settings (as in world setting, not interface settings) and they’ll show up on the bar graph, stacked on top of one another. If you hover your cursor over a bar, it’ll tell you the exact count of each setting per year.&lt;/p&gt;

&lt;figure&gt;
	&lt;img src=&quot;https://tiredlizard.github.io//a-typical-blog/assets/img/stackedplot.png&quot; alt=&quot;&quot; /&gt; 
	&lt;figcaption&gt;Figure 4. - ...those are waves! Very rectangular ones.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;I selected my favorite settings and got this lovely thing.&lt;/p&gt;

&lt;p&gt;Then there’s release month, which isn’t particularly useful… but is kinda fun to slide the dot around. As I mentioned previously, April has the least amount of releases, with only 26/550 games being released on the Switch that month.&lt;/p&gt;

&lt;h4 id=&quot;tab-2&quot;&gt;Tab 2&lt;/h4&gt;
&lt;p&gt;This one’s my favorite. You select a genre, one or more gameplay options, a setting, and a minimum critic score to see a dataframe of all the games that match your criteria. Since my dataset is pretty limited, it’s not as cool as it seemed in my head. Oh well.&lt;/p&gt;

&lt;h4 id=&quot;tab-3&quot;&gt;Tab 3&lt;/h4&gt;
&lt;p&gt;Unfortunately, this widget ended up being difficult to use considering how case sensitive it is. If you miss an apostrophe or space, it’s over (for a second). If you know the exact name, though, it’s not too bad.&lt;/p&gt;

&lt;h3 id=&quot;as-for-you&quot;&gt;As for you…&lt;/h3&gt;

&lt;p&gt;I wanted to keep this a little shorter for ease of finals week peer reviewing. (It has nothing to do with a lack of creativity.) Hopefully it wasn’t as boring as your 9 A.M. history class.&lt;/p&gt;

&lt;p&gt;Anyways, the interactive widgets on the app provide for a bit of personal analysis, should you wish to waste your time doing so. I’d be curious to know if there’s any kind of association between gameplay and critic rating, as an example. Or which settings and genres go together the most often. It’s not like I could go do that myself; obviously, you have to go check it out.&lt;/p&gt;

&lt;p&gt;Go find a genre that interests you and take a look at some of the games you might be interested in once you have more than a minute of downtime. Good luck with finals, everyone.&lt;/p&gt;

&lt;h4 id=&quot;links&quot;&gt;Links&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/tiredlizard/blog_data_collection&quot;&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://geepersitsgamedata.streamlit.app&quot;&gt;Shameful Self-Promotion&lt;/a&gt;&lt;/p&gt;

</description><description>&lt;p class=&quot;intro&quot;&gt;&lt;span class=&quot;dropcap&quot;&gt;W&lt;/span&gt;elcome back, unfortunate souls. Last time (...on Avatar), we gallivanted through the gathering and cleaning of some data from Moby Games, a website purely for collecting and managing game information. We did some basic EDA and thought a few things looked mildly interesting. Now, onto part two of this thrilling saga. &lt;/p&gt;

</description><pubDate>Wed, 04 Dec 2024 00:00:00 +0000</pubDate>
        <link>https://tiredlizard.github.io/blog/App/</link>
        <guid isPermaLink="true">https://tiredlizard.github.io/blog/App/</guid></item><item>
        <title>Definitely Gaming for Scientific Reasons: Exploring Game Data</title>
        <description>&lt;p class=&quot;intro&quot;&gt;&lt;span class=&quot;dropcap&quot;&gt;I&lt;/span&gt;f there&apos;s one thing I love more than refusing to defeat the final boss in the games I play, it&apos;s analyzing data about those games. (Alright, that&apos;s a lie; nothing can beat procrastinating in a fictional world.) 

So, here&apos;s my not-so-scientific adventure in game data exploration. Sit back, grab a controller and/or caffeinated drink, and join me as I dig into the questions no one asked - like, &quot;Which month hates game releases the most?&quot; and &quot;Are action games truly the best?&quot;&lt;/p&gt;

&lt;p&gt;(I’m sorry, but there’s no synonyms for ‘game’ in this sense that I can find. So bear with me.)&lt;/p&gt;

&lt;h2 id=&quot;the-question&quot;&gt;The Question&lt;/h2&gt;

&lt;p&gt;I wouldn’t consider myself a Gamer™ (derogatory), but I do love playing video games. My Nintendo Switch and I have spent quite a bit of time together. (I’m a fan of &lt;em&gt;Pokémon&lt;/em&gt;, &lt;em&gt;LoZ: BotW&lt;/em&gt;, &lt;em&gt;Celeste&lt;/em&gt;, and &lt;em&gt;Omori&lt;/em&gt; in particular. Not that you asked.)&lt;/p&gt;

&lt;p&gt;When I was looking for datasets to collect, I came across the Moby Games website (a site for collecting and managing game information) and thought ‘why not?’. I was curious to see what attributes give games higher ratings than others; does the type of genre or interface make a difference? Were there more popular games released in a particular year? What impact did COVID-19 have on games (if any)? And the like. Not anything I think about on a daily basis, but worth looking into.&lt;/p&gt;

&lt;h2 id=&quot;the-ethics&quot;&gt;The Ethics&lt;/h2&gt;

&lt;p&gt;Before you ask - yes, I did check the robots.txt file. It allowed me to access all the content I needed. Since I didn’t extract any names or personal info, I figured it’d be alright to share my data on the GitHub repository. If you happen to be the esteemed Moby of Moby Games and would like me to terminate my repo, email me.&lt;/p&gt;

&lt;p&gt;And don’t worry, I was very nice with my scraping. I set a 3-5 second delay with every url my program followed, so it took about an hour to collect everything. I do appreciate and respect your website, Moby Games.&lt;/p&gt;

&lt;h2 id=&quot;the-steps&quot;&gt;The Steps&lt;/h2&gt;

&lt;p&gt;Grabbing the first part of the data was easy, especially since it was a table - just same basic BeautifulSoup coding and I had it. But the second part was quite a nuisance. It was technically a grid object, but the find functions could not fulfill their one purpose in life. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;dd&amp;gt;&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;dl&amp;gt;&lt;/code&gt; tags don’t like cooperating, apparently. So ChatGPT and I talked over dinner, and breakfast, and lunch… we chatted (well, mostly I pleaded for help and it patiently responded) for hours to figure out how to extract the data I wanted.&lt;/p&gt;

&lt;p&gt;Once that was figured out, I had to do something even worse: clean the data. Honestly, it was a nightmare. Whitespace, parentheses, commas, slashes, lions, tigers, and bears - I needed to clear out almost everything. Simple, right? Yes, but I also needed to turn each value in most of my columns into lists. Rather than ‘Fantasy, Sci-fi / futuristic”, I wanted [Fantasy, Sci-fi / futuristic] so I could properly analyze the data.&lt;/p&gt;

&lt;p&gt;This is what that code looked like:&lt;/p&gt;
&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;n&quot;&gt;games_df_clean&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;games_df&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;copy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;#Clean specific columns using .apply()
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;games_df_clean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Released&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;games_df&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Released&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;clean_released_date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;games_df_clean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Critics&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;games_df&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Critics&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;clean_value&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;clean_critics&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;games_df_clean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Gameplay&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;games_df&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Gameplay&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;clean_and_split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;isinstance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;games_df_clean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Setting&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;games_df&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Setting&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;clean_and_split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;isinstance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;games_df_clean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Perspective&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;games_df&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Perspective&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;clean_and_split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;isinstance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;games_df_clean&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Interface&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;games_df&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Interface&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;clean_and_split&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;isinstance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;#Split the &apos;Genre&apos; column based on commas and remove extra spaces
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;basic_games_df&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Genre&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;basic_games_df&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Genre&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;apply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;clean_genres&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Where clean_and_split, clean_released_date, clean_date are functions previously defined to, unsurprisingly, clean the data. You can find those in my code in Github.&lt;/p&gt;

&lt;p&gt;I’ll spare you the rest of those details. Luckily for you, if you’re interested in scraping a similar website, you have (stupidly complicated) code in the repo linked at the bottom. Congrats.&lt;/p&gt;

&lt;p&gt;Then the still-hard-but-not-as-bad part: EDA. Gotta say, it’s incredibly annoying that R is so similar to Python but has different syntax - I can create plots just fine in R, but I struggle a bit in Python. With the help of my dear friend ChatGPT, I eventually got through it.&lt;/p&gt;

&lt;p&gt;So, without further ado: the dataset.&lt;/p&gt;

&lt;h2 id=&quot;the-dataset&quot;&gt;The Dataset&lt;/h2&gt;

&lt;p&gt;Unfortunately, my dataset is only games from the Nintendo Switch, and I couldn’t exactly grab the 11,774 games on the master list before Moby drop-kicked me out of their servers. So I ended up with 550 games and collected 12 features:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Title&lt;/li&gt;
  &lt;li&gt;Release year&lt;/li&gt;
  &lt;li&gt;Release date&lt;/li&gt;
  &lt;li&gt;Moby Score (Ranking)&lt;/li&gt;
  &lt;li&gt;Critics Score (Percentage)&lt;/li&gt;
  &lt;li&gt;Genre
    &lt;ul&gt;
      &lt;li&gt;Puzzle, Racing/Driving…&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Perspective
    &lt;ul&gt;
      &lt;li&gt;1st-Person, Behind view…&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Gameplay
    &lt;ul&gt;
      &lt;li&gt;RPG, Platform…&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Interface
    &lt;ul&gt;
      &lt;li&gt;Point and Select, Direct control…&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Setting
    &lt;ul&gt;
      &lt;li&gt;Fantasy, Western…&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;ESRB Rating&lt;/li&gt;
  &lt;li&gt;Multiplayer Options&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After checking for missing values, I dropped the last two columns - they were missing 361 and 444 values, respectively, out of 550 total.&lt;/p&gt;

&lt;p&gt;Why did I keep ‘Release year’ &lt;em&gt;and&lt;/em&gt; ‘Release date’? Well, I collected the year before finding out about the date variable. I also wanted months, so I just grabbed the release date as well.&lt;/p&gt;

&lt;p&gt;Having retrieved the dataset, I moved on to the summary stuff.&lt;/p&gt;

&lt;h2 id=&quot;the-stats&quot;&gt;The Stats&lt;/h2&gt;

&lt;p&gt;Now for the exciting part: summary statistics.&lt;/p&gt;

&lt;h3 id=&quot;the-numerical-stuff&quot;&gt;The Numerical Stuff&lt;/h3&gt;

&lt;p&gt;The only numeric variables I had were the Moby Score and the Critics rating.&lt;/p&gt;
&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;n&quot;&gt;all_combined_df&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;describe&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;

            &lt;span class=&quot;n&quot;&gt;Score&lt;/span&gt;     &lt;span class=&quot;n&quot;&gt;Critics&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;count&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;550.000000&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;550.000000&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;mean&lt;/span&gt;     &lt;span class=&quot;mf&quot;&gt;8.023273&lt;/span&gt;   &lt;span class=&quot;mf&quot;&gt;84.336364&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;std&lt;/span&gt;      &lt;span class=&quot;mf&quot;&gt;0.257217&lt;/span&gt;    &lt;span class=&quot;mf&quot;&gt;3.365087&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;min&lt;/span&gt;      &lt;span class=&quot;mf&quot;&gt;7.800000&lt;/span&gt;   &lt;span class=&quot;mf&quot;&gt;77.000000&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;25&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;      &lt;span class=&quot;mf&quot;&gt;7.900000&lt;/span&gt;   &lt;span class=&quot;mf&quot;&gt;82.000000&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;      &lt;span class=&quot;mf&quot;&gt;7.900000&lt;/span&gt;   &lt;span class=&quot;mf&quot;&gt;84.000000&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;75&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;      &lt;span class=&quot;mf&quot;&gt;8.100000&lt;/span&gt;   &lt;span class=&quot;mf&quot;&gt;86.000000&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;max&lt;/span&gt;      &lt;span class=&quot;mf&quot;&gt;9.400000&lt;/span&gt;   &lt;span class=&quot;mf&quot;&gt;96.000000&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Not particularly interesting, besides the sheer number of 0’s the function felt the need to add. The relatively high scores are par for the course, seeing as I took the &lt;em&gt;top&lt;/em&gt; 550 games from the list, which was organized by Moby Score.&lt;/p&gt;

&lt;h3 id=&quot;the-categorical-stuff&quot;&gt;The Categorical Stuff&lt;/h3&gt;

&lt;p&gt;Now for our first categorical variable: release year!&lt;/p&gt;

&lt;figure&gt;
	&lt;img src=&quot;https://tiredlizard.github.io//a-typical-blog/assets/img/GamesperYear.png&quot; alt=&quot;&quot; /&gt; 
	&lt;figcaption&gt;Figure 1. - I&apos;m sure you can... figure it out.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Well, that was underwhelming. The counts of the rest of the categorical variables look very similar to this, as can be expected. Instead of just inserting the count plot for every variable, I wanted to show you a couple comparison graphs. (Honestly, I just wanted to actually compare some of the variables I looked at because I spent a heckin’ long time on data collection.)&lt;/p&gt;

&lt;p&gt;This one is fun. I’ll include the code for it as well:&lt;/p&gt;
&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;c1&quot;&gt;##Stacked DataFrame
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#Group the data and create a stacked DataFrame
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;exploded_df&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;all_combined_df&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;explode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Genre&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reset_index&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;drop&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;#.explode is used to separate out cells with multiple values into new rows
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exploded_df&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;groupby&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Year&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&apos;Genre&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]).&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;size&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reset_index&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Count&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;#Create the stacked area chart
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fig&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;area&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Year&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Count&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Genre&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; 
              &lt;span class=&quot;n&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Games Released by Genre over Time&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
              &lt;span class=&quot;n&quot;&gt;labels&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Year&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&apos;Year&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&apos;Count&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&apos;Number of Games&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
              &lt;span class=&quot;n&quot;&gt;template&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;plotly&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;fig&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;update_layout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;dict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;l&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;r&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;40&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;b&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;40&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;fig&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;figure&gt;
	&lt;img src=&quot;https://tiredlizard.github.io//a-typical-blog/assets/img/cool_area_plot.png&quot; alt=&quot;&quot; /&gt; 
	&lt;figcaption&gt;Figure 2. - A cool stacked plot of games released per genre per year.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;If you’re unfamiliar with stacked area plots, they’re pretty simple - the one with the largest area has the most counts. In this case, ‘Action’ (the blue one) has the most games of all the genres. Then each other genre is stacked on top of it until the total count for the year is reached. For example, in 2018 in this dataset, there were approximately 50 Action games released, 10 Adventure games released, etcetera.&lt;/p&gt;

&lt;p&gt;(Note the substantial dip in 2020 from both of these graphs. Unsurprising, but still neat to look at.)&lt;/p&gt;

&lt;p&gt;I actually made six plots to use in the post, but I figured that might be too much. So here’s the last one:&lt;/p&gt;

&lt;figure&gt;
	&lt;img src=&quot;https://tiredlizard.github.io//a-typical-blog/assets/img/output.png&quot; alt=&quot;&quot; /&gt; 
	&lt;figcaption&gt;Figure 3. - Not sure why I&apos;m even putting a caption here. The image is pretty self-explanatory.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;It seems like April is just a lame month for game releases in my dataset.&lt;/p&gt;

&lt;p&gt;Anyways, that was a little bit of EDA for you to snack on. By all means, if you’re curious, go check out the dataset on my GitHub.&lt;/p&gt;

&lt;h2 id=&quot;the-finish-the-flag-if-you-will&quot;&gt;The Finish (The Flag, if you will)&lt;/h2&gt;

&lt;p&gt;In the end, while my glance into the world of Nintendo Switch game data didn’t turn me into a data wizard or an official Gamer™, it did give me a peek into the patterns behind the games I (and many others) love. From genre trends over time to release schedules that avoid April like the plague, every stat and visualization helped paint a bigger picture of what’s happening in gaming. So, while this may not be groundbreaking scientific research, it was pretty entertaining (and incredibly frustrating - just like a platformer). And if anyone asks, I was just gaming… for science. Wow, that was &lt;em&gt;incredibly&lt;/em&gt; cheesy.&lt;/p&gt;

&lt;p&gt;As for you - go take a look at the data and see if your favorite game (or just a game you know) made it on the list. Or maybe try making a plot of Setting versus Perspective and see if there’s anything interesting. I dunno, have a smidgen of fun with it.&lt;/p&gt;

&lt;p&gt;(Like, Comment, and Subscribe?)&lt;/p&gt;

&lt;h2 id=&quot;links--zeldas&quot;&gt;Links (&amp;amp; Zeldas)&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://www.mobygames.com/platform/switch/&quot;&gt;Moby Games!&lt;/a&gt;
&lt;a href=&quot;https://github.com/tiredlizard/blog_data_collection&quot;&gt;GitHub :(&lt;/a&gt;&lt;/p&gt;
</description><description>&lt;p class=&quot;intro&quot;&gt;&lt;span class=&quot;dropcap&quot;&gt;I&lt;/span&gt;f there&apos;s one thing I love more than refusing to defeat the final boss in the games I play, it&apos;s analyzing data about those games. (Alright, that&apos;s a lie; nothing can beat procrastinating in a fictional world.) 

&lt;/p&gt;
</description><pubDate>Wed, 06 Nov 2024 00:00:00 +0000</pubDate>
        <link>https://tiredlizard.github.io/blog/EDA/</link>
        <guid isPermaLink="true">https://tiredlizard.github.io/blog/EDA/</guid></item><item>
        <title>Putting the SCE in... &apos;Sceince&apos;: A Rushed Introduction to Single Cell Experiments</title>
        <description>&lt;p class=&quot;intro&quot;&gt;&lt;span class=&quot;dropcap&quot;&gt;S&lt;/span&gt;o, you woke up this morning and wondered &quot;what in the heck is an SCE object?&quot;. Just kidding, no one does that. That&apos;s why I&apos;m here to tell you about something you&apos;ve never even heard about. My fellow students, don&apos;t be too alarmed by the &apos;11 Minute Read&apos;; you can skim it in, like, two minutes. (I&apos;m very sorry.) &lt;/p&gt;

&lt;h2 id=&quot;sce-questions&quot;&gt;SCE Questions&lt;/h2&gt;

&lt;p&gt;Take a shot (of water!) every time I say ‘SCE object’.&lt;/p&gt;

&lt;h4 id=&quot;what-is-the-sce-object&quot;&gt;What is the SCE object?&lt;/h4&gt;

&lt;p&gt;I’ll start with the basics. SCE stands for &lt;em&gt;Single-Cell Experiment&lt;/em&gt;. So an SCE object, you guessed it, contains biological data for cells. “Why would you want to work with biological data?” you ask. “Because I’m a masochist,” I answer. No, I’m a biostatistican, but same difference. At least I’m not an actuary. Those guys really &lt;em&gt;are&lt;/em&gt; masochists. (I’m joking!)&lt;/p&gt;

&lt;p&gt;Anyways, the main assay, which is essentially a data frame of raw counts, is made up of thousands of rows representing certain genes and columns representing certain (biological) cells. The data I’m playing with here has 6,260 gene expressions (rows) and 65,246 individual cells (columns), meaning I have a grand total of a whopping &lt;em&gt;408,439,960&lt;/em&gt; (table) cells. Yeah, it’s a lot. In fact, it has to use a sparse matrix - a matrix that collapses all cells with ‘0’ into commas - to save space. Even then, this particular object is about 1.3 gigabytes.&lt;/p&gt;

&lt;h4 id=&quot;where-is-the-sce-object&quot;&gt;Where is the SCE object?&lt;/h4&gt;

&lt;p&gt;BiocManager is &lt;em&gt;my&lt;/em&gt; best friend. You can’t have it.&lt;/p&gt;

&lt;p&gt;Ugh, fine. Here’s how you’d install it:&lt;/p&gt;
&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-r&quot; data-lang=&quot;r&quot;&gt;&lt;span class=&quot;n&quot;&gt;install.packages&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BiocManager&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;repos&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://cloud.r-project.org&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;BiocManager&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;install&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;SingleCellExperiment&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# SCE objects are part of this package.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Of course, I have my actual SCE data given to me from my professor. Good luck finding some on your own!&lt;/p&gt;

&lt;h4 id=&quot;why-is-the-sce-object&quot;&gt;Why is the SCE object?&lt;/h4&gt;

&lt;p&gt;(Yes, I’m ignoring proper grammar for the joke.)&lt;/p&gt;

&lt;p&gt;The SCE object is a smaller part of something called &lt;em&gt;single cell RNA sequencing&lt;/em&gt; (or scRNA-seq for short). In scRNA-seq, we capture the gene expression of individual cells, which helps us understand cellular differences in complex tissues or conditions like cancer. For example, my dataset is part of a larger one involving Renal Cell Carcinoma and identifying gene expressions that are more common in cells found in the cancerous regions than in cells found in the adjacent normal regions… what a mouthful. So, essentially, SCE objects serve as containers to store all this incredibly complex data.&lt;/p&gt;

&lt;p&gt;Long story short: RNA tells us important stuff, we put the important stuff into Single-Cell Experiment objects.&lt;/p&gt;

&lt;h4 id=&quot;how-is-the-sce-object&quot;&gt;How is the SCE object?&lt;/h4&gt;

&lt;p&gt;It’s doing well; thanks for asking.&lt;/p&gt;

&lt;p&gt;Alright, I admit, this is getting old. But the structure of the Single-Cell Experiment &lt;em&gt;is&lt;/em&gt; very important, and probably one of the most difficult things to explain.&lt;/p&gt;

&lt;figure&gt;
	&lt;img src=&quot;https://tiredlizard.github.io//a-typical-blog/assets/img/scestructure.png&quot; alt=&quot;&quot; /&gt; 
	&lt;figcaption&gt;Figure 1. - Thanks to Bioconductor for their well-informed guide to SCE objects. Go check that out if you want a professional explanation. &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Oh, nevermind. It was pretty easy!&lt;/p&gt;

&lt;p&gt;In all seriousness, an SCE object has an odd format. The primary assay, as mentioned before, is made of counts - it’s essentially a matrix of mostly 0s that shows which cells express which genes. But then we have… the metadata.&lt;/p&gt;

&lt;p&gt;The metadata contains information about each cell. This is what happens when you load the column metadata on the first three cells.&lt;/p&gt;
&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-r&quot; data-lang=&quot;r&quot;&gt;&lt;span class=&quot;n&quot;&gt;load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;sce.Rdata&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;first.3&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sce&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[,&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;colData&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;first.3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;#=&amp;gt; prints: &lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;DataFrame&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rows&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;and&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;8&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;columns&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                       &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nGene&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;      &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nUMI&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;      &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sample&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;percent_mito&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;doublet_score&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;       &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;batch&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;        &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;       &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;stage&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                   &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;integer&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numeric&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;character&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numeric&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;     &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;numeric&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;character&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;character&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;character&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;AAACCTGAGAGCTTCT&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-9&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;      &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1655&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;      &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;5721&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;       &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S14_N&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1.15962e-212&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.00133505&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;           &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;           &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;N&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;      &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;locAdv&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;AAACCTGAGTCGTTTG&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-9&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;      &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1547&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;      &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;4883&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;       &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S14_N&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;6.30512e-16&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.51172545&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;           &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;           &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;N&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;      &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;locAdv&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;AAACCTGGTGCATCTA&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-9&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;      &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1349&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;      &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;2237&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;       &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S14_N&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;5.01866e-15&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.00000000&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;           &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;           &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;N&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;      &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;locAdv&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Where (you can skim this if you want):&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;nGene: number of unique genes detected in each cell&lt;/li&gt;
  &lt;li&gt;nUMI: number of Unique Molecular Identifiers (UMI)&lt;/li&gt;
  &lt;li&gt;sample: indicates sample each cell belongs to&lt;/li&gt;
  &lt;li&gt;percent_mito: percentage of UMIs that map to mitochondrial genes in each cell&lt;/li&gt;
  &lt;li&gt;doublet_score: score estimating the likelihood that a cell is a “doublet”, meaning two cells were captured as one during sequencing&lt;/li&gt;
  &lt;li&gt;batch: which batch the cell belongs to&lt;/li&gt;
  &lt;li&gt;type: indicates condition of the cell (normal or tumor)&lt;/li&gt;
  &lt;li&gt;stage: refers to stage of disease (early, locally advanced, metastatic)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wow, I didn’t even understand most of that, and I spent six weeks with this data.&lt;/p&gt;

&lt;h4 id=&quot;who-is-the--okay-ill-stop-now&quot;&gt;Who is the – okay, I’ll stop now.&lt;/h4&gt;
&lt;p&gt;I know, I’m hilarious. …this is probably why no one will hire me, huh. Moving on!&lt;/p&gt;

&lt;h2 id=&quot;so-now-you-want-to-analyze-data&quot;&gt;So now you want to analyze data.&lt;/h2&gt;

&lt;p&gt;Since I have to include some form of data science in this post, I suppose I will go over the basic things you can do with the SCE object. I am so sorry to my classmates in Stat 386. (Hopefully this counts as data science? Since it’s science… using data?)&lt;/p&gt;

&lt;h4 id=&quot;normalization&quot;&gt;Normalization&lt;/h4&gt;

&lt;p&gt;Unfortunately, since this is biological data, it is very much not normal. In order to perform any kind of analysis, you’re going to want to normalize it. 
(Sorry Python users - I’m working in R and I will not cater to your needs.)&lt;/p&gt;
&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-r&quot; data-lang=&quot;r&quot;&gt;&lt;span class=&quot;n&quot;&gt;scaled&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;assay&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sce&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;counts&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;colSums&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;assay&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sce&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;counts&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# Takes counts assay and divides each table cell by the sum of the column counts to scale it.&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logcounts&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;log1p&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scaled&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;10000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# Create a matrix called &apos;logcounts&apos; by multiplying the scaled matrix by 10000 and performing a log transformation.&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;assay&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sce&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;logcounts&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;logcounts&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# Inserts the new logcounts matrix as an assay in the SCE.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;The transposition stuff is just because R is whiny and doesn’t like performing operations on assays that are too tall. Me too, pal. The scaling factor isn’t set in stone, though 10,000 is a common choice in single-cell RNA sequencing since it makes the data more interpretable. It also makes it more manageable for log transformations.&lt;/p&gt;

&lt;p&gt;Et voilà, you have a normalized count assay.&lt;/p&gt;

&lt;h4 id=&quot;highly-variable-genes&quot;&gt;Highly Variable Genes&lt;/h4&gt;

&lt;p&gt;As you might’ve noticed, there are a lot of genes in your assay. What you can do now is simplify a bit more to only have the most variable gene expressions, which are basically just the most interesting ones to researchers (they differ the most between samples, meaning that they may be important when distinguishing cell types).&lt;/p&gt;

&lt;p&gt;In my dataset, the most variable genes represented the most likely cells to have differences between tumorous samples and non-tumorous samples. This could provide crucial information that might be used to identify cancerous cells.&lt;/p&gt;
&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-r&quot; data-lang=&quot;r&quot;&gt;&lt;span class=&quot;n&quot;&gt;BiocManager&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;install&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;scran&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;library&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scran&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# For the rowVars function.&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rowVars&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;assay&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sce&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;logcounts&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# Calculate row variances for the logcounts assay.&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;highest_variance_index&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;which&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sort&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)[&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rv&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;m&quot;&gt;5000&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# Index the top 5,000 most variable genes.&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sce&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sce&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;highest_variance_index&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# Use that index to simplify the SCE object.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;p&gt;Now you can cry a little less every time you look at it.&lt;/p&gt;

&lt;h4 id=&quot;pca-pretty-cool-algebra&quot;&gt;PCA (Pretty Cool Algebra)&lt;/h4&gt;

&lt;figure&gt;
	&lt;img src=&quot;https://tiredlizard.github.io//a-typical-blog/assets/img/PCA_visual.png&quot; alt=&quot;&quot; /&gt; 
	&lt;figcaption&gt;Figure 2. - Thanks to ResearchGate for unknowingly letting me borrow this image.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;If you don’t already know, PCA stands for &lt;em&gt;Principal Component Analysis&lt;/em&gt;. Imagine a 3D scatter plot filled with dots representing your data points. The goal of PCA is to find the best axis (or direction) that captures the most variance in that data. You can think of it as spinning the scatter plot around to identify this axis, and then &lt;em&gt;squishing&lt;/em&gt; everything down to a 2D line along that axis. In practice, this means you’re transforming high-dimensional data (like a 65,000-dimensional space for scRNA-seq data) into a lower-dimensional space while retaining as much information as possible. It’s an eigenvector-filled way to simplify your data and visualize complex relationships.&lt;/p&gt;
&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-r&quot; data-lang=&quot;r&quot;&gt;&lt;span class=&quot;n&quot;&gt;BiocManager&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;install&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;BiocSingular&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# For the fixedPCA function.&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;BiocManager&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;install&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;scater&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;c1&quot;&gt;# For the plotReducedDim function.&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;library&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;BiocSingular&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;library&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scater&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sce&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fixedPCA&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sce&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;assay.type&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;logcounts&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;plotReducedDim&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sce&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dimred&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;PCA&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;n&quot;&gt;colour_by&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;figure&gt;
	&lt;img src=&quot;https://tiredlizard.github.io//a-typical-blog/assets/img/PCA_plot.png&quot; alt=&quot;&quot; /&gt; 
	&lt;figcaption&gt;Figure 3. - How exciting! Blobs!&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;This is quite an abrupt cut-off, but I’m already running far too long and my creativity is also long gone. If you want to know more, like, comment, and subscr - no, that’s the wrong platform.&lt;/p&gt;

&lt;p&gt;To be continued… maybe, if I’m bored enough.&lt;/p&gt;

&lt;h2 id=&quot;and-youve-finally-made-it-through-thank-heavens&quot;&gt;And you’ve finally made it through, thank heavens.&lt;/h2&gt;

&lt;p&gt;Congratulations! You’re probably feeling pretty dang hydrated, if you followed my instructions at the beginning. I know the topic isn’t one a lot of you data science people will be using in the future, but I hope it was at least more interesting than watching paint dry on a snail.&lt;/p&gt;

&lt;p&gt;To summarize: in this exceedingly long post, I forcibly took you on a whirlwind tour through &lt;em&gt;Single-Cell Experiment&lt;/em&gt; (SCE) objects in R, exploring their structure, how they store complex biological data, and ways to wrangle that data into something manageable. We covered normalization techniques to make the data usable, identified highly variable genes to focus our analysis, and briefly dunked our toes into &lt;em&gt;Principal Component Analysis&lt;/em&gt; (PCA) to visualize it all. Hopefully, this introduction gave you a basic understanding of SCE objects and how they can be used to make sense of cellular gene expression data.&lt;/p&gt;

&lt;p&gt;If you are morbidly curious about SCEs and their applications, this &lt;a href=&quot;https://bioconductor.org/books/3.17/OSCA.intro/index.html&quot;&gt;link&lt;/a&gt; will take you to a much better guide to scRNA-seq data analysis. If you have any questions, feel free to ask, though I unfortunately am young and inexperienced and thus have many gaps in my knowledge.&lt;/p&gt;

&lt;p&gt;Now, you have my permission to depart and never return to this post. Ciao!&lt;/p&gt;

&lt;h4 id=&quot;links&quot;&gt;Links…&lt;/h4&gt;
&lt;p&gt;&lt;small&gt;…to avoid being copyrighted, sent to prison for ten years, and then returning to find my college education is obsolete and I have $200,000 in student loans to pay back but then instead of doing that I just jump off a bridge but then I survive and have to pay the medical bills as well and so I end up homeless and penniless under that same bridge in a cruel twist of fate and resort to talking about SCE objects as my busking method which somehow leads to me giving any money I have to the poor souls who walk by me and then I perish&lt;/small&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://bioconductor.org/books/3.17/OSCA.intro/the-singlecellexperiment-class.html&quot;&gt;Figure 1&lt;/a&gt;
&lt;a href=&quot;https://www.researchgate.net/figure/A-simple-visualization-of-Principal-Component-Analysis-PCA-To-describe-the-position-of_fig3_372888730&quot;&gt;Figure 2&lt;/a&gt;&lt;/p&gt;

</description><description>&lt;p class=&quot;intro&quot;&gt;&lt;span class=&quot;dropcap&quot;&gt;S&lt;/span&gt;o, you woke up this morning and wondered &quot;what in the heck is an SCE object?&quot;. Just kidding, no one does that. That&apos;s why I&apos;m here to tell you about something you&apos;ve never even heard about. My fellow students, don&apos;t be too alarmed by the &apos;11 Minute Read&apos;; you can skim it in, like, two minutes. (I&apos;m very sorry.) &lt;/p&gt;

</description><pubDate>Wed, 02 Oct 2024 00:00:00 +0000</pubDate>
        <link>https://tiredlizard.github.io/blog/SCE/</link>
        <guid isPermaLink="true">https://tiredlizard.github.io/blog/SCE/</guid></item><item>
        <title>How to create a blog post</title>
        <description>&lt;p class=&quot;intro&quot;&gt;&lt;span class=&quot;dropcap&quot;&gt;T&lt;/span&gt;his post will describe how to create a blog post with the proper naming conventions, as well as tips for including images and links.  At the end there is a troubleshooting guide that can help with the most common problems .&lt;/p&gt;

&lt;h3 id=&quot;steps-for-creating-a-new-post&quot;&gt;Steps for creating a new post.&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Create a new file in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_posts&lt;/code&gt; folder called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;YYYY-MM-DD-post-name.md&lt;/code&gt;, where YYYY is the year (2024), MM numeric month (01-12), and DD is the numeric day of the month (01-31).  The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;post-name&lt;/code&gt; is a short name for the new post with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-&lt;/code&gt; between words.  &lt;strong&gt;You must use this name convention for all new posts.&lt;/strong&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Make the YML heading.  All pages in the site need to start with a YML heading.  For posts you should use the following header:
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;---
layout: post
title:  &quot;Post Name&quot;
description: Short yet informative description
image: /assets/img/blog-image.jpg
---
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;em&gt;For this theme, the layout should stay as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;post&lt;/code&gt;.   All the other fields should be updated with the information for your particular blog post.&lt;/em&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;If you add an image to the header information, the top banner picture will change for this post.  You can also add an optional field &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;display_image: true&lt;/code&gt; if you want to display a larger image just below the header image.  If this happens, the banner image will return to the default.
    &lt;ul&gt;
      &lt;li&gt;The blog image should be a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.jpg&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.png&lt;/code&gt; file that can be found in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;assets/img&lt;/code&gt;.  Don’t make it too large or the page will take longer to load (500-800 KB is a good size).  Leave the file path as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/assets/ing/&lt;/code&gt; in the header area.*&lt;/li&gt;
      &lt;li&gt;Adding a post image will also display the image in the “next” or “previous” post location.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Write the body of the blog using markdown.  There are a lot of references for markdown available.  I like the &lt;a href=&quot;https://www.markdownguide.org&quot;&gt;Markdown Guide&lt;/a&gt; because many of the examples show both the markdown and the html code.  There are separate pages for &lt;a href=&quot;https://www.markdownguide.org/basic-syntax/&quot;&gt;basic syntax&lt;/a&gt;, &lt;a href=&quot;https://www.markdownguide.org/extended-syntax/&quot;&gt;extended syntax&lt;/a&gt;, and a &lt;a href=&quot;https://www.markdownguide.org/cheat-sheet/&quot;&gt;cheatsheet&lt;/a&gt; for quick reference.&lt;/li&gt;
&lt;/ol&gt;

&lt;hr /&gt;
&lt;hr /&gt;

&lt;h3 id=&quot;links&quot;&gt;Links&lt;/h3&gt;

&lt;p&gt;To create a link (internal or external), enclose the link text in brackets (e.g., [Statistics Department]) and then follow it immediately with the URL in parentheses (e.g., (https://statistics.byu.edu)).&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;My favorite department at BYU is the [Statistics Department](https://statistics.byu.edu).
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;My favorite department at BYU is the &lt;a href=&quot;https://statistics.byu.edu&quot;&gt;Statistics Department&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want external links to open in a separate window, you will need to use html code with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;target=&quot;_blank&quot;&lt;/code&gt; inside the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt; tag.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;My favorite department at BYU is the &amp;lt;a href=&quot;https:statistics.byu.edu&quot; target=&quot;_blank&quot;&amp;gt;Statistics Department&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;My favorite department at BYU is the &lt;a href=&quot;https:statistics.byu.edu&quot; target=&quot;_blank&quot;&gt;Statistics Department&lt;/a&gt;&lt;/p&gt;

&lt;hr /&gt;
&lt;hr /&gt;

&lt;h3 id=&quot;internal-links-and-files&quot;&gt;Internal Links and Files&lt;/h3&gt;

&lt;p&gt;If you want to have a link that points to another location on your site or if you want to include a file (such as an image or video) you must use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;site.url&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;site.baseurl&lt;/code&gt; variables when making the link reference.  For example, this link to pointing to the &lt;a href=&quot;https://tiredlizard.github.io//a-typical-blog/about&quot;&gt;About&lt;/a&gt; page is coded as:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[About]({{site.url}}/{{site.baseurl}}/about)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Paths to files should also be referenced with the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;site.url&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;site.baseurl&lt;/code&gt; variables (see the section on &lt;strong&gt;Adding Images&lt;/strong&gt;).&lt;/p&gt;

&lt;hr /&gt;
&lt;hr /&gt;

&lt;h3 id=&quot;adding-images&quot;&gt;Adding Images&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;In the examples below, if your image ends with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.png&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.JPEG&lt;/code&gt;, use the appropriate extension instead of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.jpg&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Images for the blog will generally but put into the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;assets/img&lt;/code&gt; folder.  (You can also create a subfolder for images, but you will need to include the subfolder name in the reference link.)&lt;/p&gt;

&lt;p&gt;Markdown syntax for including images is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;![Fig Name](path/to/image)&lt;/code&gt;.  For example:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;![Figure]({{site.url}}/{{site.baseurl}}/assets/img/image_name.jpg)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;img src=&quot;https://tiredlizard.github.io//a-typical-blog/assets/img/image5.jpg&quot; alt=&quot;Figure&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;
&lt;hr /&gt;

&lt;h3 id=&quot;resizing-images&quot;&gt;Resizing images&lt;/h3&gt;

&lt;p&gt;The image I added in the previous section seems a bit large for this post.  Unfortunately,
there isn’t a good way to resize images with markdown, so if you need to resize an image, use html instead of markdown and specify the width in the style parameter as follows:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;img src=&quot;{{site.url}}/{{site.baseurl}}/assets/img/image_name.jpg&quot; alt=&quot;&quot; style=&quot;width:300px;&quot;/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;(Example with width set to 300 pixels)
&lt;img src=&quot;https://tiredlizard.github.io//a-typical-blog/assets/img/image5.jpg&quot; alt=&quot;&quot; style=&quot;width:300px;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;(Example with width set to 100 pixels)
&lt;img src=&quot;https://tiredlizard.github.io//a-typical-blog/assets/img/image5.jpg&quot; alt=&quot;&quot; style=&quot;width:100px;&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h3 id=&quot;troubleshooting&quot;&gt;Troubleshooting&lt;/h3&gt;

&lt;p&gt;Here are some things to keep in mind if your blog appearance isn’t going as you planned:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem:  The blog post that I created isn’t appearing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Possible Solutions:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Check your date. GitHub pages won’t display blog posts with future dates&lt;/li&gt;
  &lt;li&gt;Check the name of the post file.  It must be in the form “YYYY-MM-DD-title.md”.  Make sure that you included the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.md&lt;/code&gt; extension&lt;/li&gt;
  &lt;li&gt;Check the yaml header.  If there are any special characters in any of the fields, you need to use quotes around the entire field entry.  The most common culprit is the description.  If you’re having trouble, try putting quotes around the entire description&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Problem:  I know that I made changes to a blog post but the changes aren’t appearing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Possible Solution:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Check the header.  If there are any special characters in any of the fields, you need to use quotes around the entire field entry.  The most common culprit is the description.  If you’re having trouble, try putting quotes around the entire description.&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;Problem:  My entire blog has weird formatting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Possible Solution:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Usually this is an address problem.  Double check your url and baseurl in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config&lt;/code&gt; file&lt;/li&gt;
&lt;/ul&gt;
</description><description>&lt;p class=&quot;intro&quot;&gt;&lt;span class=&quot;dropcap&quot;&gt;T&lt;/span&gt;his post will describe how to create a blog post with the proper naming conventions, as well as tips for including images and links.  At the end there is a troubleshooting guide that can help with the most common problems .&lt;/p&gt;

</description><pubDate>Mon, 05 Feb 2024 00:00:00 +0000</pubDate>
        <link>https://tiredlizard.github.io/blog/create-post/</link>
        <guid isPermaLink="true">https://tiredlizard.github.io/blog/create-post/</guid></item><item>
        <title>Example Post Formatting</title>
        <description>&lt;p class=&quot;intro&quot;&gt;&lt;span class=&quot;dropcap&quot;&gt;C&lt;/span&gt;urabitur blandit tempus porttitor. Nullam quis risus eget urna mollis ornare vel eu leo. Vestibulum id ligula porta felis euismod semper. Donec sed odio dui. Aenean lacinia bibendum nulla sed consectetur.&lt;/p&gt;

&lt;h1 id=&quot;heading-1&quot;&gt;Heading 1&lt;/h1&gt;

&lt;h2 id=&quot;heading-2&quot;&gt;Heading 2&lt;/h2&gt;

&lt;h3 id=&quot;heading-3&quot;&gt;Heading 3&lt;/h3&gt;

&lt;h4 id=&quot;heading-4&quot;&gt;Heading 4&lt;/h4&gt;

&lt;h5 id=&quot;heading-5&quot;&gt;Heading 5&lt;/h5&gt;

&lt;h6 id=&quot;heading-6&quot;&gt;Heading 6&lt;/h6&gt;

&lt;blockquote&gt;Aenean lacinia bibendum nulla sed consectetur. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet fermentum. Nulla vitae elit libero, a pharetra augue. Curabitur blandit tempus porttitor. Donec sed odio dui. Cras mattis consectetur purus sit amet fermentum.&lt;/blockquote&gt;

&lt;p&gt;Nullam quis risus eget urna mollis ornare vel eu leo. Cras mattis consectetur purus sit amet fermentum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.&lt;/p&gt;

&lt;h2 id=&quot;unordered-list&quot;&gt;Unordered List&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;List Item&lt;/li&gt;
  &lt;li&gt;Longer List Item
    &lt;ul&gt;
      &lt;li&gt;Nested List Item&lt;/li&gt;
      &lt;li&gt;Nested Item&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;List Item&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;ordered-list&quot;&gt;Ordered List&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;List Item&lt;/li&gt;
  &lt;li&gt;Longer List Item
    &lt;ol&gt;
      &lt;li&gt;Nested OL Item&lt;/li&gt;
      &lt;li&gt;Another Nested Item&lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
  &lt;li&gt;List Item&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;definition-list&quot;&gt;Definition List&lt;/h2&gt;
&lt;dl&gt;
  &lt;dt&gt;Coffee&lt;/dt&gt;
  &lt;dd&gt;Black hot drink&lt;/dd&gt;
  &lt;dt&gt;Milk&lt;/dt&gt;
  &lt;dd&gt;White cold drink&lt;/dd&gt;
&lt;/dl&gt;

&lt;p&gt;Donec id elit non mi porta gravida at eget metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas faucibus mollis interdum. Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam.&lt;/p&gt;

&lt;h2 id=&quot;table&quot;&gt;Table&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Syntax&lt;/th&gt;
      &lt;th&gt;Description&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Header&lt;/td&gt;
      &lt;td&gt;Title&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Paragraph&lt;/td&gt;
      &lt;td&gt;Text&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Header&lt;/td&gt;
      &lt;td&gt;Title&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Paragraph&lt;/td&gt;
      &lt;td&gt;Text&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;code-snippet&quot;&gt;Code Snippet&lt;/h2&gt;
&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Hi&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;print_hi&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&apos;Tom&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#=&amp;gt; prints &apos;Hi, Tom&apos;.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
&lt;h2 id=&quot;figure-with-caption&quot;&gt;Figure with Caption&lt;/h2&gt;

&lt;figure&gt;
	&lt;img src=&quot;https://tiredlizard.github.io//a-typical-blog/assets/img/touring.jpg&quot; alt=&quot;&quot; /&gt; 
	&lt;figcaption&gt;Figure 1. - This is an example figcaption&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-html&quot; data-lang=&quot;html&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;figure&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;nt&quot;&gt;&amp;lt;img&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;{{site.url}}/{{site.baseurl}}/assets/img/touring.jpg&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;alt=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;nt&quot;&gt;&amp;lt;figcaption&amp;gt;&lt;/span&gt;Figure 1. - This is an example figcaption&lt;span class=&quot;nt&quot;&gt;&amp;lt;/figcaption&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/figure&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
</description><description>&lt;p class=&quot;intro&quot;&gt;&lt;span class=&quot;dropcap&quot;&gt;C&lt;/span&gt;urabitur blandit tempus porttitor. Nullam quis risus eget urna mollis ornare vel eu leo. Vestibulum id ligula porta felis euismod semper. Donec sed odio dui. Aenean lacinia bibendum nulla sed consectetur.&lt;/p&gt;

</description><pubDate>Mon, 15 Dec 2014 00:00:00 +0000</pubDate>
        <link>https://tiredlizard.github.io/blog/example-post-formatting/</link>
        <guid isPermaLink="true">https://tiredlizard.github.io/blog/example-post-formatting/</guid></item></channel>
</rss>
