<?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 Zachary Ang on Medium]]></title>
        <description><![CDATA[Stories by Zachary Ang on Medium]]></description>
        <link>https://medium.com/@zachary.ahw?source=rss-2ee7652cd804------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*DTWZzEcDSAImDdLunInZ2w.png</url>
            <title>Stories by Zachary Ang on Medium</title>
            <link>https://medium.com/@zachary.ahw?source=rss-2ee7652cd804------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 09:13:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zachary.ahw/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[Collecting Movie Data]]></title>
            <link>https://medium.com/data-science/collecting-movie-data-445ca1ead8e5?source=rss-2ee7652cd804------2</link>
            <guid isPermaLink="false">https://medium.com/p/445ca1ead8e5</guid>
            <category><![CDATA[data-collection]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[movies]]></category>
            <category><![CDATA[web-scraping]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Zachary Ang]]></dc:creator>
            <pubDate>Thu, 31 Jan 2019 07:16:07 GMT</pubDate>
            <atom:updated>2019-01-31T14:49:51.630Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v5fvVabIVpP65OEYs7IxTA.png" /></figure><h4>Using a bunch of APIs to assemble a pretty neat dataset</h4><p>I started out with the initial premise that I could try and <strong>predict the price of an iTunes movie</strong> given its characteristics. I knew that we could get information on movies in iTunes with a well documented public API, so let’s take a look.</p><h3>Data from the iTunes data store</h3><p>There are two main ways you can get movie information from the iTunes store on the iTunes API — via a keyword call or a lookup by ID. Obviously, using keywords to extract specific movies is generally not a good idea. Some keywords give you as many as 50 matches (try searching for “Harry Potter”).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/0*SticU1EUbSczYlHj.jpg" /><figcaption>With an average response time of 2s, 10 billion lookups is gonna take…</figcaption></figure><p>A lookup by ID is not much of an improvement either. The iTunes ID trackId string is <strong>at least</strong> 10 digits long, meaning that there could be as many as 10 billion possible IDs I would have to look up one at a time. <em>Not a good idea</em>.</p><p>So I used the<a href="https://rss.itunes.apple.com/"> iTunes RSS Feed</a> to narrow down my search. The snippet below defines a function collect_rss_movies() that pings the iTunes RSS Feed. I decided to rely on the RSS iTunes feed to get more up-to-date movies with complete price information. After getting the iTunes IDs from the iTunes RSS feed, I turned to the iTunes API to get the movie information from the iTunes store using the get_info_by_id() function.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/92ee7de0e45ba27629fb69b81c5700a2/href">https://medium.com/media/92ee7de0e45ba27629fb69b81c5700a2/href</a></iframe><p>I’ve also defined a settings.py file which defines the collection parameters. Here, I’m directing the function to collect data from 9 countries and across 2 main genres.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d97f717ff96662764f773b0e72fc498b/href">https://medium.com/media/d97f717ff96662764f773b0e72fc498b/href</a></iframe><p>I eventually dropped the documentary titles as they looked a <a href="https://itunes.apple.com/us/movie/bill-murray-stories-life-lessons-learned-from-mythical/id1435996525"><em>little obscure</em></a><em> </em>relative to the mainstream movies, but here’s a snippet of what a movie record looks like:</p><pre>{&#39;artistName&#39;: &#39;Christopher McQuarrie&#39;,<br> &#39;contentAdvisoryRating&#39;: &#39;PG-13&#39;,<br> &#39;country&#39;: &#39;USA&#39;,<br> &#39;currency&#39;: &#39;USD&#39;, &#39;primaryGenreName&#39;: &#39;Action &amp; Adventure&#39;,<br> &#39;releaseDate&#39;: &#39;2018-07-27T07:00:00Z&#39;,<br> &#39;shortDescription&#39;: &#39;On a dangerous assignment to recover stolen plutonium, Ethan Hunt (Tom Cruise) chooses to save his&#39;,<br> &#39;trackHdPrice&#39;: 19.99,<br> &#39;trackHdRentalPrice&#39;: 5.99,<br> &#39;trackId&#39;: 1406515547,<br> &#39;trackName&#39;: &#39;Mission: Impossible - Fallout&#39;,<br> &#39;trackNumber&#39;: 6,<br> &#39;trackPrice&#39;: 14.99,<br> &#39;trackRentalPrice&#39;: 5.99,<br> &#39;trackTimeMillis&#39;: 8873322,<br> &#39;wrapperType&#39;: &#39;track&#39;}</pre><p>That’s the gist of it — there are some features that I haven’t included here, but the data description is available at the official i<a href="https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/iTuneSearchAPI/index.html">Tunes API documentation</a>, or you can check out the data description at my <a href="https://github.com/zacharyang/movies-project/tree/master/data">Github</a>.</p><p>Great! We’re all set to do a new exciting machine learning project. Right? <em>But there’s so much more to a movie than that, isn’t there? </em>So I did a little more digging as to how I could supplement this data set.</p><h3>Open Movie Database and The Movie Database</h3><p>While IMdb is the authoritative source on all movie information, they don’t have a public API and I was going to run into trouble searching for the exact movie that I should collect even if I had relied on web scraping. I turned to two open databases on movies, the <a href="http://www.omdbapi.com/">Open Movie Database</a> (OMdb) and <a href="https://developers.themoviedb.org/3/movies/get-movie-details">The Movie database</a> (TMdb).</p><blockquote>The Movie Database (TMDb) is a community built movie and TV database. Every piece of data has been added by our amazing community dating back to 2008. TMDb’s strong international focus and breadth of data is largely unmatched and something we’re incredibly proud of.</blockquote><p>So that’s the provenance of TMdb. From OMdb’s website:</p><blockquote>The OMDb API is a RESTful web service to obtain movie information, all content and images on the site are contributed and maintained by our users.</blockquote><h4>Why two movie databases?</h4><p>Although they were respectively well maintained, they each had their pros and cons, and I realised that I’d probably have to utilise both to extract the right blend of information for my feature set. Both databases did not log the iTunes ID in their database for each movie so I was going to have to rely on a title search to match each movie from the iTunes data to the movies database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/227/1*pfdLHWPDE80iT5FWxtddIQ.png" /><figcaption>Methods available to get information on a movie in the TMdb API</figcaption></figure><ul><li><strong>Features. </strong>OMdb had a lot more useful information than that I couldn’t find in the TMdb dataset. For instance, OMdb contained information on the movie ratings, eg. Rotten Tomatoes ratings, Metacritic score and IMdb ratings. OMdb data also recorded box office performance of the movie, which I felt would be a key feature to predict how much an iTunes movie could list for.</li><li><strong>API capabilities</strong>. In general, the TMdb API was more capable and offered more methods to look for information. In OMdb, you could only look up movies by a keyword search or by IMdb ID. Also, doing a keyword search on the TMdb API generally yielded better results than the OMdb API.</li><li><strong>API rate limits. </strong>OMdb had a pretty tight API rate limit of 1,000 calls per day while the TMdb API had a much higher rate limit of 4 requests per second (or ~340,000 calls per day).</li></ul><p>So<strong> </strong>the OMdb API had <strong>more information that I needed,</strong> but the TMdb API <strong>was generally better to work with.</strong> I eventually decided that I needed to make very targeted and specific calls to the OMdb API to get movie information through a lookup by ID. OMdb indexed their movie records using the IMdb ID, so I was going to have to find the IMdb ID for every movie that was in my iTunes dataset via keyword search, which as I had mentioned, was better done through the TMdb API.</p><p>Though somewhat convoluted, I settled on the following strategy:</p><ol><li>Parse the movie title to a search string to pass through the TMdb API, looking for an exact match. Include year of production to narrow down the search further.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*-ejZN0ZVfx-HjswKaOLxWQ.png" /><figcaption>Parsed movie titles, transformed into search strings for the TMdb API.</figcaption></figure><p>2. For exact matches, look for the IMdb ID using a lookup by TMdb ID. For results with no matches, relax the search criteria by dropping the year of production. For movie titles with mutliple matches or results, extract the IMdb from the first result from a Google search in the form of “Movie title + Year of Production + IMdb”</p><p>3. Match each movie to an IMdb ID, and lookup OMdb API for movie information for each movie.</p><p>Following this procedure, I managed to uniquely identify a rather healthy looking dataset of 603 unique movies from the OMdb API , which <strong>matched ~1,500 out of the 1,800 movies </strong>I collected on the iTunes store so a decent return overall, without delving into the messy world of <a href="https://medium.com/district-data-labs/basics-of-entity-resolution-with-python-and-dedupe-bc87440b64d4">entity resolution</a>. There’s a pretty lengthy chunk of code for this, but you can also follow it at my <a href="https://github.com/zacharyang/movies-project/blob/master/collect_data.py">Github repo</a>.</p><h3>Box Office Mojo data</h3><p>I was pretty happy with the data that I had until I did some initial exploration on the OMdb data. I noticed a large chunk of missing values for box office information in my data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tgq87_ba6iFD5lJlLNjB0w.png" /><figcaption>Over 40% of the movies in the OMdb data had missing box office receipt information.</figcaption></figure><p>I could have lived with missing ratings scores, but box office performance would have been a good feature to incorporate into my model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*GBJLuEASMUZL2Ey7Qg4atg.gif" /><figcaption>Dat feeling when you see so many missing values</figcaption></figure><p>And it seemed plainly obvious that I could get the information rather easily through public data sources. So I turned to <a href="https://www.boxofficemojo.com/alltime/">Box Office Mojo</a>, using the ever reliable requests and BeautifulSoup combo.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e86356094c8a0a3c5a25f76766325b05/href">https://medium.com/media/e86356094c8a0a3c5a25f76766325b05/href</a></iframe><p>I found ~7,000 movies, filling all of my missing values and supplementing it with the breakdown of world-wide box office gross versus US box office gross. Now it was just a matter of putting it all together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*FGCNdZRouNBVuewB1UYpAA.gif" /><figcaption>Merging data: Easy as Pen Pineapple Apple Pen</figcaption></figure><h3>What my data looks like now</h3><p>After all that wrangling, I have a dataset of ~1,500 movies with data merged from 4 different sources, joined by different keys and methods. They exist primarily in <a href="https://github.com/zacharyang/movies-project/tree/master/data/clean">two csv files found in my repository</a>, and I’ve included a broad schema for the database below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*myrfeQpW7_WOCk42LZLmiQ.png" /></figure><p>That wraps up my post about collecting data on movies. I’ll be posting updates on the modelling and data exploration here over the next week or so. In the meanwhile, ping me if you have any feedback, suggestions or improvements to my data collection process!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=445ca1ead8e5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/collecting-movie-data-445ca1ead8e5">Collecting Movie Data</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[All birds are black]]></title>
            <link>https://medium.com/data-science/all-birds-are-black-ec94930294b5?source=rss-2ee7652cd804------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec94930294b5</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[experiment]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[modelling]]></category>
            <dc:creator><![CDATA[Zachary Ang]]></dc:creator>
            <pubDate>Fri, 21 Dec 2018 08:57:14 GMT</pubDate>
            <atom:updated>2018-12-21T17:56:05.734Z</atom:updated>
            <content:encoded><![CDATA[<h4>A simple way to think about bias-variance trade-off</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BL0I6IwLKPpqiwCC" /><figcaption>Photo by <a href="https://unsplash.com/@hannes_wolf?utm_source=medium&amp;utm_medium=referral">Hannes Wolf</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I’ve come across multiple approaches and philosophies for building models to represent real world relationships. My statistics professor was relentless in emphasising <a href="https://www.britannica.com/topic/Occams-razor">Occam’s Razor and parsimony</a>. Social scientists are obsessed with finding causal relationships in models, often through <a href="https://www.sagepub.com/sites/default/files/upm-binaries/23639_Chapter_5___Causation_and_Experimental_Design.pdf">experiments</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/0*o0D3IIxoD5cdXaaY.jpg" /><figcaption>Don’t go there, Simba!</figcaption></figure><p>In machine learning, we get introduced pretty early on to the <strong>bias-variance trade-off</strong>, and the perils of <a href="https://elitedatascience.com/overfitting-in-machine-learning">overfitting</a>.</p><p>The basic idea, according to Wikipedia:</p><blockquote>…the <strong>bias–variance tradeoff</strong> is the property of a set of predictive models whereby models with a lower bias in parameter estimation have a higher variance of the parameter estimates across samples, and vice versa.</blockquote><p>Lost yet? There are a ton of <a href="https://towardsdatascience.com/understanding-the-bias-variance-tradeoff-165e6942b229">excellent explanations</a> out there, but let’s try to crack this without graphs, math or greek.</p><p>Let’s start with the simplest of models. <em>A mental model.</em></p><h3>All birds are black: The simplest model</h3><p>Suppose you’ve never seen a bird before. <em>Ever. </em>And you’ve been asked (by your imaginary boss) to either:</p><ul><li>Describe how birds, in general, look like;</li><li>Explain what it is that makes a bird, a bird; or</li><li>Predict what the next bird would look like at any given place or time.</li></ul><p>You’d probably observe what a bird, or several birds look like, and make a few generalisations about the bird.</p><p>Suppose next, that you come across a flock of crows and you conclude the following:</p><ul><li>All birds have two legs</li><li>All birds have beaks</li><li>All birds have feathers</li><li><strong>All birds are black</strong></li></ul><p>Congratulations! You’ve built your first model in the bird-verse.</p><p>Of course, one doesn’t have to be a bird expert to know that “all birds are black” is an incorrect conclusion, but remember — y<em>ou’ve never seen a bird before</em>! Your model is <strong>overfitted</strong>, where you’ve picked out too many details from the crow and tried to generalise it to an entire population of birds. <strong>You wanted to describe birds, but ended up describing crows.</strong></p><p>After getting a telling-off from your boss, you return to the bird-verse and build another model. “Keep It Simple, Stupid” came the advice. You then observe some other birds and conclude:</p><ul><li><strong>All birds have feathers</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*-aZ4S6xe_owJLm1n.jpg" /><figcaption>Dame Edna has feathers. Is she a bird?</figcaption></figure><p>That’s not <em>quite</em> right either. We’ve avoided the problem of making generalisations based on idiosyncratic features of some birds. However, we’ve gone too far by making a single declaration on what we presumed was a universal characteristic amongst birds.</p><p>Not unreasonable by any stretch, but still wrong.</p><p>That’s when we say a model is <strong>under-fitted</strong>. You’ve only taken one characteristic, but it doesn’t return a consistent prediction or explanation of what birds are or would be. In this case, <strong>you wanted to describe birds, but you ended up catching every one with feathers</strong>.</p><p>Let’s try and bring this back to stats and machine learning parlance. In the first model, we’ve reduced the<em> bias</em> in explaining a local sample of birds, but there’s more <em>variance</em> when generalising to another sample.</p><p>In the second model, we’ve gotten a low <em>variance </em>predictor that performs well when generalising to more bird samples, but faces more <em>bias </em>when confronted with a sample of stuff that has feathers, but is clearly not a bird!</p><h3>We build models everyday</h3><p>We gravitate between over-fitted and under-fitted models, iterating through various models of how things function until we come to a satisfactory understanding of how things work. Once you start thinking about models simply, you’ll start noticing the bias-variance trade-off <strong>everywhere</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*XzHIkIqFiudrXGOnh8OmAg.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*zsOVVGToi4Q4qh68yaRxEA.gif" /><figcaption>Greg learnt about bias-variance trade-off the hard way</figcaption></figure><p>Establishing relationships, building models and getting to the root of things we observe in our environment is intrinsic to human nature. It’s really not that different from how we build models for machine learning. And it’s no wonder <a href="https://www.entrepreneur.com/article/309892">machines end up like us</a>.</p><p>Thanks for reading! Please leave comments or feedback if this was useful for you, or if you’d like to suggest some improvements.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec94930294b5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/all-birds-are-black-ec94930294b5">All birds are black</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[You can’t just Google everything]]></title>
            <link>https://medium.com/data-science/you-cant-just-google-everything-38c52b402779?source=rss-2ee7652cd804------2</link>
            <guid isPermaLink="false">https://medium.com/p/38c52b402779</guid>
            <category><![CDATA[movies]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[video-on-demand]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Zachary Ang]]></dc:creator>
            <pubDate>Thu, 20 Dec 2018 03:50:41 GMT</pubDate>
            <atom:updated>2018-12-21T00:42:39.456Z</atom:updated>
            <content:encoded><![CDATA[<h4>And other things I wish I knew before I started my latest Data Science project</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Byd3fEA_oNhQrfvX" /><figcaption>Photo by <a href="https://unsplash.com/@cdr6934?utm_source=medium&amp;utm_medium=referral">Chris Ried</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I got started on a new data science project a few weeks ago and expectedly, it’s been h̶o̶r̶r̶i̶f̶i̶c̶ absolutely enlightening. I’ve made a few tentative explorations into data science and machine learning projects before. But I thought it was time to do something <em>bigger. </em>But where would I start?</p><h3><strong>You can’t just Google everything</strong></h3><p>I made the mistake of looking for inspiration where, to be fair, most people would — the front page of Google. As it turns out, there are <em>way too many </em>resources out there that you could get lost in. Some tips are a little underwhelming. Take this one from a Quora post I found:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O4w6iu7B3SfhKjABxWxMZg.png" /><figcaption>I fell asleep when I saw “cricket”</figcaption></figure><p>That didn’t sound right. Why should I be looking at data that merely “mimicked” real world application of data science? I wanted to build a real portfolio, solve real problems and make a real difference to businesses and people. I wanted to analyse something I could be passionate about. These suggested datasets are great, no doubt. They’d probably be a great test of your data exploration, machine learning or visualisation skills. But what would it all count for, ultimately?</p><blockquote>I wanted to build a real portfolio, solve real problems and make a real difference to businesses and people.</blockquote><p>Instead, one of the most useful resources I’ve turned to are the writers on <a href="https://towardsdatascience.com/">Towards Data Science</a>. Michael Galarnyk wrote a <a href="https://towardsdatascience.com/how-to-build-a-data-science-portfolio-5f566517c79c">great piece</a> on building a data science portfolio and Jeremie Harris wrote a great <a href="https://towardsdatascience.com/the-4-fastest-ways-not-to-get-hired-as-a-data-scientist-565b42bd011e">“don’t-do” list</a> for aspiring data scientists. This part spoke to me the best:</p><blockquote>When in doubt, here are some projects that hurt you more than they help you:</blockquote><blockquote>* Survival classification on the <a href="https://www.kaggle.com/c/titanic">Titanic dataset</a>.</blockquote><blockquote>* Hand-written digit classification on the <a href="https://www.tensorflow.org/versions/r1.2/get_started/mnist/pros">MNIST dataset</a>.</blockquote><blockquote>* Flower species classification using the <a href="https://archive.ics.uci.edu/ml/datasets/iris">iris dataset</a>.</blockquote><p>I have mixed feelings about Kaggle and their competitions. I think data scientists should possess the ability to wrangle data from all kinds of places unimaginable. I don’t really like the idea of being ‘spoon-fed’ the data. That being said…</p><h3>Collecting your own data is painful. Really.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/0*pyf0MY5YaBZR4NMZ.jpg" /></figure><p>So I finally decided to collect my own data. The project was going to be about predicting a movie’s iTunes list price from its characteristics, eg. box office performance, critic ratings, cast, plot etc. Models on predicting success of a movie were not new. <strong>But some questions hadn’t been asked, nor answered.</strong></p><ul><li>After a movie is released, how much would a movie be able to list for on a Video on Demand (VOD) platform?</li><li>Can I forecast this price in advance so I can decide if I want to pay for it?</li><li>Or could another VOD provider use this information to compete with iTunes on price?</li><li>Can a Subscription Video on Demand provider like Netflix use this information to optimise their pricing strategy?</li></ul><p><em>Much better than looking at cricket data.</em></p><p>But very few datasets provided the connection between movies and their list price on iTunes, or other VOD platforms.</p><p>Eventually, I turned to open source movie databases such as <a href="https://developers.themoviedb.org/3/movies/get-movie-details">The Movie Database</a> and <a href="http://www.omdbapi.com/">Open Movie Database</a>, which I combined with the iTunes data to analyse the data. This was not without its challenges though. You can look at my script and exploratory analysis on <a href="https://github.com/zacharyang/movies-project">Github</a>, but stay tuned for a blog post on my whole data collection process soon.</p><h3>Everyone who has valuable data uses an API</h3><p>I’m no expert in internet protocol, server scripting or database architecture and engineering. But I don’t think I’m far off the mark with this one.</p><p>I relied heavily on using APIs through my data collection process, but I also used web scraping techniques to gather my data. I found myself making much less queries to the website/server using an API, which provided me a way of making a structured query to get all the data I <em>needed</em>. Nothing superfluous or noisy.</p><p>It’s important for organisations to understand why an API layer will benefit them:</p><ul><li>You can protect your servers that host your information.</li><li>You’ll protect the data that powers your business.</li><li>It helps your partners and collaborators get the data and information that they need, easily and safely.</li><li>You can manage your server resources by tweaking rate limits.</li><li>You are in ultimate control of how you want data to be coming in and out of your servers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/278/0*ujBmfVrPRLMpti7Z.jpg" /></figure><p>The analogy of an API <a href="https://medium.freecodecamp.org/what-is-an-api-in-english-please-b880a3214a82">being a a bartender</a> is particularly useful. Instead of opening up your data ‘buffet’ style, where people would tend to adopt a grab-first-ask-questions-later mentality, it’s much better to have a guy to control how much food gets consumed. Pretty neat stuff.</p><p>Thanks for reading my first blog post. I’ll be posting more updates as my project progresses and thoughts bubble to the surface.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38c52b402779" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/you-cant-just-google-everything-38c52b402779">You can’t just Google everything</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>
    </channel>
</rss>