<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tincy Thomas on Medium]]></title>
        <description><![CDATA[Stories by Tincy Thomas on Medium]]></description>
        <link>https://medium.com/@tincythomas?source=rss-9ba225612cba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qAX44BKWNKZHepPAqBhiBQ.jpeg</url>
            <title>Stories by Tincy Thomas on Medium</title>
            <link>https://medium.com/@tincythomas?source=rss-9ba225612cba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 13:38:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tincythomas/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Untold Journey ✨]]></title>
            <link>https://tincythomas.medium.com/untold-journey-8c7e8c9fb36e?source=rss-9ba225612cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c7e8c9fb36e</guid>
            <category><![CDATA[journey]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[jesus]]></category>
            <category><![CDATA[layoffs]]></category>
            <category><![CDATA[jobs]]></category>
            <dc:creator><![CDATA[Tincy Thomas]]></dc:creator>
            <pubDate>Fri, 19 Jul 2024 15:36:40 GMT</pubDate>
            <atom:updated>2024-08-01T02:59:17.613Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KILayx2oXGxGoV7C" /><figcaption>Photo by <a href="https://unsplash.com/@alisaanton?utm_source=medium&amp;utm_medium=referral">Alisa Anton</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>It was a Friday, started out normally, my manager was on vacation. I was to complete the tasks before Friday finishes. Suddenly, I was asked are you free around 2pm by an exec. I told yes and a meeting was fixed. Meanwhile something was bothering me, why meeting at this time? I asked may I know the agenda of the meeting, however got no response. I thought I’ll take lunch after the meeting, as something was not feeling right. I kept wondering what it could be for and what not. Clock ticked 2. Both of execs came, one said I saw your message but I wanted to tell this in-person. Hearing that my sixth sense whispered, something is surely fishy. The next moment I was told there is a bad news, as per company restructuring decision, we are cutting your role. That hit me so hard, I went numb, I wasn&#39;t sure of what expression should I put on my face. Total blank situation. They told, we are sorry, it’s not you, this is on us, and we can discuss severance etc. I tried saying it’s not payment, I can even work for less. But they said, sorry we cant employ like that, it’ll be against policies. All I wanted was to stay, as it was my best learning experience and growing platform. Unfortunately, LAID OFF!</p><p>The call was disconnected, but I stood there stuck. Then I saw slack, gmail, everything automatically signing out. My logins were getting deactivated. It was all in the matter of seconds. I wanted to download my lessons learnt document, however it was tied with my work email. My lessons learnt included things like what I learned after completing one project or if I was stuck somewhere, it contained steps of how I resolved, etc. My bad, it was the sad silent demise of all things personal attached with work email. My go-to laptop had just turned empty.</p><p>I tried connecting with my colleagues, who were shocked saying we saw you in the morning call. When did this happen?! Some consoled me with words, some tried connecting me with their friends, some brought references. I was worried, how will I tell this to my family where I was the sole earner. I was all anxious and no way I could control my tears. Few days passed with crying and weeping.</p><p>Although, this news shattered the hopes of my parents but they were the strongest. I had gained control somewhere, I understood this won’t fix, if I do nothing. I started applying rigorously, I tried building resumes and drafting cover letters. Could not ignore Chat-GPT. Took LinkedIn premium, sent connection requests until my weekly limit gets exceeded. I messaged people who were working where I was applying, expecting to get a referral. Many were positive, many just ignored even after seeing. At times I lost every inch of hope. It was the darkest of moments with no clue whether I’m on the right track. I was smiling outside however burning inside. I had few friends. I was afraid to reveal I was laid off. This brought me much closer to God. All I had was him, Jesus.</p><p>I applied to as many jobs as I could, got interview calls, cleared rounds, some recruiters ghosted with next steps, some said sorry we are moving forward with another candidate who has more experience in this. I actively applied through LinkedIn and Indeed. It was frustrating when there were no openings I could apply next. I was tired. When I wasn’t applying I worked on learning new technologies and revising what I used to do with different approach. Other side I was scared seeing the number of applicants who were applying for a post, LinkedIn analytics tells that. Those times, I put my laptop on sleep and go before the God. Plugging into either divine prayers or messages. I cried my inside out making no voice. I crafted prayers, I spent time in Jesus, 3 AM prayers. My only hope. My parents guided me to be sure of his blessing. I took every saints, Mother Mary, Joseph — patron saint of workers all in my shrine with Jesus and Supreme God. I started manifesting I got a new better job, prayers became my comfort when hope seemed diminishing.</p><p>Slowly, my discipline and energy paid off! After, what it felt like eternity of interviews and applications, I got my conditional offer by the grace of God on my birthday week. I was surprised, it sounded very dear to me. I wanted to share but at the same moment I wanted to protect my good news from the eyes of everyone. It was the gift of power, gift of finding comfort in Jesus.</p><p>Looking back, that layoff was a pivotal chapter. It tested me, reshaped my priorities, and deepened my faith. Today, as I embrace new beginning, I carry with me the lessons of resilience and the power of faith, knowing that every challenge can lead to unexpected blessings. However the journey is hard.</p><p>All these days of uncertainity,<br>Psalm 90:17, reminded me the importance of seeking Lord’s Favour.<br>Proverbs 3:5, my trust.<br>Romans 8:28, my comfort.<br>Mathew 7:7, was the only assuring promise I had.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c7e8c9fb36e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Turning people work with you.]]></title>
            <link>https://tincythomas.medium.com/turning-people-work-with-you-9ae340f34481?source=rss-9ba225612cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ae340f34481</guid>
            <category><![CDATA[team-collaboration]]></category>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[team-building]]></category>
            <category><![CDATA[team]]></category>
            <category><![CDATA[project-management]]></category>
            <dc:creator><![CDATA[Tincy Thomas]]></dc:creator>
            <pubDate>Wed, 19 Jun 2024 20:11:45 GMT</pubDate>
            <atom:updated>2024-06-21T18:39:43.810Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lcmskEAnRcpUgZ0v" /><figcaption>Photo by <a href="https://unsplash.com/@mrafonso1976?utm_source=medium&amp;utm_medium=referral">Margarida Afonso</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I was asked a question, how would you deal with the people who might not be cooperative while working however it is from them your input comes?!</p><p>I believe everyone have faced this situation once in while, handling difficult people. There could be several reasons, such as they may fear losing their job or they might be a kind person who finds it hard to open up to an unknown.. Or if it requires them to change the way they work, sooner or later, and thus you’ll feel resistance.</p><p>So, if someone is “blocking” your progress and you’re unable to persuade them to change directly, you need strategy.</p><p>But how do you do that?</p><p>Well, I have found something! It’s called Stakeholder Mapping.</p><p>Let’s get into it.</p><p>To identify the most important people who have a bearing on the success of your project and get them working for you rather than against you.</p><p><strong>Step 1 — Add the most important stakeholders to your map</strong></p><p>Discuss each stakeholder in turn and determine their location on the Stakeholder Map by rating their relative disposition towards your project and the degree to which they are actively involved.</p><p><strong>Step 2 — Add relationships between the stakeholders</strong></p><p>Draw lines between the stakeholders where there is an influential relationship between the two parties, where one influences the other (politically and/or emotionally).</p><p><strong>Step 3 — Identify whom to move up on the map and create a plan</strong></p><p>You want the most influential stakeholders of project on top and move them up to the top. So if they’re not, you must find a way to get them there.</p><p>To shift dispositions toward a more favorable situation, you might exploit the relationship between a strong supporter of your project and someone else who remains skeptical.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FhlrxpUQeNFbHXPH8uX3Lg.png" /><figcaption>This example illustrates some typical stakeholder disposition towards some change initiative.</figcaption></figure><p>Description of Stakeholders:</p><ol><li><strong>Senior Management</strong>: Supportive and highly involved; critical for resource allocation and strategic direction.</li><li><strong>Production Manager</strong>: Supportive and highly involved; oversees operational aspects directly impacted by the project.</li><li><strong>Team Leaders</strong>: Supportive and moderately involved; influence their teams and facilitate implementation.</li><li><strong>Suppliers</strong>: Supportive and moderately involved; critical for timely delivery of materials or services.</li><li><strong>Floor Operators</strong>: Neutral and minimally involved; impacted by changes but not actively engaged.</li><li><strong>External Consultants</strong>: Neutral disposition; hired for specific expertise but not emotionally invested.</li><li><strong>Regulatory Body</strong>: Opposed disposition; compliance issues may pose challenges to project implementation.</li><li><strong>Finance Department</strong>: Neutral disposition; concerned with budgetary implications but not opposed.</li></ol><p>Relationship:</p><ul><li><strong>Senior Management</strong> has a strong positive influence on <strong>Production Manager</strong> and <strong>Team Leaders</strong>.</li><li><strong>Finance Department</strong> has a neutral influence on the project, interacting with both supportive and neutral stakeholders.</li><li><strong>Regulatory Body</strong> poses a potential challenge due to opposition, influencing decision-making and compliance efforts.</li><li><strong>Suppliers</strong> play a supportive role with moderate influence, ensuring smooth logistics and production support.</li></ul><p>Strategy:</p><ul><li><strong>Engage Neutral Stakeholders</strong>: Develop plans to increase involvement and understanding, highlight how their expertise is crucial for the successful implementation of project.</li><li><strong>Build Trust and Rapport:</strong> Scheduling one-on-ones to understand their perspectives and concerns. Actively listening and assuring them that the new system is aimed to enhance their roles rather than eliminate them.</li><li><strong>Involve Them in the Process:</strong> Invite them in project planning and decision-making process. By doing so, they will feel more valued and were able to see firsthand how their input shaped the project’s direction.</li><li><strong>Feedback Loops:</strong> Establishing regular check-ins to ensure everyone are up to date with project’s progress and could voice any ongoing concerns.</li><li><strong>Address Regulatory Challenges</strong>: Work closely with legal and compliance teams to foresee and mitigate risks.</li><li><strong>Leverage Supportive Stakeholders</strong>: Utilize their influence to sway neutral or skeptical parties towards support.</li><li><strong>Provide Training and Upskilling Opportunities:</strong> Collaborate with the HR department to plan programs that would help in acquiring new skills relevant to the new system. This demonstrate our commitment to their professional growth and future roles within the company.</li></ul><p>Ideally, you would want everyone in the top, actively involved and championing the project! Here this example really shows a broad landscape of diverging dispositions, representing the dynamics and relationships within an example change initiative, guiding strategies for effective stakeholder management and project success.</p><p>Adjustments are important as relationships and project dynamics evolve over time over project.</p><h3>Summing up</h3><p>Stakeholder mapping illustrates dispositions — so that one can determine what action one should take to shift unfavorable dispositions more positively.</p><p>Be aware, though, that the data in your stakeholder map represents your perceptions about other people — and people may not necessarily agree with you!</p><p>So remember to keep every sensitive information confidential.</p><p>Happy Deh!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ae340f34481" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deciphering Imbalance: Unraveling the Factors Behind Handling Imbalanced Datasets]]></title>
            <link>https://medium.com/bitstrapped/deciphering-imbalance-unraveling-the-factors-behind-handling-imbalanced-datasets-d71c29417c3c?source=rss-9ba225612cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/d71c29417c3c</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[smote]]></category>
            <category><![CDATA[imbalanced-data]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Tincy Thomas]]></dc:creator>
            <pubDate>Mon, 12 Feb 2024 18:02:25 GMT</pubDate>
            <atom:updated>2024-02-12T18:02:25.593Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*54vgfAzokqmHmDI_95b06A.jpeg" /></figure><p>In the world of data science, navigating through imbalanced datasets is akin to walking a tightrope suspended between two disparate worlds. The intuition behind addressing class imbalances lies in the delicate balance between preserving the integrity of the dataset and ensuring the model’s ability to learn effectively from minority classes. As data enthusiasts, our journey begins with understanding the nuances of imbalanced data and discerning the key considerations that underpin our approach.</p><p>Imbalanced datasets present a formidable challenge, where the prevalence of one class overshadows the others, skewing the learning process and compromising the model’s predictive capabilities. Picture a scenario where fraudulent transactions lurk within a sea of legitimate ones, or rare diseases hide within the vast expanse of normal cases. In such imbalanced landscapes, traditional machine learning algorithms often falter, gravitating towards the majority class and neglecting the minority, leading to biased and inaccurate outcomes.</p><p>The crux of the matter lies in how we reconcile this imbalance, ensuring fairness and accuracy in our predictive models. One key consideration revolves around the choice between oversampling, undersampling, or a delicate dance between the two. Oversampling techniques such as SMOTE (Synthetic Minority Over-sampling Technique) breathe life into minority classes by synthesizing new instances, enriching the dataset and mitigating class imbalance. Conversely, undersampling methods surgically prune the majority class, curating a more balanced dataset while retaining essential information.</p><p>As we embark on this expedition, armed with intuition and fortified by knowledge, we must navigate the way towards imbalanced data with precision and foresight. Here’s a brief intuition behind choosing each approach and how to implement them in Python:</p><ol><li>Oversampling:</li></ol><ul><li>Intuition: Oversampling involves increasing the number of instances in the minority class to balance the class distribution. This helps the model learn from the minority class more effectively by providing it with more examples to train on.</li><li>Python Implementation (using imbalanced-learn library):</li></ul><pre>from imblearn.over_sampling import SMOTE  # Apply SMOTE oversampling <br>smote = SMOTE() <br>X_resampled, y_resampled = smote.fit_resample(X, y)</pre><p>2. Undersampling:</p><ul><li>Intuition: Undersampling involves reducing the number of instances in the majority class to balance the class distribution. This helps prevent the model from being biased towards the majority class and forces it to learn from the minority class more effectively.</li><li>Python Implementation (using imbalanced-learn library):</li></ul><pre>from imblearn.under_sampling import RandomUnderSampler  # Apply random undersampling <br>undersample = RandomUnderSampler() <br>X_resampled, y_resampled = undersample.fit_resample(X, y)</pre><p>3. Combination of Oversampling and Undersampling:</p><ul><li>Intuition: Combining oversampling and undersampling techniques aims to take advantage of the strengths of both approaches. It can help alleviate class imbalance issues while minimizing the potential drawbacks of each individual method.</li><li>Python Implementation (using imbalanced-learn library):</li></ul><pre>from imblearn.combine import SMOTEENN  # Apply SMOTEENN (combination of SMOTE oversampling and ENN undersampling) <br>smote_enn = SMOTEENN() <br>X_resampled, y_resampled = smote_enn.fit_resample(X, y)</pre><p>When choosing between oversampling, undersampling, or a combination of both, be mindful of potential pitfalls such as overfitting, loss of information, and introduction of noise when applying these techniques. Additionally, considering factors such as the size of your dataset, the class distribution, the characteristics of your minority and majority classes, and the computational resources available is the utmost important thing.</p><p>Size of Your Dataset:</p><ul><li>If your dataset is relatively small, you may want to avoid aggressive undersampling techniques that discard a significant portion of your data, as it can lead to loss of valuable information.</li><li>Similarly, if your dataset is large, oversampling techniques might be more computationally feasible compared to undersampling, which can significantly reduce the dataset size.</li></ul><p>2. Class Distribution:</p><ul><li>Understanding the class distribution is crucial. If the class imbalance is severe, you may need to employ more aggressive techniques like oversampling or a combination of oversampling and undersampling.</li><li>If the class imbalance is not too severe, you might be able to address it effectively with moderate undersampling or selective oversampling.</li></ul><p>3. Characteristics of Minority and Majority Classes:</p><ul><li>Consider the characteristics of both the minority and majority classes. For instance, if the minority class contains noisy or irrelevant samples, undersampling might help in cleaning up the dataset.</li><li>If the minority class has important features or patterns that are not well represented, oversampling techniques can help amplify these characteristics and improve model performance.</li></ul><p>4. Computational Resources:</p><ul><li>Oversampling techniques like SMOTE can significantly increase the size of your dataset, which might require more memory and computational power during model training and inference.</li><li>Undersampling techniques reduce the dataset size, potentially reducing computational requirements, but they may also discard important information, especially if the majority class is informative.</li></ul><p>5. Performance Evaluation:</p><ul><li>It’s crucial to evaluate the performance of your model using appropriate metrics before and after applying sampling techniques. This helps ensure that the chosen method effectively addresses the class imbalance without sacrificing overall model performance or introducing bias.</li><li>Cross-validation techniques can help in robustly evaluating model performance across different subsets of your data.</li></ul><p>In summary, experimentation and thorough evaluation using appropriate performance metrics are key to selecting the most suitable technique for your specific problem. However, our journey does not end with the choice of technique alone.</p><p>Attaching helpful documentation to consider:</p><ul><li><a href="https://imbalanced-learn.org/stable/references/over_sampling.html">Over-sampling methods - Version 0.12.0</a></li><li><a href="https://imbalanced-learn.org/stable/references/combine.html">Combination of over- and under-sampling methods - Version 0.12.0</a></li><li><a href="https://imbalanced-learn.org/stable/references/under_sampling.html">Under-sampling methods - Version 0.12.0</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d71c29417c3c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bitstrapped/deciphering-imbalance-unraveling-the-factors-behind-handling-imbalanced-datasets-d71c29417c3c">Deciphering Imbalance: Unraveling the Factors Behind Handling Imbalanced Datasets</a> was originally published in <a href="https://medium.com/bitstrapped">Bitstrapped</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[mean_absolute_error() or mean_squared_error() or explained_variance_score()]]></title>
            <link>https://medium.com/bitstrapped/mean-absolute-error-or-mean-squared-error-or-explained-variance-score-f2872b1800ba?source=rss-9ba225612cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2872b1800ba</guid>
            <category><![CDATA[machine-learning-ai]]></category>
            <category><![CDATA[functional-programming]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[fundamentals]]></category>
            <dc:creator><![CDATA[Tincy Thomas]]></dc:creator>
            <pubDate>Fri, 08 Sep 2023 20:45:18 GMT</pubDate>
            <atom:updated>2023-09-08T20:45:18.582Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5YKwVUhFkGwyqUDV5FZ0Vw.png" /></figure><h4>👉 Mean Absolute Error</h4><p>The mean_absolute_error function computes mean absolute error, a risk metric corresponding to the expected value of the absolute error loss. If <em>ŷi</em> is the predicted value of the <em>i</em>th sample, and <em>yi</em> is the corresponding true value, then the mean absolute error (MAE) estimated over <em>n</em> samples is defined as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zORLui0HFRgAQ8tl.png" /></figure><p>or, <em>sklearn.metrics.mean_absolute_error(y_true, y_pred, sample_weight=None, multioutput=’uniform_average’)</em></p><p>Implementing is as simple as,</p><pre>&gt;&gt;&gt; from sklearn.metrics import mean_absolute_error<br><br>&gt;&gt;&gt; y_true = [3, -0.5, 2, 7]<br><br>&gt;&gt;&gt; y_pred = [2.5, 0.0, 2, 8]<br><br>&gt;&gt;&gt; mean_absolute_error(y_true, y_pred)<br>0.5</pre><h4>👉 Mean Squared Error</h4><p>The mean squared error is given by the following formula:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/147/0*XP_4ls8GWY_srCaS.png" /></figure><p>The preceding formula is similar to the formula that we saw for the mean absolute error, except that instead of computing the absolute difference between the true and predicted output values, we compute the square of the difference.</p><p>That is, <em>sklearn.metrics.mean_squared_error(y_true, y_pred, sample_weight=None, multioutput=’uniform_average’, squared=True)</em></p><p>We use the mean_squared_error() from the metrics module. In order to implement the MSE in scikit-learn, we use the following code:</p><pre>&gt;&gt;&gt; from sklearn.metrics import mean_squared_error<br><br>&gt;&gt;&gt; y_true = [3, -0.5, 2, 7]<br><br>&gt;&gt;&gt; y_pred = [2.5, 0.0, 2, 8]<br><br>&gt;&gt;&gt; mean_squared_error(y_true, y_pred)<br>0.375</pre><h4>👉 Explained Variance Score</h4><p>In machine learning, variance is the difference between the actual samples of the dataset and the predictions made by the model. When working on a regression-based machine learning problem, it is very useful to know how much of the variance is explained by the machine learning model.</p><p>That is, <em>sklearn.metrics.explained_variance_score(y_true, y_pred, *, sample_weight=None, multioutput=’uniform_average’, force_finite=True)</em></p><p>The explained variance score explains the dispersion of errors of a given dataset, and the formula is written as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EqG8hMkitTPwZ6Mn.png" /></figure><p>Here, <em>Var(y, ŷ)</em> and <em>Var(y)</em> is the variance of prediction errors and actual values respectively. Scores close to 1.0 are highly desired, indicating better squares of standard deviations of errors.</p><p>Obtain the explained variance score of our predictions using the explained_variance_score function of the sklearn.metrics module with the following code:</p><pre>&gt;&gt;&gt; from sklearn.metrics import explained_variance_score<br><br>&gt;&gt;&gt; y_true = [3, -0.5, 2, 7]<br><br>&gt;&gt;&gt; y_pred = [2.5, 0.0, 2, 8]<br><br>&gt;&gt;&gt; explained_variance_score(y_true, y_pred)<br>0.957...</pre><p>Do let me know through comments what else should be added ;)</p><p>Happy Learning !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2872b1800ba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bitstrapped/mean-absolute-error-or-mean-squared-error-or-explained-variance-score-f2872b1800ba">mean_absolute_error() or mean_squared_error() or explained_variance_score()</a> was originally published in <a href="https://medium.com/bitstrapped">Bitstrapped</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pub/Sub to BigQuery Streaming with Dataflow]]></title>
            <link>https://medium.com/bitstrapped/pub-sub-to-bigquery-streaming-with-dataflow-b71e5381ec6a?source=rss-9ba225612cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/b71e5381ec6a</guid>
            <category><![CDATA[google]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[google-analytics]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Tincy Thomas]]></dc:creator>
            <pubDate>Mon, 28 Aug 2023 21:06:42 GMT</pubDate>
            <atom:updated>2023-08-28T21:06:42.702Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4CXTv9g9Heo5RcQRUbI19A.jpeg" /><figcaption>Pic credits: <a href="https://wall.alphacoders.com/big.php?i=542764">https://wall.alphacoders.com/big.php?i=542764</a></figcaption></figure><p>First things first we are using Dataflow’s built-in template to copy dataflow pub/sub to BQ table. Here the Pub/Sub topic will serve as the Source, BigQuery will be the output and in between we have the Dataflow pipeline to connect with.</p><p>On the backend side we are dealing with : <br> - generating messages in Pub/Sub<br> - dataflow pipeline reads and process this message<br> - output will be reached to BigQuery table</p><p>We’ll be using cloud shell for faster working, so let’s activate it first</p><pre>$ gcloud auth list</pre><p>Create Cloud Storage Bucket</p><pre>$ gsutil mb gs://learningdemo</pre><p>Create topic in Pub/Sub</p><pre>$ gcloud pubsub topics create learnpubsub</pre><p>Create dataset and table in BigQuery</p><pre>$ bq mk learndataset</pre><pre>$ bq mk learndataset.mytable name:STRING,price:integer</pre><p>To run Dataflow pipeline job, goto console then choose Dataflow to create a job from template and here we click on Pub/Sub topic to BQ. Fill on the required parameters with topic name, table name and bucket name.</p><p>Now, as we are manually publishing messages, we could go to select publish message with an example as follows,</p><pre>{<br>  &quot;name&quot; : &quot;Jamieson B12&quot;<br>  &quot;price&quot; : 5<br>}</pre><p>After submitting as per above, one will push this input to the BigQuery side as could be seen from the output below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XZXk5WQlVgZstYh6R0FUaw.png" /></figure><p>Thus, if all this was for learning don’t forget to stop and delete Dataflow job and pub/sub.</p><p>Happy Learning !</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b71e5381ec6a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bitstrapped/pub-sub-to-bigquery-streaming-with-dataflow-b71e5381ec6a">Pub/Sub to BigQuery Streaming with Dataflow</a> was originally published in <a href="https://medium.com/bitstrapped">Bitstrapped</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Native Derived Tables with LookML | Looker | Google Cloud]]></title>
            <link>https://medium.com/bitstrapped/using-native-derived-tables-with-lookml-looker-google-cloud-c66c3786cfc5?source=rss-9ba225612cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/c66c3786cfc5</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[google-analytics]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[looker]]></category>
            <dc:creator><![CDATA[Tincy Thomas]]></dc:creator>
            <pubDate>Wed, 02 Aug 2023 16:26:05 GMT</pubDate>
            <atom:updated>2023-08-02T16:26:05.990Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M2EqmjeJq1VxoOxxdC1pkQ.jpeg" /><figcaption><a href="https://wall.alphacoders.com/big.php?i=1316620">https://wall.alphacoders.com/big.php?i=1316620</a></figcaption></figure><p>Native derived tables are derived tables that perform the same function as a written SQL query, but are expressed natively in the LookML language.</p><p>Native derived tables are great because they embody the core LookML principle of <em>reusability</em>. They allow you to inherit already existing dimensions, measures and even Explores and join logic. This makes your model much more maintainable in the long run, since you’re minimizing the number of “hard-coded” database references.</p><h3>Create a native derived table</h3><ol><li>Click the toggle button to enter <strong>Development mode </strong>on Looker user interface.</li><li>On the <strong>Looker navigation menu</strong>, click <strong>Explore</strong>.</li><li>Use column: product category enhanced ecommerce , column: total product revenue, column: transaction id</li><li>Click <strong>Run</strong>.</li><li>Click on the settings gear icon next to <strong>Run</strong> (top right of page), and select <strong>Get LookML</strong>.</li><li>Tab over to <strong>Derived Table,</strong> click on the LookML code in the box, and copy it to your clipboard.</li><li>Navigate to the Looker IDE (<strong>Develop &gt; your project name</strong>), click on the plus (<strong>+</strong>) icon next to File Browser, and choose <strong>Create View</strong>.</li><li>Name the new view revenue and click <strong>Create</strong>.</li><li>Click <strong>revenue.view</strong> and drag it under the <strong>views</strong> folder.</li><li><strong>Erase all the sample auto-generated code</strong>, and paste in the copied code from the Explore. Don’t forget to fix the auto-generated view name to revenue.</li></ol><h3>Add a product rank derived column</h3><p>So now you have the foundation for your native derived table. The next task is to rank the products, this can be achieved in most SQL dialects through what is called a ROW_NUMBER() function.</p><p>To accomplish this, you’ll need to add a <strong>derived_column</strong> to your native derived tables’ <strong>explore_source</strong>. In a native derived table, you can use derived_column to specify a column that <em>does not yet exist</em> in the Explore specified by the <strong>explore_source</strong> parameter. For this example, you will call it product_rank.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zF5Uxugew_OnscpQXDa20A.png" /></figure><p>Whenever you make a derived column, you also need to add a dimension for it. It is the same as when you have a column in your regular database table; the column needs to be represented in LookML as a dimension.</p><p>Have you noticed the auto-generated dimensions don’t have a sql parameter?</p><p>That is because, when you don’t specify the sql for a dimension, Looker assumes it should point to a column in the underlying data with exactly the same name as the dimension. That can be a useful shortcut for other areas of your project if you’d like, although generally it is a better practice to be explicit whenever possible. In this case, you should at least specify the type. If you don’t, Looker defaults to string, which you do not want here.</p><p>So far so good! But what if your business users want to see the product names displayed like “1) Example Product”, and not just “Example Product” alone. How would this be accomplished? In this case, you could create a dimension that concatenates two other dimension values. As follows —</p><pre>view: revenue {<br>  derived_table: {<br>    explore_source: history {<br>      column: product_category__enhanced_ecommerce_ {}<br>      column: total_product_revenue {}<br>      column: transaction_id {}<br>      derived_column: product_rank {<br>        sql: row_number() over (order by total_product_revenue desc) ;;<br>      }<br>    }<br>    datagroup_trigger: purchase_default_datagroup<br>  }<br><br>  dimension: product_rank {<br>    type: number<br>  }<br><br>  dimension: product_rank_concat {<br>    label: &quot;Product Name&quot;<br>    type: string<br>    sql: ${product_rank} || &#39;) &#39; || ${product_category__enhanced_ecommerce_} ;;<br>  }<br><br>  dimension: product_rank_top_5 {<br>    hidden: yes<br>    type: yesno<br>    sql: ${product_rank} &lt;= 5 ;;<br>  }<br><br>  dimension: product_rank_grouped {<br>    label: &quot;Product Name Grouped&quot;<br>    type: string<br>    sql: case when ${product_rank_top_5} then ${product_rank_concat} else &#39;6) Other&#39; end ;;<br>  }<br><br>  dimension: product_category__enhanced_ecommerce_ {<br>    description: &quot;&quot;<br>  }<br><br>  dimension: total_product_revenue {<br>    description: &quot;&quot;<br>    value_format: &quot;$#,##0.00&quot;<br>    type: number<br>  }<br><br>  dimension: transaction_id {<br>    description: &quot;&quot;<br>  }<br>}</pre><ol><li>Click save your changes for the above native derived table view</li><li>Navigate back to the Explore page for <strong>History</strong> (my table name for the dataset I’m using).</li><li>Under the <strong>Revenue</strong> (my derived table name) view, select the <strong>Product Name Grouped</strong> dimension.</li><li>Under the <strong>History</strong> view, select the <strong>Total Product Revenue</strong> measure.</li><li>Click <strong>Run</strong>.</li><li>Make sure the <strong>Product Name Grouped</strong> column is ordered from first to last, then under the Visualization tab, click <strong>Pie Chart</strong>.</li><li>Verify your visualization resembles the following:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ffAdTFSiYs3FBtyLYPrcCw.png" /></figure><p>Lastly, yes, here’s dropping the <a href="https://www.kaggle.com/datasets/farjanakabirsamanta/analytics-case-studyecommerce">link</a> for the dataset I have been using so far.</p><p>Happy Learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c66c3786cfc5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bitstrapped/using-native-derived-tables-with-lookml-looker-google-cloud-c66c3786cfc5">Using Native Derived Tables with LookML | Looker | Google Cloud</a> was originally published in <a href="https://medium.com/bitstrapped">Bitstrapped</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Custom Visualization through HTML | Looker | Google Cloud]]></title>
            <link>https://medium.com/bitstrapped/custom-visualization-through-html-looker-google-cloud-fa3663146103?source=rss-9ba225612cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa3663146103</guid>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[looker]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[html]]></category>
            <dc:creator><![CDATA[Tincy Thomas]]></dc:creator>
            <pubDate>Mon, 24 Jul 2023 02:48:15 GMT</pubDate>
            <atom:updated>2023-07-24T03:14:12.686Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c6VbDKdkbmSR1PZ7HjTbnw.png" /><figcaption>Picture Credit: <a href="https://wall.alphacoders.com/big.php?i=1322626">https://wall.alphacoders.com/big.php?i=1322626</a></figcaption></figure><p>Yes, it is possible to manipulate certain elements of table visualizations, such as font color or size or be the background color and much more. Looker utilizes <strong>HTML tags</strong> and <strong>Liquid variables</strong>, to build a dimension or measure with the style of your choice. No greater knowledge of HTML is required. Moreover, to use both the HTML and <strong>Link parameters</strong> at the same time, use linked_value in the HTML parameter instead of just value.</p><h3>What is Liquid?</h3><p>Liquid formatting is an open source Ruby-based template language built by Shopify (Liquid Documentation).</p><p>Main point is Looker utilizes Liquid to reference values from measures and dimensions within the html parameter.</p><p>For example, this dimension will display names with green background:</p><pre>dimension: name {<br>type: string<br>sql: ${TABLE}.name ;;<br>html: &lt;p style=&quot;color: black; background-color: green; font-size:100%; text-align:center&quot;&gt;{{ rendered_value }}&lt;/p&gt;;;<br>}</pre><p>This can be helpful for highlighting specific values and the tiles. There is also an option for conditional formatting on the <strong>Formatting</strong> tab for table visualizations. To apply conditional formatting in your visualization, turn on the <strong>Enable Conditional Formatting</strong> feature to view the options. You can specify the color code for your visualization in the <strong>Rule</strong> section. If you have more than one rule, the rules higher on the list have precedence over rules lower on the list. In the <strong>Format</strong> box, choose whether to colour-code values along a scale or based on a logical condition (as shown on the Enable Conditional Formatting documentation page).</p><p>On the other hand, what if someone wants to use images of product items on the Looker side, it’s easy using the html tags along side providing the correct URL and it will fetch through the name id mentioned on it, as the example added below for instance:</p><pre>dimension: item_img {<br>  sql: ${item_id} ;;<br>  html: &lt;img src=&quot;https://www.amazon.com/product_images/{{ value }}.jpg&quot; /&gt; ;;<br>}</pre><p>Another use case could be if one wants to insert a Google search link itself on the Looker side so that, while making the visualization, an explorer could easily go for a google search and find what is it, like:</p><pre>dimension: product {<br>    sql: ${TABLE}.product_line ;;<br>    link: {<br>      label: &quot;Google&quot;<br>      url: &quot;https://www.google.com/search?q={{ value }}&quot;<br>      icon_url: &quot;https://google.com/favicon.ico&quot;<br>    }<br>  }</pre><p>Aren’t you curious to see how the output will show? Here it goes,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-wdIrVC36oUKUYPRYFc8_g.png" /></figure><p>Isn’t it simple enough to understand, yes it definitely is!</p><p>Last but not the least from HTML &amp; Looker combination, one more example could be of how one could embed icons on the display side</p><pre>dimension: gender {<br>    type: string<br>    sql: ${TABLE}.Gender ;;<br>  }<br>  dimension: he_or_she {<br>    label: &quot;he/she&quot;<br>    sql: ${TABLE}.gender ;;<br>    html: {% if value == &#39;Female&#39; %}<br>         &lt;p&gt;&lt;img src=&quot;https://www.freeiconspng.com/uploads/female-icon-27.png&quot; height=20 width=20&gt;{{ rendered_value }}&lt;/p&gt;<br>      {% elsif value == &#39;Male&#39; %}<br>        &lt;p&gt;&lt;img src=&quot;https://www.freeiconspng.com/uploads/male-icon-14.png&quot; height=20 width=20&gt;{{ rendered_value }}&lt;/p&gt;<br>      {% endif %}<br>;;<br>  }</pre><p>which could result into something like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uVw2DI65QvLlLz0OCJSsjg.png" /></figure><p>seems interesting right and the small insight here we got — sales or the purchasing power is more for women than the men ;)</p><p>At Bitstrapped, we believe analyzing and understanding complex data sets through the use of visual representations is valuable. And, identifying patterns, trends, and relationships within data is essential. Moreover to gain valuable insights to inform decision-making and strategy development is all a necessary cyclic process.</p><p>Happy Learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa3663146103" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bitstrapped/custom-visualization-through-html-looker-google-cloud-fa3663146103">Custom Visualization through HTML | Looker | Google Cloud</a> was originally published in <a href="https://medium.com/bitstrapped">Bitstrapped</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why do we derive and persist table | Looker | Google Cloud]]></title>
            <link>https://medium.com/bitstrapped/why-do-we-derive-and-persist-table-looker-google-cloud-da0f0cc59749?source=rss-9ba225612cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/da0f0cc59749</guid>
            <category><![CDATA[looker]]></category>
            <category><![CDATA[google-analytics]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[google-cloud]]></category>
            <dc:creator><![CDATA[Tincy Thomas]]></dc:creator>
            <pubDate>Wed, 19 Jul 2023 19:36:08 GMT</pubDate>
            <atom:updated>2023-07-19T19:48:06.121Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*puPndUsR_Gi086cgRtb72Q.jpeg" /><figcaption>Picture source credit: <a href="https://wall.alphacoders.com/big.php?i=549522">https://wall.alphacoders.com/big.php?i=549522</a></figcaption></figure><h3>The caching process 💡</h3><p>Looker acts like a front door attendant for a database. When a user runs a query, Looker determines whether the exact same query has been run before. If not, it allows the query to run on the database. When the results are returned, Looker caches them for future reference.</p><p>If the same query <em>has</em> been run before, Looker checks the caching policy to determine whether the results are still valid. If yes, Looker returns the cached results to the business user. This happens in less than a second.</p><p>If the same query has been run before but the results are no longer valid per the caching policy, Looker sends the query to the database. It then caches the new results for future reference.</p><h3>Datagroups</h3><p>LookML developers use datagroups to manage caching on a Looker instance. Different caching policies require separate datagroup definitions. The number and types of datagroups you need to create depends on your data’s extraction, transformation, and loading (ETL) processes and business requirements.</p><p>For example, you may need to define datagroups at the model level, for individual Explores, or for persistent derived tables (PDTs), depending on how often your data is updated.</p><ul><li>To apply a datagroup as the default for all Explores, use the persist_with parameter at the model level.</li><li>To apply a datagroup to a specific Explore, use the persist_with parameter in that Explore’s definition.</li><li>To apply a datagroup to a specific set of Explores but not all Explores in a model, use the persist_with parameter in each Explore’s definition and specify the same datagroup name.</li></ul><h3>Objects that can use datagroups</h3><p>persist_with— If you apply a datagroup at the model level, Looker, by default, will apply the same caching rules to all Explores within this model.</p><p>However, you can apply a datagroup <em>on an individual Explore</em>, which overrides any setting at the model level. Because Explores are the foundation for all content, the same caching logic applies to Looks and dashboards in the Explore.</p><p>datagroup_trigger— For PDTs, you can apply a datagroup to specify how the PDT is rebuilt.</p><h3>Datagroup configuration</h3><p>Datagroups take two parameters: max_cache_age and sql_trigger.</p><p>max_cache_age specifies the number of hours to keep a cached result, such as 24 hours.</p><p>sql_trigger is used to write a <strong>SELECT</strong> statement that can tell Looker whether the results have changed. The sql_trigger should be written to return only one value. Looker will regularly send this statement to the connected database. If the result has changed, Looker refreshes the cache.</p><p>Although only one parameter is required, it is best to use both to achieve the desired caching results. For example, if the sql_trigger check doesn&#39;t detect a change, that could mean something went wrong with the ETL process or the sql_trigger itself. If you include a max_cache_age parameter, the cache will be refreshed after a set duration regardless of the result of the sql_trigger check.</p><p>Define and apply datagroups to individual Explores in a LookML model. Specifically, you update caching for all views in the History Explore to refresh whenever a new transaction_id is added, because the transaction_id is the primary key for product purchases.</p><p>A derived table in Looker is a query whose results are used as if it were an actual table in the database.</p><p>However, persistence is when data survives after its creation process has terminated.</p><p>A persistent derived table (PDT) is a derived table that is written into a scratch schema on your database and regenerated on the schedule that you specify with a persistence strategy.</p><p>A PDT can be either a native derived table or a SQL-based derived table.</p><p>When to use PDTs — a temporary table will be built every time a query is ran. However a PDT will be build by persisting or triggering, which exists as cache. PDTs should be a part of ETL when they are consistently being used and the logic is well understood or rarely changes.</p><p>“When doing something quick and small, or if you’re doing something sensitive to frequent ETL. Or if one doesn’t mind the computation cost and computing it again, then don’t persist” — Maxie Corbin, Looker Data Analyst.</p><p>Providing an example giving sneak peek into PDT, you might have a database table called history that has many columns.</p><pre># Define the database connection to be used for this model.<br>connection: &quot;purchase&quot;<br># include all the views<br>include: &quot;/views/**/*.view.lkml&quot;<br># Datagroups define a caching policy for an Explore. To learn more,<br># use the Quick Help panel on the right to see documentation.<br>datagroup: purchase_default_datagroup {<br>  sql_trigger: SELECT MAX(transaction_id) FROM revenue;;<br>  max_cache_age: &quot;1 hour&quot;<br>}<br>persist_with: purchase_default_datagroup<br>explore: history {<br>  join: revenue {<br>    relationship: one_to_one<br>    sql_on: ${history.transaction_id}=${revenue.transaction_id} ;;<br>    type: left_outer<br>  }<br>}<br>explore: revenue {}</pre><p>You want to compute some customer-level aggregate metrics, such as rank by product and revenue. Here, I’m using a native derived table not the SQL derived table, you could use either to create a new view named revenue that could include these metrics.</p><ul><li>For a native derived table, you define the derived table with a LookML-based query.</li><li>For a SQL-based derived table, you define the derived table with a SQL query.</li></ul><pre>view: revenue {<br>  derived_table: {<br>    explore_source: history {<br>      column: product_category__enhanced_ecommerce_ {}<br>      column: total_product_revenue {}<br>      column: transaction_id {}<br>      derived_column: product_rank {<br>        sql: row_number() over (order by total_product_revenue desc) ;;<br>      }<br>    }<br>    datagroup_trigger: purchase_default_datagroup<br>  }<br>  dimension: product_rank {<br>    type: number<br>  }<br>  dimension: product_rank_concat {<br>    label: &quot;Product Name&quot;<br>    type: string<br>    sql: ${product_rank} || &#39;) &#39; || ${product_category__enhanced_ecommerce_} ;;<br>  }<br>  dimension: product_rank_top_5 {<br>    hidden: yes<br>    type: yesno<br>    sql: ${product_rank} &lt;= 5 ;;<br>  }<br>  dimension: product_rank_grouped {<br>    label: &quot;Product Name Grouped&quot;<br>    type: string<br>    sql: case when ${product_rank_top_5} then ${product_rank_concat} else &#39;6) Other&#39; end ;;<br>  }<br>  dimension: product_category__enhanced_ecommerce_ {<br>    description: &quot;&quot;<br>  }<br>  dimension: total_product_revenue {<br>    description: &quot;&quot;<br>    value_format: &quot;$#,##0.00&quot;<br>    type: number<br>  }<br>  dimension: transaction_id {<br>    description: &quot;&quot;<br>  }<br>}</pre><p>Don’t forget to toggle on Enable PDTs on the connection page while setting up PDT.</p><p>And, thus we got our schema generated on the temporary dataset, looker_scratch we had created for PDTs on Big Query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1IbPUY9rED25yEkF0rHe1Q.png" /></figure><p>Seems to be little fast-track, right? Yes, I’m covering just the essentials layer needed to start out and here’s the <a href="https://www.kaggle.com/datasets/farjanakabirsamanta/analytics-case-studyecommerce">Link</a> to dataset I have been using thus far ;)</p><p>Happy Learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da0f0cc59749" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bitstrapped/why-do-we-derive-and-persist-table-looker-google-cloud-da0f0cc59749">Why do we derive and persist table | Looker | Google Cloud</a> was originally published in <a href="https://medium.com/bitstrapped">Bitstrapped</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL runner query to Dashboard | Looker | Visualization]]></title>
            <link>https://medium.com/total-brainstorming/sql-runner-query-to-dashboard-looker-visualization-888f8f978956?source=rss-9ba225612cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/888f8f978956</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[looker]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[looker-training]]></category>
            <dc:creator><![CDATA[Tincy Thomas]]></dc:creator>
            <pubDate>Sat, 08 Jul 2023 18:33:03 GMT</pubDate>
            <atom:updated>2023-07-08T18:33:03.292Z</atom:updated>
            <content:encoded><![CDATA[<h3>SQL runner query to Dashboard | Looker</h3><p>If you are on Google’s Looker and are you stuck on how to work on SQL, don’t worry you are at right place.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0T3Bq8hOhrwwI2yxDLhKtg.jpeg" /></figure><p>SQL Runner provides a great way to directly access your database and leverage that access in a variety of ways. Using SQL Runner, you can easily navigate the tables in your schema, use an ad hoc Explore from a SQL query, run prewritten descriptive queries on your data, see your SQL Runner history, download results, share queries, add to a LookML Project as a derived table, perform other useful tasks and thus create beautiful visuals out of it.</p><h3>Adding a SQL Runner query to a LookML project</h3><p>SQL Runner is a great place to test SQL to use as a derived table in your LookML project. You can test it in SQL Runner, and then add it to your LookML project.</p><p>Once you have created a SQL query in SQL Runner, you can create a derived table from the query by using the <strong>Add to Project</strong> option or the <strong>Get Derived Table LookML</strong> option. Both of these options allow you to take a query in SQL Runner and add them to your LookML project. See the following sections for more information.</p><h3>Add to Project</h3><p>Using the <strong>Add to Project</strong> option is the easiest way to add a SQL Runner query to your project. The <strong>Add to Project</strong> option lets you select a LookML project, and then Looker automatically creates a view file with the query in your selected project. Select the project you want to add this derived table to.</p><p>Let the steps be clear here:</p><ol><li>Enter a view name for the derived table.</li><li>Click <strong>Add</strong> to add the query as a derived table in your project. Looker will switch to Development Mode if not already in it, create a new view file with the LookML from the SQL Runner query, and then open the file browser to see the newly added view file.</li><li>Move the file to suit your project’s file organization have the view files.</li><li>Validate the LookML and deploy your changes to production.</li></ol><p>*If you would prefer instead to manually create the view file and add the query’s LookML yourself, you can use the <strong>Get Derived Table LookML</strong> option.</p><h3>Get Derived Table LookML</h3><p>Another way to create a derived table from your SQL Runner query is to use the <strong>Get Derived Table LookML</strong> option from the SQL Runner gear menu. Just like with the <strong>Add to Project</strong> option, Looker will provide the LookML needed to make your SQL query into a derived table. From there, you can copy the LookML to paste into your project yourself, which is useful if you want to replace an existing derived table.</p><h3>Explore</h3><p>explore adds an existing view to Looker&#39;s menu of Explores as described on the LookML terms and concepts documentation page. As a best practice, an Explore should be defined inside of a model file.</p><p>Explores are typically named after an existing view. However, if you want to have multiple Explores based on the same view, you can add a from parameter to the Explore. In that case, the Explore can be given any valid name, which includes only lowercase letters (a-z), digits (0-9), and underscores. Just be careful as the explore needs to reference an existing view name. In Looker, your users can see Explores listed in the <strong>Explore</strong> menu. Explores are listed below the names of the models they belong to.</p><p>It’s possible to use explore by itself, without additional parameters. In practice, you typically see explore used with additional options. For example, it&#39;s very common to join additional views into an Explore.</p><h3>View</h3><p>A view declaration defines a list of fields (dimensions or measures) and their linkage to an underlying table or derived table. In LookML a view typically references an underlying database table, but it can also represent a derived table.</p><p>A view may join to other views. The relationship between views is typically defined as part of an Explore declaration in a model file.</p><blockquote>Not all views are Explores, because not all views describe an entity of interest.</blockquote><h3>Create a Look report using the modelled query</h3><p>In this task, you will build a Look report using the modelled query.</p><ol><li>Open a new Looker window in a new tab.</li><li>On the left side navigation menu of the Looker User Interface, click <strong>Explore</strong>.</li><li>In the <strong>Data</strong> pane, click on the settings icon on column name.</li><li>Expand <strong>Visualization</strong> pane and choose a chart.</li><li>Click on the settings icon in the <strong>Visualization</strong> pane to play around with.</li><li>Click on settings icon next to Run (top right of page), and select <strong>Save as a Look</strong>.</li><li>Enter a title for the Look report. Chose the <strong>Shared</strong> folder to save the report.</li><li>Click <strong>Save</strong>.</li><li>Open a new Looker window in a new tab. Click <strong>Shared folders</strong>.</li><li>Click the Look report and review the data and visualization</li></ol><p>Cheers, you made it thus far!</p><p>And, we made it to a look which could now be saved to a new dashboard or an existing one.</p><p>Happy Learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=888f8f978956" width="1" height="1" alt=""><hr><p><a href="https://medium.com/total-brainstorming/sql-runner-query-to-dashboard-looker-visualization-888f8f978956">SQL runner query to Dashboard | Looker | Visualization</a> was originally published in <a href="https://medium.com/total-brainstorming">Total Brainstorming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unleashing the power of React Components.]]></title>
            <link>https://tincythomas.medium.com/unleashing-the-power-of-react-components-3a7d332badcc?source=rss-9ba225612cba------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a7d332badcc</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[user-interface]]></category>
            <category><![CDATA[components]]></category>
            <dc:creator><![CDATA[Tincy Thomas]]></dc:creator>
            <pubDate>Fri, 24 Mar 2023 22:09:54 GMT</pubDate>
            <atom:updated>2023-03-25T01:09:46.804Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mXmtsIxOgIZrHWXZymMX1w.jpeg" /><figcaption><a href="https://free4kwallpapers.com/uploads/originals/2022/04/11/dreaming-hill-wallpaper.jpg">Source</a></figcaption></figure><p>React apps are made out of <em>Components</em>. A function that returns the <em>React Elements</em>. These Elements are objects that get created when we return the <em>JSX</em>. JSX in turn, looks like HTML, a special syntax of React, under the hood returning regular <em>JavaScript Object</em>. Those are turned to Real DOM elements, that people see on the screen, i.e. <em>UI</em>.</p><pre>import React from &quot;react&quot;<br><br>function Page(){<br>    return(<br>        &lt;div&gt;<br>            &lt;ol&gt;<br>                &lt;li&gt;&quot;Testing, 1, 2, 3 - Let&#39;s get started!&quot;&lt;/li&gt;<br>                &lt;li&gt;&quot;Let&#39;s make sure everything works as expected!&quot;&lt;/li&gt;<br>            &lt;/ol&gt;<br>        &lt;/div&gt;<br>    )<br>}<br>ReactDOM.render(&lt;Page/&gt;, document.getElementById(&quot;root&quot;))</pre><p>Point to be noted is to use Pascal Case, where components name need to start with capital letters only. Moreover, put them inside a common parent element, such as a <em>&lt;div&gt;…&lt;/div&gt;</em> or an empty <em>&lt;&gt;…&lt;/&gt;</em> tag. One has to wrap in some parent element as no two sibling element could come side by side. Start with adding header and footer. Let’s get into one of its example:</p><pre>import React from &quot;react&quot;<br>import logo from &quot;./logo.png&quot;<br>function Page(){<br>    return(<br>        &lt;div&gt;<br>            &lt;div&gt;<br>                &lt;img src ={logo}/&gt;<br>            &lt;/div&gt;<br>            &lt;h1&gt;Why Choose React&lt;/h1&gt;<br>            &lt;ol&gt;<br>                &lt;li&gt;Get ready to explore the world of powerful web development.&lt;/li&gt;<br>                &lt;li&gt;Unlock the potential of creating dynamic user interfaces with React.&lt;/li&gt;<br>            &lt;/ol&gt;<br>            &lt;footer&gt;<br>                &lt;small&gt;©Thomas Development&lt;/small&gt;<br>            &lt;/footer&gt;<br>        &lt;/div&gt;<br>    )<br>}<br>ReactDOM.render(&lt;Page/&gt;, document.getElementById(&quot;root&quot;))</pre><p>Now, rather than taking all markup in one component, let’s do parent/child components.</p><pre>import React from &quot;react&quot;<br>import ReactDOM from &quot;react-dom&quot;<br>import logo from &quot;./logo.png&quot;<br>function Header(){<br>    return(<br>        &lt;header&gt;<br>            &lt;div&gt;<br>                &lt;img src ={logo}/&gt;<br>            &lt;/div&gt;<br>        &lt;/header&gt;<br>    )<br>}<br><br>function Page(){<br>    return(<br>        &lt;div&gt;<br>            &lt;Header/&gt;<br>            &lt;h1&gt;Why Choose React&lt;/h1&gt;<br>            &lt;ol&gt;<br>                &lt;li&gt;Get ready to explore the world of powerful web development.&lt;/li&gt;<br>                &lt;li&gt;Unlock the potential of creating dynamic user interfaces with React.&lt;/li&gt;<br>            &lt;/ol&gt;<br>            &lt;footer&gt;<br>                &lt;small&gt;©Thomas Development&lt;/small&gt;<br>            &lt;/footer&gt;<br>        &lt;/div&gt;<br>    )<br>}<br>ReactDOM.render(&lt;Page/&gt;, document.getElementById(&quot;root&quot;))</pre><p>Things are getting clear now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*wgx_1TX4Is4_MZgIjB2dgw.png" /><figcaption>The output of the React code is a web page that is displaying a heading at the top that reads “Why Choose React” and a list beneath it that states the potential of using it.</figcaption></figure><p>Next, organizing these components is an important step in creating React applications. Components should also be organized into separate files, allowing developers to quickly and easily find and update components.</p><pre>// App.js FILE<br><br>import React from &quot;react&quot;<br>import ReactDOM from &quot;react-dom&quot;<br>import Header from &quot;./Header&quot;<br>import MainContent from &quot;./MainContent&quot;<br>import Footer from &quot;./Footer&quot;<br>function Page(){<br>    return(<br>        &lt;div&gt;<br>            &lt;Header/&gt;<br>            &lt;MainContent/&gt;<br>            &lt;Footer/&gt;<br>        &lt;/div&gt;<br>    )<br>}<br>ReactDOM.render(&lt;Page/&gt;, document.getElementById(&quot;root&quot;))</pre><pre>// Header.js FILE<br><br>import React from &quot;react&quot;<br>import logo from &quot;./logo.png&quot;<br>export default function Header(){<br>    return(<br>        &lt;div&gt;<br>            &lt;div&gt;<br>                &lt;img src ={logo}/&gt;<br>            &lt;/div&gt;<br>        &lt;/div&gt;<br>    )<br>}</pre><pre>// MainContent.js FILE<br><br>import React from &quot;react&quot;<br>export default function MainContent(){<br>    return(<br>        &lt;div&gt;<br>            &lt;ol&gt;<br>                &lt;li&gt;Get ready to explore the world of powerful web development.&lt;/li&gt;<br>                &lt;li&gt;Unlock the potential of creating dynamic user interfaces with React.&lt;/li&gt;<br>            &lt;/ol&gt;<br>        &lt;/div&gt;<br>    )<br>}</pre><pre>// Footer.js FILE<br><br>import React from &quot;react&quot;<br>export default function Footer(){<br>    return(<br>        &lt;div&gt;<br>            &lt;footer&gt;<br>                &lt;small&gt;©Thomas Development&lt;/small&gt;<br>            &lt;/footer&gt;<br>        &lt;/div&gt;<br>    )<br>}</pre><p>Now, one could easily wonder why “root”?</p><p>It is when browser gets response from server and starts rendering, it goes to the root file. In most cases <em>/index.html</em> and renders the same first. Inside this html in body tag a <em>&lt;div&gt;</em> element is written whose id is “root” like <em>&lt;div id=”root”&gt;&lt;/div&gt;</em>. Then control goes to our App.js File. Inside this App.js File, a component is used called <em>&lt;Page/&gt;</em>, is the first most component rendered on the screen. And, every other component is defined in this component. Thus,<em> document.getElementById(“root”)</em> renders the /index.html that is the root file. This is how all components are rendered and finally the React App starts working!</p><p>In conclusion, React Components are an essential tool for creating powerful and user-friendly web applications. Components allow for encapsulation of code, making it easier to debug and maintain applications. They are designed to be self-contained, meaning they can be reused in different applications with minimal changes. Components can be used to create reusable and shareable libraries, allowing developers to create their own custom components and share them with other developers. Moreover, can be used to create custom visualizations, such as charts and tables, powerful animations and transitions, allowing developers to quickly and easily create interactive user interfaces and engaging experiences for users.</p><p>To add on, for styling our those pages I would prefer to go with tailwindcss, which I would love to cover on somewhere future posts.</p><p>Till then bidding adieu. Until then, take care and stay safe!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a7d332badcc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>