<?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 Ebuka (Gaus Octavio) on Medium]]></title>
        <description><![CDATA[Stories by Ebuka (Gaus Octavio) on Medium]]></description>
        <link>https://medium.com/@ebulamicheal?source=rss-59a29d873320------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Aw41uA-A0df3P6Z0c-lndg.jpeg</url>
            <title>Stories by Ebuka (Gaus Octavio) on Medium</title>
            <link>https://medium.com/@ebulamicheal?source=rss-59a29d873320------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 10:31:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ebulamicheal/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[The Causal Signal: How Optimizing Attention Biases Unlocks Long-Context Intelligence in LLMs]]></title>
            <link>https://levelup.gitconnected.com/the-causal-signal-how-optimizing-attention-biases-unlocks-long-context-intelligence-in-llms-838fc536c28a?source=rss-59a29d873320------2</link>
            <guid isPermaLink="false">https://medium.com/p/838fc536c28a</guid>
            <category><![CDATA[ai-engineering]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[causal-inference]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Ebuka (Gaus Octavio)]]></dc:creator>
            <pubDate>Mon, 09 Nov 2026 16:51:55 GMT</pubDate>
            <atom:updated>2026-11-09T16:51:55.968Z</atom:updated>
            <content:encoded><![CDATA[<p>The prevailing architecture of large language models presents a fundamental paradox: they possess vast parametric knowledge yet lack a coherent mechanism for retrieving specific information from extended contexts. While the transformer architecture allows for the processing of tens of thousands of tokens, the interpretability tools designed to understand this process have largely failed under realistic conditions. Traditional saliency methods, which attempt to quantify the influence of input tokens on an output, operate like a dim, unfocused flashlight in a cavernous room. As the context window expands, the signal-to-noise ratio collapses, rendering these tools useless for practical alignment or debugging. However, a shift in perspective — from static gradient analysis to dynamic, causal optimization — reveals that the model’s decision-making process is not a black box, but a tunable system where the trajectory of attention can be mathematically steered. By reframing input-output attribution as a problem of optimizing attention biases or tracing intermediate decision states, researchers have developed methods that recover causal signals even in the presence of massive, noisy contexts, unlocking capabilities ranging from robust reasoning to automated safety interventions.</p><p>The evolution of attribution techniques reveals a systematic failure of early approaches when applied to the scale of modern generative models. Early methods, such as Integrated Gradients and SHAP, relied on path integrals or perturbation-based approximations to estimate feature importance. While effective for short sequences, these approaches suffered from a critical flaw: they measured sensitivity rather than causality. In the context of a 10,000-token document, the gradient of the loss with respect to an input token is often dominated by noise or irrelevant distractors, a phenomenon known as attention leakage. Empirical stress tests against the Needle-in-a-Haystack (NIAH) benchmark illustrate the severity of this collapse. Baseline methods like TOKENSHAP and AT2, which rely on masking or perturbation, exhibit hit ratios of less than 5% when applied to 10,000-token contexts. In these scenarios, over 90% of the calculated saliency mass incorrectly assigns importance to irrelevant distractors, effectively burying the true signal of the “needle” under a mountain of false positives. This is not merely a technical limitation of a specific algorithm; it is a symptom of the underlying mathematical properties of the transformer. The attention mechanism, when viewed through the lens of static gradients, appears to attend to everything equally in the presence of long-range dependencies, creating a “spotlight leakage” where the light of the model’s reasoning is scattered across the entire context window, making it impossible to isolate the specific tokens that drive a specific output token.</p><p>To overcome this structural fragility, the field has pivoted toward methods that treat attribution as a differentiable optimization problem over the attention mechanism itself. This approach, exemplified by Attention Bias Optimization (ABO), fundamentally changes the diagnostic lens. Instead of passively observing the attention weights produced by the frozen model, ABO introduces a small, learnable bias term to each attention head. The objective function then becomes the maximization of the probability of the target output token, regularized by a sigmoid term to keep the biases bounded. This transforms the attribution task from a measurement problem into a causal intervention problem. By optimizing these biases, the method effectively “tunes” the model’s internal radio frequencies, steering the attention flow toward the tokens that are truly necessary to produce the desired output. The results of this reframing are stark: while traditional methods drop to near-zero accuracy at 10,000 tokens, ABO maintains hit ratios between 15% and 45%, depending on the model architecture. This represents a 10 to 30% improvement in saliency accuracy across diverse tasks, demonstrating that the causal signal was always present but obscured by the unoptimized attention landscape. The mechanism works by soft-reweighting the input representations, allowing the model to “see” the needle more clearly without requiring a full re-architecture of the network. This capability suggests that the model’s internal representation is not inherently chaotic but requires a specific, optimized alignment of its attention biases to retrieve long-range information reliably.</p><p>Complementing this optimization approach is a class of methods that leverage the causal masking inherent to decoder-only architectures to compute attribution through intermediate predictions. Techniques such as Sparse Progressive Inference (SP-PI) and Masked Progressive Inference (MP-PI) exploit the autoregressive nature of transformers, where the prediction at any given step depends only on the tokens preceding it. By generating a sequence of intermediate predictions as the model processes the input, these methods can trace the causal flow of information, identifying which tokens contributed to the final decision at each step. SP-PI achieves this with a single forward pass by using a lower-triangular mask vector to perturb the input, while MP-PI utilizes multiple forward passes to construct a more granular view of the decision path, connecting the process to Kernel SHAP. The efficacy of this approach is evident in classification tasks, where MP-PI has demonstrated up to a 10.3% improvement in AUC compared to the best prior work. By treating the model’s output as a trajectory of decisions rather than a single static point, these methods provide a “snapshot” of the decision path, allowing analysts to see how the model’s confidence evolved as it processed the context. This temporal dimension is crucial for understanding complex reasoning chains, as it reveals whether a model correctly identified a key piece of evidence early in the sequence or relied on a spurious correlation that only became apparent late in the generation process.</p><p>Beyond the mechanics of attribution, these refined causal tools are beginning to unlock concrete, high-stakes capabilities that were previously thought impossible for black-box models. The ability to accurately identify which tokens drive a specific output opens the door to zero-shot detoxification and automated safety interventions. By detecting the specific attention heads or input tokens that steer a model toward harmful outputs, developers can apply targeted perturbations or bias adjustments to neutralize the risk without retraining the entire model. Similarly, in the realm of alignment, these tools enable fine-grained sentiment steering, allowing for the precise modulation of a model’s tone in response to specific triggers within a long document. The implications for robustness are equally profound; by understanding the causal link between input features and reasoning errors, practitioners can rectify hallucinations or logical fallacies in real-time. For instance, if a model fails to answer a question because it ignored a crucial premise buried in the first paragraph of a 50-page document, causal attribution can pinpoint that missing link, enabling the generation of a corrected prompt that forces the model to attend to the relevant section. This moves interpretability from a post-hoc curiosity to a proactive engineering tool, fundamentally changing how we build and deploy reliable AI systems.</p><p>The landscape of causal attribution is further enriched by methods that compute influence through the Jacobian matrix, offering a mathematically grounded alternative to perturbation-based approaches. Jacobian Scopes calculate the token-level causal influence on the logits by analyzing the local linear approximation of the model’s function. This method decomposes the influence into three distinct scopes: Semantic, which measures the impact on the specific output token; Fisher, which assesses the impact on the entire predictive distribution; and Temperature, which captures the model’s uncertainty or effective temperature. Unlike gradient-based methods that can be unstable or noisy, Jacobian Scopes provide a consistent, open-source framework that consistently outperforms random ablation and matches or exceeds established baselines across diverse models, including LLaMA-3.2 and various instruction-following architectures. The empirical evidence shows that Jacobian Scopes achieve significantly higher AOPC (Average Output Perturbation Change) scores, indicating a superior ability to capture the true causal effect of inputs. This approach is particularly valuable for analyzing instruction tuning and translation tasks, where the model must maintain a coherent semantic trajectory. However, this method is not without limitations; as a first-order approximation, it may miss higher-order interactions and complex circuit-level dynamics, suggesting that while it provides a robust “local” causal map, it may not fully capture the non-linear intricacies of deep neural networks.</p><p>Despite the significant strides made by ABO, Progressive Inference, and Jacobian Scopes, the evaluation of these methods remains a contentious and evolving field. The standard for measuring robustness, such as the NIAH stress test, has revealed that even the most sophisticated attribution methods struggle with the sheer scale of modern contexts. While ABO sustains performance up to 10,000 tokens, the degradation in accuracy beyond this threshold suggests that there are fundamental limits to how well we can attribute causality in extremely long contexts. Furthermore, metrics like AOPC, while useful for comparing models, are themselves subject to debate regarding their alignment with human intuition about “importance.” The Jacobian Scopes approach, for instance, highlights a model-specific exception where the IWSLT2017 translation task yields lower scores for certain models, indicating that the linear approximation may not hold uniformly across different domains or model architectures. This necessitates a cautious, checklist-driven approach to interpreting attribution results, where researchers must account for model-specific quirks and the specific task at hand. The field is also moving toward integrating these attribution metrics with robustness frameworks like LENS, which incorporates locality to measure how sensitive a model is to input perturbations, suggesting that the next frontier lies in combining causal attribution with robustness testing to build truly reliable systems.</p><p>Looking forward, the trajectory of input-output inference attribution points toward a deeper integration of causal reasoning into the very fabric of model development and deployment. The current reliance on per-example optimization, as seen in ABO, presents a computational bottleneck that could be alleviated through meta-learning strategies. By training a small auxiliary network to predict the optimal attention biases for a given input, the field could amortize the inference cost, making causal attribution a scalable routine rather than a heavy post-hoc analysis. This would enable real-time interpretability in high-throughput environments, allowing developers to monitor and adjust model behavior on the fly. Furthermore, the distinction between input and output attribution is becoming increasingly blurred as models are used for both generation and classification. Future methods will likely need to account for the bidirectional flow of information, tracing how an input token influences not just the final output but also the intermediate reasoning steps and the model’s latent representations. As models grow larger and contexts become more intricate, the ability to provide mathematically rigorous, long-range causal explanations will be the defining characteristic of trustworthy AI, transforming the black box into a transparent, steerable system where every token’s contribution to the final decision is understood and accountable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=838fc536c28a" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/the-causal-signal-how-optimizing-attention-biases-unlocks-long-context-intelligence-in-llms-838fc536c28a">The Causal Signal: How Optimizing Attention Biases Unlocks Long-Context Intelligence in LLMs</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Mood-Based Playlist Generator with AI: How I Connected Emotions to Music]]></title>
            <link>https://levelup.gitconnected.com/building-a-mood-based-playlist-generator-with-ai-how-i-connected-emotions-to-music-5655a320693f?source=rss-59a29d873320------2</link>
            <guid isPermaLink="false">https://medium.com/p/5655a320693f</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[spotify]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Ebuka (Gaus Octavio)]]></dc:creator>
            <pubDate>Sat, 05 Apr 2025 07:21:33 GMT</pubDate>
            <atom:updated>2025-04-07T14:08:58.094Z</atom:updated>
            <content:encoded><![CDATA[<p>A step-by-step journey of combining FastAPI, OpenAI, and Spotify to create personalized music experiences</p><p>We’ve all been there: trying to find the perfect playlist that matches exactly how we’re feeling. Maybe you’re “feeling nostalgic about rainy summer days” or need “upbeat focus music to power through a deadline.” Traditional playlist searches just don’t capture these nuanced emotional states.</p><p>That’s why I built a Mood-Based Playlist Generator — an API that combines the intelligence of OpenAI’s language models with Spotify’s vast music library to create personalized playlists based on mood descriptions. In this article, I’ll walk you through how I built it, the challenges I faced, and how you can create your own.</p><p>The Vision: Translating Emotions to Music</p><p>The idea was simple but powerful: what if you could describe exactly how you’re feeling, and AI would curate the perfect soundtrack? No more endless scrolling through generic playlists or spending hours creating your own.</p><p>My application bridges three key components:<br>1. Your emotional state: Described in natural language<br>2. **AI understanding: Translating those emotions into musical attributes<br>3. Music discovery: Finding and compiling songs that match those attributes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fIbCAJDLkPOxqojIjRjNOQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LpPIM8rdMekG8L85nQ00ag.png" /></figure><p>The Building Blocks</p><p>Technologies Used:<br>- FastAPI: For creating a lightweight, high-performance API<br>- OpenAI API: For understanding mood descriptions and generating song suggestions<br>- Spotify Web API: For searching songs and creating playlists<br>- Python: Bringing it all together</p><p>System Architecture</p><p>The application flow works like this:<br>1. User authenticates with Spotify<br>2. User describes their mood (“anxious but ready to conquer the day”)<br>3. OpenAI generates appropriate song search queries<br>4. The app searches Spotify for matching songs<br>5. A custom playlist is created in the user’s Spotify account<br>6. The user receives a link to their new mood-matched playlist</p><p>Building the API: A Closer Look</p><p>Let’s break down the key components of the code:</p><p>Authentication Flow</p><p>The first challenge was implementing Spotify’s OAuth flow, which requires several steps:</p><p>```python<br>def get_spotify_auth_url():<br> scope = “playlist-modify-private playlist-modify-public user-read-private”<br> auth_url = f”<a href="https://accounts.spotify.com/authorize?client_id={SPOTIFY_CLIENT_ID}&amp;response_type=code&amp;redirect_uri={REDIRECT_URI}&amp;scope={scope">https://accounts.spotify.com/authorize?client_id={SPOTIFY_CLIENT_ID}&amp;response_type=code&amp;redirect_uri={REDIRECT_URI}&amp;scope={scope</a>}&quot;<br> return auth_url</p><p>def access_token(auth_code):<br> auth_header = base64.b64encode(f”{SPOTIFY_CLIENT_ID}:{SPOTIFY_CLIENT_SECRET}”.encode()).decode()<br> # Request token from Spotify…<br>```</p><p>This gives our application permission to create playlists in the user’s Spotify account.</p><p>The Magic: AI-Powered Song Selection</p><p>The heart of the application is the mood interpretation. I use OpenAI’s models to translate a mood description into concrete song suggestions:</p><p>```python<br>def generate_song_queries(mood_description, num_songs=10):<br> prompt = f”””<br> Generate {num_songs} specific song search queries based on the following mood description:<br> “{mood_description}”<br> <br> Each query should be a SIMPLE search term without special formatting.<br> For example: “Adele Hello” or “Ed Sheeran Shape of You”<br> “””<br> <br> response = openai.chat.completions.create(<br> model=”gpt-4o-mini”,<br> messages=[<br> {“role”: “system”, “content”: “You are a music expert that suggests songs matching specific moods.”},<br> {“role”: “user”, “content”: prompt}<br> ],<br> response_format={“type”: “json_object”}<br> )<br>```</p><p>This approach leverages OpenAI’s understanding of both language and music culture to generate relevant song suggestions. The model remarkably understands the emotional tones that certain artists and songs evoke.</p><p>Bringing It All Together</p><p>With song suggestions in hand, the API then:<br>1. Searches for these songs on Spotify<br>2. Creates a new playlist in the user’s account<br>3. Adds the found songs to the playlist<br>4. Returns the playlist details to the user</p><p>Challenges and Lessons Learned</p><p>Authentication Headaches</p><p>One of the most frustrating bugs was with the Spotify authentication. The error message “Only valid bearer authentication supported” kept appearing.</p><p>The fix was surprisingly simple but easy to miss: the token formatting had extra spaces. This taught me the importance of clean auth token handling:</p><p>```python<br># Properly format the access token by removing any extra spaces or quotes<br>if access_token:<br> access_token = access_token.strip()<br> if access_token.startswith(‘“‘) and access_token.endswith(‘“‘):<br> access_token = access_token[1:-1]<br>```</p><p>OpenAI Prompt Engineering</p><p>Getting the right song suggestions required careful prompt design. Initially, I was getting songs that were too obscure or didn’t match the mood well. The solution was to be more specific in the prompt:</p><p>```<br>Generate {num_songs} specific song search queries based on the following mood description:<br>“{mood_description}”</p><p>Each query should be a SIMPLE search term without special formatting.<br>```</p><p>This illustrates how critical prompt engineering is when working with AI models.</p><p>## The Results: Emotional Intelligence in Playlists</p><p>The resulting playlists have been surprisingly spot-on. For example:</p><p>- Mood: “Nostalgic about the early 2000s but feeling optimistic”<br>- Result: A mix of 2000s hits with upbeat, forward-looking tracks</p><p>- Mood: “Need focus but feeling creative and slightly rebellious”<br>- Result: A blend of instrumental focus music with creative, boundary-pushing tracks</p><p>How You Can Build This Too</p><p>Want to create your own mood-based playlist generator? Here’s how to get started:</p><p>1. Set up your environment:<br> ```<br> pip install fastapi uvicorn python-dotenv requests openai<br> ```</p><p>2. Create developer accounts:<br> — Sign up for Spotify Developer<br> — Get an API key from OpenAI</p><p>3. Clone the repository and set up your environment variables:<br> ```<br> SPOTIFY_CLIENT_ID=your_spotify_client_id<br> SPOTIFY_CLIENT_SECRET=your_spotify_client_secret<br> OPENAI_API_KEY=your_openai_api_key<br> REDIRECT_URI=<a href="http://localhost:8888/callback">http://localhost:8888/callback</a><br> ```</p><p>The repo: <a href="https://github.com/Chukwuebuka-2003/mood-playlist-ai">https://github.com/Chukwuebuka-2003/mood-playlist-ai</a></p><p>4. Run the application: `python api.py`</p><p>The Future of Emotional AI and Music</p><p>This project is just the beginning of what’s possible at the intersection of AI and music. Future enhancements could include:</p><p>- Analyzing audio features: Using Spotify’s audio features API to match songs based on danceability, energy, tempo, etc.<br>- Learning from feedback: Incorporating user feedback to improve recommendations<br>- Multi-modal input: Accepting images or voice to detect emotional states</p><p>Conclusion: The Personal Touch in the Streaming Era</p><p>In an age of algorithmic recommendations, there’s something powerful about describing your exact emotional state and getting music that resonates. This project shows how AI can help create deeply personalized experiences that connect with us on an emotional level.</p><p>Music has always been about emotion, and now technology is helping us bridge the gap between what we feel and what we hear. The code for this project is available on GitHub, and I welcome contributions and ideas for how to make this emotional-musical connection even stronger.</p><p>— -</p><p>Have you ever wanted a playlist that perfectly matches your mood? What moods would you want to translate into music? Share your thoughts in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5655a320693f" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/building-a-mood-based-playlist-generator-with-ai-how-i-connected-emotions-to-music-5655a320693f">Building a Mood-Based Playlist Generator with AI: How I Connected Emotions to Music</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing ML In A Retail Success: John’s Data-Driven Store Transformation]]></title>
            <link>https://levelup.gitconnected.com/implementing-ml-in-a-retail-success-johns-data-driven-store-transformation-669080fea242?source=rss-59a29d873320------2</link>
            <guid isPermaLink="false">https://medium.com/p/669080fea242</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[marketing]]></category>
            <dc:creator><![CDATA[Ebuka (Gaus Octavio)]]></dc:creator>
            <pubDate>Sat, 11 Nov 2023 08:44:15 GMT</pubDate>
            <atom:updated>2023-11-12T19:38:05.426Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EhhSRsozt3pCcWgd" /><figcaption>Photo by <a href="https://unsplash.com/@shootdelicious?utm_source=medium&amp;utm_medium=referral">Eiliv Aceron</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Meet John, the owner of a local convenience store. Sales has been terrible and he has a problem of overstocking goods that are not really increasing sales.</p><p>He attended a business seminar, which was focused on how Data can aid in improving businesses (either online or bricks and mortar businesses).</p><p>After the seminar, he did his research into Data and its potential for his convenience store.</p><p>He hired a Data Scientist called Ella and explained the recent difficulties that he has been facing at his convenience store.</p><p>After a brief session between the John and Ella, she was able to pinpoint these approaches that could aid to improve sales at John’s convenience store</p><blockquote><strong>An understanding of customer buying patterns is needed</strong></blockquote><blockquote><strong>An efficient optimization of product placement should be implemented</strong></blockquote><blockquote><strong>More effective promotions will aid an increase in sales</strong></blockquote><p>Ella plans to use market basket analysis — a technique that identifies the relationships between products customers buy together — and the Apriori algorithm to achieve these goals.</p><p><strong>A brief explanation of Market basket analysis:</strong></p><p>Market basket analysis is a data mining technique, which aids in finding items that buyers desire to buy.</p><p>There are various metrics involved in this analysis.</p><ol><li><strong>Support:</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*Evuqz-wf3KhMEI_azHoFAw.png" /></figure><p>This metric gives an idea of how frequent an item is in the transactions of the given data. It helps to identify rules that are important for further analysis.</p><p>A high support metric means that if most customers buy an item, then this item is important for our shop/business.</p><p>2. <strong>Confidence:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*_A34D4zRrE6JidRTlzBnOg.png" /></figure><p>This defines the probability of an occurence of the followung items in the same transaction given that some items (antecedents) already exist in the given transaction.</p><p>3. <strong>Lift:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*AYXdN7G1hCQcBogvsbDhtQ.png" /></figure><p>This is the ratio that probability of B ocurring given A is present and the probability that B occurs without knowing about A.</p><p>4. <strong>Leverage:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*mTxxDSakMgmRvKYBLDMhPQ.png" /></figure><p>This computes the probability that A and B occurs together and that its frequency which is expected if A and B were independent.</p><p>Any leverage value of 0 indicates independence.</p><p>5. <strong>Conviction:</strong></p><figure><img alt="a formula for conviction metric" src="https://cdn-images-1.medium.com/max/686/1*UOq6pFdxK9xbAxxXgpHWpw.png" /></figure><p>This is used to judge if the rule used in the market basket analysis happened to be there by chance or not.</p><p>Moving forward from the theoretical implementation of Market Basket analysis.</p><p>Ella uses a sales dataset with an aim to implement Market Basket analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/138/1*_mdnifB4MwsCxYi8msUj5Q.png" /></figure><p>The data set has 3 features and 38765 observations</p><p><strong>Building the model basket:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*PnvpEqpmRhtDHuLrZLTBsg.png" /></figure><p><strong>The output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*x8KOvTIrXDM-Njgvw6LPLA.png" /></figure><p><strong>Converting the basket to a one hot encoded matrix:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*8efaFxIKcOZVZ2-C8X67Jw.png" /></figure><p><strong>The output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GoXwz3Gzr-HhqX1Tx8lE6A.png" /></figure><p><strong>Derive the frequent items and their respective support levels:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*WHv_cQttsgOzr7fDWK5tqw.png" /></figure><p><strong>The output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*hbnQIiGGPjTvsaZM6dh1bw.png" /></figure><p><strong>Building the Association rules:</strong></p><blockquote><em>Association rules are widely used to analyze retail related data with an intention to identify strong patterns discovered in transaction data.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*SqkXXyGvBZm6lEIcqynL8Q.png" /></figure><p><strong>The Output:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O_U_b4zRNS6slW7CSlWyBg.png" /></figure><p><strong>Possible Insights That Can Be Derived From This Analysis:</strong></p><p>Judging based on the confidence metric, the highest is 0.95990. This means that a customer who buys rolls/buns is likely to buy other vegetables.</p><p>The confidence metric isn’t always reliable. Using this dataset, other vegetables has a high support and this means it occurs in many transactions done. This will not make a business impact if we decide to sell rolls/buns with other vegetables.</p><p>A better alternative metric is either lift or leverage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*e4-tSNIB6-ZMHSM2ALcGrw.png" /></figure><p>From this dataset, the highest lift and leverage is: 0.822940 and -0.002401. These values can be found in the metric 8 and 9.</p><p>Good business decisions that could be derived from this market basket analysis are these:</p><p>Customers who buys yogurt are more likely to buy whole milk together.</p><p>It’s a good business decision to promote Whole milk together to maximize sales and profit.</p><p><strong>Conclusion:</strong></p><p>Ella presents these analysis and observations to John and recommends data driven actions that he could implement to improve his convenience store performance.</p><p>Data and Machine Learning can improve a business performance, and a business that implements a data driven decision stands a chance to succeed when compared to its peers that implements decision based on random guesses.</p><p>A link to the Jupyter Notebook used: <a href="https://nbviewer.org/github/Chukwuebuka-2003/market-basket-analysis/blob/main/model.ipynb">Market Basket Analysis</a></p><p>Thanks for Reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=669080fea242" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/implementing-ml-in-a-retail-success-johns-data-driven-store-transformation-669080fea242">Implementing ML In A Retail Success: John’s Data-Driven Store Transformation</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlocking HR Insights with Python: Navigating Employee Data]]></title>
            <link>https://medium.com/@ebulamicheal/unlocking-hr-insights-with-python-navigating-employee-data-dcbd2cafc3c2?source=rss-59a29d873320------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcbd2cafc3c2</guid>
            <category><![CDATA[hr]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-analytics]]></category>
            <dc:creator><![CDATA[Ebuka (Gaus Octavio)]]></dc:creator>
            <pubDate>Fri, 03 Nov 2023 04:32:04 GMT</pubDate>
            <atom:updated>2023-11-03T04:32:04.262Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*StYqcGAF5LU_ejw3" /><figcaption>Photo by <a href="https://unsplash.com/@headwayio?utm_source=medium&amp;utm_medium=referral">Headway</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Data is in abundance these days, and it ought to be analyzed as this will aid in discovering insights that aids in data driven decision making.</p><p>The purpose of this analysis was to provide insights/answers to questions based on the data set used.</p><p>These are the questions given:</p><blockquote><strong>Analyze employee demographics to find the count of female white employees,</strong></blockquote><blockquote><strong>Assess the age distribution for those over 50 and Gen Z individuals,</strong></blockquote><blockquote><strong>Determine the oldest employee,</strong></blockquote><blockquote><strong>Calculate the percentage of employees with ten or more years of experience</strong></blockquote><blockquote><strong>Identify the primary residential area,</strong></blockquote><blockquote><strong>Pinpoint the department with the most Gen Z workers</strong></blockquote><blockquote><strong>Discover the race with the highest number of Gen Z employees...</strong></blockquote><p>The data set contained 13 columns and 37408 rows/entries.</p><p>New columns had to be created to aid answers to these questions. The data was identified to be clean (i.e it didn’t have a null value).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/185/1*1KthOKmPjNH0ujOfyPs7Bg.png" /></figure><p>The solution for each question.</p><p><strong>Analyze employee demographics to find the count of female white employees.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*Kac-1zhDFFrkVqB8DBafeg.png" /></figure><p><strong>Observation: </strong>There are no employees whom are female and white</p><p><strong>Assess the age distribution for those over 50 and Gen Z individuals.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*ZjCSW0tP32x6gN1SClcecQ.png" /><figcaption>the code</figcaption></figure><p><strong>Observation:</strong> The percentage of employees above 50 is 11.58% and the GenZ count is 2285 amongst the employees in this firm asssuming the GenZ ages were below 25.</p><p><strong>Determine the oldest employee</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*iz-ldGNXQVjI-_pnWGBGkQ.png" /><figcaption>code</figcaption></figure><p><strong>Observation: </strong>The idxmin() function was used to identify the idex of the oldest employee. The employee details were displayed and her age is 58.</p><p><strong>Calculate the percentage of employees with ten or more years of experience.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*jbb-hU8OYbIOnZYUiNUP2Q.png" /><figcaption>code</figcaption></figure><p><strong>Observation: </strong>The HR can discover that in the firm 38.54% of employees with 10 or more years of employement.</p><p><strong>Identify the primary residential area.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*J4QlnNtQVKfIKUXQWZeUgg.png" /></figure><p><strong>Observation: </strong>Cleveland, Ohio stands out as the most common residential area of the firms&#39; employees.</p><p><strong>Pinpoint the department with the most Gen Z workers.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*ERQFMH-_z3iDwaLGsNHMyw.png" /></figure><p><strong>Observation: </strong>The HR can discover that the Engineering department stands out when analyzed based on the GenZ count</p><p><strong>Discover the race with the highest number of Gen Z employees…</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*UIFHhhXWpAM-XRCriTRJJQ.png" /><figcaption>code</figcaption></figure><p><strong>Observation: </strong>It can be observed that the highest race with the GenZ employees is the White race.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*hd0U8e2Tsh3IJh15EDjaJA.png" /></figure><p>Note: Most columns were not in the original dataset, they had to be created as this will aid in the analytic process.</p><p>Analyzing data with Python is interesting, and not difficult.</p><p>This is the link to the complete notebook: <a href="https://nbviewer.org/github/Chukwuebuka-2003/hr-data/blob/main/Human%20Resources.ipynb">Jupyter notebook</a></p><p>Follow me on: <a href="https://twitter.com/ebukagaus">Twitter/X </a>and <a href="https://github.com/Chukwuebuka-2003">GitHub</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcbd2cafc3c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Insights to Impact: How Data Science Revolutionizes the Garden Tools Business]]></title>
            <link>https://levelup.gitconnected.com/from-insights-to-impact-how-data-science-revolutionizes-the-garden-tools-business-e35850f7fe2?source=rss-59a29d873320------2</link>
            <guid isPermaLink="false">https://medium.com/p/e35850f7fe2</guid>
            <category><![CDATA[garden-tools]]></category>
            <category><![CDATA[gardening]]></category>
            <category><![CDATA[buisness]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ebuka (Gaus Octavio)]]></dc:creator>
            <pubDate>Wed, 21 Jun 2023 01:37:57 GMT</pubDate>
            <atom:updated>2023-07-06T03:02:18.073Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s data-driven world, organizations across various industries are harnessing the power of data analytics to drive success.</p><p>This article explores the immense potential of data analytics in optimizing operations, enhancing efficiency, improving service delivery, and increasing competitiveness for a small garden tools business called “Greens Tools Solution.”</p><p>By harnessing the power of data science, Greens Tools Solution can unlock new dimensions of success in the dynamic garden tools industry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*V-qM67qe9RWNqFNC2_QSAA.jpeg" /><figcaption>Garden tools</figcaption></figure><h3>Optimizing Operations: A Data-Driven Approach</h3><p>Data science empowers Greens Tools Solution to optimize operations through comprehensive analysis.</p><p>By delving into historical sales data, customer preferences, and seasonal trends, the business can identify the most sought-after products and fine-tune inventory management.</p><p>This ensures that Greens Tools Solution stocks the optimal quantities of lawnmowers, brush cutters, and other tools, minimizing excess inventory and reducing storage costs. Moreover, data science enables Greens Tools Solution to optimize its supply chain, ensuring timely deliveries from suppliers and eliminating stockouts during peak demand periods.</p><h3>Enhancing Efficiency: The Data-Backed Efficiency Advantage</h3><p>Data science plays a pivotal role in enhancing efficiency within Greens Tools Solution’s business processes.</p><p>The business gains invaluable insights into customer preferences by analyzing website traffic, browsing behavior, and purchase patterns.</p><p>Armed with this knowledge, Greens Tools Solution can optimize its online storefront by enhancing the website layout, streamlining the checkout process, and providing personalized recommendations.</p><p>By delivering a seamless online shopping experience, Greens Tools Solution can amplify customer satisfaction, reduce cart abandonment rates, and maximize overall operational efficiency.</p><h3>Improving Service Delivery: From Insights to Exceptional Experiences</h3><p>Data science empowers Greens Tools Solution to elevate its service delivery and exceed customer expectations.</p><p>By analyzing customer feedback, reviews, and support interactions, the business identifies areas for improvement.</p><p>For instance, if data science reveals recurring issues with the lawnmower assembly process, Greens Tools Solution can provide more straightforward instructions or even develop assembly videos to assist customers.</p><p>By proactively addressing pain points and enhancing the overall customer experience, Greens Tools Solution fosters customer loyalty and establishes a reputation for service excellence.</p><h3>Increasing Competitiveness: The Data Advantage</h3><p>Data science provides Greens Tools Solutions with a powerful competitive edge in the garden tools market.</p><p>By scrutinizing market trends, competitor pricing, and customer preferences, the business can identify untapped opportunities and emerging trends.</p><p>Armed with this information, Greens Tools Solution can adjust its product offerings, pricing strategies, and marketing campaigns to align precisely with customer demands.</p><p>By consistently staying ahead of the competition and effectively meeting customer needs, Greens Tools Solution can expand its market share and thrive in the competitive landscape of the industry.</p><p>Conclusion:</p><p>The Era of Data Science in Garden Tools The potential impact of data science on Greens Tools Solution’s operations, efficiency, service delivery, and competitiveness is monumental.</p><p>By embracing data-driven insights, this small garden tools business can make informed decisions, optimize inventory management, deliver exceptional customer experiences, and flourish in the garden tools industry.</p><p>As data science redefines industries, Greens Tools Solution serves as a testament to the transformative power of data-driven decision-making, propelling businesses toward unprecedented success.</p><p><strong>Your thoughts:</strong></p><p>What are your thoughts on the competitive advantage that data science can provide in the garden tools market? How can businesses leverage data analytics to stay ahead of the competition?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e35850f7fe2" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/from-insights-to-impact-how-data-science-revolutionizes-the-garden-tools-business-e35850f7fe2">From Insights to Impact: How Data Science Revolutionizes the Garden Tools Business</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond Tools: The Crucial Role of Data Knowledge in the Journey of a Data Professional]]></title>
            <link>https://levelup.gitconnected.com/beyond-tools-the-crucial-role-of-data-knowledge-in-the-journey-of-a-data-professional-9c13358d4cf6?source=rss-59a29d873320------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c13358d4cf6</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Ebuka (Gaus Octavio)]]></dc:creator>
            <pubDate>Sun, 21 May 2023 12:49:35 GMT</pubDate>
            <atom:updated>2023-05-23T17:45:30.693Z</atom:updated>
            <content:encoded><![CDATA[<p>In today&#39;s data-driven world, the demand for skilled data professionals has skyrocketed. Organizations across various industries are recognizing the value of harnessing data to drive business decisions and gain a competitive edge.</p><p>While proficiency in tools such as Python, SQL, Excel, and others is often emphasized, it is important to understand that expertise in these tools alone is not enough.</p><p>True data professionals need a deep understanding of data itself and how it can be effectively applied to extract meaningful insights.</p><p>In this article, let’s explore the importance of data knowledge and its significance in the role of a data professional.</p><p>1. The Foundation of Data Knowledge:</p><p>Data knowledge forms the foundation of a data professional&#39;s skill set. It encompasses a wide range of concepts, including data types, data structures, data quality, data modeling, and data manipulation techniques.</p><p>By acquiring a solid understanding of these fundamental concepts, data professionals can lay a strong groundwork for their work.</p><p>2. Data Acquisition and Preparation:</p><p>Proficient data professionals are adept at acquiring and preparing data for analysis. This involves identifying relevant data sources, understanding the data collection process, and ensuring data quality.</p><p>Without a strong knowledge of data, professionals may struggle to interpret data sources accurately, resulting in unreliable or misleading insights.</p><p>Understanding how data is collected, transformed, and cleansed allows data professionals to make informed decisions regarding data suitability and reliability.</p><p>3. Data Analysis and Visualization:</p><p>Data professionals armed with knowledge about data are well-equipped to analyze and derive meaningful insights.</p><p>While tools like Python, SQL, or Excel provide the means to perform data analysis, a deep understanding of the underlying data is essential to ensure accurate and meaningful interpretations.</p><p>Proficient data professionals possess the ability to choose appropriate analytical techniques, interpret results, and communicate them effectively through visualizations. They understand the limitations of data and apply critical thinking to uncover patterns, trends, and correlations that may be hidden within.</p><p>4. Data-Driven Decision-Making:</p><p>Data professionals play a pivotal role in driving data-driven decision-making within organizations. By leveraging their knowledge of data, they can assist stakeholders in making informed choices that have a direct impact on business strategies.</p><p>Understanding how data aligns with business goals, and possessing the ability to communicate data insights to non-technical audiences, enables data professionals to bridge the gap between data and actionable decisions.</p><p>5. Ethical Considerations and Data Privacy:</p><p>Data professionals must also be cognizant of ethical considerations and data privacy. A solid understanding of data knowledge empowers them to handle data responsibly, ensuring compliance with privacy regulations and safeguarding sensitive information.</p><p>By considering the ethical implications of data use and handling, data professionals can build trust and maintain the integrity of their work.</p><h3><strong>Conclusion</strong></h3><p>While tools such as Python, SQL, and Excel are essential for data professionals, it is imperative to acknowledge that data knowledge forms the bedrock of their expertise. A deep understanding of data types, data structures, data quality, and data manipulation techniques enables professionals to navigate complex data landscapes effectively. By possessing this knowledge, data professionals can acquire, analyze, and interpret data accurately, ultimately leading to informed decision-making and valuable insights.</p><p>So, let&#39;s remember that tools are just the means, but it is the knowledge of data and how it can be applied that truly empowers data professionals in their pursuit of excellence.</p><p>Connect with me on <a href="https://github.com/Chukwuebuka-2003">GitHub</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c13358d4cf6" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/beyond-tools-the-crucial-role-of-data-knowledge-in-the-journey-of-a-data-professional-9c13358d4cf6">Beyond Tools: The Crucial Role of Data Knowledge in the Journey of a Data Professional</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Build a Music Recommendation System with Python and Spotify API using Streamlit]]></title>
            <link>https://levelup.gitconnected.com/how-to-build-a-music-recommendation-system-with-python-and-spotify-api-using-streamlit-5488d316aabd?source=rss-59a29d873320------2</link>
            <guid isPermaLink="false">https://medium.com/p/5488d316aabd</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[streamlit]]></category>
            <category><![CDATA[web-app-development]]></category>
            <category><![CDATA[spotify]]></category>
            <dc:creator><![CDATA[Ebuka (Gaus Octavio)]]></dc:creator>
            <pubDate>Fri, 21 Apr 2023 03:20:57 GMT</pubDate>
            <atom:updated>2024-01-10T23:39:26.035Z</atom:updated>
            <content:encoded><![CDATA[<p>Are you looking for a way to discover new music based on your favorite tracks? A music recommendation system can help you with that! In this tutorial, we will learn how to build a simple music recommendation system using Streamlit and the Spotify API.</p><p>Streamlit is a Python framework that allows you to quickly create web applications. With Streamlit, you can create interactive dashboards, data visualizations, and more. The Spotify API is a powerful tool that allows you to access the Spotify music catalog and retrieve information about tracks, albums, artists, and more.</p><h3>Prerequisites</h3><p>To follow along with this tutorial, you will need the following:</p><ul><li>A Spotify account.</li><li>Python 3.7 or higher installed on your system</li><li>A Spotify developer account</li><li>Spotipy, a Python library for the Spotify Web API</li><li>Streamlit, a Python library for creating interactive web applications.</li></ul><h3>Setting Up Spotify API Credentials</h3><p>First, you need to set up your Spotify developer account and obtain your API credentials. Follow these steps:</p><ol><li>Go to the <a href="https://developer.spotify.com/dashboard/login">Spotify Developer Dashboard</a> and log in with your Spotify account.</li><li>Click on “Create a Client ID” and fill out the form with the required information.</li><li>After creating your Client ID, you will see a page with your Client ID and Client Secret. Keep these values handy as we will be using them later in the code.</li></ol><h3>Installing Required Libraries</h3><p>We will be using the following libraries in this tutorial:</p><ul><li>Spotipy: A lightweight Python library for the Spotify Web API</li><li>Streamlit: A Python library for creating interactive web applications</li></ul><p>To install these libraries, run the following commands in your terminal:</p><pre>pip install stramlit spotipy</pre><h3>Building the Music Recommendation System</h3><p>Now that we have our credentials set up and our libraries installed, we can start building our music recommendation system. Open your text editor and create a new Python file. Let’s call it recommendationsapp.py.</p><p>First, we need to import the necessary libraries and set up our Spotify API credentials:</p><pre>import spotipy<br>from spotipy.oauth2 import SpotifyClientCredentials<br><br># Set up Spotify credentials<br>client_id = &quot;YOUR_CLIENT_ID&quot; <br>client_secret = &quot;YOUR_CLIENT_SECRET&quot;<br>client_credentials_manager = SpotifyClientCredentials(client_id=client_id, client_secret=client_secret)<br>sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)</pre><p>Note: Replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET with your own API credentials.</p><p>Now, let’s define a function get_recommendations that takes a song name as input and returns a list of recommended songs:</p><pre>def get_recommendations(track_name):<br>    # Get track URI<br>    results = sp.search(q=track_name, type=&#39;track&#39;)<br>    track_uri = results[&#39;tracks&#39;][&#39;items&#39;][0][&#39;uri&#39;]<br><br>    # Get recommended tracks<br>    recommendations = sp.recommendations(seed_tracks=[track_uri])[&#39;tracks&#39;]<br>    return recommendations</pre><p>What is the aim of this function? You might ask.</p><p>This function takes a song name as input, searches for the corresponding track URI using the Spotify API, and then uses that URI to retrieve a list of recommended tracks.</p><p>We can create our Streamlit app. In the same recommendationsapp.py file, add the following code:</p><pre>st.title(&quot;Music Recommendation System&quot;)</pre><p>Next, we can create a text input field using the st.text_input method, which allows the user to enter the name of a track they want recommendations for:</p><pre>track_name = st.text_input(&quot;Enter a song name:&quot;)</pre><p>We can then use an if statement to check if the user has entered a track name. If a track name has been entered, we can call our get_recommendations function to retrieve recommended tracks, and then use a for loop to display the name and album cover of each recommended track using the st.write and st.image methods, respectively.</p><pre>if track_name:<br>    recommendations = get_recommendations(track_name)<br>    st.write(&quot;Recommended songs:&quot;)<br>    for track in recommendations:<br>        st.write(track[&#39;name&#39;])<br>        st.image(track[&#39;album&#39;][&#39;images&#39;][0][&#39;url&#39;])</pre><p><strong>Some Images:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nfGSBgFs8ol7iDH2P7irHg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*aX_KigBAyenxkTkCt5PJCw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*He0ij8D0lB8P2iRBxSQSHw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*JsGoVDNuNVFX9wFHJK1aOA.jpeg" /></figure><p>And that’s it! We have created a simple music recommendation system that allows users to enter a track name and receive a list of recommended tracks based on their input.</p><p>In conclusion, music recommendation systems are a great way to discover new songs and artists that match your preferences.</p><p>Do you have questions?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5488d316aabd" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/how-to-build-a-music-recommendation-system-with-python-and-spotify-api-using-streamlit-5488d316aabd">How To Build a Music Recommendation System with Python and Spotify API using Streamlit</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Build A Spotify Playlist Analyzer]]></title>
            <link>https://levelup.gitconnected.com/how-to-build-a-spotify-playlist-analyzer-b974c8d2ef1a?source=rss-59a29d873320------2</link>
            <guid isPermaLink="false">https://medium.com/p/b974c8d2ef1a</guid>
            <category><![CDATA[spotify]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[streamlit]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ebuka (Gaus Octavio)]]></dc:creator>
            <pubDate>Thu, 06 Apr 2023 06:04:59 GMT</pubDate>
            <atom:updated>2023-04-09T21:37:52.326Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cEPNeLJwLJhWRyLL" /><figcaption>Photo by <a href="https://unsplash.com/@alexbemore?utm_source=medium&amp;utm_medium=referral">Alexander Shatov</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The Spotify Playlist Analyzer is a Streamlit app that allows users to analyze a Spotify playlist using data visualization tools. The app uses the Spotipy library to access data from the Spotify API and the Plotly library to create interactive charts.</p><p>To use the app, the user inputs the name of the Spotify playlist they wish to analyze in a text input box on the sidebar. The app then searches for the playlist ID based on the input name and retrieves the playlist data from the Spotify API. The playlist data is displayed in a table that shows the track name, artist name, album name, release date, popularity, and duration in milliseconds for each track in the playlist.</p><p>The app also provides three types of analysis for the playlist data:</p><ol><li>Track Popularity Distribution — a histogram that shows the distribution of track popularity in the playlist.</li><li>Bivariate Analysis — a scatter plot that allows the user to select two variables (popularity and duration in milliseconds) to plot against each other.</li><li>Multivariate Analysis — a scatter plot that allows the user to select one variable to color the data points by (artist name, album name, or release date) and one variable to size the data points by (popularity or duration in milliseconds).</li></ol><p>In addition to the data visualizations, the app also provides a playlist summary that shows the most popular and least popular tracks in the playlist and a bar chart that displays the top 10 most popular artists in the playlist.</p><h3>Prerequisites</h3><p>To follow along with this tutorial, you will need:</p><ul><li>A Spotify account</li><li>A Spotify Developer account</li><li>Python 3.x installed on your machine</li><li>Familiarity with Python programming</li><li>Familiarity with the Pandas, Streamlit, and Plotly libraries</li></ul><h3>Step 1: Setting up a Spotify Developer Account</h3><p>To use the Spotify API, you need to have a Spotify Developer account. If you don’t already have one, go to <a href="https://developer.spotify.com/dashboard/">https://developer.spotify.com/dashboard/</a> and create an account. Once you’ve created an account, create a new Spotify application to get your client_id and client_secret.</p><h3>Step 2: Installing the Required Libraries</h3><p>We will be using the following libraries for this project:</p><ul><li>Streamlit</li><li>Spotipy</li><li>Pandas</li><li>Plotly</li></ul><p>You can install these libraries by running the following command in your terminal:</p><pre>pip install streamlit spotipy pandas plotly</pre><h3>Step 3: Authenticating with the Spotify API</h3><p>To authenticate with the Spotify API, we will be using the spotipy library. We&#39;ll need to create an instance of the Spotify class, passing in our client_id and client_secret . We&#39;ll also need to create an instance of the SpotifyClientCredentials class, passing in our client_id and client_secret.</p><pre>import spotipy<br>from spotipy.oauth2 import SpotifyClientCredentials<br><br>client_id = &#39;YOUR_CLIENT_ID&#39;<br>client_secret = &#39;YOUR_CLIENT_SECRET&#39;<br><br>client_credentials_manager = SpotifyClientCredentials(client_id=client_id, client_secret=client_secret)<br>sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)</pre><h3>Step 4: Creating a Streamlit App</h3><p>We’ll use Streamlit to create a simple UI that allows users to input a Spotify playlist name and displays various analyses of the playlist. To create a Streamlit app, we first need to import the streamlit library and call the title() function to set the title of the app.</p><pre>import streamlit as st<br><br>st.title(&quot;Spotify Playlist Analyzer&quot;)</pre><h3>Step 5: Adding User Input with Streamlit</h3><p>We’ll use Streamlit’s sidebar to add a text input field for the user to enter the name of the Spotify playlist they want to analyze.</p><pre>playlist_name = st.sidebar.text_input(&quot;Enter the name of the Spotify playlist:&quot;)</pre><h3>Step 6: Retrieving Data from the Spotify API</h3><p>If the user enters a playlist name, we’ll search for the playlist ID using the search() function of the Spotify class. We’ll then retrieve data for each track in the playlist, such as the track name, artist name, popularity, duration, album name, and release date.</p><pre>if playlist_name:<br>    playlists = sp.search(playlist_name, type=&quot;playlist&quot;)[&quot;playlists&quot;][&quot;items&quot;]<br>    if playlists:<br>        playlist_id = playlists[0][&quot;id&quot;]<br>    else:<br>        st.write(&quot;No playlists found with that name.&quot;)<br>        playlist_id = None<br>else:<br>    playlist_id = None</pre><h3>Step 7: Retrieve Data from the Spotify API</h3><p>If we have a valid playlist ID, we can use the Spotipy library to retrieve data from the Spotify API.</p><pre>if playlist_id:<br>    playlist = sp.playlist(playlist_id)<br>    tracks = playlist[&quot;tracks&quot;][&quot;items&quot;]<br>    track_names = [track[&quot;track&quot;][&quot;name&quot;] for track in tracks]<br>    track_artists = [&quot;, &quot;.join([artist[&quot;name&quot;] for artist in track[&quot;track&quot;][&quot;artists&quot;]]) for track in tracks]<br>    track_popularity = [track[&quot;track&quot;][&quot;popularity&quot;] for track in tracks]<br>    track_duration = [track[&quot;track&quot;][&quot;duration_ms&quot;] for track in tracks]<br>    track_album = [track[&quot;track&quot;][&quot;album&quot;][&quot;name&quot;] for track in tracks]<br>    track_release_date = [track[&quot;track&quot;][&quot;album&quot;][&quot;release_date&quot;] for track in tracks]</pre><h3>Step 8: Display Playlist Data in a Table</h3><p>We can use Streamlit to display the playlist data in a table.</p><pre># display the playlist data in a table<br>    st.write(f&quot;## {playlist[&#39;name&#39;]}&quot;)<br>    st.write(f&quot;**Description:** {playlist[&#39;description&#39;]}&quot;)<br>    st.write(f&quot;**Number of tracks:** {len(tracks)}&quot;)<br>    st.write(&quot;&quot;)<br>    st.write(&quot;### Tracklist&quot;)<br>    st.write(&quot;| Name | Artist | Album | Release Date | Popularity | Duration (ms) |&quot;)<br>    st.write(&quot;| ---- | ------ | ----- | ------------ | ---------- | -------------- |&quot;)<br>    for i in range(len(tracks)):<br>        st.write(f&quot;| {track_names[i]} | {track_artists[i]} | {track_album[i]} | {t<br>rack_release_date[i]} | {track_popularity[i]} | {track_duration[i]} |&quot;)</pre><h3>Step 9: Create a DataFrame From The Playlist Data</h3><p>Pandas can be used to the playlist data to a DataFrame that would be used for further analysis</p><pre>    # create a dataframe from the playlist data<br>    data = {&quot;Name&quot;: track_names, &quot;Artist&quot;: track_artists, &quot;Album&quot;: track_album, &quot;Release Date&quot;: track_release_date, &quot;Popularity&quot;: track_popularity, &quot;Duration (ms)&quot;: track_duration}<br>    df = pd.DataFrame(data)</pre><h3>Step 10: Display A Histogram Of Tracks Popularity</h3><pre> # display a histogram of track popularity<br>    fig_popularity = px.histogram(df, x=&quot;Popularity&quot;, nbins=20, title=&quot;Track Popularity Distribution&quot;)<br>    st.plotly_chart(fig_popularity)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*t9Z9mst5spCNNaY6DjaQfQ.png" /><figcaption>Top 50 (Nigeria) Playlist</figcaption></figure><h3>Step 11: Bivariate Analysis</h3><p>Next, the user is prompted to select two variables for a bivariate analysis. The code then creates a scatter plot of the selected variables.</p><pre># add a dropdown menu for bivariate analysis<br>    st.write(&quot;#### Bivariate Analysis&quot;)<br>    x_axis = st.selectbox(&quot;Select a variable for the x-axis:&quot;, [&quot;Popularity&quot;, &quot;Duration (ms)&quot;])<br>    y_axis = st.selectbox(&quot;Select a variable for the y-axis:&quot;, [&quot;Popularity&quot;, &quot;Duration (ms)&quot;])<br>    fig_bivariate = px.scatter(df, x=x_axis, y=y_axis, title=f&quot;{x_axis} vs. {y_axis}&quot;)<br>    st.plotly_chart(fig_bivariate)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*vbEyDIfc-V1Lw3IbzTtc5g.png" /><figcaption>Duration vs Release Date of tracks</figcaption></figure><h3>Step 12: Multivariate Analysis</h3><p>The user is prompted to select two variables for a multivariate analysis. The code then creates a scatter plot of the selected variables, colored by one variable and sized by another variable.</p><pre># add a dropdown menu for multivariate analysis<br>    st.write(&quot;#### Multivariate Analysis&quot;)<br>    color_by = st.selectbox(&quot;Select a variable to color by:&quot;, [&quot;Artist&quot;, &quot;Album&quot;, &quot;Release Date&quot;])<br>    size_by = st.selectbox(&quot;Select a variable to size by:&quot;, [&quot;Popularity&quot;, &quot;Duration (ms)&quot;])<br>    fig_multivariate = px.scatter(df, x=&quot;Duration (ms)&quot;, y=&quot;Popularity&quot;, color=color_by, size=size_by, hover_name=&quot;Name&quot;, title=&quot;Duration vs. Popularity Colored by Artist&quot;)<br>    st.plotly_chart(fig_multivariate)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*9StYQJqN5gr6O1Vz1Txp5Q.png" /><figcaption>Popular Albums in the playlist (Davido)</figcaption></figure><h3>Step 13: A Summary Of The Playlist Data</h3><p>The code below displays a summary of the playlist data to the user. This summary includes the most popular and least popular tracks in the playlist, as well as a bar chart of the top 10 most popular artists and tracks in the playlist</p><pre># add a summary of the playlist data<br>    st.write(&quot;&quot;)<br>    st.write(&quot;### Playlist Summary&quot;)<br>    st.write(f&quot;**Most popular track:** {df.iloc[df[&#39;Popularity&#39;].idxmax()][&#39;Name&#39;]} by {df.iloc[df[&#39;Popularity&#39;].idxmax()][&#39;Artist&#39;]} ({df[&#39;Popularity&#39;].max()} popularity)&quot;)<br>    st.write(f&quot;**Least popular track:** {df.iloc[df[&#39;Popularity&#39;].idxmin()][&#39;Name&#39;]} by {df.iloc[df[&#39;Popularity&#39;].idxmin()][&#39;Artist&#39;]} ({df[&#39;Popularity&#39;].min()} popularity)&quot;)</pre><pre># display a bar chart of the top 10 most popular artists in the playlist<br>    st.write(&quot;#### Top 10 Artists&quot;)<br>    st.write(&quot;The bar chart below shows the top 10 most popular artists in the playlist.&quot;)<br>    top_artists = df.groupby(&quot;Artist&quot;).mean().sort_values(&quot;Popularity&quot;, ascending=False).head(10)<br>    fig_top_artists = px.bar(top_artists, x=top_artists.index, y=&quot;Popularity&quot;, title=&quot;Top 10 Artists&quot;)<br>    st.plotly_chart(fig_top_artists)    </pre><pre># display a bar chart of the top 10 most popular songs in the playlist<br>    st.write(&quot;#### Top 10 Songs&quot;)<br>    st.write(&quot;The bar chart below shows the top 10 most popular songs in the playlist.&quot;)<br>    top_artistss = df.groupby(&quot;Name&quot;).mean().sort_values(&quot;Popularity&quot;, ascending=False).head(10)<br>    fig_top_artistss = px.bar(top_artistss, x=top_artistss.index, y=&quot;Popularity&quot;, title=&quot;Top 10 Songs&quot;)<br>    st.plotly_chart(fig_top_artistss)    </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*N2WT6YkMqmHFkTgKBrhJeA.png" /><figcaption>Popular Artists In the playlist</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*Kz7YKLpdtSqyXTIoepFguQ.png" /><figcaption>Popular Songs in the playlist</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*k3UeA16_6TLtBQFDDOvnPw.png" /><figcaption>Release Year vs Popularity</figcaption></figure><h3>Step 14: Running The App</h3><p>The final step is to run the Streamlit app. This allows the user to interact with the app and analyze their chosen Spotify playlist.</p><p>Overall, the Spotify Playlist Analyzer is a useful tool for anyone who wants to explore the data behind their favorite Spotify playlists and gain insights into their music preferences.</p><p>It retrieves data from the Spotify API, displays it in a table, and allows users to analyze it using data visualization techniques.</p><p>The code is easy to use and provides valuable insights into the data of a Spotify playlist.</p><p>Connect With Me On <a href="https://twitter.com/ebukagaus?t=cotG-tB3xJdEU_OqejVdRQ&amp;s=09">Twitter</a></p><h3>Level Up Coding</h3><p>Thanks for being a part of our community! Before you go:</p><ul><li>👏 Clap for the story and follow the author 👉</li><li>📰 View more content in the <a href="https://levelup.gitconnected.com/?utm_source=pub&amp;utm_medium=post">Level Up Coding publication</a></li><li>💰 Free coding interview course ⇒ <a href="https://skilled.dev/?utm_source=luc&amp;utm_medium=article">View Course</a></li><li>🔔 Follow us: <a href="https://twitter.com/gitconnected">Twitter</a> | <a href="https://www.linkedin.com/company/gitconnected">LinkedIn</a> | <a href="https://newsletter.levelup.dev/">Newsletter</a></li></ul><p>🚀👉 <a href="https://jobs.levelup.dev/talent/welcome?referral=true"><strong>Join the Level Up talent collective and find an amazing job</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b974c8d2ef1a" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/how-to-build-a-spotify-playlist-analyzer-b974c8d2ef1a">How To Build A Spotify Playlist Analyzer</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Science: The Roadmap to Becoming a Successful Professional]]></title>
            <link>https://medium.com/@ebulamicheal/data-science-the-roadmap-to-becoming-a-successful-professional-54a1b8e0b34e?source=rss-59a29d873320------2</link>
            <guid isPermaLink="false">https://medium.com/p/54a1b8e0b34e</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Ebuka (Gaus Octavio)]]></dc:creator>
            <pubDate>Tue, 07 Mar 2023 06:24:13 GMT</pubDate>
            <atom:updated>2023-03-07T06:25:43.200Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h2jopUw9xLUAgtuqD1icEg.png" /><figcaption>Photo by Luke Chesser on Unsplash</figcaption></figure><p>Are you looking to take your career to the next level as a data scientist? If you are, then you’ve come to the right place! Data science is a rapidly growing field and the demand for experienced professionals is at an all-time high. To be successful, it’s important to know what skills and abilities are necessary for success in the field.</p><p>That’s why we decided to put together this article about becoming a successful data scientist. We’ll cover everything from how to properly develop your skillset and create an attractive portfolio all the way to how to network with potential employers and land that dream job or project. Whether you want a full-time position or just want to freelance in your own time, our roadmap will help you get there. So let’s get started!</p><h3>The Fundamentals of Data Science</h3><p>So you want to be a successful data scientist? That&#39;s great! Data science is certainly a hot field right now, and it can be a highly rewarding career. But before you dive in, it&#39;s important to understand the fundamentals of data science, so you can make sure you&#39;re setting yourself up for success.</p><p>Data science is an interdisciplinary subject, made up of three main components: coding, statistics and business intelligence. You&#39;ll need to have a strong understanding of each of these areas in order to be effective as a data scientist.</p><p>Coding is key for understanding how data systems work and for manipulating data effectively. Statistics involves understanding concepts like sampling, normal distributions and hypothesis testing. Business intelligence means being able to interpret the insights from your analysis in order to make smart decisions.</p><p>These fundamentals will be the foundation on which your data science career is built - so take the time to ensure that you have a thorough understanding of each one!</p><h3>Understanding the Skillset Required</h3><p>Are you ready to jump into the world of data science? Then it’s time to understand the skillset required in order to be successful in this field. Afterall, data scientists work with complex datasets and you need a certain level of expertise to make sense of them!</p><p>It’s essential for data scientists to have technical skills such as coding and scripting. In particular, knowledge of programming languages like Python, R and SQL is a must. You also need an understanding of databases, algorithms and machine learning techniques. Furthermore, having knowledge of statistical models such as regression analysis, clustering or recommendation systems is helpful too.</p><p>In addition, there are some non-technical skills that can help you stand out from the crowd! Problem-solving and communication are incredibly important when it comes to understanding data trends, presenting insights or addressing client concerns. Equally valuable are organizational skills such as project management which will make sure timelines are met and everything runs smoothly.</p><p>All in all, having a diverse set of skills will help you become an indispensable part of any team!</p><h3>Specializing in a Data Science Field</h3><p>Being a successful data scientist means you need to specialize in something—it&#39;s impossible to be an expert in everything. So, what should you specialize in? Well, the good news is that there is no right or wrong answer to this question; you should specialize in whatever interests you the most!</p><p>The most common specialization fields within data science are machine learning and artificial intelligence; these fields focus on developing models that can learn and make predictions based on data. Other popular fields include natural language processing (which deals with understanding human languages) and computer vision (which deals with recognizing objects in images).</p><p>No matter which field of data science you choose, narrowing your focus will help you become an expert in that particular area. Plus, specializations also give employers a better idea of what type of roles they should consider you for.</p><p>At the same time, don&#39;t forget to keep learning about other related areas, such as statistics and programming. This way, even if your primary focus is on one particular field within data science, you will still have the skills needed to work with other areas—making yourself more valuable overall as a professional data scientist.</p><h3>Developing Your Programming and Analytical Skills</h3><p>If you really want to make it in data science, you&#39;ll need to know more than just the basics of programming and analytics. A successful data scientist should be an expert in their chosen programming language—be it Python, R, or something else—as well as be familiar with analysis techniques such as hypothesis testing, regression analysis, and machine learning.</p><h3>Programming Languages</h3><p>At the very least, you should be capable of writing clean and efficient code that can read and manipulate large datasets. Tackle coding challenges, read books and take online courses to help improve your coding skills. A great starting point is to set up a coding environment on your computer so that you can work with datasets yourself.</p><h3>Research: Writing &amp; Mathematics</h3><p>You&#39;ll also need strong research skills in order to effectively analyze the data. This means having an excellent understanding of writing mechanics as well as a solid foundation in mathematics. Doing research on data science topics will help refine these skills, so read up on the latest developments in data science before hitting the job market.</p><p>Finally, no matter how good your programming and analytical skills are, if you don&#39;t have a good grasp of statistics then you won&#39;t get far in data science. Make sure to devote time to learning about statistical techniques such as confidence intervals, false discovery rate tests and Bayesian inference. This knowledge will be invaluable when it comes time to tackle real-world problems with data sets!</p><h3>Crafting Your Project Portfolio</h3><p>Crafting your project portfolio is an important step in becoming a successful data scientist. A portfolio is a great way to showcase your skills and knowledge to potential employers, and it will help you stand out from the crowd. Here&#39;s how to get started on creating your portfolio:</p><h3>Showcase Your Technical Skills</h3><p>When crafting your project portfolio, make sure to showcase the technical skills you have gained throughout your data science journey. This means focusing on things like coding knowledge, understanding different algorithms, and having a good grasp of machine learning principles. Most employers will be impressed by seeing examples of projects you have worked on that demonstrate these skills.</p><h3>Storytelling</h3><p>Your portfolio should also show off your storytelling ability. Every data science project should have a clear beginning, middle and end. Use this opportunity to bring the story of your projects to life by writing about what inspired them, the challenges you faced during development, and the insights that were gained from working through those challenges.</p><h3>Benefits for Your Portfolio</h3><p>Having a well-crafted data science project portfolio can provide many benefits both during and after job seeking season. Beyond giving you an edge when applying for jobs, maintaining an up-to-date portfolio is also important for staying competitive in the data science space as technology advances rapidly. What&#39;s more, keeping track of past projects can help you identify trends and use them to inform future predictions, giving you better insights into how you can improve.</p><h3>Finding the Right Job Opportunities</h3><p>When you’re ready to start looking for data scientist job opportunities, it’s important to remember that data science is a rapidly evolving field and employers are looking for somebody who is up-to-date on the most recent technology and advancements. To make sure you stand out in a crowded field of applicants, you need to make sure your skillset is up-to-date and that you can demonstrate your knowledge and expertise in the right areas.</p><h3>Expand Your Skill Set</h3><p>In order to be successful in the data science industry, you need to understand how various tools work, as well as how different technologies interact with each other. It’s also important to be comfortable working with a variety of languages, from Python and R programming languages, to SQL and NoSQL databases. You should also have an understanding of machine learning algorithms and be able to utilize them when needed.</p><h3>Focus on Soft Skills</h3><p>Data science involves a lot more than technical prowess – employers like data scientists who have strong communication skills as well. Being able to effectively communicate complex technical concepts in layman&#39;s terms is key, as well as being able to work closely with others on projects. Demonstrating your ability to work well with others can give you an edge against other potential candidates when it comes time for hiring decisions.</p><p>By staying up-to-date on the latest technologies, expanding your skill set and honing your soft skills,you can position yourself ahead of the pack in the job market for data scientists.</p><h3>Conclusion</h3><ul><li>The key to becoming a successful data scientist is to stay focused and motivated. With the right dedication and effort, you can become an expert in data science. Keep in mind that data science is an ever-evolving field, so staying up to date with the latest trends and technologies is essential.</li></ul><p>Data science is a rewarding profession and offers plenty of opportunities. If you have an interest in data science, then now is the time to get started. Use the roadmap outlined in this article to guide you on your journey and you&#39;ll be well on your way to becoming a highly successful data scientist.</p><p>Connect With Me On <a href="https://twitter.com/ebukagaus?t=cotG-tB3xJdEU_OqejVdRQ&amp;s=09">Twitter</a>, <a href="https://www.linkedin.com/in/chukwuebuka-ezeokeke-911236194">LinkedIn</a> and <a href="https://github.com/Chukwuebuka-2003">GitHub</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54a1b8e0b34e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Build Your Data Science Books Reading List Using Scrapy]]></title>
            <link>https://levelup.gitconnected.com/how-to-build-your-data-science-books-reading-list-using-scrapy-76b1cc0d351?source=rss-59a29d873320------2</link>
            <guid isPermaLink="false">https://medium.com/p/76b1cc0d351</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[scrapy]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Ebuka (Gaus Octavio)]]></dc:creator>
            <pubDate>Sat, 28 Jan 2023 08:26:49 GMT</pubDate>
            <atom:updated>2023-02-24T20:23:49.135Z</atom:updated>
            <content:encoded><![CDATA[<p>Web Scraping is a powerful technique for data collection from websites. Scrapy is a powerful python library used for web scraping. Other alternatives are beautifulsoup4</p><p>In this article, I will show you how to use Scrapy to extract available information about data science books from Amazon.com</p><p>This article is a detailed process on how to implement Scrapy</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8KUwUN6-oGhrAH92uAhwUQ.png" /><figcaption>Photo by Markus Spiske on Unsplash</figcaption></figure><p><strong>The Process:</strong></p><ol><li>Installing Scrapy</li><li>Setting up a Scrapy project</li><li>Creating a Spider</li><li>Extracting and saving the information needed (i.e Data Science Books)</li></ol><p><strong>The First Process:</strong></p><p>Before you can use scrapy, you need to have Python installed on your computer.</p><p>Scrapy is installed by executing this command</p><pre>pip install scrapy</pre><p><strong>The Second Process:</strong></p><p>Create a new scrapy project by executing this command</p><pre>scrapy startproject data_books</pre><p>A new directory called “data_books” would be created with the requied files for this Scrapy project.</p><p><strong>The Third Process:</strong></p><p>Create a Scrapy Spider. A scrapy spider is a class that aids Scrapy on how to navigate a website and the information needed to extract.</p><p>In the data_books directory, you will have to create a python file called book_bot.py (you can name the python file based on your choice).</p><p>You need to define a python class</p><pre>import scrapy</pre><pre>class BookBotSpider(scrapy.Spider):<br>name = &quot;data_books&quot;<br>start_urls = [&#39;https://www.amazon.com/s?k=data+science+books&#39;,]</pre><p><strong>The Fourth Process:</strong></p><p>Create a parse function. A parse function is called for each URL in the start_urls list. Parse function aids in navigating through a website and extracting the information you need.</p><p>Here’s an example on how to extract the title, price and rating of each data science book</p><pre>import scrapy</pre><pre>class BookBotSpider(scrapy.Spider):<br>name = &quot;data_books&quot;<br>start_urls = [&#39;https://www.amazon.com/s?k=data+science+books&#39;,]</pre><pre>def parse(self,response):<br>    for book in response.css(&#39;div.sg-col-4-of-12&#39;):<br>        yield{<br>            &#39;title&#39;: book.css(&#39;span.a-size-medium::text&#39;).get(),<br>            &#39;price&#39;: book.css(&#39;span.a-price-whole::text&#39;).get(),<br>            &#39;rating&#39;: book.css(&#39;span.a-icon-alt::text&#39;).get(),<br>             }</pre><p><strong>Final Process:</strong></p><p>The extracted data can be saved and exported in either JSON, CSV and XML file format.</p><p>Scrapy has built-in export formats such as JSON, XML and CSV.</p><p>To save the extracted data, use this syntax</p><pre>scrapy crawl data_books -o databooks.csv</pre><p>If you intend to save the extracted data to a data base or a cloud storage, you can use this command</p><pre>scrapy.exporters</pre><p>Web scraping is a powerful tool for extracting data.</p><p>Scrapy is efficient in extracting information from websites and have it saved in various formats.</p><p>By applying the steps I outlined in this article, you can:</p><ol><li>Create a scrapy spider.</li><li>Navigate a website.</li><li>Extract the information you need using Scrapy in-built functions.</li></ol><p>Web Scraping is useful for collecting required data for data science projects such as:</p><ol><li>Analyzing book prices.</li><li>Analyzing customer reviews.</li></ol><p>In conclusion, Scrapy is a great tool to have in your data science toolkit.</p><p>Connect With Me On <a href="https://twitter.com/ebukagaus?t=cotG-tB3xJdEU_OqejVdRQ&amp;s=09">Twitter</a> , <a href="https://www.linkedin.com/in/chukwuebuka-ezeokeke-911236194">LinkedIn</a>, <a href="https://github.com/Chukwuebuka-2003">Github</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76b1cc0d351" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/how-to-build-your-data-science-books-reading-list-using-scrapy-76b1cc0d351">How To Build Your Data Science Books Reading List Using Scrapy</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>