<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Grace O</title>
    <description>The latest articles on Forem by Grace O (@dee_grayce).</description>
    <link>https://forem.com/dee_grayce</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1709983%2Fd9d536dc-1532-44c8-9eb5-aaaef2afecc4.png</url>
      <title>Forem: Grace O</title>
      <link>https://forem.com/dee_grayce</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/dee_grayce"/>
    <language>en</language>
    <item>
      <title>The 5-Day Battle to Install Redash</title>
      <dc:creator>Grace O</dc:creator>
      <pubDate>Tue, 11 Mar 2025 08:43:08 +0000</pubDate>
      <link>https://forem.com/dee_grayce/the-5-day-battle-to-install-redash-32ml</link>
      <guid>https://forem.com/dee_grayce/the-5-day-battle-to-install-redash-32ml</guid>
      <description>&lt;p&gt;Installing Redash was supposed to be straightforward. Spoiler alert: it wasn’t. What I thought would be a smooth process turned into a five-day marathon of uninstalling and reinstalling Docker, Redash, and pgAdmin4, five times! It was exhausting, frustrating, and at some points, I considered giving up. But through trial, error, and a lot of troubleshooting, I finally cracked the code. Here’s how it went down.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Day 1: The Internal Error That Started It All&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The first issue I encountered was an ominous “Internal Error.” I dug into my &lt;code&gt;docker-compose.yaml&lt;/code&gt; file, making edits in hopes of a quick fix. I even created a &lt;code&gt;.env&lt;/code&gt; file and added a &lt;code&gt;COOKIE_SECRET&lt;/code&gt; and a &lt;code&gt;SECRET_KEY&lt;/code&gt;, thinking security configurations might be the culprit. Spoiler alert again: they weren’t.&lt;/p&gt;

&lt;p&gt;After more digging, I realized the issue stemmed from my PostgreSQL container. The database was missing expected tables, causing SQL queries to fail and crash the entire process. At this point, I turned to the internet, hoping someone had faced (and solved) this nightmare before.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Day 2: The Red Herring of Database Migrations&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I found a post on Restack where someone had encountered the same issue and resolved it by reinitializing the database. Excited, I ran the suggested command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker-compose run --rm server manage db upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But no luck—the same failure persisted. I then adjusted the network settings in &lt;code&gt;docker-compose.yaml&lt;/code&gt; to ensure all containers were communicating properly. By this point, I had reinstalled Redash at least three times.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Day 3: A Flicker of Hope, Then Another Failure&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;After editing and saving my &lt;code&gt;docker-compose.yaml&lt;/code&gt; file with &lt;code&gt;nano&lt;/code&gt;, I fired up Redash and loaded &lt;code&gt;localhost:5001&lt;/code&gt;. Success! The login page appeared—but something was off. The Redash icon didn’t load, hinting at another problem. I ignored it and eagerly entered my credentials (I already had an existing account). The moment I clicked “Log In,” I was met with a dreaded &lt;strong&gt;FileNotFoundError&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;At this point, I was both relieved (progress!) and frustrated (another error!). I decided to sleep on it and come back with a fresh perspective.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Day 4: The Ultimate Reset&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Determined to start fresh, I uninstalled Redash, pgAdmin4, and even deleted the PostgreSQL directory from my PC. This time, I wanted to ensure every credential and configuration was correct from the ground up. I meticulously installed all dependencies—Yarn, Poetry, Python—before cloning the Redash repository again.&lt;/p&gt;

&lt;p&gt;With cautious optimism, I built the containers once more. This time, I didn’t get an Internal Error. Instead, I faced a &lt;strong&gt;Programming Error&lt;/strong&gt;—a step forward, at least!&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Day 5: The Game Changer&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;After setting up a dedicated PostgreSQL server (&lt;code&gt;redash&lt;/code&gt;) and initializing database migrations, I confirmed that tables were finally installed using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker exec -it redash-postgres-1 psql -U postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;\dt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The tables were there! But Redash still wasn’t connecting. Frustrated yet determined, I took a deeper look at the &lt;code&gt;REDASH_DATABASE_URL&lt;/code&gt; in my &lt;code&gt;docker-compose.yaml&lt;/code&gt; file. That’s when I realized the problem: &lt;strong&gt;Redash was defaulting to the wrong PostgreSQL server.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By default, &lt;code&gt;REDASH_DATABASE_URL&lt;/code&gt; was set to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;postgresql://postgres:password@postgres/postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, my PostgreSQL container was named &lt;code&gt;redash&lt;/code&gt;, not &lt;code&gt;postgres&lt;/code&gt;. Changing this to the actual server name or its IP address was the missing piece. Here’s how I fixed it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;postgresql://postgres:password@127.11.2.1:5432/postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once I made this adjustment, Redash finally connected, and the web interface loaded &lt;strong&gt;perfectly&lt;/strong&gt;. Victory at last!&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Lessons Learned&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Check your database migrations.&lt;/strong&gt; Missing tables will break everything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Be mindful of PostgreSQL container names.&lt;/strong&gt; If your database isn't named &lt;code&gt;postgres&lt;/code&gt;, update the &lt;code&gt;REDASH_DATABASE_URL&lt;/code&gt; accordingly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network configurations matter.&lt;/strong&gt; Ensuring all containers are on the same network can save you hours of debugging.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Persistence is key.&lt;/strong&gt; Debugging is often about patience, trial and error, and methodically eliminating potential causes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After five long days, countless errors, and multiple reinstallations, I finally got Redash up and running. If you’re going through something similar, don’t give up—sometimes, the solution is just one configuration tweak away!&lt;/p&gt;

