<?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 Andrei Teleron on Medium]]></title>
        <description><![CDATA[Stories by Andrei Teleron on Medium]]></description>
        <link>https://medium.com/@ateleron?source=rss-4c863a6b214d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*xIK4T8xtGuxdzCI9t-ge-w.png</url>
            <title>Stories by Andrei Teleron on Medium</title>
            <link>https://medium.com/@ateleron?source=rss-4c863a6b214d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 11:52:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ateleron/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[Wagtail CMS for Web Development]]></title>
            <link>https://ateleron.medium.com/wagtail-for-web-development-afa428db5df6?source=rss-4c863a6b214d------2</link>
            <guid isPermaLink="false">https://medium.com/p/afa428db5df6</guid>
            <category><![CDATA[wagtail]]></category>
            <category><![CDATA[cms]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[django]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Andrei Teleron]]></dc:creator>
            <pubDate>Thu, 08 Jul 2021 16:03:22 GMT</pubDate>
            <atom:updated>2021-07-15T16:34:20.345Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A free &amp; open-source CMS based on Python/Django and my experiences with it as a developer.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vMRgmfLDf4LLySzxOmOnUA.png" /></figure><p>Founded in <a href="https://github.com/wagtail/wagtail/commit/679f15811e4ffbde9df880daf012ffcafdddebb1">2014</a> and led by the folks at Torchbox, an employee-owned digital agency, Wagtail is a content management system (CMS) that provides an intuitive and sleek interface for content managers, and robust tools for developers. Built on top of Django, Wagtail adopts much of its <a href="https://docs.djangoproject.com/en/3.2/misc/design-philosophies/">design philosophy</a>:</p><ol><li><strong>Quick Development.</strong> A lot of features come “batteries included” such as a user authentication system and inherent security features while leaving incredible room for customization.</li><li><strong>Consistency.</strong> Wagtail extends much of Django’s classes, while staying true to Django’s architecture and coding style. Those familiar with Django will find it that much easier to pick up!</li><li><strong>Loose Coupling.</strong> Django &amp; Wagtail’s project methodology encourages regimented organization of code, where each layer is independent and specialized in function.</li></ol><p>Over the years, Wagtail has seen a growth of open-source contributors to its platform. With Torchbox at the helm, they all helped to make it a now renowned name in the web-based business solution sphere for companies small and large — with the likes of Google, NASA, and Mozilla readily adding it to their tech stack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Dn8H-syuqg4_DxnuDqi9g.png" /><figcaption>Organizations using Wagtail CMS</figcaption></figure><h3>Customizable Admin Design</h3><p>After creating a number of websites with Wagtail, it has crystallized in my mind that it’s my first tool of choice for full stack web development — thanks in large part to its beautifully designed, out-of-the-box admin page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FREF3rqTIErFu_ZZxOqGAg.png" /><figcaption>Example of an admin page for adding new articles</figcaption></figure><p>With its poppy animations combined with vibrant orange, charcoal, and deep teal colors, right from the get-go the admin page seems a tier above vanilla Django’s. <a href="https://docs.wagtail.io/en/stable/advanced_topics/customisation/admin_templates.html#custom-user-interface-colors">Wagtail provides good documentation on how to customize it even further</a> to better suit a company’s image, such as changing its base colors and replacing the bird logo with a new one.</p><h3>Intuitive Explorer for Content Managers</h3><p>Wagtail contents follow a tree-like structure. For pages, they all have one common root, usually the home page. Like a sprout advancing into adolescence, pages will begin to branch out, encompassing more of the site’s full, envisioned web-space. Wagtail has made this quite easy and snappy to explore, making it a pleasant experience for content managers.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FBEJWC3U72n8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DBEJWC3U72n8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FBEJWC3U72n8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8930a9ef0152472ceacce6eb317edc1c/href">https://medium.com/media/8930a9ef0152472ceacce6eb317edc1c/href</a></iframe><p>Folders and links to other admin pages can be created for different purposes such as analytics and CRUD operations on vanilla Django models. To assist with content management workflow, admin account permission settings are also readily available in Wagtail and customizable — with features such as group creation and modifying each group’s access level.</p><h3>Streamfields — a CMS Luxury</h3><p>One of the main selling points of Wagtail are its s<em>treamfields</em>. It’s used like WordPress’ <em>Gutenburg </em>to create non-fixed and varied page structures by adding organized blocks of content together. Each block can house content fields that will map to a specific styling in the published page, and are specialized for a specific function — whether it’s a big brick of rich text, a welcoming call-to-action banner, or a complex card block that contain a mix of images, rich text, and URL links.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUSrUPMrWsK8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUSrUPMrWsK8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUSrUPMrWsK8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7437cb721811765cf0511e172bab8be4/href">https://medium.com/media/7437cb721811765cf0511e172bab8be4/href</a></iframe><p>A couple months ago, <a href="https://docs.wagtail.io/en/stable/releases/2.13.html">Wagtail released a major update (v2.13.0)</a> in which <em>streamfields </em>were rebuilt to use a client-side rendering model via Wagtail’s new <a href="https://wagtail.github.io/telepath/"><em>telepath</em></a> library. Drawing inspiration from the <em>react-streamfield</em> library, this adds improved speed/performance, and more productivity options (i.e. block duplication) and am excited in the future to see how they expand its uses.</p><h3>It’s Based on Django</h3><p>Wagtail has a <em>Page</em> model, which is essentially a suped-up version of a regular Django model, with built-in features such as native image support, admin mapping, and an <em>api_fields </em>attribute that takes in a list of fields to expose in Wagtail’s powerful, v2 API (built on Django Rest Framework). If not used in a headless application, <em>Page </em>models handle page routing with minimal set up. They can be designed to be created anywhere along the page tree structure, or made available as a child or parent page for certain types of pages.</p><p>Regular Django models are also readily accepted for cases that don’t need <em>Page </em>model methods. For example, an ecommerce website may want to create a customer, shipping address, cart, and order model to store customer data that is easily browsable in the admin — all organized in a folder called <em>accounts</em>. To do this, Wagtail adopts a similar method in Django with its special method <em>modeladmin_register().</em></p><h3>Wagtail — My First Tool of Choice</h3><p>My first implementation of a Wagtail website was a space news/blog. And after finishing it, it’s left such a good impression on me that I’ve continued to use it on all my projects thereafter. It has been a pleasure to develop on and would like to thank <a href="https://www.youtube.com/watch?v=1_yA25ZmNkA&amp;list=PLMQHMcNi6ocsS8Bfnuy_IDgJ4bHRRrvub">Kalob Taulien’s YouTube series on Wagtail</a> for helping me get started. For my clients, it is in the hopes that their pleasant experiences with Wagtail CMS will move them to create vibrant, high quality content that their users would enjoy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afa428db5df6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jumpstarting Your SEO]]></title>
            <link>https://ateleron.medium.com/jumpstarting-your-seo-9f0ed4c49b33?source=rss-4c863a6b214d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f0ed4c49b33</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[search-engine-marketing]]></category>
            <category><![CDATA[marketing-strategies]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[seo]]></category>
            <dc:creator><![CDATA[Andrei Teleron]]></dc:creator>
            <pubDate>Sat, 22 Aug 2020 21:38:13 GMT</pubDate>
            <atom:updated>2020-08-24T01:33:34.321Z</atom:updated>
            <content:encoded><![CDATA[<h4>Two methods to reach a wider audience online</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YWNhT87KCkyv6Vpy.jpg" /><figcaption>Photo by Nick Morrison on Unsplash</figcaption></figure><p>Before the internet was made publicly available on August 6th, 1991, much of the world’s information was shared primarily through books, journals, and newspapers sporting that classic “news-papery” feel. A lot of information was stored in libraries where it took a bit of effort to find what one was looking for.</p><p>With the advent of the internet, it has become significantly easier to share information and learn. It’s been widely adopted throughout the world and became quickly a collective hub of information much in the same way libraries were in the pre-internet era — this time without the required hours to wade through halls and shelves to find what one was looking for.</p><p>This paved the way for an entirely new branch of marketing called search engine optimization (SEO), through which a large part is due to the internet’s incredible potential for reaching a tremendous amount of people. With a whopping 2 trillion searches made per year <a href="https://kenshoo.com/monday-morning-metrics-daily-searches-on-google-and-other-google-facts/">[1]</a>, it’s clear that there’s quite a bit of marketing potential. SEO encompasses methods that aim to <em>increase </em>the chances of users searching for a website and thereby increasing its traffic. For primarily online-based business, SEO becomes integral to their survival, with many devoting significant resources in the form of creating departments, teams, or hiring consultants. Even if a business does not have as large of an online presence, spending some resources towards SEO can bring in lucrative results.</p><p>There is a wide breadth of SEO-related knowledge beginning with the understanding of how websites are ranked and then moving on to designing an online presence where such knowledge is put to practical use. When developing a website, there are two stakeholders, both of which have different methods in determining how relevant a website is: users and search engines. A natural first step to accommodating the two viewpoints is to design an information architecture that’s easy for users to find what they’re looking for and easy for search engines to scan your website for information. One way to plan for this is through a sitemap.</p><h3><strong>Sitemaps</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-egxGftsWDmB3ceW.png" /><figcaption><em>Example sitemap template for an e-commerce website from moqups.com</em></figcaption></figure><p>Search engines use crawlers that scan your website to determine its relevancy when a user enters a search query, which, in its natural way of operating, may only scour some of its web pages. What if for some reason it doesn’t scan a highly informative page on a website, such as a product details page? This is where the sitemap can help. Creating a hierarchical, organized sitemap can make the crawler’s job easier by giving them a roadmap to how and where they collect information from a website.</p><p>In the example above, the e-commerce website has three main points of entry highlighted in purple that the crawlers have access to from your home page. For example, they may not go through all of the products web pages where the meat and potatoes are and elect to only scan a few products. For an e-commerce site with a variety of products, sitemaps become essential in giving search engines a clearer picture of what a website offers.</p><p>After creating a rough sketch of a sitemap, it may be time to concurrently brainstorm keywords for the website to further build its information architecture.</p><h3><strong>Keyword Choice</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tWtiUcj7u86UTg9M.jpg" /><figcaption><em>Photo by Ashkay on Unsplash</em></figcaption></figure><p>A large part of the core of SEO consists of keywords. Keywords affect both the users’ and search engines’ ability to determine the usefulness of a website and it’s important to be meticulous when choosing the right ones to satisfy both.</p><p>The most recent Google search algorithm change was announced in 2013. Code-named Hummingbird, the update placed more weight on the <em>intent</em> behind the search words rather than on the actual search words. This means that when the words “hardwood table” is inputted, Google will read the intent to be “buy hardwood table” and will show results from vendors that sell these items. This simplifies the process of determining keywords and lets SEO strategists focus on succinct keywords that defines the essence of the website. On the other hand, it also adds a layer of abstraction and complexity to the search engine ranking algorithm that needs to be accounted for.</p><p>As with any marketing plan, it’s advised to begin as early as possible since the choices made here can have ramifications for future efforts with the project. Whiteboard sitemap drawings can provide a visual structure of a website and how each piece relates to one another. Coming up with keywords during this process can be great too. There is a saying in data science, which is not exclusive to this field, that the result is only as good as the data that goes into it. With regards to keywords, it’s integral to choose quality keywords for better ranking purposes. The topic of SEO is massive and one will come across choices that are not as clear-cut as it seems due to the black-box that encapsulates many search engine algorithms. Trust in your instinct.</p><p><em>Originally published at </em><a href="https://www.andreiteleron.design/blog/jumpstarting-your-seo/"><em>https://www.andreiteleron.design</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f0ed4c49b33" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tableau Public Integration with Jupyter Notebook]]></title>
            <link>https://ateleron.medium.com/tableau-public-integration-with-jupyter-notebook-569e8787fe7e?source=rss-4c863a6b214d------2</link>
            <guid isPermaLink="false">https://medium.com/p/569e8787fe7e</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Andrei Teleron]]></dc:creator>
            <pubDate>Fri, 20 Mar 2020 01:30:48 GMT</pubDate>
            <atom:updated>2020-03-20T01:30:48.961Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>A way to embed Tableau visualizations to Jupyter Notebook</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HgsKHykdMIyysB-M" /><figcaption>Photo by <a href="https://unsplash.com/@firmbee?utm_source=medium&amp;utm_medium=referral">William Iven</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you have an account with Tableau Public and have a few vizzes uploaded there already, go ahead and:</p><ol><li>Log in to your profile at <a href="https://public.tableau.com/s/">https://public.tableau.com/s/</a></li><li>Click one of your vizzes</li><li>Click the <strong>share </strong>button on the Tableau banner underneath the viz</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ynJ2i60xULsQOif_r-vdZQ.png" /><figcaption>Share button highlighted in green</figcaption></figure><p>4. Copy the <strong>Embed Code</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/1*Ps9tWoHjFJ06nJtjbaoMuw.png" /></figure><p>5. Go to an empty code cell in Jupyter Notebook and type: <strong>%%html</strong>. On a new line in the same cell, paste the <strong>Embed Code. </strong>It should look something like this:</p><pre>%%html<br>&lt;div class=&#39;tableauPlaceholder&#39; id=...</pre><p>Your viz should now be embedded in Jupyter Notebook!</p><p>If you’re planning to post on Github, sometimes the tableau visualizations won’t show up on there. A quick way to load them is to copy your notebook’s link on Github and paste the URL to <a href="https://nbviewer.jupyter.org/">Jupyter’s nbviewer</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=569e8787fe7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Could WiFi Impact Health? A Case for Wired Connections instead of WiFi and How to Make Them Tidy]]></title>
            <link>https://ateleron.medium.com/could-wifi-impact-health-a-case-for-wired-connections-instead-of-wifi-and-how-to-make-them-tidy-4762b0d02394?source=rss-4c863a6b214d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4762b0d02394</guid>
            <category><![CDATA[ethernet]]></category>
            <category><![CDATA[need-for-speed]]></category>
            <category><![CDATA[health]]></category>
            <category><![CDATA[wifi]]></category>
            <category><![CDATA[internet]]></category>
            <dc:creator><![CDATA[Andrei Teleron]]></dc:creator>
            <pubDate>Thu, 19 Mar 2020 18:12:22 GMT</pubDate>
            <atom:updated>2020-03-19T18:12:22.272Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Less disconnects, seamless data transfers, and less EMF pollution!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WME1wsvZgGNUcQRa" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Faster and Reliable Internet Connection</h3><p>If you rely heavily on the internet for business or are a gamer with a need for speed, there is great value in ditching WiFi and switching to a wired connection. A hiccup in the network can cause wasted opportunity and/or a potential loss of cash money. Disconnects can happen due to a few reasons:</p><ol><li>The internet bill is due.</li><li>Your WiFi signal may not reach far enough for a reliable connection.</li><li>Interference from other devices such as GPS, phones and microwaves.</li><li>Packet loss in which “packets” of data fail to reach your device. This can manifest as lag or congestion on the network.</li></ol><p>With WiFi, the last three items can be potential liabilities that can be fixed by using ethernet cables.</p><h3>WiFi Signals May Impact Health</h3><p>WiFi is classified as a non-ionizing radiation, which means that the energy emitted is low enough as to not ionize the atoms it passes through. Ionizing radiation on the other hand, can cause damage to cells. <a href="https://science.howstuffworks.com/radiation2.htm">Still, overexposure to even non-ionizing radiation can prove hazardous to health.</a></p><p>Routers radiate an invisible, electromagnetic energy that vibrates at certain frequencies. Depending on your router, these frequencies can range from 900 MHz to as large as 60 GHz, with the higher range being capable of faster data transfers. Commercial routers typically have a 2.4 GHz band and a 5 GHz band.</p><p><a href="https://www.sciencedirect.com/science/article/pii/S0013935118300355">A recent 2018 review study uploaded on Science Direct portends that WiFi signals can cause neuronal damage and lower sperm counts in mice, but are largely reversible when WiFi was turned off after a few months. However, it can cause small but lasting effects if left on for longer.</a> A typical household will leave the WiFi on at all times, which may accrue incremental damage. To mitigate this, a simple method is to turn off the router before sleeping so at least the frequencies are off for a good amount of time. Ethernet cables are a better alternative, but takes more effort to install and make them tidy. Studies on the effects of WiFi remains conflicted, and is up to the user to make their own choices.</p><p>It’s also noted that younger people are more affected by WiFi than older people, so it may be beneficial to those with children and/or pregnant mothers to install wired connections around the house rather than relying on WiFi.</p><h3>Disabling WiFi</h3><p>The precise protocol for disabling WiFi differs depending on which internet service provider (ISP) you use and it’s recommended to consult their documentation. For many modem/router combos, this involves typing in your router’s IP address into the internet search bar (10.0.0.1 for Xfinity users) and typing in your username &amp; password. After logging in, there’s an option to disable WiFi.</p><p>Disabling the WiFi doesn’t remove ethernet cable functionality so feel free to use them!</p><h3>Making Cables Look Tidy</h3><p>Ethernet cables are cumbersome and can be downright difficult to wire if you have multiple users/devices that use the internet.Thankfully, there are ways to remedy this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/0*oi6tPOZPX4P5SK0N" /><figcaption>Cable clip from <a href="https://www.grainger.com/product/TY-RAP-R-Cable-Clip-1A877">Grainger</a></figcaption></figure><p>Cable clips keep wires in place and with the help of adhesives, can allow wiring to flow along edges and ceilings to keep them out of harm’s way. They come in a variety of shapes and colors to help wires blend into their surroundings. Cable ties are a less costly alternative and are also great for threading multiple wires through.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*DBWsmTVx-VgjUKOZ.JPG" /><figcaption>Cable protector from <a href="https://www.zoro.com/hubbell-wiring-device-kellems-cable-protector-1-channel-yellow-5-ft-l-ft4y5/i/G1193193/">Zoro</a></figcaption></figure><p>Cable protectors can be used to hide cables underneath rugs and shield them from bustling feet and the occasional vacuum cleaner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-CuHl0WeFQbs9Gzr.jpg" /><figcaption>Ethernet cables from <a href="https://www.monoprice.com/product?p_id=29479&amp;gclid=EAIaIQobChMI4ovo6c6l6AIVpP_jBx1KyAGcEAQYASABEgICGvD_BwE">Monoprice</a></figcaption></figure><p>Ethernet cables come in a wide variety of colors so they can match the background you’d like to place them on. There are also flat cables rather than cylindrical ones for that certain aesthetic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1MpN71VlU4i_wjHE" /><figcaption><a href="https://www.cdw.com/product/NETGEAR-5-port-Gigabit-Unmanaged-Switch-GS305/5615760?cm_cat=google&amp;cm_ite=5615760&amp;cm_pla=NA-NA-NETGEAR_NW&amp;cm_ven=acquirgy&amp;ef_id=EAIaIQobChMI2d-J4oOn6AIVtf_jBx1HPAsLEAQYAyABEgJ9fPD_BwE:G:s&amp;gclid=EAIaIQobChMI2d-J4oOn6AIVtf_jBx1HPAsLEAQYAyABEgJ9fPD_BwE&amp;s_kwcid=AL!4223!3!243462491255!!!g!303665991090!">NETGEAR 5-port Gigabit Unmanaged Switch</a></figcaption></figure><p>Routers come equipped with a limited number of ethernet ports, which can pose a problem for households that need more. Ethernet switches remedy this by serving as an ethernet hub for additional connections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*xbCbBzAVEnC-erJX" /><figcaption>Ethernet splitters from <a href="https://www.walmart.com/ip/Convert-A-Single-RJ45-Outlet-To-2-RJ45-Sockets-Female-LAN-Ethernet-Cable-Connector-Splitter-Extender-Adapter/262596762?wmlspartner=wlpa&amp;selectedSellerId=4654&amp;adid=22222222227104958242&amp;wl0=&amp;wl1=g&amp;wl2=c&amp;wl3=233533752627&amp;wl4=pla-385215305405&amp;wl5=9021511&amp;wl6=&amp;wl7=&amp;wl8=&amp;wl9=pla&amp;wl10=115056792&amp;wl11=online&amp;wl12=262596762&amp;veh=sem&amp;gclid=EAIaIQobChMI2d-J4oOn6AIVtf_jBx1HPAsLEAQYAiABEgK7c_D_BwE">Walmart</a></figcaption></figure><p>Ethernet splitters are similar to ethernet ports but without the bulk.</p><p>Before making the jump to ethernet cables, it is advised to do an assessment of yours and others needs and come to your own conclusions through careful research. Despite WiFi studies being a bit wishy-washy, ethernet cables still prove to be a more reliable source of connection and can cut down on electrosmog in a world where more of it is floating through the air thanks to rapid advances in technology each year.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4762b0d02394" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cleaning Missing Values in a Pandas Dataframe]]></title>
            <link>https://medium.com/data-science/cleaning-missing-values-in-a-pandas-dataframe-a88b3d1a66bf?source=rss-4c863a6b214d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a88b3d1a66bf</guid>
            <category><![CDATA[missing-data]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-cleaning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Andrei Teleron]]></dc:creator>
            <pubDate>Wed, 06 Nov 2019 20:34:21 GMT</pubDate>
            <atom:updated>2019-11-17T21:55:38.041Z</atom:updated>
            <content:encoded><![CDATA[<p>Ways to visualize missing data and what to do with them using Python.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8xA0eQ-a96kOxNAa" /><figcaption>Photo by <a href="https://unsplash.com/@jankolar?utm_source=medium&amp;utm_medium=referral">Jan Kolar / VUI Designer</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When working on analyzing data, you’ll likely come across data that is missing (also called null values or NaNs). Data cleaning is an important part of the data analysis pipeline and making sure that it’s all tidy up will make your analysis much stronger.</p><h3>Determining Missing Values</h3><p>The only library you’ll need to import is pandas:</p><pre>import pandas as pd</pre><p>If you’re using the pandas library in Python and are constantly dealing with data that has missing values and need to get to your data analysis faster, then here’s a quick function that outputs a dataframe that tells you how many missing values and their percentages in each column:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/0*-lZ7JeaiHLHuAKeb.png" /></figure><p>A little less readable version, but you can copy paste it in your code:</p><pre>def assess_NA(data):<br>    &quot;&quot;&quot;<br>    Returns a pandas dataframe denoting the total number of NA values and the percentage of NA values in each column.<br>    The column names are noted on the index.<br>    <br>    Parameters<br>    ----------<br>    data: dataframe<br>    &quot;&quot;&quot;<br>    # pandas series denoting features and the sum of their null values<br>    null_sum = data.isnull().sum()# instantiate columns for missing data<br>    total = null_sum.sort_values(ascending=False)<br>    percent = ( ((null_sum / len(data.index))*100).round(2) ).sort_values(ascending=False)<br>    <br>    # concatenate along the columns to create the complete dataframe<br>    df_NA = pd.concat([total, percent], axis=1, keys=[&#39;Number of NA&#39;, &#39;Percent NA&#39;])<br>    <br>    # drop rows that don&#39;t have any missing data; omit if you want to keep all rows<br>    df_NA = df_NA[ (df_NA.T != 0).any() ]<br>    <br>    return df_NA</pre><p>The only parameter you need to pass is a dataframe object. Here’s an example where we call the function assess_NA() on a dataframe with missing data called training , which then outputs the dataframe: df_NA .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/0*MM9SyT4_FFvTmABg.png" /></figure><p>The rows represent the features of your dataframe and the columns provide information on your missing data. If there are no missing values, then it will just output an empty dataframe.</p><h3>Ways to Clean Missing Data</h3><p>Knowing this, you can be more informed on what to do with null values such as:</p><ol><li><strong>Removing</strong> rows with them</li><li><strong>Impute </strong>using mean, median, 0, false, true, etc.</li></ol><h4>Removing rows with null values</h4><p>This method is a simple, but messy way to handle missing values since in addition to removing these values, it can potentially remove data that aren’t null. You can call dropna() on your entire dataframe or on specific columns:</p><pre># Drop rows with null values<br>df = df.dropna(axis=0)</pre><pre># Drop column_1 rows with null values<br>df[&#39;column_1&#39;] = df[&#39;column_1&#39;].dropna(axis=0)</pre><p>The axis parameter determines the dimension that the function will act on. axis=0 removes all rows that contain null values. axis=1 does nearly the same thing except it removes columns instead.</p><h4>Imputing null values</h4><p>Rather than dropping values with missing data, imputation looks to replace these values with another value — usually the mean or median of a specified column. There are benefits to using either. For example, if the column has a lot of outliers the median would probably be more useful since it is more resistant to them. This way, we are attempting to preserve aspects of the data. To do this, we can call the fillna() function on a dataframe column and specifying either mean() or median() as a parameter:</p><pre># Impute with mean on column_1<br>df[&#39;column_1&#39;] = df[&#39;column_1&#39;].fillna( df[&#39;column_1&#39;].mean() )</pre><pre># Impute with median on column_1<br>df[&#39;column_1&#39;] = df[&#39;column_1&#39;].fillna( df[&#39;column_1&#39;].median() )</pre><p>Besides mean and median, imputing missing data with 0 can also be a good idea in some cases:</p><pre># Impute with value 0 on column_1<br>df[&#39;column_1&#39;] = df[&#39;column_1&#39;].fillna(0)</pre><p>Knowing what path to take when handling missing data is largely dictated by domain-knowledge and what your intuition tells you about the data. This is gained step-by-step and by working with datasets that allow you to ask meaningful questions about them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a88b3d1a66bf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/cleaning-missing-values-in-a-pandas-dataframe-a88b3d1a66bf">Cleaning Missing Values in a Pandas Dataframe</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PostgreSQL Integration with Jupyter Notebook]]></title>
            <link>https://medium.com/analytics-vidhya/postgresql-integration-with-jupyter-notebook-deb97579a38d?source=rss-4c863a6b214d------2</link>
            <guid isPermaLink="false">https://medium.com/p/deb97579a38d</guid>
            <category><![CDATA[jupyter-notebook]]></category>
            <category><![CDATA[postgresql]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Andrei Teleron]]></dc:creator>
            <pubDate>Sun, 03 Nov 2019 17:29:55 GMT</pubDate>
            <atom:updated>2020-05-24T19:52:23.453Z</atom:updated>
            <content:encoded><![CDATA[<p><em>For a more seamless data extraction experience.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_4ITA6ACGusmKEu7" /><figcaption>Photo by <a href="https://unsplash.com/@pawel_czerwinski?utm_source=medium&amp;utm_medium=referral">Paweł Czerwiński</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Jupyter Notebook is a great software to catalog steps taken during data visualization and analysis. It supports Python code, markdown, HTML, and thanks to a few libraries, PostgreSQL! This allows you to write SQL code right in the notebook and make changes, or query the database from there. You can also convert any query into a pandas dataframe so you can go straight to the analysis. It has made me love using SQL and Jupyter Notebook more!</p><h4>Prerequisites:</h4><ul><li>Jupyter Notebook</li><li>PostgreSQL and a database (<a href="http://www.postgresqltutorial.com/postgresql-sample-database/">sample database &amp; how to load</a>)</li></ul><h4>Libraries to install:</h4><ul><li><a href="https://github.com/catherinedevlin/ipython-sql">ipython-sql</a></li><li>sqlalchemy</li><li>A python database API (DBAPI) library</li></ul><p>The first two libraries can be installed by using the pip install commands:</p><pre>pip install ipython-sql<br>pip install sqlalchemy</pre><p>The third library depends on what SQL software you choose to use. For PostgreSQL, you would use <a href="https://pypi.org/project/psycopg2/">psycopg2</a>:</p><pre>pip install psycopg2</pre><p>Different DBAPIs are documented on <a href="https://docs.sqlalchemy.org/en/13/core/engines.html">sqlalchemy’s website,</a> like MySQL, Oracle, and SQLite (thanks Dave Campbell).</p><h4>ipython-sql</h4><p>Created by <a href="https://github.com/catherinedevlin/ipython-sql">catherinedevlin on Github</a>, this enables the use of SQL magic functions that contain % and %% , allowing you to write SQL style code right in Jupyter Notebook.</p><h4>sqlalchemy</h4><p>Originally authored by Michael Bayer, sqlalchemy is touted as a “SQL toolkit and object-relational-mapper” for Python. For the purposes of this tutorial, it will mainly be used to store SQL queries into a pandas dataframe.</p><p>Now that we have our libraries installed, let’s move on to Jupyter Notebook!</p><h3>Getting Started</h3><p>To load ipython-sql, use the following magic command:</p><pre>%load_ext sql</pre><p>Next, we will only need the create_engine() function from sqlalchemy so let’s import that with the following line:</p><pre>from sqlalchemy import create_engine</pre><p>Once we’ve laid the groundwork, we can now connect to a PostgreSQL database!</p><h3>Connecting to a PostgreSQL database</h3><p>To connect ipython-sql to your database, use the following format:</p><pre># Format<br>%sql dialect+driver://username:password@host:port/database</pre><pre># Example format<br>%sql postgresql://postgres:password123@localhost/dvdrental</pre><ul><li>dialect+driver in this case would just be postgresql , but feel free to use a different database software here.</li><li>username:password is where you will substitute your username and password.</li><li>host is usually just localhost.</li><li>In my experience, port does not need to be specified.</li><li>database is the name of the database to connect to.</li></ul><p>To see if it successfully connected, Jupyter Notebook will print the following:</p><pre>&#39;Connected: username@database&#39;</pre><p>To connect sqlalchemy to the database, the format will largely be the same, but we will create a new object called engine using the create_engine() function:</p><pre># Format<br>engine = create_engine(&#39;dialect+driver://username:password@host:port/database&#39;)</pre><pre># Example format<br>engine = create_engine(&#39;postgresql://postgres:password123@localhost/dvdrental&#39;)</pre><p>For the most part, you can just copy &amp; paste what you wrote after the %sql magic command when connecting to ipython-sql and encapsulate it in quotes as a parameter in the create_engine() function.</p><p>As long as you see no errors in the output, you should be connected to the database!</p><h3>Writing SQL Commands in Jupyter Notebook</h3><p>To enable database querying and other commands, call the magic command %%sql and add your SQL code after. The SQL code should be in its own block, separate from Python code (Thanks Daniel Upton for pointing that out!). Here’s sample code that queries the first three rows and all of the columns in the inventory table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*zagb2CYiNRU8FRTuSOOvLw.png" /></figure><p>If you’d like to store your query in a pandas DataFrame, this is where sqlalchemy comes in. Create a dataframe object using the command pd.read_sql() . It takes two arguments:</p><ol><li>Your SQL query encapsulated in quotes.</li><li>The engine object you created earlier using the create_engine() function.</li></ol><p>The following is an example of how to implement a dataframe, inventory_dataframe , using the inventory table query SQL code in the image above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*vOJMT-lNag8bHpYoMmLVCw.png" /></figure><p>Once you have your query in a DataFrame, feel free to continue with your data analysis!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=deb97579a38d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/postgresql-integration-with-jupyter-notebook-deb97579a38d">PostgreSQL Integration with Jupyter Notebook</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>