<?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 Ashley Eakland on Medium]]></title>
        <description><![CDATA[Stories by Ashley Eakland on Medium]]></description>
        <link>https://medium.com/@smashley_eakland?source=rss-d02b87849932------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*mB3_VSJp5nPaX_6NZd51rA.jpeg</url>
            <title>Stories by Ashley Eakland on Medium</title>
            <link>https://medium.com/@smashley_eakland?source=rss-d02b87849932------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 10:56:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@smashley_eakland/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 Voices in My Head]]></title>
            <link>https://medium.com/@smashley_eakland/the-voices-in-my-head-8d6fdca90d5f?source=rss-d02b87849932------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d6fdca90d5f</guid>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[imposter-syndrome]]></category>
            <dc:creator><![CDATA[Ashley Eakland]]></dc:creator>
            <pubDate>Mon, 18 Apr 2022 20:05:37 GMT</pubDate>
            <atom:updated>2022-04-18T20:05:37.931Z</atom:updated>
            <content:encoded><![CDATA[<p>The constant battle with Imposter Syndrome and how I deal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jrWGUSZaoDT2JeXF" /><figcaption>Photo by <a href="https://unsplash.com/@mittaluday?utm_source=medium&amp;utm_medium=referral">Uday Mittal</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>What was your first thought when you read that title? “This lady hears voices? Is she crazy?” I mean, in some ways maybe... But the short answer is no. I’m referring to the voices of <strong>Imposter Syndrome</strong>. <em>*insert spooky noises and lightning flashes*</em></p><p>When I made this change from my comfortable career in Purchasing to Tech (and Data Science, specifically), I had never heard of “Imposter Syndrome”. I had no idea what everyone was talking about when I joined Flatiron School. But I quickly discovered that this was something I had battled my entire professional life, and would have to face even MORE on my new chosen path.</p><p><strong>So what is Imposter Syndrome?</strong> In a nutshell, it’s feeling inadequate or like you don’t have a clue what you’re doing — but you really do. Or you’re especially hard on yourself for little mistakes and agonize over them (<em>I think my record was 4 days of agony and internal self-abuse over one mistake</em>). Or feeling like a fraud. It can present in a variety of ways that all amount to relatively the same feeling of not belonging or chronic self-doubt.</p><p>For me…it’s that voice in your head saying “you’re not that good, look what they can do. You don’t know what you’re doing. You can’t get a better R-squared than that? You claim to love puzzles and be a problem solver, yet you’re not great at algorithms? You’re not going to get it. It’s too much. You should go back to what you did before — that was safe and comfortable.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*au2uVsUcYFmHjSBX" /><figcaption>Photo by <a href="https://unsplash.com/@nseylubangi?utm_source=medium&amp;utm_medium=referral">Nsey Benajah</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In an article by <a href="https://www.verywellmind.com/imposter-syndrome-and-social-anxiety-disorder-4156469">verywell Mind</a>, they list many examples of how Imposter Syndrome can present itself, but one example that I was surprised to see was “attributing your success to luck”. I have done this many, many times… But I vividly remember doing this during my DS program at Flatiron on a group project and my teammate was quick to remind me that this was my Imposter talking. My Imposter is sneaky and often comes out of my mouth without me even realizing.</p><p><strong>Where did this damn voice come from?</strong> Well, I know where mine comes from, but I’m sure it’s different for everyone. I have a tendency to strive for perfection. My logical brain knows that perfection is not realistic, but my Imposter Brain doesn’t care. “You can do better.” It doesn’t help that I always had a knack for being good at things — like school. I felt like I didn’t have to work at it all that hard and it just made sense. I got good grades. And now I’m an adult (<em>at least in years — sense of humor at times….ehhh</em>), who made this risky jump to an <strong>entirely</strong> new field (<em>dare I say: an old dog learning new tricks</em>). This Imposter went from a whisper to a full blown scream. Add in trying to get a job now post-grad from the program, without a prior bachelors degree or a lot of tech background. And I’m “competing” with those who I perceive to be superior because they are younger so they are innately “better” at tech, and most have a degree, so employers are definitely going to look at them first…. WHOO — we’ve got a choir of Negative Nancy’s in my brain! Concert, anyone?</p><blockquote>The same article linked above gives some other reasons, like personality types and social anxiety as a factor, and I’m sure there are many other reasons this jerk voice can pop up and ruin your day. And it will look different for all of us. In the image below are some of the types — maybe yours is a combination of them, like mine.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0QdCSa0aM-ybQe8XQaBN0Q.png" /><figcaption>Photo by <a href="https://www.verywellmind.com/imposter-syndrome-and-social-anxiety-disorder-4156469">Verywell / Theresa Chiech</a>i</figcaption></figure><p><strong>So how do we cope? </strong>If it’s not clear from the above or my previous blog posts, humor is a big part of my life. It’s an integral part of who I am. If I can’t poke fun at myself or find a way to laugh, am I even living? And while humor does work for me in some ways for some things, it’s not always going to bring you up out of the bottom of that hole. Comparing myself to others is one of my triggers, and I know this. The first thing for me is to limit my social media time on LinkedIn. Yes, I know it’s important for networking, and all that jazz. But it’s just so easy to get caught up in all the great things everyone else is doing and what they <strong>can </strong>do that I find myself circling the drain again. And I only reference LinkedIn specifically as I’m mostly speaking about professional capabilities here, and my personal social media channels are primarily filled with ads, funny memes, and videos of turtles trying to bite dogs at the ankles (<em>thanks, AI and predictive news feed!</em>). But by nature, my other social media is limited to a small amount of time per day as well just for my mental health.</p><p>Another good method that my therapist recommends is to write things out. Now, I’m not using this post for my therapy homework per se, but writing out what you are good at can really help keep things in perspective. Maybe you’re incredible at brain teasers like <a href="https://www.youtube.com/watch?v=E8ty1O-S-MI">this one</a> (<em>I couldn’t get the answer on my own, but my brother did in about .06 seconds — different brain types, I tell ya!</em>), write it down! Or singing, cooking, or working out consistently (<em>it’s a sore subject and I’m working on it</em>). Whatever you’re good at, focus on that and write it down. I like to go back and read my Strengths from the <a href="https://www.gallup.com/cliftonstrengths/en/253676/how-cliftonstrengths-works.aspx">StrengthsFinder 2.0</a> for some warm and fuzzies. It’s an in-depth assessment similar to a personality test that ranks your top talents and strengths, how to develop them, and why each of those things about you is so great. In all, there are 34 strengths across 4 domains (Strategic Thinking, Relationship Building, Influencing, and Executing). I didn’t pay for the whole shebang (which ranks every one of the 34 strengths for you), but it will give you your top five strengths if you buy the book, which comes with the assessment code. I lead heavily with the Strategic Thinking domain (with three of my top five belonging to that domain: Input, Intellection, and Learner), followed by Executing (Restorative) and Relationship Building (Positivity). Reminding yourself of what you’re good at helps to drown out the Imposter noise.</p><p>The last thing I try to keep in mind — and I’m not great at this yet, but I’m trying — is practicing emotional intelligence. I read <a href="https://www.talentsmarteq.com/emotional-intelligence-2-0/">Emotional Intelligence 2.0</a> a while back and the general idea is that if we better understand our emotions, we can improve our emotional intelligence with strategies that target self-awareness, self-management, social awareness, and relationships. Similar to the StrengthsFinder 2.0 model, you take the test and you will find out where you’re weak, and it will help you to build on your foundation. My number one thing to work on — can you guess?! <strong>Take Control of Your Self-Talk. </strong>If I can remember to employ the strategies in the book, for example, replacing judgmental statements like <em>I’m an idiot </em>with factual ones like <em>I made a mistake, </em>I can gradually work toward quieting the Imposter<em>. </em>The hardest part about this approach is that our brains are quite literally wired to give emotions the upper-hand over logic. I learned from this book that signals enter our brain at the spinal cord where they have to travel across the brain to the frontal lobe where rational thinking happens. But on that route is the limbic system — where emotions are experienced. We feel our emotions before our brains can rationally comprehend what we are experiencing. Knowing this, I make a concerted effort to give myself time to let that signal finish its trip before I react. In a professional environment or if I’m under external pressures, I am far better at practicing emotional intelligence. But when it comes to internal pressure, I think the road from the limbic system to the frontal lobe is extra long because I have no problem beating myself to a pulp on the inside.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BmhF6SfHEFHtJvP-" /><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><strong>The absolute biggest thing we can do to deal with Imposter Syndrome is TALK ABOUT IT. </strong>And one thing I have to say about the tech community as a whole (from literally everyone I have encountered) is that this is a real, common issue that is openly discussed. Talking about feelings shouldn’t be taboo. We are here to support you and listen and reassure you. You’re not an idiot. You do know what you’re doing. And, frankly, that little voice inside saying those mean things SUCKS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YlGatxm35g_N7ZzG" /><figcaption>Photo by <a href="https://unsplash.com/@timmarshall?utm_source=medium&amp;utm_medium=referral">Tim Marshall</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>For more ideas to cope with Imposter Syndrome, take a look at the verywell article I’ve linked here. What works for me may not work for you, and there are many ideas for handling your specific Imposter type. And if you need support a bit more involved than just yourself or a chat with a friend, please utilize the <a href="https://findtreatment.samhsa.gov/">SAMHSA Behavioral Health Services Locator</a> and find someone to talk to about it. Mental health is important. You are important.</p><p>Thanks for coming to my HEAD talk. (<em>That’s a play on words… TED talk, HEAD talk… you get it…</em>)</p><blockquote><em>If you or a loved one are struggling with mental health, contact the </em><a href="https://www.samhsa.gov/find-help/national-helpline"><em>Substance Abuse and Mental Health Services Administration (SAMHSA) National Helpline</em></a><em> at 1–800–662–4357 for information on support and treatment facilities in your area.</em></blockquote><h4>Resources</h4><blockquote><a href="https://www.verywellmind.com/imposter-syndrome-and-social-anxiety-disorder-4156469"><em>verywell Mind — Imposter Syndrome</em></a></blockquote><blockquote><em>Don Clifton, Tom Rath | StrengthsFinder 2.0, 2007</em></blockquote><blockquote><em>Dr. Jean Greaves, Dr. Travis Bradberry| Emotional Intelligence 2.0, 2009</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d6fdca90d5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Put on your tool belt. Let’s get Plumbing!]]></title>
            <link>https://medium.com/@smashley_eakland/put-on-your-tool-belt-lets-get-plumbing-a2ca8efcc61b?source=rss-d02b87849932------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2ca8efcc61b</guid>
            <category><![CDATA[pdf]]></category>
            <category><![CDATA[parsing]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Ashley Eakland]]></dc:creator>
            <pubDate>Sat, 02 Apr 2022 20:43:30 GMT</pubDate>
            <atom:updated>2022-04-02T20:43:30.832Z</atom:updated>
            <content:encoded><![CDATA[<p>Parsing PDF’s with Python and the PDF Plumber Library</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*23u23Ky6Rqx_rRHF" /><figcaption>Photo by <a href="https://unsplash.com/@neonbrand?utm_source=medium&amp;utm_medium=referral">NeONBRAND</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>As Data Scientists, Data Analysts, Data Fanatics, what-have-yous — we have many tools in our tool belts. And I’ve gotta say, I’m a big fan of “<strong>have and not need</strong>” rather than “<strong>need and not have</strong>”. It was during my Capstone Project at Flatiron that I came upon a problem that I didn’t have the right tool for, so I had to come up with a solution! I was provided real-world data for my project, and one of the file types was a PDF. “Why not just convert the file type to something like .xls?” you might be wondering. Well that feels a bit like cheating to me. Surely, there has to be a way to extract what I need from the PDF without file conversions… And what if I come across a file that I can’t convert? I wanted to see if I could parse the PDF first — solve my problem and gain a new tool for my belt. Enter PDF Plumber!</p><blockquote><em>Now, I feel like it’s critical to mention that you should read through the </em><a href="https://github.com/jsvine/pdfplumber"><em>documentation</em></a><em> and keep it handy during your tinkering. I’ve found that depending on what the PDF contains and what it looks like (is the text selectable? Are there charts or images?), it can really affect how you’re going to extract what’s in your file.</em></blockquote><p>For demonstration purposes, I’m using my resume PDF. <em>#shamelessplug</em></p><p>Now, we’re going to open and store our pages of the PDF for convenience. This particular file (being that it’s my resume) only has 1 page, so I’m grabbing just that page and saving it as the first page, but you could follow this same principle for subsequent pages, or write a function to grab and store all the pages for you. Show us those nifty coding skills!</p><pre><em>#import the library - use whatever alias you like</em><br>import pdfplumber as mario</pre><pre><em>#open your file using the plumber and store the first page in a variable</em><strong><br>with</strong> mario<strong>.</strong>open(&quot;./Data/Data Science Resume -Ashley.pdf&quot;) <strong>as</strong> pdf:<br>    resume_page <strong>=</strong> pdf<strong>.</strong>pages[0]<br>    print(resume_page<strong>.</strong>objects<strong>.</strong>keys())</pre><pre><strong>output: dict_keys([&#39;rect&#39;, &#39;line&#39;, &#39;char&#39;])</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hNhM9iTOEtbde9LQ" /><figcaption>Photo by <a href="https://unsplash.com/@claudiolcastro?utm_source=medium&amp;utm_medium=referral">Cláudio Luiz Castro</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you check the file type of the first_page, you’ll see that it is a “Page” type. The attributes of this type can be found in the documentation and will depend on what is contained in your file. You can call upon .objects, .chars, .lines, and even .images (among others)!</p><pre><em>#print the type of the variable we stored<br></em>type(resume_page)</pre><pre><strong>output: pdfplumber.page.Page</strong></pre><pre><em>#calling on the objects of the page - I will not put the output for #this here, as it prints every character on the page along with it&#39;s #location and orientation, font, etc. but the notebook is in the #repository linked at the bottom for reference</em></pre><pre>print(resume_page<strong>.</strong>objects)</pre><p>Using the built in functions extract_words() and extract_tables(), the PDF Parser will skim the page and return anything that looks like a word or a table. Extract_words() returns a dictionary for each word with its location on the PDF, as well as the direction the text is going. The extract_tables() will return a list of lists containing anything it finds within what it deems to be a table.</p><pre>words <strong>=</strong> resume_page<strong>.</strong>extract_words()<br>words</pre><pre><strong>output:</strong><br>[{&#39;text&#39;: &#39;ASHLEY&#39;,<br>  &#39;x0&#39;: 254.8445175,<br>  &#39;x1&#39;: 298.77912579023433,<br>  &#39;top&#39;: 38.94000044999996,<br>  &#39;doctop&#39;: 38.94000044999996,<br>  &#39;bottom&#39;: 52.9399999499999,<br>  &#39;upright&#39;: True,<br>  &#39;direction&#39;: 1},<br> {&#39;text&#39;: &#39;EAKLAND&#39;,<br>  &#39;x0&#39;: 301.93834004999997,<br>  &#39;x1&#39;: 357.16038944481437,<br>  &#39;top&#39;: 38.94000044999996,<br>  &#39;doctop&#39;: 38.94000044999996,<br>  &#39;bottom&#39;: 52.9399999499999,<br>  &#39;upright&#39;: True,<br>  &#39;direction&#39;: 1},<br> {&#39;text&#39;: &#39;Puyallup,&#39;,<br>  &#39;x0&#39;: 75.40539525,<br>  &#39;x1&#39;: 114.442016835,<br>  &#39;top&#39;: 54.70499970000003,<br>  &#39;doctop&#39;: 54.70499970000003,<br>  &#39;bottom&#39;: 65.20499970000003,<br>  &#39;upright&#39;: True,<br>  &#39;direction&#39;: 1},<br> {&#39;text&#39;: &#39;WA&#39;,<br>  &#39;x0&#39;: 116.815796145,<br>  &#39;x1&#39;: 131.75573769,<br>  &#39;top&#39;: 54.70499970000003,<br>  &#39;doctop&#39;: 54.70499970000003,<br>  &#39;bottom&#39;: 65.20499970000003,<br>  &#39;upright&#39;: True,<br>  &#39;direction&#39;: 1},<br> {&#39;text&#39;: &#39;98374|253-737-####&#39;,<br>  &#39;x0&#39;: 134.129517,<br>  &#39;x1&#39;: 228.53650283999997,<br>  &#39;top&#39;: 54.69914048202145,<br>  &#39;doctop&#39;: 54.69914048202145,<br>  &#39;bottom&#39;: 65.20499970000003,<br>  &#39;upright&#39;: True,<br>  &#39;direction&#39;: 1}, ... </pre><p>For example, in the tables below, you can see that “Mario” found a couple of “tables” on my resume, but broke the sentences up by line, and also didn’t catch everything on the page. So we will use the extract_words for this particular demonstration.</p><pre>tables <strong>=</strong> resume_page<strong>.</strong>extract_tables()<br>tables</pre><pre><strong>output:</strong><br>[[[&#39;Data Scientist with a passion for statistical analysis and machine learning. Proven track record of demonstrated analytical skills and&#39;],<br>  [&#39;dependability from a background in Supply Chain (in both aerospace and structural steel applications). Very detail oriented with&#39;],<br>  [&#39;strong interpersonal skills and a belief that kindness, empathy, and a bit of humor are crucial to build and strengthen relationships,&#39;],<br>  [&#39;both personal and professional.&#39;],<br>  [&#39;TECHNICAL SKILLS&#39;]]]</pre><p>Admittedly, this is hard to read in the output above. The nested dictionary of words can be a little cumbersome, so let’s write a function to extract this and plunk it into a neater format for reading.</p><pre><strong>def</strong> word_extraction(page_num):<br>    <em>&#39;&#39;&#39;<br>    page_num = int for page num<br>    returns words = list of words<br>    &#39;&#39;&#39;</em><br>    output <strong>=</strong> pdf<strong>.</strong>pages[page_num]<strong>.</strong>extract_words(x_tolerance<strong>=</strong>3,<br>                   y_tolerance<strong>=</strong>3, <br>                   keep_blank_chars<strong>=False</strong>, <br>                   use_text_flow<strong>=False</strong>, <br>                   horizontal_ltr<strong>=True</strong>, <br>                   vertical_ttb<strong>=True</strong>, <br>                   extra_attrs<strong>=</strong>[])<br>    words <strong>=</strong> []<br>    <strong>for</strong> word <strong>in</strong> output:<br>        words<strong>.</strong>append(word[&#39;text&#39;]) <em>#add the word value found in the &quot;text&quot; key to a list</em><br>    <br>    <strong>return</strong> words</pre><p>Now that we have it defined, let’s call it on our page number and see what we get!</p><pre>word_extraction(0)</pre><pre><strong>output:<br></strong>[&#39;ASHLEY&#39;,<br> &#39;EAKLAND&#39;,<br> &#39;Puyallup,&#39;,<br> &#39;WA&#39;,<br> &#39;98374|253-737-####&#39;,<br> &#39;|ashley@eakland.net|Portfolio&#39;,<br> &#39;Website|GitHub|Medium|LinkedIn&#39;,<br> &#39;DATA&#39;,<br> &#39;SCIENTIST&#39;,<br> &#39;Data&#39;,<br> &#39;Scientist&#39;,<br> &#39;with&#39;,<br> &#39;a&#39;,<br> &#39;passion&#39;,<br> &#39;for&#39;,<br> &#39;statistical&#39;,<br> &#39;analysis&#39;,<br> &#39;and&#39;,<br> &#39;machine&#39;,<br> &#39;learning.&#39;,<br> &#39;Proven&#39;,<br> &#39;track&#39;,<br> &#39;record&#39;,<br> &#39;of&#39;,<br> &#39;demonstrated&#39;,<br> &#39;analytical&#39;,<br> &#39;skills&#39;,<br> &#39;and&#39;,<br> &#39;dependability&#39;,<br> &#39;from&#39;,<br> &#39;a&#39;,<br> &#39;background&#39;,<br> &#39;in&#39;,<br> &#39;Supply&#39;,<br> &#39;Chain&#39;,<br> &#39;(in&#39;,<br> &#39;both&#39;,<br> &#39;aerospace&#39;,<br> &#39;and&#39;, ...</pre><p>Oof. Okay, this is <em>better</em>, but still not great. It’s just a giant list of words. So let’s grab the words by section — like the header, then the statement, then the projects, etc. By printing <strong>words</strong> again, we can easily see locations are provided for each word. Let’s grab the locations from the top of the page (doctop) and bottom of the page (bottom) for each section “chunk”, and use those to locate and grab the words for each section.</p><pre>print(words)</pre><pre><strong>output:</strong><br>[{&#39;text&#39;: &#39;ASHLEY&#39;, &#39;x0&#39;: 254.8445175, &#39;x1&#39;: 298.77912579023433, &#39;top&#39;: 38.94000044999996, &#39;doctop&#39;: 38.94000044999996, &#39;bottom&#39;: 52.9399999499999, &#39;upright&#39;: True, &#39;direction&#39;: 1}, {&#39;text&#39;: &#39;EAKLAND&#39;, &#39;x0&#39;: 301.93834004999997, &#39;x1&#39;: 357.16038944481437, &#39;top&#39;: 38.94000044999996, &#39;doctop&#39;: 38.94000044999996, &#39;bottom&#39;: 52.9399999499999, &#39;upright&#39;: True, &#39;direction&#39;: 1}, {&#39;text&#39;: &#39;Puyallup,&#39;, &#39;x0&#39;: 75.40539525, &#39;x1&#39;: 114.442016835, &#39;top&#39;: 54.70499970000003, &#39;doctop&#39;: 54.70499970000003, &#39;bottom&#39;: 65.20499970000003, &#39;upright&#39;: True, &#39;direction&#39;: 1}, {&#39;text&#39;: &#39;WA&#39;, &#39;x0&#39;: 116.815796145, &#39;x1&#39;: 131.75573769, &#39;top&#39;: 54.70499970000003, &#39;doctop&#39;: 54.70499970000003, &#39;bottom&#39;: 65.20499970000003, &#39;upright&#39;: True, &#39;direction&#39;: 1}, {&#39;text&#39;: &#39;98374|253-737-####&#39;, &#39;x0&#39;: 134.129517, &#39;x1&#39;: 228.53650283999997, &#39;top&#39;: 54.69914048202145, &#39;doctop&#39;: 54.69914048202145, &#39;bottom&#39;: 65.20499970000003, &#39;upright&#39;: True, &#39;direction&#39;: 1}, </pre><pre><em>#The first chunk of words make up the header, so let&#39;s grab those together +/- a few pixels for good measure</em><br><em>#The 38 and 95 are pulled from the dictionary for the words seen above. </em><br><strong>def</strong> section_extraction(page_num):<br>    &#39;&#39;&#39;<br>   <em> page_num = int for page num</em><br>    &#39;&#39;&#39;<br>    output <strong>=</strong> pdf<strong>.</strong>pages[page_num]<strong>.</strong>extract_words(x_tolerance<strong>=</strong>3,<br>                   y_tolerance<strong>=</strong>3, <br>                   keep_blank_chars<strong>=False</strong>, <br>                   use_text_flow<strong>=False</strong>, <br>                   horizontal_ltr<strong>=True</strong>, <br>                   vertical_ttb<strong>=True</strong>, <br>                   extra_attrs<strong>=</strong>[])<br>    header <strong>=</strong> []<br>    <strong>for</strong> word <strong>in</strong> output:<br>        <strong>if</strong> word[&#39;doctop&#39;] <strong>&gt;=</strong> 38 <strong>and</strong> word[&#39;bottom&#39;] <strong>&lt;=</strong> 95:<br>                    header<strong>.</strong>append(word[&#39;text&#39;])<br>    <strong>return</strong> header</pre><p>Perfect — function to grab the header words is defined. Let’s test it and see how it works!</p><pre>section_extraction(0)</pre><pre><strong>output:<br></strong>[&#39;ASHLEY&#39;,<br> &#39;EAKLAND&#39;,<br> &#39;Puyallup,&#39;,<br> &#39;WA&#39;,<br> &#39;98374|253-737-####&#39;,<br> &#39;|ashley@eakland.net|Portfolio&#39;,<br> &#39;Website|GitHub|Medium|LinkedIn&#39;,<br> &#39;DATA&#39;,<br> &#39;SCIENTIST&#39;]</pre><p>Much better! Now I have a neat little header section! Let’s revise our function to include all the sections!</p><pre><em>#adding the other chunks of the page with their location ranges to #our function to grab the balance of the words</em><br><br><strong>def</strong> section_extraction(page_num):<br>    &#39;&#39;&#39;<br>    <em>page_num = int for page num</em><br>    &#39;&#39;&#39;<br>    output <strong>=</strong> pdf<strong>.</strong>pages[page_num]<strong>.</strong>extract_words(x_tolerance<strong>=</strong>3,<br>                   y_tolerance<strong>=</strong>3, <br>                   keep_blank_chars<strong>=False</strong>, <br>                   use_text_flow<strong>=False</strong>, <br>                   horizontal_ltr<strong>=True</strong>, <br>                   vertical_ttb<strong>=True</strong>, <br>                   extra_attrs<strong>=</strong>[])<br>    header <strong>=</strong> []<br>    <strong>for</strong> word <strong>in</strong> output:<br>        <strong>if</strong> word[&#39;doctop&#39;] <strong>&gt;=</strong> 38 <strong>and</strong> word[&#39;bottom&#39;] <strong>&lt;=</strong> 95:<br>            header<strong>.</strong>append(word[&#39;text&#39;])<br>    description <strong>=</strong> []<br>    <strong>for</strong> word <strong>in</strong> output:<br>        <strong>if</strong> word[&#39;doctop&#39;] <strong>&gt;=</strong> 92 <strong>and</strong> word[&#39;bottom&#39;] <strong>&lt;=</strong> 145:<br>            description<strong>.</strong>append(word[&#39;text&#39;])<br>    technical_skills <strong>=</strong> []<br>    <strong>for</strong> word <strong>in</strong> output:<br>        <strong>if</strong> word[&#39;doctop&#39;] <strong>&gt;=</strong> 149 <strong>and</strong> word[&#39;bottom&#39;] <strong>&lt;=</strong> 190:<br>            technical_skills<strong>.</strong>append(word[&#39;text&#39;])<br>    technical_projects <strong>=</strong> []<br>    <strong>for</strong> word <strong>in</strong> output:<br>        <strong>if</strong> word[&#39;doctop&#39;] <strong>&gt;=</strong> 203 <strong>and</strong> word[&#39;bottom&#39;] <strong>&lt;=</strong> 508:<br>            technical_projects<strong>.</strong>append(word[&#39;text&#39;])<br>    history <strong>=</strong> []<br>    <strong>for</strong> word <strong>in</strong> output:<br>        <strong>if</strong> word[&#39;doctop&#39;] <strong>&gt;=</strong> 511 <strong>and</strong> word[&#39;bottom&#39;] <strong>&lt;=</strong> 671:<br>            history<strong>.</strong>append(word[&#39;text&#39;])<br>    education <strong>=</strong> []<br>    <strong>for</strong> word <strong>in</strong> output:<br>        <strong>if</strong> word[&#39;doctop&#39;] <strong>&gt;=</strong> 674 <strong>and</strong> word[&#39;bottom&#39;] <strong>&lt;=</strong> 751:<br>            education<strong>.</strong>append(word[&#39;text&#39;])<br>                    <br>    <strong>return</strong> header, description, technical_skills, technical_projects, history, education</pre><p>There! Now we have lists of the words within the PDF grouped by their sections. Now, depending on what is contained within the PDF, we can change the format of each of these. For example, the Header and Technical Skills could be better suited for a dictionary rather than a list. We can also modify the description section to be a long string rather than a list of words, and perform a similar task with the technical_projects. I’ve done that below just for demonstration purposes.</p><blockquote>It is also worth noting that this would be simple enough to reformat our functions to correct the outputs initially, but I’m not going to do that at this point in time. #stretchgoal ;)</blockquote><pre>words_lists <strong>=</strong> section_extraction(0)<br>words_lists</pre><pre><strong>output:<br></strong>([&#39;ASHLEY&#39;,<br>  &#39;EAKLAND&#39;,<br>  &#39;Puyallup,&#39;,<br>  &#39;WA&#39;,<br>  &#39;98374|253-737-####&#39;,<br>  &#39;|ashley@eakland.net|Portfolio&#39;,<br>  &#39;Website|GitHub|Medium|LinkedIn&#39;,<br>  &#39;DATA&#39;,<br>  &#39;SCIENTIST&#39;],[&#39;Data&#39;,&#39;Scientist&#39;, &#39;with&#39;,&#39;a&#39;,&#39;passion&#39;,&#39;for&#39;,<br>  &#39;statistical&#39;,&#39;analysis&#39;,&#39;and&#39;,&#39;machine&#39;,&#39;learning.&#39;,&#39;Proven&#39;,      &#39;track&#39;,&#39;record&#39;, &#39;of&#39;,&#39;demonstrated&#39;,&#39;analytical&#39;,&#39;skills&#39;,&#39;and&#39;,<br>  &#39;dependability&#39;,&#39;from&#39;,&#39;a&#39;, &#39;background&#39;,&#39;in&#39;, &#39;Supply&#39;,&#39;Chain&#39;,<br>  &#39;(in&#39;,&#39;both&#39;,&#39;aerospace&#39;,&#39;and&#39;,&#39;structural&#39;,&#39;steel&#39;, &#39;applications).&#39;,&#39;Very&#39;,&#39;detail&#39;, &#39;oriented&#39;, &#39;with&#39;,&#39;strong&#39;,<br>  &#39;interpersonal&#39;,&#39;skills&#39;,&#39;and&#39;, &#39;a&#39;, &#39;belief&#39;,&#39;that&#39;,&#39;kindness,&#39;,<br>  &#39;empathy,&#39;,&#39;and&#39;,&#39;a&#39;, &#39;bit&#39;,&#39;of&#39;, &#39;humor&#39;,&#39;are&#39;, &#39;crucial&#39;,<br>  &#39;to&#39;,&#39;build&#39;,&#39;and&#39;,&#39;strengthen&#39;,&#39;relationships,&#39;,&#39;both&#39;,<br>  &#39;personal&#39;,&#39;and&#39;, &#39;professional.&#39;],[&#39;TECHNICAL&#39;,&#39;SKILLS&#39;,<br>  &#39;Python,&#39;,&#39;Pandas, Matplotlib&#39;,&#39;&amp;&#39;, &#39;Seaborn,&#39;,&#39;StatsModels,  Scikit-learn,&#39;, &#39;GeoPy,&#39;,&#39;Version&#39;,&#39;Control&#39;,&#39;(git),&#39;,&#39;SQL&#39;,&#39;as&#39;,  &#39;well&#39;, &#39;as&#39;,&#39;experience&#39;, &#39;with&#39;,&#39;TensorFlow,&#39;,&#39;web&#39;,&#39;scraping,&#39;,<br>  &#39;and&#39;,&#39;MRP&#39;,&#39;and&#39;, &#39;ERP&#39;,&#39;software&#39;,&#39;(JobBoss,&#39;,IQMS,&#39;,<br>  &#39;FabTrol),Microsoft&#39;,&#39;Office&#39;,&#39;Excel(Suite)&#39;],[&#39;TECHNICAL&#39;,<br>  &#39;PROJECTS&#39;,&#39;A&#39;, &#39;Pizza&#39;,&#39;the&#39;,&#39;Profit&#39;, &#39;-Github&#39;,&#39;Identifying&#39;,<br>  &#39;which&#39;, &#39;marketing&#39;,&#39;avenue&#39;,&#39;and&#39;,&#39;promos&#39;,&#39;positively&#39;,<br> &#39;affect&#39;,&#39;net&#39;,&#39;sales&#39;,&#39;the&#39;,&#39;most&#39;,&#39;to&#39;,&#39;make&#39;,&#39;solid&#39;,&#39;business&#39;,<br>  &#39;recommendations&#39;,&#39;for&#39;, &#39;a&#39;,&#39;local&#39;,&#39;pizza&#39;,franchise.&#39;,<br>  &#39;●Data&#39;,&#39;Wrangled&#39;,&#39;9&#39;,&#39;marketing&#39;,&#39;and&#39;,&#39;sales&#39;,&#39;reports&#39;,<br>  &#39;provided&#39;,&#39;by&#39;,&#39;the&#39;,&#39;business&#39;,&#39;containing&#39;,&#39;sales&#39;,&#39;data&#39;,<br>                           ...</pre><pre>header_dict <strong>=</strong> {&#39;Name&#39;: words_lists[0][0:2], &#39;Contact Info&#39;: words_lists[0][2:7], &#39;Title&#39;: words_lists[0][7:9]}<br>header_dict</pre><pre><strong>output:</strong><br>{&#39;Name&#39;: [&#39;ASHLEY&#39;, &#39;EAKLAND&#39;],<br> &#39;Contact Info&#39;: [&#39;Puyallup,&#39;,<br>  &#39;WA&#39;,<br>  &#39;98374|253-737-####&#39;,<br>  &#39;|ashley@eakland.net|Portfolio&#39;,<br>  &#39;Website|GitHub|Medium|LinkedIn&#39;],<br> &#39;Title&#39;: [&#39;DATA&#39;, &#39;SCIENTIST&#39;]}</pre><pre>description_statement <strong>=</strong> &#39; &#39;<strong>.</strong>join(word <strong>for</strong> word <strong>in</strong> words_lists[1])<br>description_statement</pre><pre><strong>output:</strong><br>&#39;Data Scientist with a passion for statistical analysis and machine learning. Proven track record of demonstrated analytical skills and dependability from a background in Supply Chain (in both aerospace and structural steel applications). Very detail oriented with strong interpersonal skills and a belief that kindness, empathy, and a bit of humor are crucial to build and strengthen relationships, both personal and professional.&#39;</pre><p>Much better! I only showed a couple of examples above here, but they are all in the notebook in the linked repository on my GitHub if you would like to see the complete process. I’m guessing if you’re still with me, you know basic coding in Python, so I’m not going to bore you with every code block.</p><p>One last thing that I do want to show is the page to image function — which I thought was so neat! You will need to install ImageMagick (and Wand — which is the Python binding for ImageMagick) to get this to work, so take a look at the documentation <a href="https://docs.wand-py.org/en/latest/guide/install.html#install-imagemagick-on-mac">here</a>. It’s well written and easy to follow, and worth it!</p><pre>resume <strong>=</strong> resume_page<strong>.</strong>to_image(resolution<strong>=</strong>150)<br>resume</pre><pre><strong>output:</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dAIvfoLyGiOwsTyJCOY3fw.png" /><figcaption>An image of the PDF is displayed on the output of your notebook! This is an abridged version, of course, not the full page that is seen in the notebook.</figcaption></figure><p>And there you have it! A down and dirty intro to PDF Plumber! There is SO MUCH to learn from this tool, and I’ve just barely scratched the surface myself. I am still tinkering and playing with different PDF files (with selectable text, charts, etc). This is a highly useful skill to add to our tool belts so take a look and tinker around with PDF Plumber and your own PDF’s (resumes or otherwise) and imagine the possibilities!</p><blockquote><strong><em>Resources:</em></strong><br><em>PDF Plumber Documentation: </em><a href="https://github.com/jsvine/pdfplumber"><em>Find it here</em></a><em><br>ImageMagick Documentation: </em><a href="https://docs.wand-py.org/en/latest/guide/install.html#install-imagemagick-on-mac"><em>Find it here</em></a><em><br>GitHub Repository containing my Notebook and Code: </em><a href="https://github.com/smashley-eakland/plumb-a-pdf"><em>Find it here</em></a></blockquote><p>Thank you for reading! Till next time!</p><figure><img alt="Mario and Luigi MarioKart Costumes — Author and Spouse" src="https://cdn-images-1.medium.com/max/1024/1*jKu83k2M9YFIaWM4_Q-Otw.png" /><figcaption>Enjoy this photo of the Author and the Mario to her Luigi in their second place winning Halloween Costumes — 2020.</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2ca8efcc61b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Love So Far: An Interactive View]]></title>
            <link>https://medium.com/@smashley_eakland/love-so-far-an-interactive-view-add3c01a7ab9?source=rss-d02b87849932------2</link>
            <guid isPermaLink="false">https://medium.com/p/add3c01a7ab9</guid>
            <category><![CDATA[social-project]]></category>
            <category><![CDATA[folium]]></category>
            <category><![CDATA[valentines-day]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[geopy]]></category>
            <dc:creator><![CDATA[Ashley Eakland]]></dc:creator>
            <pubDate>Sat, 12 Feb 2022 16:10:14 GMT</pubDate>
            <atom:updated>2022-02-28T04:42:41.942Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Folium Library and a Grand Romantic Gesture!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zBI6-ynPUvP5FJM1U2GxKg.jpeg" /><figcaption>Photo by author — This is the view from Kerry Park overlooking Seattle. Custom, handwritten notes like this (but more romantic or sweet) with scenic views behind are traded worldwide.</figcaption></figure><p>In honor of Valentine’s Day, <em>*insert reader groans here*</em>, I thought I would write my blog post this week on a fun social project that I stumbled across recently, but with a twist using the Folium Library in Python.</p><p>According to <a href="https://today.yougov.com/topics/lifestyle/articles-reports/2017/02/08/americans-fall-out-of-love-with-valentines-day">this survey</a>, 48% of Americans think that Valentine’s Day is overrated, compared to 43% who would consider it to be “romantic”. I would not consider myself to be the overly romantic type, and I’m sure my husband would agree. <em>However</em>, I can appreciate a grand gesture when I see one! Enter the <strong>Love So Far Project</strong>!</p><p>I was in one of my “plant lovers” social media groups when I saw someone asking for handwritten notes with a message for her spouse on them from other members’ locations around the world. <em>“What a sweet idea!” I thought to myself. </em>It was reading through the comments that I realized — this is a <strong>thing</strong>. A thing people do. For their spouses, for their kids, friends, parents... You name it! The messages are all different and the views behind the notes change, but the love spreads like wildfire — across the globe. I offered to get her a shot of Seattle, and being the gorgeous city that it is, ended up with others wanting messages, too. The interesting thing that I came to discover was that these were being offered as trades, like baseball cards. So I could write a message for someone with my beloved city behind it, and in turn, they would do the same for me. And so began my journey with the <strong>Love So Far Project</strong>…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NTCxtdCvHShQ_bm_4OdPlw.jpeg" /><figcaption>Photo by author — an example of a note I have written and sent off.</figcaption></figure><p>In just over a week, I have written many notes and sent them around the world, and in turn, received messages that I am planning to print and put in an album for my husband (<em>romantic gesture!</em>). For my blog this week, I thought it might be interesting to see them visualized using the Folium library in Python — a library that I personally love. It’s easy to generate great maps that are user friendly and highly customizable.</p><p>To start, import the library into your notebook. I had my locations in an Excel for keeping track of where I’ve sent these notes off to, which ended up being handy for this! Excel also has the Geography feature which auto-populated the latitude and longitudes for me ahead of time. Using Pandas, I’ll read in my Excel file with the locations listed, and their coordinates in their respective columns, ready for mapping.</p><pre>import folium<br>import pandas as pd<br>locations = pd.read_excel(&#39;locations.xslx&#39;)</pre><p>For my example, we’re going to initialize the base map at the site of my photo location, Kerry Park. The latitude and longitude is required to initialize the map, and you can play with the zoom_start feature to have it display the map however you like it visually at initialization. For this example, I’ll have it fairly zoomed in.</p><blockquote>There are other parameters we can pass in here, such as the tiles parameter, which allows you to change the view of your map. For example, ‘CartoDB dark_matter’ will change the view to a dark mode, almost like the night view of your maps on GPS. I’m just going to use the default “OpenStreetView” here, but I encourage you to take a look at the documentation <a href="https://python-visualization.github.io/folium/index.html">here</a>. The Choropleth maps are especially nifty — but not applicable to my example.</blockquote><pre><em>#Kerry Park starting location</em><br>base_map = folium.Map([47.629486, -122.359909], zoom_start=18)<br>base_map</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l3bAyJTB2TFduKNhrHJ1Ng.png" /><figcaption>Base map — zoomed in to 18</figcaption></figure><p>Using Folium, in just a couple of simple lines of code, we can add markers at our latitudes and longitudes coordinates that include popups with whatever information we desire at those markers as well! I zipped my latitude, longitude and name of location together in a list of points, which is then iterated through for the markers. For each point, Folium will extract the latitude, longitude and the name, plot the marker, and add a popup with the name of the location to the popup for us!</p><pre><em>#initializing marker variables</em><br>long = locations[&#39;Longitude&#39;]<br>lat = locations[&#39;Latitude&#39;]<br>name = locations[&#39;City&#39;]<br>points = list(zip(lat, long, name))</pre><pre><em>#adding markers with popups to my base map</em><br>for p in points:<br>    lat = p[0]<br>    long = p[1]<br>    name = p[2]<br>    popup = folium.Popup(name)<br>    marker = folium.Marker(location=[lat,long], popup=popup)<br>    marker.add_to(base_map)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*abHQaaI7DwztE2hQqHwJkg.png" /></figure><p>Voila! Now we have these handy markers on all of our locations that includes the name of where I sent off a little handwritten love. But what if we took it a step further… What if we added a column to our DataFrame that calculates the distance between the destination of the note and our starting point? I didn’t quite know how to accomplish this, but through a little quick digging, I found that GeoPy is a pretty simple and clean way to get this done! <em>(</em><a href="https://geopy.readthedocs.io/en/latest/"><em>Documentation here.</em></a><em>)</em></p><pre>from geopy import distance</pre><p>In order for GeoPy to calculate the distance, you need to feed it a tuple of locations. For this, I will utilize a loop again to create tuples of the note destination coordinates, and create a “home base” Seattle-coordinate tuple that I can feed in. These will then be appended into a list of distances that will become my “Distance” row in my DataFrame!</p><pre><em>#calculate distance from Seattle</em><br>seattle = (47.629486, -122.359909)<br>long = locations[&#39;Longitude&#39;]<br>lat = locations[&#39;Latitude&#39;]<br>coords = list(zip(lat, long))<br>distances = []<br>for loc in coords:<br>    distances.append(distance.distance(loc, seattle))</pre><pre><em>#add it to the DF</em><br>locations[&#39;Distance&#39;] = distances</pre><p>Now, a tricky thing that I found with this was that once complete, it becomes a “geodesic” object (because I had calculated the Geodesic distance — or shortest path on a curved surface). This was only an inconvenience to me as there was no innate rounding done to the calculation. Once we reformat our popups to include the distance from Seattle — you can see why this might be a bit bothersome (<em>or at least to nit-picky folks like myself</em>).</p><pre><em>#reformat our base map to include location distance from Seattle &quot;home base&quot;</em></pre><pre>distances = locations[&#39;Distance&#39;]<br>long = locations[&#39;Longitude&#39;]<br>lat = locations[&#39;Latitude&#39;]<br>name = locations[&#39;City&#39;]<br>points = list(zip(lat, long, name, distances))<br>for p in points:<br>    lat = p[0]<br>    long = p[1]<br>    name = p[2]<br>    dist_frm = p[3]<br>    dist_pop = f&#39; {name} : {dist_frm} from Seattle!&#39;<br>    popup = folium.Popup(dist_pop)<br>    marker = folium.Marker(location=[lat,long], popup=popup)<br>    marker.add_to(base_map)<br>    <br>base_map</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-6V0VFl-YJezsqV2xOUPNQ.png" /></figure><p><strong>SO</strong> many decimal points. That’s just not going to work for me. I tried a few different methods to resolve it, but the geodesic method always caught on to me and would not allow any sort of rounding functionality! My quick fix for this was to copy into another column (to ensure I didn’t break what I already had…<em>I’m a big fan of double-coverage and CYA</em>), cast my values into strings, drop the “km” and cast back into a float. By doing this, I was able to save my values, get it into a <em>‘roundable’</em> format, and keep my original geodesic object column happy in the process. Everyone wins! There may be a better or “cleaner” way, and I’ll keep trying to find it. <em>If you happen to know what it is, feel free to comment and enlighten me!</em></p><p>In reading through the documentation and playing with styling, I also discovered that you can change the Icon of the marker! You can change just the color of the blue “bubble”, the color of the white “dot” in the middle, or make it something else entirely! For example, Folium supports the use of FontAwesome and GlyphIcon icons. See the documentation and the Font-Awesome website for more info on these — but know that they are designed to be used with inline elements (like HTML and CSS), and per the documentation, you will have to define your prefix in your icon parameters if you opt to use a different icon.</p><pre><em>#Fix to rounding to 2 decimal places &amp; change some stylings!</em></pre><pre>distances = locations[&#39;Distance from Seattle&#39;] <em>#new float column</em><br>long = locations[&#39;Longitude&#39;]<br>lat = locations[&#39;Latitude&#39;]<br>name = locations[&#39;City&#39;]<br>points = list(zip(lat, long, name, distances))</pre><pre>for p in points:<br>    lat = p[0]<br>    long = p[1]<br>    name = p[2]<br>    dist_frm = p[3]<br>    dist_pop = f&#39; {name} : {dist_frm:.2f}km from Seattle!&#39; <em>#rounded</em><br>    popup = folium.Popup(dist_pop)</pre><pre><em>#Define our new icon styling - let&#39;s make them red with a white heart because ~ LOVE! <br>    <br>    </em>icon = folium.Icon(color=&#39;red&#39;, icon_color=&#39;white&#39;, icon=&#39;heart&#39;, angle=0, prefix=&#39;fa&#39;)<br>    marker = folium.Marker(location=[lat,long], popup=popup, icon=icon)</pre><pre>    marker.add_to(base_map)</pre><blockquote>The angle allows you to rotate the view of the heart within the marker, and the prefix is calling upon the FontAwesome ‘heart’ designation for my icon.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SGRRKefsHx4Xq8CBCEkjIg.gif" /><figcaption>A demonstration of the interactive capability of these maps!</figcaption></figure><p>If you wanted to have all of the popups shown at launch, you definitely could do that by simply passing popup = folium.Popup(dist_pop, show=True) in the code above. With less markers, this would work great, but gets quite messy very quickly with more markers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xwq6J7SnnTgxqXN-3kV-lQ.png" /></figure><p>There you have it! A short and sweet example of how we can take just a few moments of our day to send a little love across the globe… and then subsequently, throw it into an Excel sheet or just straight into Pandas and visualize it using Folium. Because we are Data Scientists after all.</p><blockquote>To see the supporting repository and full Jupyter Notebook, please visit my GitHub page <a href="https://github.com/smashley-eakland/love-so-far">here!</a></blockquote><blockquote>If you’re interested in the <strong>Love So Far</strong> project, you can find it on Facebook. Even if you don’t want the notes in return, it is truly heartwarming to write these notes and send them off. To hear the stories of who they are going to and meet all these new people all over the world is rewarding! It’s a small thing that doesn’t take much time, but I think the joy that the notes bring to the recipient is well worth the time we invest.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MW5dQXXxaXBbuOxTZJAT8A.jpeg" /><figcaption>Photo by author — another anonymized example of what has been requested on these notes!</figcaption></figure><h3>Resources:</h3><p><a href="https://python-visualization.github.io/folium/modules.html?highlight=icon">Folium Documentation</a></p><p><a href="https://geopy.readthedocs.io/en/latest/">GeoPy Documentation</a></p><p><a href="https://fontawesome.com/">Font Awesome</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=add3c01a7ab9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Literal Sea of Data]]></title>
            <link>https://medium.com/@smashley_eakland/a-literal-sea-of-data-70657de5bb1e?source=rss-d02b87849932------2</link>
            <guid isPermaLink="false">https://medium.com/p/70657de5bb1e</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[oceanography]]></category>
            <category><![CDATA[oceans]]></category>
            <category><![CDATA[data-collection]]></category>
            <dc:creator><![CDATA[Ashley Eakland]]></dc:creator>
            <pubDate>Sun, 16 Jan 2022 00:37:36 GMT</pubDate>
            <atom:updated>2022-01-16T00:39:03.867Z</atom:updated>
            <content:encoded><![CDATA[<h4>The last frontier…on Earth</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uDxd1lJxzJLu-MCz5qp0WA.jpeg" /><figcaption>I hope the wonder in my daughter’s eyes never fades, as mine has yet to. Personal photo — taken in Ocean Shores, WA — 2017.</figcaption></figure><blockquote>“Those who live by the sea can hardly form a single thought of which the sea would not be part.” — Hermann Bloch</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ecIghWdM88K2Q5tU0yAluA.jpeg" /><figcaption>Personal photo — Rock stacking at Ruby Beach in the Olympic National Park. July 2019.</figcaption></figure><p>Ever since I was a little girl, I have had a deep love for the ocean. The smell, the sound, the color and clarity of the water depending on where in the world it is, and everything that lives within it. Some of my earliest and fondest memories were formed at the beach, and it is the place I retreat to when I need to refresh my soul. Luckily, I live in the beautiful Pacific Northwest where beaches, lakes, rivers — <em>plus</em> <em>mountains and forests!</em>— are just a short drive away.</p><p>Perusing the essays in a book titled <strong><em>The Fourth Paradigm</em></strong>, when I got to <strong>“A 2020 View for Ocean Science”, </strong>something inside of me lit up — like a child realizing they can use their newly acquired math skills to answer a math question to earn a piece of candy from a special jar (<em>yes, this is another family tradition of ours — for another day!</em>). For my blog this week, I’d like to write through this lightbulb moment. <em>I will do my best to keep it concise, but if you’ve read anything of mine previously, we know how that can go.</em></p><blockquote>Side note: if you have an interest in Data Science and haven’t read <strong><em>The Fourth Paradigm</em></strong>, I’d recommend you take a look at it. It is a collection of Data Science related essays spanning a variety of topics and applications. It was recommended to our cohort by our instructor (thanks, Mark!) and, being the curious person I am, I was sucked in quickly! It was published in 2009 by Microsoft in dedication to Turing Award winner Jim Gray, a groundbreaking computer scientist, who went missing at sea in 2007.</blockquote><p>The essay is written by John R. Delaney of the University of Washington and Roger S. Barga of Microsoft Research. I’m sure that most of us know that little is known about our ocean, despite the fact that it covers about 70% of our planets surface and is the “engine that drives weather-climate systems” <em>(1, p27). </em>As you can imagine, this “engine” directly affects our production of food, our water supply, and potential for flooding. The ocean is the ultimate repository — for both human waste and resources. Since 1800, the ocean has absorbed nearly half of the carbon released <em>(1, p27)</em>. The basins are vast, though finite, repositories of living and non-living resources that we turn to for food, energy and minerals necessary to sustain life as we know it <em>(1, p27)</em>. Not only do we rely on the oceans for survival, but they are a known source of unpredictable hazards like tsunamis, hurricanes and storms, and even earthquakes. <strong>“The oceans may be viewed as the common heritage of humankind, the responsibility and life support of us all.”<em>(1, p28)</em></strong></p><p><em>So what’s the problem? Why not just go explore the ocean? </em>In short: the complexity. The ocean is affected by so many different factors and processes over many scales of time and space. To research this will require collaborative research across many disciplines simultaneously and continuously, while also allowing the study of the interactions between factors to happen <em>in situ (definition below)</em>. This is the challenge of next generation ocean science — to be able to document and quantify the constantly changing processes and how they interact with one another, from <em>within the ocean</em>.</p><blockquote>In situ: <strong>adverb</strong></blockquote><blockquote>In its natural or original position or place — Source for definition <a href="https://www.merriam-webster.com/dictionary/in%20situ">here</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*2CGJrliJr3cAh-0pFXioaQ.jpeg" /><figcaption>“We know more about the areas of space that we’ve explored than we do about our own oceans.” A statement I’ve heard many a time and that inspired me to create this meme. <a href="https://science.howstuffworks.com/physical-science-channel.htm">This is a fun read</a> discussing the topic.</figcaption></figure><p>As I stated above, little is known about our ocean. Historically, we have relied on manned ships, submarines or satellites to collect data for study. But as the essay states, there is a vision for next generation oceanographic research that that draws on emerging and converging the many new technologies. Marcel Proust called this “the real voyage of discovery, [which] lies not in seeking new landscapes, but in having new eyes.”</p><p>The essay outlines six steps on this path for change in the way oceanography is to be approached. The first step is to gather the data from the perspective of within the ocean, archived, visualized and compared at comparable scales to the actual measurements. Current (<em>read: 2009</em>) models are not accurate for predicting the behavior of the oceans due to a lack of actual data available. We need to be able to quantify episodic events within the context in order to continuously compare the model with the observed data, refine the model, and iteratively improve towards a better predictive model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*nTtqziz4sfUPJHeRYagy_w.jpeg" /><figcaption>Saildrone sensors collect a menagerie of crucial data. <a href="https://www.saildrone.com/news/atlantic-hurricane-mission-new-era-observing-forecasting">Image source</a>.</figcaption></figure><p>As an example, collecting data on hurricanes to better predict them. While I was doing additional research for this blog post, I came across Saildrone. (<em>I won’t get too far into all the amazing research they are completing globally in collaboration with NOAA, but I highly recommend you do.</em>) Just last September, NOAA and Saildrone successfully sailed one of their drones through Category 4 Hurricane Sam for 24 hours, collecting incredible amounts of data on the exchange of energy between the ocean surface and the atmosphere. The drone even captured video of the encounter that you can find <a href="https://www.saildrone.com/news/atlantic-hurricane-mission-new-era-observing-forecasting">here</a> with the article detailing the findings or watch the embedded video below. This successful mission opens the door to a whole new world of data collection on hurricanes and the potential for better predictive models.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F656704575%3Fh%3Dae7b1a0568%26app_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fvimeo.com%2F656704575&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1325743525-baaf1e42867aec4fe994b12ba64df40bf69f290921ecf24a064798a8a0143139-d_1280&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c77bddcef6f5b0180282723c0defe8b/href">https://medium.com/media/2c77bddcef6f5b0180282723c0defe8b/href</a></iframe><p>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RYon0K6ISWoiwfLhC6WZSw.png" /><figcaption>Image representation of the OOI infrastructure to come from “A 2020 View of Ocean Science”.</figcaption></figure><p>The further steps in the essay outline the implementation of a cabled infrastructure program consisting of sensors, arrays, robots, and instruments distributed throughout the ocean, known as the OOI or the the Ocean Observatories Initiative. This infrastructure would be utilizing electro-optical cables and readily available power and bandwidth, in combination with many other technologies such as high resolution sonar and volumetric sampling.</p><p>Because <strong><em>The Fourth Paradigm</em></strong> was published in 2009, this portion of the essay is a little outdated. The Ocean Observatories Initiative that is referenced in the essay as “<em>in the early stages”</em> has been collecting data for over six years already, with sensor systems all over the world, as seen below. The OOI is funded by the National Science Foundation, and the data collected is freely available on their website through their user-friendly Data Explorer. (NOAA and Saildrone, and I’m sure many others that I haven’t researched yet, also have their own datasets that are accessible to the public on their respective websites.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AxQ5TKkhH78Ns0SVVmDTJw.jpeg" /><figcaption>“Moored arrays and autonomous vehicles provide time-series observations and mesoscale spatial sampling at sparsely sampled, high-latitude regions critical to our understanding of climate, the carbon cycle, and ocean circulation.” — OOI, Source <a href="https://oceanobservatories.org/research-arrays/">here</a>.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K-kdPjYqlvOZKpqKkr0Csw.jpeg" /><figcaption>Regional Cabled Array spanning across the Juan de Fuca plate — Image Source <a href="https://oceanobservatories.org/marine-technologies/cabled-infrastructure/">here</a>.</figcaption></figure><p>Of particular interest to me, mentioned both in the essay and on OOI’s website <a href="https://oceanobservatories.org/marine-technologies/cabled-infrastructure/">here</a>, is the Regional Cabled Array spanning the Juan de Fuca tectonic plate off of the coast of Oregon. This array is collecting data on and monitoring “volcanic and hydrothermal activity, methane seeps, earthquakes and myriad ocean processes”<em>(3)</em> in an area where this could prove to be incredibly valuable information. The Juan de Fuca plate is in the Cascadia Subduction Zone, which is a topic of discussion for those of us in the Pacific Northwest that would see the immense destruction should that plate push beneath the North American plate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*48IifG-VOV8xeTd0FrQV9A.jpeg" /><figcaption>Image source <a href="https://www.usgs.gov/centers/pcmsc/science/cascadia-subduction-zone-marine-geohazards">here</a>.</figcaption></figure><p>Taking a quick read through <a href="https://www.usgs.gov/centers/pcmsc/science/cascadia-subduction-zone-marine-geohazards">this article</a> on the Cascadia Subduction Zone on the USGS website, you’ll see not only the explanation as to how and why this subduction zone and the resulting earthquake of the plate slipping would be catastrophic, the USGS specifically references metrics that they hope to research in this area (geologic structure and sampling, seafloor seeps, among others). There is synergistic research between the USGS, OOI, and Woods Hole Oceanographic Institution happening as evidenced <a href="https://pnwgeohazards.whoi.edu/">here</a> at the Investigations for PNW GeoHazards website. As you may recall from the beginning of this blog post, this collaboration is a critical piece of the puzzle to successful data collection and study as outlined in the essay.</p><p>It is encouraging to see that the steps in <strong>“A 2020 View of Ocean Science”</strong> have been implemented and we are gathering data on our oceans to try to answer important questions. I’ve barely scratched the surface here as to what data collected from our oceans can reveal, and believe me when I tell you that this is a rabbit hole (<em>but a fun one</em>) once you start digging! And to be completely honest, I had not even considered the infinite possibilities of what every little piece of data in any infinite topic can tell you, answer, or even bring about a new question you hadn’t thought of yet. Furthermore, this really sparked something inside me and brought me to love and appreciate the ocean and all the secrets that it holds — but in an entirely new light. I have always been curious about, say, how many different shark species there are (<em>over 400</em>), and what is at the bottom of the Mariana Trench. But I had not even considered how something so mysterious yet so crucial to our survival would be something I get to explore and learn from as a Data Scientist as technology advances and data archives grow.</p><p>I will leave you with this last infographic below from the OOI that is updated periodically. In just a few years time, you can see how the data archives have grown just within the Ocean Observatories Initiative libraries. I can only imagine what we will be able to collect in another 12 years, and what questions we will be posing to answer then. As a lifelong learner, and infinitely curious person, I just hope I get to be a part of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HIIZsMvYdbYNo9qOMKsk8A.png" /><figcaption>Numbers as of May 1, 2020. Image source <a href="https://oceanobservatories.org/about-ooi/">here</a>.</figcaption></figure><h3>Resources:</h3><ol><li>John R. Delaney, Roger S. Barga — “A 2020 View for Ocean Science”<em> | </em><strong><em>The Fourth Paradigm</em></strong><em>, 2009 </em>|<strong><em>A PDF Version of the book can be found </em></strong><a href="https://www.microsoft.com/en-us/research/wp-content/uploads/2009/10/Fourth_Paradigm.pdf"><strong><em>here</em></strong></a></li></ol><p><strong>2. Saildrone and NOAA — Atlantic Hurricane Mission</strong> <a href="https://www.saildrone.com/news/atlantic-hurricane-mission-new-era-observing-forecasting">https://www.saildrone.com/news/atlantic-hurricane-mission-new-era-observing-forecasting</a></p><p><strong>3. Ocean Observatories Initiative</strong> <a href="https://oceanobservatories.org/">https://oceanobservatories.org/</a></p><p><strong>4. USGS Cascadia Subduction Zone Marine Geohazards</strong> <a href="https://www.usgs.gov/centers/pcmsc/science/cascadia-subduction-zone-marine-geohazards">https://www.usgs.gov/centers/pcmsc/science/cascadia-subduction-zone-marine-geohazards</a></p><p><strong>5. Investigations for PNW GeoHazards</strong> <a href="https://pnwgeohazards.whoi.edu/">https://pnwgeohazards.whoi.edu/</a></p><p><strong>6. NOAA Data Access </strong><a href="https://oceanexplorer.noaa.gov/data/access/access.html">https://oceanexplorer.noaa.gov/data/access/access.html</a> <em>(listed here as a reference — no specific data from NOAA was used in this blog post)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70657de5bb1e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Extra Pickles, please!]]></title>
            <link>https://medium.com/@smashley_eakland/extra-pickles-please-8c384f50144a?source=rss-d02b87849932------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c384f50144a</guid>
            <category><![CDATA[pickling]]></category>
            <category><![CDATA[humor]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[holidays]]></category>
            <dc:creator><![CDATA[Ashley Eakland]]></dc:creator>
            <pubDate>Thu, 23 Dec 2021 19:14:56 GMT</pubDate>
            <atom:updated>2022-01-15T04:06:34.620Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Holiday Bonus Blog: “Un-Pickling” the Christmas Pickle</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*OSmta5J8KDhhHwATyBMjkw.png" /><figcaption>Google Image Source <a href="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fclausnet.com%2Fuploads%2Fmonthly_2016_08%2Fpickle.png.a5f696cd304beed8399b75d248e05c74.png&amp;f=1&amp;nofb=1">here</a></figcaption></figure><p>As I’m nearing the end of Phase 2, I reached a topic on the Pickle library in Python, and inspiration struck like the zing of a tangy dill. Why not write up a short “bonus” blog on Pickle, the process of pickling, and the Christmas Pickle? If you’ve never heard of the Christmas Pickle, and/or “pickling” in Python, they’re kind of a big dill... (<em>I know, I’m sorry… but I am a sucker for puns. I will try to keep them to a minimum.</em>)</p><p>Forgive me if this feels a bit rushed, but I want to make sure that you can enjoy this dill-icious blog post before the holiday. <em>(Oops. Ok, last one…)</em> In a nutshell, pickling is all about data serialization and converting Python objects into byte streams to be saved to disk or transferred over a network. “Un-pickling” or opening the files back up is, as expected, the inverse of that — building the byte streams back into the Python objects that they started as. Using the Pickle library, I am going to tell you a story about a tradition that my family has relating to a different kind of pickle — The Christmas Pickle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kLrOcOqe183xlQ2gNfMCPQ.png" /></figure><p>First, you’re going to need to import the Python pickle library. After we import our pickle library, we’re going to save (or “pickle”) the object using <strong>with open() </strong>and <strong>pickle.dump()</strong> so that we can access it later. Now for the sake of demonstration, let’s open it back up from the saved location and see what our Christmas Pickle story is all about with <strong>pickle.load()</strong>. At first, this may seem a little backwards (<em>at least it did to me</em>). <em>We’re “dumping” to save the file and loading to open?</em> Yes — but it helped me to think of the actual serialization process that is happening. Pickle is “dumping” the object into bytes, and loading it back up into the Python object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XgCKARnn4irJ3O-enR2hdg.png" /><figcaption><a href="https://heartbrain.marketing/wp-content/uploads/2017/12/Christmas-Pickle-1024x768.png">Image Source</a></figcaption></figure><p>Now let’s look at the Python object that Pickle loaded back in for me — a simple dictionary that I’m using to tell the story of the Christmas Pickle. The Christmas Pickle is a green, glass ornament that gets hidden in your Christmas Tree every year. The first person to find the pickle gets a prize. In our family, it’s an all out war to find that thing. (<em>My older brother even cheated one year and brought a second pickle to dupe us all into believing he’d already found it!</em>). And believe me when I tell you, it is harder than it sounds. These pictures REALLY don’t do it justice. Or maybe my family is just intense as our pickle ornament is always hidden deep inside the tree under branches and behind other ornaments. (<em>File this under “things that make you go hmmm” and to maybe circle back on with the therapist…</em>)</p><p>The origin of the Christmas Pickle tradition is highly debated and largely unknown. It is rumored to have been started in Germany. If you feel up to a field trip, pop on over to Germany and ask a random citizen if they’ve heard of this. Chances are they haven’t. In fact, based on a 2016 study, 90% of surveyed Germans have never heard of this infamous Christmas Pickle tradition (<em>source linked below</em>). (And if it makes your field trip worth it, calculate the probability of that citizen having heard of this or not and report your observed findings. #fullcircle) The leading speculation with regard to origin is that a crafty Woolworths salesman started slinging the pickle ornaments in the late 1800’s under the guise of a “longstanding German tradition” after the department store had a large shipment of the glass ornaments come in that they needed to offload. There are other urban legends and tall tales surrounding the origins of this fun little scavenger hunt, but they’re just that: tales.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EFELX4YM9w76pbbZGNwqEQ.png" /><figcaption>While this tradition may be true for my family, will it be for yours?</figcaption></figure><p>You’ll notice in these examples that I am passing in the arguments “rb” and “wb”. This is for “read bytes” and “write bytes” and will depend on what action you’re doing. If, for example, you’re just opening the file as we are in this example above, you’ll need to read the bytes. On the other hand… If you’re thinking “you know Ashley, this Christmas Pickle…it sounds crazy. I’m just not about that pickle life. I don’t want to fight my brother on Christmas over a glass pickle.” Then, I would say “fair enough — the pickle life isn’t for everyone”. And we would pass in the “wb” argument so that I could add in “False” under the “Tradition” key for the ones that can’t handle or simply don’t want a little friendly competition. :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zxd2REJ-ZlledIZo1MC-1w.png" /></figure><p>On this particular little story, it’s likely not the optimal use of its capabilities. A more applicable data science example would be in Machine Learning when our model requires training. Once the model has been trained, we can utilize pickling to save it to disk and call upon it later to load it from disk rather than having to train the model again.</p><p><strong>A few notes on Pickling in Python to remember:</strong></p><p>Be cautious when unpickling from external sources as it may contain malicious or erroneous data. Additionally, if you’re collaborating with someone utilizing a different version of Python (ie 2.x and you’re on 3.x or vice versa), the pickling versions will not be compatible with one another as Pickle does not support cross language compatibility (yes, even within Python!).</p><p>That’s all for now. Relish in all that is <strong>Pickle</strong>! (Seriously. <em>Last one…promise.</em>)</p><h4>I hope that you have a wonderful holiday with all those that matter the most. With or without pickles.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BK81pt5tiVN17nHoBEsbBQ.jpeg" /><figcaption><a href="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Ftexastitos.com%2Fwp-content%2Fuploads%2F2016%2F12%2FPickle-Christmas-Ornament.jpg&amp;f=1&amp;nofb=1">Google image source</a></figcaption></figure><h3>A Follow Up:</h3><p>To illustrate the hunt, see if you can find the pickle in our Christmas tree this past year before I zoom in on it below!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F666208570%3Fh%3D8d9fd4872b%26app_id%3D122963&amp;dntp=1&amp;display_name=Vimeo&amp;url=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F666208570%3Fh%3D8d9fd4872b&amp;image=https%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F1348565818-5ef12c4b8f67c00f694695b90deb37a106e52a4c08f758aab3f1a1165f69fd5c-d_1280&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/2a5cd2134bda2a590b905bd235786f1d/href">https://medium.com/media/2a5cd2134bda2a590b905bd235786f1d/href</a></iframe><blockquote>Jupyter Notebook can be found on my GitHub Repository <a href="https://github.com/smashley-eakland/Christmas-Pickling">here</a></blockquote><blockquote>Pickle reference information can be found <a href="https://www.educba.com/python-pickle/">here</a></blockquote><blockquote>Christmas Pickle Tradition — MSN story containing study info can be found <a href="https://www.msn.com/en-us/news/world/the-story-behind-the-christmas-pickle-tradition/ar-AARGX8I">here</a></blockquote><blockquote>Additional Christmas Pickle information can be found <a href="https://www.bobvila.com/articles/christmas-pickle-ornament/">here</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c384f50144a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Feynman and Me]]></title>
            <link>https://medium.com/@smashley_eakland/feynman-and-me-da96face7c54?source=rss-d02b87849932------2</link>
            <guid isPermaLink="false">https://medium.com/p/da96face7c54</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[beautifulsoup]]></category>
            <category><![CDATA[feynman-technique]]></category>
            <category><![CDATA[web-scraping]]></category>
            <dc:creator><![CDATA[Ashley Eakland]]></dc:creator>
            <pubDate>Mon, 20 Dec 2021 23:13:20 GMT</pubDate>
            <atom:updated>2022-01-19T20:29:20.250Z</atom:updated>
            <content:encoded><![CDATA[<h4>How a legendary physicist and BeautifulSoup can make me a better data scientist</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XuEaBpKJ47lvmNr9" /><figcaption>Photo by <a href="https://unsplash.com/@grisskitchen?utm_source=medium&amp;utm_medium=referral">Max Griss</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a> — Great. Now I’m starving.</figcaption></figure><p>If you’re reading this, you’re probably wondering what Richard Feynman, soup (that is also beautiful?), and my success in the field of data science could possibly have to do with one another. And that’s fair. So let me start off by thanking you for bearing with my babble while I get down to it.</p><p>It’s no secret that the curriculum at Flatiron is tough as well as incredibly fast paced. That is what I signed on for, and as I’ve stated previously, I’m not afraid of a challenge, so please don’t misconstrue my statement as anything other than a simple observation. Being the person that I am (over critical and incredibly high expectations of myself, among many other double-edged qualities), now that I have successfully passed Phase 1, it’s time for me to reflect on my weak areas and expand this ever-growing knowledge base even further. Enter Feynman and BeautifulSoup.</p><figure><img alt="The Feynman Method flowchart" src="https://cdn-images-1.medium.com/max/1024/1*CGS-QiBaW1SkN8wP53F8Ag.png" /><figcaption>The Feynman Technique — simplified. <a href="https://tradebrains.in/feynman-technique/the-feynman-technique-chart-min/">Source</a></figcaption></figure><p>I’m sure you’ve heard of the Feynman Technique, which could be a blog post in of itself. In a nutshell, the idea is that you take a subject that you wish to learn, and pretend that you’re teaching it to a classroom of children, making sure that you’re using plain language (they’re <strong>children</strong>, after all). By doing so, you identify areas where your explanation is lacking, and therefore where your understanding is weak. So you refine and redo your presentation until you feel you’ve mastered the topic. I am going to give myself a bit of leeway on the “plain language” part here due to the complexity of the topic. (Also because of my notorious long-winded nature and logophile ways. My daughter used the word “translucent” in a sentence, properly, at the age of three. It was then that I realized I’m not great at “plain language”.)</p><p>At the end of Phase 1, we covered <em>Web Scraping </em>utilizing a library called BeautifulSoup. (Sorry, foodies. I lured you in with the title image, but we’re not actually getting to work with beautiful, edible soup <strong><em>this time</em></strong>.) If I’m being honest, with myself and with you, this was a bit abstract and over my head at the time. In this blog post, I’m hoping to utilize the Feynman method to better understand the process of Web Scraping. Technically speaking, that would make the reader of this post the “child”. But really, before you run for the hills, I’m also the child here because I’m teaching myself again. Ready? Let’s make some internet soup!</p><p>First and foremost, what exactly <em>is</em> web scraping?</p><blockquote>Web scraping is the process of gathering mass amounts of data from websites in HTML format, and then converting it into a more usable format like a spreadsheet or a database.</blockquote><p>There are many ways that web scraping can be done, but the way I want to discuss this today is using a library in Python called BeautifulSoup. In order to web scrape and utilize BeautifulSoup, you will need to have an understanding of HTML and CSS for searching webpages for the content you desire. In order for this to be a blog post and not a full blown novel, we will assume that the reader has a basic understanding of HTML (though I will touch briefly on what is seen in my examples below). The first thing you’re going to need to do is to import the BeautifulSoup library. I’m also importing Pandas so that I can turn our scraped data into a DataFrame, but how you handle your scraped data is entirely up to you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PSU4sryXDfNioHMy8vX4Pw.png" /><figcaption>I am importing Pandas to turn my data into a DataFrame. You can import other libraries as needed — maybe MatPlotLib or Seaborn for some fancy visualizations!</figcaption></figure><p>The next thing that you’ll want to do is use the requests module to open the website that you’re working with. I’ve recreated a Flatiron lecture notebook for the purposes of this blogpost and will be utilizing images from my personal, reworked notebook here for instructional purposes. I will link my notebook at the bottom of the blogpost, which can be found on my GitHub, and I’ve also linked the original Flatiron repository as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MpMvpGlraobqCytVxxIwtA.png" /><figcaption>I highly recommend the HTTP kitties for a good laugh. So much so that I’ve linked it again <a href="https://www.flickr.com/photos/girliemac/albums/72157628409467125/">right here</a> for convenience. You’re welcome.</figcaption></figure><p>Now that we’ve got our request in, let’s see what we’re working with! For this first example, not a lot here, just a few simple elements. We see the &lt;html&gt; which designates the root or start of the document. Next is the &lt;head&gt; which is the “container” for the &lt;title&gt; element that we see, followed by the &lt;/head&gt; which is the “end” of that container. Similarly, we see the &lt;body&gt; container which contains the &lt;p&gt; tag. The &lt;p&gt; tag stands for paragraph and will be where the text of the document is held. Then again we see the end of the body and the end of the document with the &lt;/body&gt; and &lt;/html&gt; listed. There are many other HTML tag types and CSS style codes that may appear, but I’m not going to list them here for the sake of being succinct. I realize that this first example is quite basic, but fear not, I’ve got some depth for you yet!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YtQ6_dKBLsCbxjN7cG4Hbw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6EN2edMz1kW6_3urxZ1yBA.png" /><figcaption>You can slice using indexing from the list we created, or search through your soup with the find_all method and pass in arguments for your search.</figcaption></figure><p>Since we’ve made this a list, we can index and slice out the elements that we want as per the usual slicing method, or as seen in the third example, we can use the find_all method and search by element type. I personally like the freedom of the find_all method, given that you can search by class type, or by id! Of course, this all assumes you know these arguments, so you’d want to know the specifics of your data in order to call upon them. I will show you how to spot this information in the final example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jn-SfD4eB99YfOcRyyi_9Q.png" /></figure><p>In this final example, we’re going to scrape for the weather forecast and put it into a nice, neat Pandas DataFrame. This example shows a bit of the depth that I alluded to above, and you can see how navigating some of these outputs can be a bit overwhelming. In the image below, we’ve asked BeautifulSoup and requests to grab the information for us and display it using “.prettify()”. (I’ve gotta say, with names like BeautifulSoup, and prettify, I’m sold.) By using the prettify method, you get a more readable version of your data, and can more easily identify what you want to grab out of it designated by the tags. In this case, I’m looking for something that looks like it contains the days or times and the weather conditions — which in this case are contained in the “p-class” tags.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*13sLZoMQhW-N0Vxl5-ypKg.png" /></figure><p>So we’ve identified what we want to get, now it’s just a matter of grabbing it, and getting it into our DataFrame. The steps are roughly listed in the image above, but for the sake of clarity, I will list them again below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jWf2J8_ihOMyBb4_Bm6fkA.png" /></figure><p>First, let’s grab our times and our short descriptions and assign them to their own respective variables. As we noted above, using find_all, we can search by class! So we will use that method, tell BeautifulSoup to grab the<em> ‘short-desc’</em> and <em>‘period-name’</em> data from the p-class tags, and store them in the <strong>descs</strong> and <strong>times</strong> variables (to make it easier to access and call upon).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WrAWvfq93SEqR4OE6f85Lg.png" /></figure><p>Now, we can combine them into a list of tuples by time and description, effectively sticking the weather condition and time <strong>together</strong>. We want to use a tuple since the <em>condition is specific to the time</em>, and a tuple is <strong>immutable, </strong>meaning it can’t be changed. Which is good, we want the conditions to stay with the time they are pertinent to indefinitely for this particular dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3DaWfYHxsW-JihYKu1712w.png" /></figure><p>We’ve reached the final step for this example and demonstration. Using the pd.DataFrame method and the “<strong><em>together”</em></strong> list of tuples we made, we can create a new DataFrame. Notice in the parentheses, I’ve passed in the “columns” argument to create the columns for our new DataFrame. This tells Python and Pandas to use the first item in the tuple, and put those in the new column called “time”, and the second item in the tuple into the new column “description”. <strong><em>[Insert “ooohs” and “aaaaahs” here.]</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1JNyPLXkAy3DxrZ7" /><figcaption>Photo by <a href="https://unsplash.com/@whaleitsjessica?utm_source=medium&amp;utm_medium=referral">Jessica Tan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>*It’s worth mentioning that because we are using BeautifulSoup and the web scraping process as a whole, we need to be conscientious of the data we are gathering. Depending on what you are scraping and where from, you could potentially get yourself into some trouble. Maybe just “minor” trouble in that your IP address gets flagged or banned from the websites you’re scraping due to the speed of which Python and BeautifulSoup are capable of processing these requests, or potential legal repercussions if you’ve scraped something you shouldn’t have. As you can see in the steps above, we simply put in a web address, and BeautifulSoup and Python do the hard work for us. It is up to us to use our best judgement as to where from and how much data we are pulling from the web. *</strong></p><p>We did it. We made it through the web scraping process and the Feynman Technique — both <em>highly</em> simplified. I’m proud of you for sticking through it with me (you’re still here, right?!).</p><p><strong>Now for the million dollar question: do we understand it?</strong></p><p>I don’t know about you, but I definitely feel I have a better understanding of the web scraping process. Of course, there are some underlying things here that I did not cover, such as HTML, CSS, Pandas and Python in general. So this “tutorial” assumes a basic understanding of all of those things is already in place.</p><p>Do I see myself scraping the web frequently? Probably not. But who really knows? I am happy to have an understanding of the process and be able to gather data should the need arise, with the knowledge that there is some level of risk if you’re not careful of where and what you scrape! And as an aspiring Data Scientist, I want to have as much knowledge and as many skills as I possibly can. So thank you, Feynman Technique, and thanks to you, too, for reading.</p><blockquote>GitHub Repository: Flatiron original lecture notebook can be found <a href="https://github.com/flatiron-school/ds-webscraping-opw32">here</a>.</blockquote><blockquote>GitHub Repository: Adapted notebook shown here for demonstration purposes can be found <a href="https://github.com/smashley-eakland/feynman-soup">here</a>.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da96face7c54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Purchasing to Python]]></title>
            <link>https://medium.com/@smashley_eakland/from-purchasing-to-python-5f1b8aa2ac59?source=rss-d02b87849932------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f1b8aa2ac59</guid>
            <category><![CDATA[career-change]]></category>
            <category><![CDATA[data-sc]]></category>
            <category><![CDATA[bootcamp]]></category>
            <dc:creator><![CDATA[Ashley Eakland]]></dc:creator>
            <pubDate>Sat, 27 Nov 2021 01:29:33 GMT</pubDate>
            <atom:updated>2021-11-27T01:29:33.541Z</atom:updated>
            <content:encoded><![CDATA[<h4>A leap of faith into a new realm in adulthood and learning to trust in me.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_AJ1eZw6k9hDKXJY" /><figcaption>Photo by <a href="https://unsplash.com/@dryanparker?utm_source=medium&amp;utm_medium=referral">Ryan Parker</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>As I sit and watch the cursor blink, I think to myself “what have I done? Why isn’t this clicking in my brain? Should I try banging my head on the desk? Maybe that will help…” I knew that I was in for a challenge — making such a big switch, and I have <strong>never </strong>been one to shy away from a challenge. But this should come easier, right?!</p><p>Let’s back up a bit. My background is in Metals, more specifically and most recently, structural steel purchasing, though I spent my years prior to that in Aerospace manufacturing in estimating. Reading technical drawings and specifications, utilizing MRP and ERP software to issue Purchase Orders and/or prepare estimates, among many other things were my bread and butter for almost a decade. And though it may sound terrible, this wasn’t something that I necessarily “chose”. It was a field that I sort of fell into at 23 years old, got pretty good at, and stuck with…for a while.</p><p>Fast forward to summer 2021. Thanks to the COVID pandemic, the steel market is in the midst of record setting price increases, coupled with longer lead times and numerous supply chain issues. As the solo Purchasing Agent for an established structural steel fabrication company, this creates a number of problems, both with regard to timeline and budget constraints. The stress of having to consistently “put out fires” as we’d say, and track down increasingly hard to find material was beginning to get to me. It began to get to the point where the various mills were announcing increases so frequently that I began compiling an Excel sheet to track the increases as they came, almost weekly it seemed. It was during the building of this tool that I had a realization: I love this. Data. Numbers. Trends. Putting all of this information together, analyzing and presenting it was legitimately enjoyable (even though I was the bearer of bad news).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x3zS6BGignBFSpwMlECE1Q.png" /><figcaption>This is just a snip showing the graphs produced by the spreadsheet I created from scratch. Even as a first-week Data Science Student, I see much room for improvement on this tool and the graphs that I chose to represent the data, but I still feel a sense of pride in what was produced with little time and knowledge of professional data manipulation!</figcaption></figure><p>While I enjoyed who I worked with, and didn’t necessarily <em>hate </em>what I was doing, I was starting to realize that I didn’t feel any particular attachment or joy when doing it. And that is when I decided that I should really think about making a change. But how? And to what?</p><blockquote>And then it happened…</blockquote><p>Groaning to a friend of mine, she really encouraged me to make a change. “You really should look into coding,” she said. “The market is crazy! You’d be great!” But I wasn’t so sure at the time, and so I just recreationally started playing with Python on Codecademy. While I found the exercises to be quite fun and simple (I’ll admit, I didn’t get to the real head scratching stuff— hello, loops and functions!), I still wasn’t sure where to begin. So, like any rational adult, I took a “coding career” quiz. As I’m sure you have guessed by now, it came up Data Science, and it seems like I’ve trusted my future to an internet quiz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_Qyy2O6TMak4rUQO" /><figcaption>Photo by <a href="https://unsplash.com/@wocintechchat?utm_source=medium&amp;utm_medium=referral">Christina @ wocintechchat.com</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Don’t panic yet! Like any good scientist, I took multiple variations of these quizzes and researched heavily the different paths that coding careers could take and would be. I’ve always had a deep-seated love of math and it’s always come pretty naturally to me. My affinity for math and data and this <em>very new to me </em>language <strong>together. </strong>Dare I say… the math checks out.</p><p>After extensive researching of various schools and Data Science programs, I applied to Flatiron School based on their reputation, their graduation rates, and other factors. I was accepted into the Data Science bootcamp and received the Women Take Tech Scholarship. I ultimately decided to take this huge leap of faith and leave my job to pursue this path. And off to the proverbial races we go.</p><p>Back to the cursor. <em>Blink. Blink. Blink.</em></p><p>After persistent (read: stubborn) reading and retrying, errors and fixes, checking my notes (yes, handwritten)… it works and my code runs as it should. And there is no greater feeling than succeeding when you were sure that you couldn’t. Prevailing in spite of that insidious Imposter Syndrome, which is a very <strong><em>real thing </em></strong>that you’d never even heard of or known that you had until starting this program (<a href="https://www.healthline.com/health/mental-health/imposter-syndrome">this article</a> was very insightful and even covers different competence types and how they pertain to each person based on internal beliefs). But you did it, on your own, and that is a major win.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2MslmeDofV7Oi_qQ" /><figcaption>Photo by <a href="https://unsplash.com/@alexbracken?utm_source=medium&amp;utm_medium=referral">alex bracken</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I can feel that I made the right decision <em>in my bones</em>. The math, the coding skills, and potential career advancements are all initial reasons I made the jump. But the incredibly welcoming community I have joined with an intrinsic awareness of the stress and feelings that come along with this decision solidifies that I’ve made the right choice. I know I will make it to the other side, proud and confident, and with an incredible support system by my side to thank for helping me along the way. It’s not going to be easy, and I will have to face my inner Imposter head on (repeatedly, I’m sure). It is both intimidating and exciting, but completely worth <strong>every bit </strong>of risk because at the end of the day, what I’ve “done” (to answer my inner monologue) is I’ve taken the steps to change my life for the better. It’s up to me to follow through, trust myself and the process, and enjoy the journey.</p><blockquote>And that’s exactly what I intend to do.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f1b8aa2ac59" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>