</description>
      <category>redash</category>
      <category>redis</category>
      <category>ubuntu</category>
      <category>postgres</category>
    </item>
    <item>
      <title>Technical Report: Titanic Passenger List</title>
      <dc:creator>Grace O</dc:creator>
      <pubDate>Mon, 01 Jul 2024 07:48:10 +0000</pubDate>
      <link>https://forem.com/dee_grayce/technical-report-titanic-passenger-list-556h</link>
      <guid>https://forem.com/dee_grayce/technical-report-titanic-passenger-list-556h</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
The Titanic dataset, available on Kaggle, contains detailed information about the passengers aboard the ill-fated RMS Titanic. This dataset is a popular choice for data analysis and machine learning practice due to its rich variety of numerical and categorical variables. The purpose of this review is to conduct an initial exploration of the dataset, identifying key insights and patterns at first glance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Observations&lt;/strong&gt;&lt;br&gt;
Upon examining the Titanic dataset, several initial observations can be made:&lt;/p&gt;

&lt;p&gt;**Survival Rate: **The dataset includes a Survived column, where 0 indicates the passenger did not survive, and 1 indicates survival. A quick count of this column shows that a minority of passengers survived the disaster. Specifically, only about 38% of the passengers survived, highlighting the tragedy's severity.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;# Basic survival rate calculation&lt;br&gt;
survival_rate = df['Survived'].mean()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Passenger Class Distribution:&lt;/strong&gt; The dataset contains a Pclass column indicating the class of travel (1st, 2nd, or 3rd class). A review shows that the majority of passengers were in the 3rd class, followed by 1st and then 2nd class. This distribution suggests a diverse socio-economic background among the passengers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Distribution of passenger classes
class_distribution = df['Pclass'].value_counts()

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*&lt;em&gt;Age Distribution: *&lt;/em&gt; The Age column reveals the age distribution of the passengers. The dataset includes a range of ages from infants to elderly passengers. A histogram of the ages shows a concentration of passengers in their 20s and 30s, with fewer children and older adults. There are also some missing values in the Age column, which could impact further analysis.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Basic age distribution and missing values
age_distribution = df['Age'].describe()
missing_age_values = df['Age'].isnull().sum()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Visualization&lt;/strong&gt;&lt;br&gt;
To support these observations, a simple visualization of the age distribution can be helpful. Below is a histogram depicting the age distribution of the passengers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import matplotlib.pyplot as plt
import seaborn as sns

# Loading the Titanic dataset
df = sns.load_dataset('titanic')

# Histogram of passenger ages
plt.hist(df['Age'].dropna(), bins=30, edgecolor='black')
plt.title('Age Distribution of Titanic Passengers')
plt.xlabel('Age')
plt.ylabel('Frequency')
plt.show()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*&lt;em&gt;The image output will be *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1k82omhqcvxj2h90vp2x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1k82omhqcvxj2h90vp2x.png" alt="Image description" width="562" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
In summary, the Titanic dataset reveals several initial insights:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The survival rate among passengers was low, with only about 38% surviving.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The majority of passengers traveled in the 3rd class, indicating a varied socio-economic passenger base.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The age distribution shows a concentration of passengers in their 20s and 30s, with some missing age data that could be addressed in further analysis.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These observations provide a foundation for more in-depth exploration and analysis. Future steps could include examining the impact of different variables on survival rates, filling missing age values using predictive modeling, and exploring relationships between other variables such as fare, gender, and passenger class.&lt;/p&gt;

&lt;p&gt;For more information about data analysis and internship opportunities, visit the HNG Internship websites at &lt;a href="https://hng.tech/internship"&gt;HNG Internship&lt;/a&gt; and &lt;a href="https://hng.tech/hire"&gt;HNG Hire&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>dataanalysis</category>
      <category>titanic</category>
      <category>python</category>
    </item>
  </channel>
</rss>
