{"componentChunkName":"component---src-templates-blog-list-template-js","path":"/119","result":{"data":{"allMarkdownRemark":{"edges":[{"node":{"excerpt":"Introduction When building APIs, the need to upload files is expected, which can be images, text documents, scripts, pdfs, among others. In…","fields":{"slug":"/engineering/upload-files-with-node-and-multer/"},"html":"<h1 id=\"introduction\" style=\"position:relative;\"><a href=\"#introduction\" aria-label=\"introduction permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Introduction</h1>\n<p>When building APIs, the need to upload files is expected, which can be images, text documents, scripts, pdfs, among others. In the development of this functionality, some problems can be found, such as the number of files, valid file types, sizes of these files, and several others. And to save us from these problems we have the <a href=\"https://github.com/expressjs/multer\">Multer</a> library. Multer is a node.js middleware for handling <code>multipart/form-data</code> that is used to send files in forms.</p>\n<h1 id=\"first-steps\" style=\"position:relative;\"><a href=\"#first-steps\" aria-label=\"first steps permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>First steps</h1>\n<p>The first step is to create a NodeJS project on your computer.</p>\n<h1 id=\"adding-express\" style=\"position:relative;\"><a href=\"#adding-express\" aria-label=\"adding express permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Adding Express</h1>\n<p>In your terminal, type the following command:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"jsx\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk12\">yarn</span><span class=\"mtk1\"> </span><span class=\"mtk12\">add</span><span class=\"mtk1\"> </span><span class=\"mtk12\">express</span></span></code></pre>\n<p>* <em>You can also use NPM for installation</em></p>\n<p>Create a file named <code>app.js</code> inside the <code>src/</code> folder. The next step is to start our Express server in our <code>app.js</code></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">express</span><span class=\"mtk1\"> = </span><span class=\"mtk11\">require</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;express&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">app</span><span class=\"mtk1\"> = </span><span class=\"mtk11\">express</span><span class=\"mtk1\">()</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">app</span><span class=\"mtk1\">.</span><span class=\"mtk11\">listen</span><span class=\"mtk1\">(</span><span class=\"mtk7\">3000</span><span class=\"mtk1\"> || </span><span class=\"mtk12\">process</span><span class=\"mtk1\">.</span><span class=\"mtk12\">env</span><span class=\"mtk1\">.</span><span class=\"mtk12\">PORT</span><span class=\"mtk1\">, () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;Server on...&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})</span></span></code></pre>\n<h1 id=\"adding-multer\" style=\"position:relative;\"><a href=\"#adding-multer\" aria-label=\"adding multer permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Adding Multer</h1>\n<p>With the project created, configured and with Express installed, we will add the multer to our project.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk12\">yarn</span><span class=\"mtk1\"> </span><span class=\"mtk12\">add</span><span class=\"mtk1\"> </span><span class=\"mtk12\">multer</span></span></code></pre>\n<p>The next step is to import the multer into our <code>app.js</code> file.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"jsx\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">multer</span><span class=\"mtk1\"> = </span><span class=\"mtk11\">require</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;multer&quot;</span><span class=\"mtk1\">)</span></span></code></pre>\n<p>We are almost there. Now create a folder called <code>uploads</code> where we will store the uploaded files.</p>\n<h1 id=\"configuring-and-validating-the-upload\" style=\"position:relative;\"><a href=\"#configuring-and-validating-the-upload\" aria-label=\"configuring and validating the upload permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Configuring and validating the upload</h1>\n<p>Now we are at a very important stage which is the configuration of <code>diskStorage</code>. <code>DiskStorage</code> is a method made available by multer where we configure the destination of the file, the name of the file and we can also add validations regarding the type of the file. These settings are according to the needs of your project. Below I will leave an elementary example of the configuration.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">storage</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">multer</span><span class=\"mtk1\">.</span><span class=\"mtk11\">diskStorage</span><span class=\"mtk1\">({</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">destination</span><span class=\"mtk12\">:</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">req</span><span class=\"mtk1\">, </span><span class=\"mtk12\">file</span><span class=\"mtk1\">, </span><span class=\"mtk12\">cb</span><span class=\"mtk1\">) </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk11\">cb</span><span class=\"mtk1\">(</span><span class=\"mtk4\">null</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;uploads/&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  },</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">filename</span><span class=\"mtk12\">:</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">req</span><span class=\"mtk1\">, </span><span class=\"mtk12\">file</span><span class=\"mtk1\">, </span><span class=\"mtk12\">cb</span><span class=\"mtk1\">) </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk11\">cb</span><span class=\"mtk1\">(</span><span class=\"mtk4\">null</span><span class=\"mtk1\">, </span><span class=\"mtk10\">Date</span><span class=\"mtk1\">.</span><span class=\"mtk11\">now</span><span class=\"mtk1\">() + </span><span class=\"mtk8\">&quot;-&quot;</span><span class=\"mtk1\"> + </span><span class=\"mtk12\">file</span><span class=\"mtk1\">.</span><span class=\"mtk12\">originalname</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  },</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})</span></span></code></pre>\n<p>In the configuration above, we mentioned the destination for the uploaded files and also change the name of the file .</p>\n<h1 id=\"providing-an-upload-route\" style=\"position:relative;\"><a href=\"#providing-an-upload-route\" aria-label=\"providing an upload route permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Providing an upload route</h1>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"5\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">uploadStorage</span><span class=\"mtk1\"> = </span><span class=\"mtk11\">multer</span><span class=\"mtk1\">({ </span><span class=\"mtk12\">storage:</span><span class=\"mtk1\"> </span><span class=\"mtk12\">storage</span><span class=\"mtk1\"> })</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\">// Single file</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">app</span><span class=\"mtk1\">.</span><span class=\"mtk11\">post</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;/upload/single&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">uploadStorage</span><span class=\"mtk1\">.</span><span class=\"mtk11\">single</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;file&quot;</span><span class=\"mtk1\">), (</span><span class=\"mtk12\">req</span><span class=\"mtk1\">, </span><span class=\"mtk12\">res</span><span class=\"mtk1\">) </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">req</span><span class=\"mtk1\">.</span><span class=\"mtk12\">file</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk12\">res</span><span class=\"mtk1\">.</span><span class=\"mtk11\">send</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;Single file&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\">//Multiple files</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">app</span><span class=\"mtk1\">.</span><span class=\"mtk11\">post</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;/upload/multiple&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">uploadStorage</span><span class=\"mtk1\">.</span><span class=\"mtk11\">array</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;file&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk7\">10</span><span class=\"mtk1\">), (</span><span class=\"mtk12\">req</span><span class=\"mtk1\">, </span><span class=\"mtk12\">res</span><span class=\"mtk1\">) </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">req</span><span class=\"mtk1\">.</span><span class=\"mtk12\">files</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk12\">res</span><span class=\"mtk1\">.</span><span class=\"mtk11\">send</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;Multiple files&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})</span></span></code></pre>\n<p>In the code snippet above, we created 2 POST routes for sending files. The first <code>/upload/single</code> route receives only a single file, note that the uploadStorage variable receives our diskStorage settings. As a middleware in the route, it calls the <code>single</code> method for uploading a single file. The <code>/upload/multiple</code> route receives several files, but with a maximum limit of 10 files, note that the uploadStorage variable now calls the ʻarray` method for uploading multiple files.</p>\n<h1 id=\"the-end\" style=\"position:relative;\"><a href=\"#the-end\" aria-label=\"the end permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>The end</h1>\n<p>With all the settings done, our little API is already able to store the files sent.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"6\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">express</span><span class=\"mtk1\"> = </span><span class=\"mtk11\">require</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;express&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">multer</span><span class=\"mtk1\"> = </span><span class=\"mtk11\">require</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;multer&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">app</span><span class=\"mtk1\"> = </span><span class=\"mtk11\">express</span><span class=\"mtk1\">()</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">storage</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">multer</span><span class=\"mtk1\">.</span><span class=\"mtk11\">diskStorage</span><span class=\"mtk1\">({</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">destination</span><span class=\"mtk12\">:</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">req</span><span class=\"mtk1\">, </span><span class=\"mtk12\">file</span><span class=\"mtk1\">, </span><span class=\"mtk12\">cb</span><span class=\"mtk1\">) </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk11\">cb</span><span class=\"mtk1\">(</span><span class=\"mtk4\">null</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;uploads/&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  },</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">filename</span><span class=\"mtk12\">:</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">req</span><span class=\"mtk1\">, </span><span class=\"mtk12\">file</span><span class=\"mtk1\">, </span><span class=\"mtk12\">cb</span><span class=\"mtk1\">) </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk11\">cb</span><span class=\"mtk1\">(</span><span class=\"mtk4\">null</span><span class=\"mtk1\">, </span><span class=\"mtk10\">Date</span><span class=\"mtk1\">.</span><span class=\"mtk11\">now</span><span class=\"mtk1\">() + </span><span class=\"mtk8\">&quot;-&quot;</span><span class=\"mtk1\"> + </span><span class=\"mtk12\">file</span><span class=\"mtk1\">.</span><span class=\"mtk12\">originalname</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  },</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">const</span><span class=\"mtk1\"> </span><span class=\"mtk12\">uploadStorage</span><span class=\"mtk1\"> = </span><span class=\"mtk11\">multer</span><span class=\"mtk1\">({ </span><span class=\"mtk12\">storage:</span><span class=\"mtk1\"> </span><span class=\"mtk12\">storage</span><span class=\"mtk1\"> })</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\">// Single file</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">app</span><span class=\"mtk1\">.</span><span class=\"mtk11\">post</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;/upload/single&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">uploadStorage</span><span class=\"mtk1\">.</span><span class=\"mtk11\">single</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;file&quot;</span><span class=\"mtk1\">), (</span><span class=\"mtk12\">req</span><span class=\"mtk1\">, </span><span class=\"mtk12\">res</span><span class=\"mtk1\">) </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">req</span><span class=\"mtk1\">.</span><span class=\"mtk12\">file</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk12\">res</span><span class=\"mtk1\">.</span><span class=\"mtk11\">send</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;Single file&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\">//Multiple files</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">app</span><span class=\"mtk1\">.</span><span class=\"mtk11\">post</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;/upload/multiple&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">uploadStorage</span><span class=\"mtk1\">.</span><span class=\"mtk11\">array</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;file&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk7\">10</span><span class=\"mtk1\">), (</span><span class=\"mtk12\">req</span><span class=\"mtk1\">, </span><span class=\"mtk12\">res</span><span class=\"mtk1\">) </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">req</span><span class=\"mtk1\">.</span><span class=\"mtk12\">files</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk12\">res</span><span class=\"mtk1\">.</span><span class=\"mtk11\">send</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;Multiple files&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">app</span><span class=\"mtk1\">.</span><span class=\"mtk11\">listen</span><span class=\"mtk1\">(</span><span class=\"mtk7\">3000</span><span class=\"mtk1\"> || </span><span class=\"mtk12\">process</span><span class=\"mtk1\">.</span><span class=\"mtk12\">env</span><span class=\"mtk1\">.</span><span class=\"mtk12\">PORT</span><span class=\"mtk1\">, () </span><span class=\"mtk4\">=&gt;</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;Server on...&quot;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})</span></span></code></pre>\n<p>Now it's up to you!</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk7 { color: #B5CEA8; }\n  .dark-default-dark .mtk10 { color: #4EC9B0; }\n  .dark-default-dark .mtk3 { color: #6A9955; }\n  .dark-default-dark .mtk15 { color: #C586C0; }\n</style>","frontmatter":{"date":"October 12, 2020","updated_date":null,"description":"Learn how to upload files in a NodeJS application using Multer, Multer is a middleware for handling multipart/form-data that is used to send files in forms.","title":"Upload files using NodeJS + Multer","tags":["NodeJs","Express","Multer"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/7abf157b1bfeb7c65d7e338a620ac875/58556/node-multer-upload.webp","srcSet":"/static/7abf157b1bfeb7c65d7e338a620ac875/61e93/node-multer-upload.webp 200w,\n/static/7abf157b1bfeb7c65d7e338a620ac875/1f5c5/node-multer-upload.webp 400w,\n/static/7abf157b1bfeb7c65d7e338a620ac875/58556/node-multer-upload.webp 800w,\n/static/7abf157b1bfeb7c65d7e338a620ac875/99238/node-multer-upload.webp 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Gabriel Rabelo","github":"gabrielrab","avatar":null}}}},{"node":{"excerpt":"Introduction Learning Deep Features for Discriminative Localization: Machine learning and Deep learning are gaining traction in today’s…","fields":{"slug":"/engineering/class-activation-mapping/"},"html":"<h3 id=\"introduction\" style=\"position:relative;\"><a href=\"#introduction\" aria-label=\"introduction permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Introduction</h3>\n<h4 id=\"learning-deep-features-for-discriminative-localization\" style=\"position:relative;\"><a href=\"#learning-deep-features-for-discriminative-localization\" aria-label=\"learning deep features for discriminative localization permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Learning Deep Features for Discriminative Localization:</h4>\n<p>Machine learning and Deep learning are gaining traction in today’s world and are making significant and unimaginable progress in almost every industry. However, with the increase in complexity and accuracy of these algorithms, the interpretability of these is at stake- especially the deep learning models which take in more than a million parameters for complex, convoluted models. Class Activation Mapping (CAM) is one such technique which helps us in enhancing the interpretability of such complex models.</p>\n<h3 id=\"class-activation-mapping-cams\" style=\"position:relative;\"><a href=\"#class-activation-mapping-cams\" aria-label=\"class activation mapping cams permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Class Activation Mapping (CAMs)</h3>\n<p>For a particular class (or category), Class activation mapping basically indicates the discriminative region of the image, which influenced the deep learning model to make the decision. The architecture is very similar to a convolutional neural network. It comprises several convolution layers, with the layer just before the final output performing Global Average Pooling. The features that are obtained are fed into the fully connected neural network layer governed by the softmax activation function and thus, output us the required probabilities. The importance of the weights with respect to a category can be found out by projecting back the weights onto the last convolution layer’s feature map. </p>\n<h3 id=\"global-average-pooling-gap-vs-global-max-pooling-gmp\" style=\"position:relative;\"><a href=\"#global-average-pooling-gap-vs-global-max-pooling-gmp\" aria-label=\"global average pooling gap vs global max pooling gmp permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Global Average Pooling (GAP) vs Global Max Pooling (GMP)</h3>\n<p>The Global Average Pooling (GAP) is preferred over Global Max Pooling (GMP) because GAP helps us in identifying the full extent of the object as compared to the GMP layer, which identifies one discriminative part. In Global Average Pooling, an average is taken across all the activation maps which help us to find all the possible discriminative regions present in them. Contrary to this, the Global Max Pooling method just considers the most discriminative region. Hence, Global Average Pooling showed better results than Global Max Pooling.</p>\n<h3 id=\"mathematical-equations-governing-cams\" style=\"position:relative;\"><a href=\"#mathematical-equations-governing-cams\" aria-label=\"mathematical equations governing cams permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Mathematical equations governing CAMs</h3>\n<p>Let <img src=\"https://latex.codecogs.com/png.latex?f%28x%2Cy%29\" alt=\"Equation 1\"> be the activation map of unit <img src=\"https://latex.codecogs.com/png.latex?k\" alt=\"Equation 2\"> in the last convolutional layer at spatial location <img src=\"https://latex.codecogs.com/png.latex?%28x%2Cy%29\" alt=\"Equation 3\">.</p>\n<p><em>The result of GAP is represented as:-</em></p>\n<p><img src=\"https://latex.codecogs.com/png.latex?F_%7Bk%7D%3D%20%5Csum_%7Bx%2Cy%7Df_%7Bk%7D%28x%2Cy%29\" alt=\"Equation 4\"></p>\n<p><em>For a class c, an input to the softmax will be:-</em></p>\n<p><img src=\"https://latex.codecogs.com/png.latex?S_%7Bc%7D%3D%20%5Csum_%7Bk%7Dw%5E%7Bc%7D_%7Bk%7DF_%7Bk%7D\" alt=\"Equation 5\"></p>\n<p><em>Output of Softmax layer:-</em></p>\n<p><img src=\"https://latex.codecogs.com/png.latex?P_c%3D%20%5Cfrac%7Be%5E%7BS_c%7D%7D%7B%5Csum_ce%5E%7BS_c%7D%7D\" alt=\"Equation 6\"></p>\n<p>Thus, <strong>the final equation</strong> for an activation map of class c would be:- </p>\n<p><img src=\"https://latex.codecogs.com/png.latex?M_%7Bc%7D%28x%2Cy%29%3D%5Csum_%7Bk%7Dw%5E%7Bc%7D_%7Bk%7Df_%7Bk%7D%28x%2Cy%29\" alt=\"Equation 7\">  </p>\n<h3 id=\"weakly-supervised-object-localization\" style=\"position:relative;\"><a href=\"#weakly-supervised-object-localization\" aria-label=\"weakly supervised object localization permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Weakly-supervised Object Localization</h3>\n<p>The localization ability of the CAM method was put to the test when they were trained on the ILSVRC 2014 benchmark dataset. The CAM technique was used on popular CNN models like AlexNet, VGGNet and GoogLeNet by tweaking their models and fitting a GAP layer (similar to the CAM architecture) towards the end. This modified model was giving astounding results with the GAP layer as compared to their traditional architecture in terms of discriminative localization.</p>\n<h3 id=\"deep-features-for-generic-localization\" style=\"position:relative;\"><a href=\"#deep-features-for-generic-localization\" aria-label=\"deep features for generic localization permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Deep Features for Generic Localization</h3>\n<p>After applying a CAM architecture to fine-grained recognition and pattern discovery (like discovering informative objects in the scenes, concept localization in weakly labelled images, weakly supervised text detector and interpreting visual question answering), we can infer that feature capturing and localization was far more accurate in the CAM based GAP layer architecture, as the complete extent of the features were captured.\nVisualizing Class-specific Units:-\nWhen we use the GAP layer and the ranked softmax weight, we can directly visualize the units, which are the most discriminative for a particular class. Thus, CNN actually learns a bag of words, where each word is a discriminative class-specific unit. A combination of these class-specific units helps to guide CNNs in classifying each image.</p>\n<h3 id=\"conclusion\" style=\"position:relative;\"><a href=\"#conclusion\" aria-label=\"conclusion permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Conclusion:</h3>\n<p>CAMs are a great technique to interpret the information from the CNN models. However, the disadvantage of CAMs is that they can be noisy, and there might be some loss of spatial information. Hence, the Grad-CAM architecture and the Score-CAM architecture were built upon the CAM architecture to improve the accuracy, feature capturing and retain precise spatial information.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"October 10, 2020","updated_date":null,"description":"Learn about the importance of the explainability of deep learning models and Class Activation Map Technique","title":"Class Activation Mapping in Deep Learning","tags":["Explainable AI","Deep Learning","CNN","Machine Learning"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/f00bfab91c9b545daddfe5a17abc22c8/58556/Cover.webp","srcSet":"/static/f00bfab91c9b545daddfe5a17abc22c8/61e93/Cover.webp 200w,\n/static/f00bfab91c9b545daddfe5a17abc22c8/1f5c5/Cover.webp 400w,\n/static/f00bfab91c9b545daddfe5a17abc22c8/58556/Cover.webp 800w,\n/static/f00bfab91c9b545daddfe5a17abc22c8/99238/Cover.webp 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Ankit Choraria","github":"Ankit810","avatar":null}}}},{"node":{"excerpt":"What is data enrichment? and its importance Data enrichment is the process of combining first-party data from internal sources with…","fields":{"slug":"/engineering/full-data-science-pipeline-implementation/"},"html":"<h2 id=\"what-is-data-enrichment-and-its-importance\" style=\"position:relative;\"><a href=\"#what-is-data-enrichment-and-its-importance\" aria-label=\"what is data enrichment and its importance permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is data enrichment? and its importance</h2>\n<p>Data enrichment is the process of combining first-party data from internal sources with disparate data from other internal systems or third-party data from external sources.</p>\n<p>Usually, the data available from clients or stakeholders are not enough to solve the given problem statement, like if a client comes with a problem statement to build a recommendation engine for his mutual fund industry, the usual data they have is old purchase data but that's not enough as client behaviour changes with time and is impacted by the present market condition, oil prices, etc. which needs to be incorporated in the model to make it efficient.</p>\n<p>Codes for this tutorial is at <a href=\"https://github.com/LoginRadius/engineering-blog-samples/tree/master/Data_Science/Full_DataScience_Pipeline_Implementation\">Link</a></p>\n<p><strong>The whole process id divided into four steps:</strong></p>\n<p>I have implemented a full pipeline of data science from scrapping data from web to implementing ml and NLP classification.</p>\n<ul>\n<li>Phase I:</li>\n</ul>\n<p>Here I have scraped data from IMDB website (imdb.py)</p>\n<ul>\n<li>Phase II:</li>\n</ul>\n<p>I have tried to implement simple ML regression on the data (ml_imdb.py)</p>\n<ul>\n<li>Phase III:</li>\n</ul>\n<p>I have prepared the data for NLP classification (multilabel_prep.py)</p>\n<ul>\n<li>Phase IV:</li>\n</ul>\n<p>I have implemented multilabel NLP classifier using various techniques like chain classifier etc. (multilabel<em>nlp</em>classifier.ipynb)</p>\n<h2 id=\"what-is-web-scraping\" style=\"position:relative;\"><a href=\"#what-is-web-scraping\" aria-label=\"what is web scraping permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is web scraping?</h2>\n<p>Web scraping is the process of extracting and parsing raw data from the web. Web scraping is a technique which helps data scientist to make their data-rich and is an efficient technique of data collection.</p>\n<p>This world is full of data, but unfortunately, most of them are not in the form to be used. Data is like crude oil, or we say it is in unstructured form. For a data scientist or engineer, our first challenge is to make the data model consumption ready, which takes the majority of the time, and this whole process is collectively known as data preprocessing.</p>\n<p>HTML  is a form of primary markup language and the base framework of mostly all websites. For performing web scraping its necessary to know it</p>\n<p>Here we will start with requesting the web page using python package requests.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"python\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> requests </span><span class=\"mtk15\">import</span><span class=\"mtk1\"> get</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  url = </span><span class=\"mtk8\">&#39;http://www.imdb.com/search/title?release_date=2017&sort=num_votes,desc&page=1&#39;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  response = get(url)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk11\">print</span><span class=\"mtk1\">(</span><span class=\"mtk11\">len</span><span class=\"mtk1\">(response.text))</span></span></code></pre>\n<p>The whole web page is now stored in the variable object response.\nThen we parse the web page using beautifulsoup package.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"python\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">from</span><span class=\"mtk1\"> bs4 </span><span class=\"mtk15\">import</span><span class=\"mtk1\"> BeautifulSoup</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  html_soup = BeautifulSoup(response.text, </span><span class=\"mtk8\">&#39;html.parser&#39;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk10\">type</span><span class=\"mtk1\">(html_soup)</span></span></code></pre>\n<p>Then I will store all the div with the class named lister-item mode-advanced in variable movie_containers.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"python\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">movie_containers = html_soup.find_all(</span><span class=\"mtk8\">&#39;div&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">class_</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&#39;lister-item mode-advanced&#39;</span><span class=\"mtk1\">)</span></span></code></pre>\n<p>Then I iterate through this object and store the information in lists to make my final DataFrame, using simple for loops.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"python\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk3\"># Lists to store the scraped data in</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">names = []</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">years = []</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">imdb_ratings = []</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">metascores = []</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">votes = []</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\">#gross=[] #many movies have no record</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">movie_description=[]</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">movie_duration=[]</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">movie_genre=[]</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># Extract data from individual movie container</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">for</span><span class=\"mtk1\"> container </span><span class=\"mtk4\">in</span><span class=\"mtk1\"> movie_containers:</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># If the movie has Metascore, then extract:</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> container.find(</span><span class=\"mtk8\">&#39;div&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">class_</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&#39;ratings-metascore&#39;</span><span class=\"mtk1\">) </span><span class=\"mtk4\">is</span><span class=\"mtk1\"> </span><span class=\"mtk4\">not</span><span class=\"mtk1\"> </span><span class=\"mtk4\">None</span><span class=\"mtk1\">:</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># The name</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        name = container.h3.a.text</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        names.append(name)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># The year</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        year = container.h3.find(</span><span class=\"mtk8\">&#39;span&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">class_</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&#39;lister-item-year&#39;</span><span class=\"mtk1\">).text</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        years.append(year)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># The IMDB rating</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        imdb = </span><span class=\"mtk10\">float</span><span class=\"mtk1\">(container.strong.text)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        imdb_ratings.append(imdb)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># The Metascore</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        m_score = container.find(</span><span class=\"mtk8\">&#39;span&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">class_</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&#39;metascore&#39;</span><span class=\"mtk1\">).text</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        metascores.append(</span><span class=\"mtk10\">int</span><span class=\"mtk1\">(m_score))</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># The number of votes</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        vote = container.find(</span><span class=\"mtk8\">&#39;span&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">attrs</span><span class=\"mtk1\"> = {</span><span class=\"mtk8\">&#39;name&#39;</span><span class=\"mtk1\">:</span><span class=\"mtk8\">&#39;nv&#39;</span><span class=\"mtk1\">})[</span><span class=\"mtk8\">&#39;data-value&#39;</span><span class=\"mtk1\">]</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        votes.append(</span><span class=\"mtk10\">int</span><span class=\"mtk1\">(vote))</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># Gross income of movie</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk3\">#gross_inc =container.find_all(&#39;span&#39;, attrs = {&#39;name&#39;:&#39;nv&#39;})[1][&#39;data-value&#39;]</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk3\">#gross.append(gross_inc)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># movie description</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        movie_desc=container.find_all(</span><span class=\"mtk8\">&#39;p&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">class_</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&#39;text-muted&#39;</span><span class=\"mtk1\">)[</span><span class=\"mtk7\">1</span><span class=\"mtk1\">].text</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        movie_description.append(movie_desc)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        movie_det=container.find_all(</span><span class=\"mtk8\">&#39;p&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">class_</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&#39;text-muted&#39;</span><span class=\"mtk1\">)[</span><span class=\"mtk7\">0</span><span class=\"mtk1\">]</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># Movie duration</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        movie_dur=movie_det.find(</span><span class=\"mtk8\">&#39;span&#39;</span><span class=\"mtk1\">,</span><span class=\"mtk12\">class_</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&#39;runtime&#39;</span><span class=\"mtk1\">).text</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        movie_duration.append(movie_dur)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># Movie genre</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        movie_gen=movie_det.find(</span><span class=\"mtk8\">&#39;span&#39;</span><span class=\"mtk1\">,</span><span class=\"mtk12\">class_</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&#39;genre&#39;</span><span class=\"mtk1\">).text</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        movie_genre.append(movie_gen)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> pandas </span><span class=\"mtk15\">as</span><span class=\"mtk1\"> pd</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">one_df = pd.DataFrame({</span><span class=\"mtk8\">&#39;movie&#39;</span><span class=\"mtk1\">: names,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk8\">&#39;year&#39;</span><span class=\"mtk1\">: years,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk8\">&#39;imdb&#39;</span><span class=\"mtk1\">: imdb_ratings,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk8\">&#39;metascore&#39;</span><span class=\"mtk1\">: metascores,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk8\">&#39;votes&#39;</span><span class=\"mtk1\">: votes,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\">#&#39;gross&#39;:gross,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk8\">&#39;movie decription&#39;</span><span class=\"mtk1\">:movie_description,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk8\">&#39;movie duration&#39;</span><span class=\"mtk1\">:movie_duration,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk8\">&#39;movie genre&#39;</span><span class=\"mtk1\">:movie_genre</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">})</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk11\">print</span><span class=\"mtk1\">(one_df.info())</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">one_df.to_csv(</span><span class=\"mtk8\">&#39;50_movie_details.csv&#39;</span><span class=\"mtk1\">)</span></span></code></pre>\n<p>But this was only for one page which has data for 50 movies only which is not enough to build a model.</p>\n<p>Please refer my code to understand how I use simple for loops to iterate through all the movies and downloading data for 20 years(approx).</p>\n<h2 id=\"implementing-simple-linear-algorithms-in-numerical-data-we-just-scrapped\" style=\"position:relative;\"><a href=\"#implementing-simple-linear-algorithms-in-numerical-data-we-just-scrapped\" aria-label=\"implementing simple linear algorithms in numerical data we just scrapped permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Implementing simple linear algorithms in numerical data we just scrapped</h2>\n<p>Whats is linear regression??</p>\n<p>It is one of the most popular and used statistical techniques\n• Used to understand the relationship between variables</p>\n<p>  • Can also be used to predict a value of interest for new observations</p>\n<p>  • The aim is to predict the value of a continuous numeric variable of interest (known as the response or dependent or target variable)</p>\n<p>  • The values of one or more predictor (or independent) variables are used to make the prediction</p>\n<p>  • One predictor = simple regression</p>\n<p>  • More predictors = multiple regression</p>\n<p>Here I just tried to use metascore of movies firstly to predict IMDB ratings and secondly I wanted to enhance it by using metascore and votes to predict IMDB rating. </p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"python\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk3\">## ML model</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">X = data.loc[:, </span><span class=\"mtk8\">&#39;metascore&#39;</span><span class=\"mtk1\">].values</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">y = data.loc[:, </span><span class=\"mtk8\">&#39;imdb&#39;</span><span class=\"mtk1\">].values</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># Splitting the dataset into the Training set and Test set</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">from</span><span class=\"mtk1\"> sklearn.cross_validation </span><span class=\"mtk15\">import</span><span class=\"mtk1\"> train_test_split</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">X_train, X_test, y_train, y_test = train_test_split(X, y, </span><span class=\"mtk12\">test_size</span><span class=\"mtk1\"> = </span><span class=\"mtk7\">0.33</span><span class=\"mtk1\">, </span><span class=\"mtk12\">random_state</span><span class=\"mtk1\"> = </span><span class=\"mtk7\">0</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">from</span><span class=\"mtk1\"> sklearn.linear_model </span><span class=\"mtk15\">import</span><span class=\"mtk1\"> LinearRegression</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">regressor = LinearRegression()</span><span class=\"mtk3\">#making object for reg package</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">regressor.fit(X_train.reshape(-</span><span class=\"mtk7\">1</span><span class=\"mtk1\">,</span><span class=\"mtk7\">1</span><span class=\"mtk1\">), y_train.reshape(-</span><span class=\"mtk7\">1</span><span class=\"mtk1\">,</span><span class=\"mtk7\">1</span><span class=\"mtk1\">))</span><span class=\"mtk3\">#to fit the regressor to our training data</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\">#predict the test results</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">y_pred =regressor.predict(X_test.reshape(-</span><span class=\"mtk7\">1</span><span class=\"mtk1\">,</span><span class=\"mtk7\">1</span><span class=\"mtk1\">))</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">from</span><span class=\"mtk1\"> sklearn.metrics </span><span class=\"mtk15\">import</span><span class=\"mtk1\"> mean_squared_error</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">mean_squared_error(y_test, y_pred)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># 0.18041462828221905</span></span></code></pre>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"python\" data-index=\"5\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk3\">## Let try with imdb and votes</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">X1 = data.loc[:, [</span><span class=\"mtk8\">&#39;metascore&#39;</span><span class=\"mtk1\">,</span><span class=\"mtk8\">&#39;votes&#39;</span><span class=\"mtk1\">]].values</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">y1 = data.loc[:, </span><span class=\"mtk8\">&#39;imdb&#39;</span><span class=\"mtk1\">].values</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># Splitting the dataset into the Training set and Test set</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">from</span><span class=\"mtk1\"> sklearn.cross_validation </span><span class=\"mtk15\">import</span><span class=\"mtk1\"> train_test_split</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">X_train, X_test, y_train, y_test = train_test_split(X1, y1, </span><span class=\"mtk12\">test_size</span><span class=\"mtk1\"> = </span><span class=\"mtk7\">0.33</span><span class=\"mtk1\">, </span><span class=\"mtk12\">random_state</span><span class=\"mtk1\"> = </span><span class=\"mtk7\">0</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">from</span><span class=\"mtk1\"> sklearn.linear_model </span><span class=\"mtk15\">import</span><span class=\"mtk1\"> LinearRegression</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">regressor = LinearRegression()</span><span class=\"mtk3\">#making object for reg package</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">regressor.fit(X_train, y_train)</span><span class=\"mtk3\">#to fit the regressor to our training data</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\">#predict the test results</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">y_pred =regressor.predict(X_test)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">from</span><span class=\"mtk1\"> sklearn.metrics </span><span class=\"mtk15\">import</span><span class=\"mtk1\"> mean_squared_error</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">mean_squared_error(y_test, y_pred)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># 0.15729132122310804 good score</span></span></code></pre>\n<p>I tried to scrape data from the IMDB site and then applied ML regression techniques on it. Later I found that the movies listed are multi-class like Logan belongs to Action, Drama, Sci-Fi, which led me to think about how to implement the classifier model in the multilabel data. Usually, the data we get in real-world is mostly multi labelled like chatbot data; the intent is many and like these movies which are multi-class.</p>\n<p>Here we will first see how we prep our data for multilabel classification.</p>\n<p>Here we have all tags in one single column which is not usable while we do classification, so we have to make separate columns for all labels, and if the row doesn't belong to that category, it will be filled by 0 else 1.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"python\" data-index=\"6\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> os</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">os.chdir(</span><span class=\"mtk8\">&#39;Desktop/web_scraping/imdb scrapper_ml/&#39;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">import</span><span class=\"mtk1\"> pandas </span><span class=\"mtk15\">as</span><span class=\"mtk1\"> pd</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">data=pd.read_csv(</span><span class=\"mtk8\">&#39;multilabel_nlp_classification.csv&#39;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">movie_list=[x </span><span class=\"mtk15\">for</span><span class=\"mtk1\"> x </span><span class=\"mtk4\">in</span><span class=\"mtk1\"> data[</span><span class=\"mtk8\">&#39;movie genre&#39;</span><span class=\"mtk1\">]]</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">movie_list1=</span><span class=\"mtk8\">&#39;&#39;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">for</span><span class=\"mtk1\"> x </span><span class=\"mtk4\">in</span><span class=\"mtk1\"> data[</span><span class=\"mtk8\">&#39;movie genre&#39;</span><span class=\"mtk1\">]:</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    movie_list1+=</span><span class=\"mtk8\">&#39;,&#39;</span><span class=\"mtk1\">+x</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">li_m=movie_list1.split(</span><span class=\"mtk8\">&#39;,&#39;</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">li=[x.strip() </span><span class=\"mtk15\">for</span><span class=\"mtk1\"> x </span><span class=\"mtk4\">in</span><span class=\"mtk1\"> li_m]</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">list_s=</span><span class=\"mtk10\">list</span><span class=\"mtk1\">(</span><span class=\"mtk10\">set</span><span class=\"mtk1\">(li))</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">for</span><span class=\"mtk1\"> x </span><span class=\"mtk4\">in</span><span class=\"mtk1\"> list_s:</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    data[x]=</span><span class=\"mtk7\">0</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">data[</span><span class=\"mtk8\">&#39;movie_genre&#39;</span><span class=\"mtk1\">]=[x.strip().split(</span><span class=\"mtk8\">&#39;,&#39;</span><span class=\"mtk1\">) </span><span class=\"mtk15\">for</span><span class=\"mtk1\"> x </span><span class=\"mtk4\">in</span><span class=\"mtk1\"> data[</span><span class=\"mtk8\">&#39;movie genre&#39;</span><span class=\"mtk1\">]]</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">de=data.copy()</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\">#data.loc[0,&#39;Action&#39;]=1</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">de[</span><span class=\"mtk8\">&#39;id&#39;</span><span class=\"mtk1\">]=</span><span class=\"mtk11\">range</span><span class=\"mtk1\">(</span><span class=\"mtk7\">0</span><span class=\"mtk1\">,</span><span class=\"mtk7\">6116</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\">#print(de.loc[de[&#39;id&#39;]==0,&#39;Action&#39;])</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">for</span><span class=\"mtk1\"> i </span><span class=\"mtk4\">in</span><span class=\"mtk1\"> </span><span class=\"mtk11\">range</span><span class=\"mtk1\">(</span><span class=\"mtk7\">0</span><span class=\"mtk1\">,</span><span class=\"mtk7\">6116</span><span class=\"mtk1\">):</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">for</span><span class=\"mtk1\"> x </span><span class=\"mtk4\">in</span><span class=\"mtk1\"> de.loc[de[</span><span class=\"mtk8\">&#39;id&#39;</span><span class=\"mtk1\">]==i,</span><span class=\"mtk8\">&#39;movie_genre&#39;</span><span class=\"mtk1\">]:</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk15\">for</span><span class=\"mtk1\"> y </span><span class=\"mtk4\">in</span><span class=\"mtk1\"> x:</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">            y=y.strip()</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">            de.loc[de[</span><span class=\"mtk8\">&#39;id&#39;</span><span class=\"mtk1\">]==i,y]=</span><span class=\"mtk7\">1</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">de.to_csv(</span><span class=\"mtk8\">&#39;multilabel_nlp_classification.csv&#39;</span><span class=\"mtk1\">)</span></span></code></pre>\n<p>Now, as our data is ready, we can start with NLP implementation.</p>\n<p>For multilabel classification, I used techniques like classifier chain, label powerset, etc.</p>\n<p>Here the problem statement is that using the movie description our model has to guess which genre the movie belongs to. It is a popular use case. Take an example of ecommerce product description data; now instead of manually assigning the labels to it, we can use a model which will find relevant labels or genre for it and make the content relevant to the type it belongs.</p>\n<p>I start with Exploratory data analysis and then data cleaning, which is the most crucial step as if all the description has some very 30-50 common words it will simply make the data-heavy and model slow and inefficient.</p>\n<p>Then we go on to make the data model ready as ML models don't understand text data we have to feed numbers in it. For that purpose, we use TfidfVectorizer.</p>\n<h3 id=\"what-is-tfidfvectorizer\" style=\"position:relative;\"><a href=\"#what-is-tfidfvectorizer\" aria-label=\"what is tfidfvectorizer permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is TfidfVectorizer?</h3>\n<p>TfidfVectorizer - Transforms text to feature vectors that can be used as input to the estimator.</p>\n<p>Then simply diving the data in train and test split. </p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"python\" data-index=\"7\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">x_train = vectorizer.transform(train_text)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">y_train = train.drop(</span><span class=\"mtk12\">labels</span><span class=\"mtk1\"> = [</span><span class=\"mtk8\">&#39;id&#39;</span><span class=\"mtk1\">,</span><span class=\"mtk8\">&#39;movie decription&#39;</span><span class=\"mtk1\">], </span><span class=\"mtk12\">axis</span><span class=\"mtk1\">=</span><span class=\"mtk7\">1</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">x_test = vectorizer.transform(test_text)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">y_test = test.drop(</span><span class=\"mtk12\">labels</span><span class=\"mtk1\"> = [</span><span class=\"mtk8\">&#39;id&#39;</span><span class=\"mtk1\">,</span><span class=\"mtk8\">&#39;movie decription&#39;</span><span class=\"mtk1\">], </span><span class=\"mtk12\">axis</span><span class=\"mtk1\">=</span><span class=\"mtk7\">1</span><span class=\"mtk1\">)</span></span></code></pre>\n<p>I tried first with applying logistic regression and one vs rest classifier.</p>\n<h3 id=\"what-is-onevsrestclassifier\" style=\"position:relative;\"><a href=\"#what-is-onevsrestclassifier\" aria-label=\"what is onevsrestclassifier permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is OneVsRestClassifier??</h3>\n<p>OneVsRestClassifier strategy splits a multi-class classification into one binary classification problem per class.\nOneVsRestClassifier is when we want to do multi-class or multilabel classification, and its strategy consists of fitting one classifier per class. For each classifier, the class is fitted against all the other classes. </p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"python\" data-index=\"8\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk3\"># Using pipeline for applying logistic regression and one vs rest classifier</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">LogReg_pipeline = Pipeline([</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                (</span><span class=\"mtk8\">&#39;clf&#39;</span><span class=\"mtk1\">, OneVsRestClassifier(LogisticRegression(</span><span class=\"mtk12\">solver</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&#39;sag&#39;</span><span class=\"mtk1\">), </span><span class=\"mtk12\">n_jobs</span><span class=\"mtk1\">=-</span><span class=\"mtk7\">1</span><span class=\"mtk1\">)),</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">            ])</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">for</span><span class=\"mtk1\"> category </span><span class=\"mtk4\">in</span><span class=\"mtk1\"> categories:</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    printmd(</span><span class=\"mtk8\">&#39;**Processing </span><span class=\"mtk4\">{}</span><span class=\"mtk8\"> comments...**&#39;</span><span class=\"mtk1\">.format(category))</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk3\"># Training logistic regression model on train data</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    LogReg_pipeline.fit(x_train, train[category])</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk3\"># calculating test accuracy</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    prediction = LogReg_pipeline.predict(x_test)</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk11\">print</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;Test accuracy is </span><span class=\"mtk4\">{}</span><span class=\"mtk8\">&#39;</span><span class=\"mtk1\">.format(accuracy_score(test[category], prediction)))</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk11\">print</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;</span><span class=\"mtk6\">\\n</span><span class=\"mtk8\">&quot;</span><span class=\"mtk1\">)</span></span></code></pre>\n<p>Next, I tried with BinaryRelevance</p>\n<h3 id=\"what-is-binaryrelevance\" style=\"position:relative;\"><a href=\"#what-is-binaryrelevance\" aria-label=\"what is binaryrelevance permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is BinaryRelevance?</h3>\n<p>It is a simple technique which treats each label as a separate single class classification problem.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"python\" data-index=\"9\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk3\"># using binary relevance</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">from</span><span class=\"mtk1\"> skmultilearn.problem_transform </span><span class=\"mtk15\">import</span><span class=\"mtk1\"> BinaryRelevance</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">from</span><span class=\"mtk1\"> sklearn.naive_bayes </span><span class=\"mtk15\">import</span><span class=\"mtk1\"> GaussianNB</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># initialize binary relevance multi-label classifier</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># with a gaussian naive bayes base classifier</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">classifier = BinaryRelevance(GaussianNB())</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># train</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">classifier.fit(x_train, y_train)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># predict</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">predictions = classifier.predict(x_test)</span></span></code></pre>\n<p>Next, I tried using ClassifierChain.</p>\n<h3 id=\"what-is-classifierchain\" style=\"position:relative;\"><a href=\"#what-is-classifierchain\" aria-label=\"what is classifierchain permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is ClassifierChain?</h3>\n<p>It is almost similar to BinaryRelevance, here the first classifier is trained just on the input data, and then each next classifier is trained on the input space and all the previous classifiers in the chain.  </p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"python\" data-index=\"10\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">from</span><span class=\"mtk1\"> skmultilearn.problem_transform </span><span class=\"mtk15\">import</span><span class=\"mtk1\"> ClassifierChain</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">from</span><span class=\"mtk1\"> sklearn.linear_model </span><span class=\"mtk15\">import</span><span class=\"mtk1\"> LogisticRegression</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># initialize classifier chains multi-label classifier</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">classifier = ClassifierChain(LogisticRegression())</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># Training logistic regression model on train data</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">classifier.fit(x_train, y_train)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># predict</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">predictions = classifier.predict(x_test)</span></span></code></pre>\n<p>Next, I tried using Label Powerset.</p>\n<h3 id=\"what-is-labelpowerset\" style=\"position:relative;\"><a href=\"#what-is-labelpowerset\" aria-label=\"what is labelpowerset permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What is LabelPowerset?</h3>\n<p>Here we transform the problem into a multi-class problem with one multi-class classifier is trained on all unique label combinations found in the training data.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"python\" data-index=\"11\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">from</span><span class=\"mtk1\"> skmultilearn.problem_transform </span><span class=\"mtk15\">import</span><span class=\"mtk1\"> LabelPowerset</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># initialize label powerset multi-label classifier</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">classifier = LabelPowerset(LogisticRegression())</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># train</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">classifier.fit(x_train, y_train)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\"># predict</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">predictions = classifier.predict(x_test)</span></span></code></pre>\n<p>Please refer my notebook multilabel<em>nlp</em>classifier.ipynb from my repo for more details.</p>\n<h2 id=\"improvement\" style=\"position:relative;\"><a href=\"#improvement\" aria-label=\"improvement permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Improvement:</h2>\n<ol>\n<li>More feature engineering and data to avoid this overfitting and make more efficient pipeline</li>\n<li>If we collect more data, deep learning and state of the art algorithms like BERT can help us to leverage the efficiency of the model.</li>\n</ol>\n<h2 id=\"summary\" style=\"position:relative;\"><a href=\"#summary\" aria-label=\"summary permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Summary:</h2>\n<ul>\n<li>We have learnt how to collect data by web scraping and tools to perform the same.</li>\n<li>We completed the modelling techniques on in numerical data</li>\n<li>We prepared the label data to be model fed ready</li>\n<li>We learnt how different ML techniques could be applied to text data and build a multilabel classifier.</li>\n</ul>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk15 { color: #C586C0; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk10 { color: #4EC9B0; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk3 { color: #6A9955; }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk7 { color: #B5CEA8; }\n  .dark-default-dark .mtk6 { color: #D7BA7D; }\n</style>","frontmatter":{"date":"October 09, 2020","updated_date":null,"description":"Learn how to implement the full data science pipeline right from collecting the data to implementing ML algorithms.","title":" Full data science pipeline implementation","tags":["DataScience","Python","Web scraping","NLP","Machine learning"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/5a2492e69b5cbb1c2f5bb0a3d4ca9fc2/58556/ds.webp","srcSet":"/static/5a2492e69b5cbb1c2f5bb0a3d4ca9fc2/61e93/ds.webp 200w,\n/static/5a2492e69b5cbb1c2f5bb0a3d4ca9fc2/1f5c5/ds.webp 400w,\n/static/5a2492e69b5cbb1c2f5bb0a3d4ca9fc2/58556/ds.webp 800w,\n/static/5a2492e69b5cbb1c2f5bb0a3d4ca9fc2/df6a9/ds.webp 1125w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Rinki Nag","github":"eaglewarrior","avatar":null}}}},{"node":{"excerpt":"The two types of email you can send and receive are plain text emails (any email that contains just plain old text with no formatting) and…","fields":{"slug":"/engineering/html-email-concept/"},"html":"<p>The two types of email you can send and receive are plain text emails (any email that contains just plain old text with no formatting) and HTML emails, these are formatted and styled using HTML and inline CSS.\nHTML email is the use of HTML to provide formatting and semantic markup capabilities in an email that are not available in plain text.</p>\n<p>An HTML email is designed just like a website with the help of graphics, table columns, colors and links. A non-programmer can also create it since email marketing services provide flexible campaign builders. Email client vendors have not been as developing as web browser vendors in adopting new standards. </p>\n<p><strong>Definition</strong></p>\n<p>Emails which are formatted using Hypertext Markup Language(HTML), as opposed to plain text email.</p>\n<p><strong>How to Create an HTML Email</strong></p>\n<p>Many tools that create and send an email will offer pre-formatted, already built HTML templates that allow you to design emails without knowing or accessing any code of back-end.</p>\n<p>The best way to understand any process is to do it yourself, from level zero. We make any changes in the email editor; those changes will be automatically coded into the final result. This email building tool is the best option if you don't have an email designer, but you still want to send any professional marketing emails.</p>\n<p>If you want more control over the code of your emails and you are comfortable with HTML(that is just basic and easy), most email tools will allow you to import HTML files directly for using it as custom email templates. They have a wide variety of free HTML email templates available on the internet, and if you are familiar with HTML, it is a straightforward process to use that template in the email building tool of your own choice.</p>\n<p>To create an HTML email from scratch, you will need to have advanced knowledge of HTML. Because creating an HTML email from scratch can be quite tricky, we recommend you to work with a developer for this process, or you may go with a template for an easy process.</p>\n<p><strong>If you choose to code your HTML email by hand, these are the necessary steps you need to use while creating HTML email:</strong></p>\n<ol>\n<li>The perfect email template size should have 600-700 max-width.</li>\n<li>If the design has animation, then use .gif animated file because interactive elements like Flash, JavaScript, or HTML forms won't work in most email inboxes.</li>\n<li>Try to use HTML tables (HTML tables present tabular data in a semantic and structurally appropriate manner) for your presentation.</li>\n<li>To improve the presentation of Web, use inline CSS within your HTML email.</li>\n<li>CSS style should be either in a separate CSS file or below the body tag and not under the head tag.</li>\n<li>To save yourself from trouble, avoid the use of CSS shorthand code.</li>\n<li>The most genuine way of coding background colors is to use six-digit hexadecimal code for color (like #000000, i.e. for black).</li>\n<li>Be sure always to use \"display: block;\" for your image tags (either inline or embedded CSS) because this takes the baseline out of the equation and keeps everything arranged neatly and in order.</li>\n<li>If you wish to have padding on columns, it might be more cross-browser, so you can always create spacer DIVs in between the columns (or between rows).</li>\n<li>You need to use absolute paths for your images.</li>\n<li>Try adding a line-height and font-size of 1 under \"<TD>\" (or the desired size).</li>\n<li>Inline styles to <TD> and tables are the right way to go for Html email.</li>\n<li>In an HTML table, you can set the cell padding and cell spacing to zero to eliminate the unwanted spacing in your layout.</li>\n</ol>\n<p><strong>How to send  HTML emails through Outlook?</strong></p>\n<ol>\n<li>Select more commands to customize your quick access toolbar(suggestion).</li>\n<li>Choose \"attach\" function and then \"add\" it to the toolbar.</li>\n<li>Open \"attach a file\" window from the quick access toolbar.</li>\n<li>Select HTML file you need to import BUT do not click to INSERT yet.</li>\n<li>Switch \"insert\" button with the \"insert as a text\" button and click.</li>\n<li>Now, you can send it to your audience.</li>\n</ol>\n<p><strong>You can check HTML Email Template here:</strong></p>\n<p><a href=\"https://github.com/designmodo/html-email-templates\">HTML Email Templates</a></p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"October 09, 2020","updated_date":null,"description":"If you choose to code your HTML email by hand, there are many different things you need to use while creating HTML email.","title":"HTML Email Concept","tags":["Html","Email"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.7699115044247788,"src":"/static/67ac86643dbb14dedfd4fe52ff7e659c/58556/email_picture.webp","srcSet":"/static/67ac86643dbb14dedfd4fe52ff7e659c/61e93/email_picture.webp 200w,\n/static/67ac86643dbb14dedfd4fe52ff7e659c/1f5c5/email_picture.webp 400w,\n/static/67ac86643dbb14dedfd4fe52ff7e659c/58556/email_picture.webp 800w,\n/static/67ac86643dbb14dedfd4fe52ff7e659c/54d25/email_picture.webp 1080w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Nivedita Singh","github":"Nivedita967","avatar":null}}}},{"node":{"excerpt":"Identity-as-a-service or IDaaS refers to cloud-based identity and access management solutions that are offered on a subscription basis. At…","fields":{"slug":"/identity/best-idaas-provider-loginradius/"},"html":"<p>Identity-as-a-service or IDaaS refers to cloud-based identity and access management solutions that are offered on a subscription basis. At its core, IDaaS delivers access, intelligence, and identity governance capabilities to consumers' systems.</p>\n<p>Interestingly, IdaaS has been experiencing exponential growth in recent years. So, to understand this rapid surge in the best IDaaS providers, let's go back a little.</p>\n<p>Consumers have already been exploring and utilizing the online facilities—from transactions, education, work, shopping, entertainment, to medicines—for some time now. They want frictionless, non-invasive, and <a href=\"https://www.loginradius.com/customer-experience-solutions/\">seamless solutions</a>. </p>\n<p>So, how are companies delivering instant, personalized gratification? The basis for most is <em>identity</em>.</p>\n<p>Consumers want identity solutions to be easy and simple-to-use.</p>\n<p><a href=\"https://www.loginradius.com/blog/2020/06/consumer-data-privacy-security/\">Data privacy</a> is another prerequisite necessity. In fact, a survey by Gemalto finds out that 71% of consumers <a href=\"https://www.thalesgroup.com/en/markets/digital-identity-and-security/press-release/majority-of-consumers-would-stop-doing-business-with-companies-following-a-data-breach-finds-gemalto\">choose to opt-out of a company</a> that experienced a data breach. Talk about a dealbreaker!</p>\n<p>Likewise, there are also key questions about data privacy, ownership, control, and scalability. Scoring these areas on a firm ground will make a good ID solution. A growing number of companies are already working on this goal. </p>\n<p>The best IDaaS providers are evolving, and new ones are emerging. How do you choose the right one?</p>\n<h2 id=\"5-factors-to-consider-before-choosing-the-best-idaas-provider\" style=\"position:relative;\"><a href=\"#5-factors-to-consider-before-choosing-the-best-idaas-provider\" aria-label=\"5 factors to consider before choosing the best idaas provider permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>5 Factors to Consider Before Choosing the Best IDaaS Provider</h2>\n<p><img src=\"/0dba2e23e64a52e959fe1feeb8344cc8/Best-IDaaS-solution-1.webp\" alt=\"Best IDaaS solution\"></p>\n<p><strong>1. It should connect to mixed platform environments.</strong></p>\n<p>A lot of organizations (especially enterprise-level) still prefer the hybrid approach to host their business applications, i.e. both <a href=\"https://www.loginradius.com/multi-tenant-cloud/\">on-premises and in the cloud</a>. The best IDaaS providers will offer consumers seamless access from a variety of devices, or mostly when legacy solutions are involved. </p>\n<p>It should not matter where the applications are hosted or accessed, the IDaaS solution should simplify integration and create a simplified, smooth, and unified consumer experience. </p>\n<p><strong>2. It should deliver better security.</strong></p>\n<p>With a <a href=\"https://www.loginradius.com/blog/2019/06/customer-identity-and-access-management/#:~:text=Customer%20identity%20and%20access%20management%20(CIAM)%20is%20a%20digital%20identity,while%20securely%20managing%20customer%20identities.\">modern cloud identity platform</a> comes security with modern techniques. Identity theft and network compromise are a big problem that IT managers face today, and the lack of passwords is a major explanation for these breaches.</p>\n<p>There should be a large number of security techniques included as the identity management platform transitions to the cloud. Examples include one-way password hashing, salting that secures communication between all vulnerable end-points. </p>\n<p><strong>3. It should verify and manage all identities.</strong></p>\n<p>With modern industries requiring robust access and security policies, the best IDaaS provider should include identity management tools for different use cases. </p>\n<p>For example, when new devices, applications, and consumers are introduced, or third-party relationships are integrated, the access requirement and priorities are also changed. Your IDaaS provider should be able to access authorized resources without having to <a href=\"https://www.loginradius.com/authentication/\">authenticate and sign in</a> separately to each application.</p>\n<p>Moreover, your IDaaS solutions provider should also include frameworks for single sign-on (SSO) and federated identity with <a href=\"https://www.loginradius.com/blog/2019/06/what-is-multi-factor-authentication/\">multi-factor authentication</a> (MFA) that removes silos and enables uninterrupted network environments.</p>\n<p><strong>4. It should offer a complete app access lifecycle management.</strong></p>\n<p>When a new user joins your organization or an existing user takes on a different role, your IDaaS solution should make provisioning easier with automatic account creation, role-based authorization management, <a href=\"https://www.loginradius.com/blog/2019/05/what-is-single-sign-on/\">single sign-on</a>, and automated account deprovisioning.</p>\n<p>A comprehensive, automated app access lifecycle management eliminates helpdesk calls, reduces IT burden, and saves time. It is also easier to offboard users by instantly removing access and deactivating app accounts.</p>\n<p><strong>5. It should offer multi-factor authentication (MFA).</strong></p>\n<p>Consumers aren't confined to just the one network, device, or applications today. They have to remember a lot of passwords for different accounts. But then, passwords alone cannot be trusted to keep accounts secure. You need a stronger authentication factor at a granular level and MFA should do the trick.</p>\n<p>The best IDaaS provider should include MFA with (at least) the following combination:</p>\n<ul>\n<li>Soft token with one-button authentication.</li>\n<li>One Time Passcode (OTP) sent over text or email.</li>\n<li>User-configurable security question as a second layer.</li>\n</ul>\n<p>Also, ensure that your IDaaS provider offers custom configurations, whenever necessary for optimal performance. Make sure it is affordable, flexible, and designed to scale (forecasting your rapid growth).</p>\n<p><a href=\"https://www.loginradius.com/resource/guide-to-modern-customer-identity/\"><img src=\"/cb344658920387aac010223f2c1d79a1/EB-Guide-to-Modern-Customer-Identity.webp\" alt=\"Guide-to-Modern-Customer-Identity-ebook\"></a></p>\n<h2 id=\"why-loginradius-is-considered-to-be-your-one-stop-solution-for-idaas-for-both-developers-and-businesses\" style=\"position:relative;\"><a href=\"#why-loginradius-is-considered-to-be-your-one-stop-solution-for-idaas-for-both-developers-and-businesses\" aria-label=\"why loginradius is considered to be your one stop solution for idaas for both developers and businesses permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Why LoginRadius Is Considered to Be Your One-Stop Solution for IDaaS for Both Developers and Businesses</h2>\n<p>LoginRadius is credible and the best IDaaS provider that can be applied to any situation where consumers expect to connect securely to organizations' IT resources.</p>\n<p>The platform offers next-gen technology to make sure employees, consumers, clients, or partners are who they say they are. Once confirmed, it offers access rights to resources based on the roles and permissions granted. </p>\n<p>Additionally, the LoginRadius <a href=\"https://www.loginradius.com/blog/identity/identity-as-a-service-for-business/\">IDaaS is deployed through the cloud</a>—meaning businesses can request access securely, irrespective of the location or device. </p>\n<p>Let's find out the key capabilities that make LoginRadius an interesting pick for developers and businesses, in general. </p>\n<h3 id=\"best-idaas-provider-for-developers\" style=\"position:relative;\"><a href=\"#best-idaas-provider-for-developers\" aria-label=\"best idaas provider for developers permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Best IDaaS Provider for Developers</h3>\n<ul>\n<li><strong>Cloud-Based and Multitenant Architecture</strong>: LoginRadius offers a <a href=\"https://www.loginradius.com/multi-tenant-cloud/\">multi-tenant cloud architecture</a>. As a result, developers can issue updates, perform security fixes and improvements for consumers instantly. They can scale the use of cloud-based IDaaS solutions to meet organizations' identity and access management needs.</li>\n<li><strong>Single Sign-On and Federation</strong>: <a href=\"https://www.loginradius.com/single-sign-on/\">LoginRadius offers SSO</a> and Federation to allow consumers to authenticate to multiple applications (including third-parties) with a single set of credentials. It encourages seamless end-user experiences with accessing their day-to-day IT services.</li>\n<li><strong>Access management and control</strong>: With LoginRadius developers can assign access privileges to consumers based on their attributes, roles, and responsibilities. It also allows them to assign or revoke access, whenever required.</li>\n<li><strong>Identity management</strong>: LoginRadius offers identity management capabilities by keeping track of consumers' access privileges. It also offers organizations with information on consumers' lifecycles by monitoring, auditing, and reporting their activities from the LoginRadius admin console.</li>\n</ul>\n<h3 id=\"best-idaas-provider-for-businesses\" style=\"position:relative;\"><a href=\"#best-idaas-provider-for-businesses\" aria-label=\"best idaas provider for businesses permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Best IDaaS Provider for Businesses</h3>\n<ul>\n<li><strong>Governance and Compliance</strong>: LoginRadius enforces <a href=\"https://www.loginradius.com/data-governance/\">governance policies and regulatory compliances</a> to mitigate security vulnerabilities. A few of the certificates include ISO/IEC 27001:2013, ISO/IEC 27017:2015, SOC 2 (Type II), ISAE 3000, NIST Cybersecurity Framework, CSA Star CCM, CIS Critical Security Controls, PCI DSS Compliant, and OpenID. </li>\n<li><strong>Scalability</strong>: LoginRadius is a cloud-based platform that scales as your business grows. The platform regularly experiences peak transaction volumes of 150,000 logins per second and easily handles around 10,000 requests per second with less than 500 milliseconds latency. </li>\n<li><strong>Security</strong>: Not just MFA and SSO, LoginRadius IDaaS solution also offers end-to-end encryption. Businesses can verify consumer identities with confidence. Also, on the cloud, they back up data regularly so they can restore/recover quickly in case of any disaster. </li>\n</ul>\n<h2 id=\"conclusion\" style=\"position:relative;\"><a href=\"#conclusion\" aria-label=\"conclusion permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Conclusion</h2>\n<p>It is incredibly important for IT professionals to safeguard systems and data while providing easy, convenient access to consumers and clients. Only the best IDaaS provider can offer reliable security that businesses require. </p>\n<p>LoginRadius is the comprehensive ideal solution for enterprises who need to implement identity management into applications quickly and easily.</p>\n<p><a href=\"https://www.loginradius.com/contact-us?utm_source=blog&#x26;utm_medium=web&#x26;utm_campaign=best-idaas-provider-loginradius\"><img src=\"/788a6a84e389edac18728007099fdc1d/Book-a-free-demo-request.webp\" alt=\"book-a-free-demo-loginradius\"></a></p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"October 09, 2020","updated_date":null,"description":"Identity-as-a-service or IDaaS refers to cloud-based applications for identity and access management provided on the basis of subscription. At its heart, IDaaS provides consumers’ systems with access, intelligence, and identity governance capabilities.","title":"Best IDaaS Provider - Why Loginradius is Considered as the Best IDaaS Solution","tags":["data privacy","idaas provider","cx"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5748031496062993,"src":"/static/a31bf6eae56026bb3a863103a340af56/7f8e9/idaas-provider.webp","srcSet":"/static/a31bf6eae56026bb3a863103a340af56/61e93/idaas-provider.webp 200w,\n/static/a31bf6eae56026bb3a863103a340af56/1f5c5/idaas-provider.webp 400w,\n/static/a31bf6eae56026bb3a863103a340af56/7f8e9/idaas-provider.webp 768w","sizes":"(max-width: 768px) 100vw, 768px"}}},"author":{"id":"Rakesh Soni","github":"oyesoni","avatar":"rakesh-soni.webp"}}}},{"node":{"excerpt":"These days we have all come across one of the coolest buzzwords in the IT industry: \"The Blockchain\". It might seem to be a new magic word…","fields":{"slug":"/engineering/blockchain-the-new-technology-of-security-trust/"},"html":"<p>These days we have all come across one of the coolest buzzwords in the IT industry: <strong>\"The Blockchain\"</strong>. It might seem to be a new magic word in the market that companies spell interest in their businesses. However, the complexity of it is incredibly far-reaching. Blockchain integrates the openness and flexibility of the internet with the security of cryptography to come out with a safer, faster way of verification of information and most importantly establishes trust in this open world.</p>\n<p>Blockchain was first developed by an anonymous programmer or group of programmers known by a name 'Santoshi Nakamoto'.It was an underlying technology for the Bitcoin, which is used for peer-to-peer transactions. Blockchain at its heart is a list of transactions like a distributed ledger open to all in the network. It stores the data in such a way that it seems virtually impossible to add, update or remove any information stored without the notice of other users in a peer-to-peer network.</p>\n<h2 id=\"how-does-blockchain-work\" style=\"position:relative;\"><a href=\"#how-does-blockchain-work\" aria-label=\"how does blockchain work permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How does blockchain work?</h2>\n<p>Blockchain mainly performs two tasks: collect and order data in blocks- similar to the traditional computer database and then chain them securely using cryptography.</p>\n<p>Let us take a closer look at each block in this enormous chain –</p>\n<ul>\n<li>FILLING  IN THE BLOCK\nData: This is the information which depends on the blockchain if it is a bitcoin block, then it contains information about the sender, receiver of the amount and the amount value.</li>\n<li>SECURING THE CHAIN\nHash: It is quite similar to human fingerprint and is unique to each block, once the information of the block changes, the hash changes and the block no longer remain the same as the previous one.</li>\n<li>LOCKING THE BLOCKS DOWN\nHash of the previous block-the hash of one block gives the data for the next block, and this new block uses this hash function and traces of it is woven into the new hash this continues to build an enormous chain.</li>\n</ul>\n<p><img src=\"/b84871cea75ab42c2a7a93163787f5e5/block.webp\" alt=\"Blockchain\"></p>\n<h2 id=\"establishing-the-trust\" style=\"position:relative;\"><a href=\"#establishing-the-trust\" aria-label=\"establishing the trust permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Establishing the trust</h2>\n<p>The copy of the complete blockchain is with all the participants so that they can detect tampering if the hash matches across the chain then everyone knows that it is trustworthy.\nBlockchain is an emerging technology but has been evolving ever since its innovation. This technology has the unlimited potential to bring about an upheaval in the way everyone- organisations, governments, individuals work together. It promises a simple, secure, paperless path to establish trust for virtual transactions of money, products and other confidential information worldwide.</p>\n<h2 id=\"blockchain-in-action\" style=\"position:relative;\"><a href=\"#blockchain-in-action\" aria-label=\"blockchain in action permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Blockchain in action</h2>\n<p>Blockchain is one of the technologies that has gained popularity from its very birth, and now it is being used in many fields.</p>\n<h2 id=\"financial-market\" style=\"position:relative;\"><a href=\"#financial-market\" aria-label=\"financial market permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Financial market</h2>\n<p>In financial markets, trade is very dynamic where there is the exchange of money, assets involving multiple banks; this may lead to unexpected errors. To reduce this bottleneck blockchain came up with the idea of smart contracts which is a small computer program that describes the transactions step by step combining multiple blockchains, multiple assets and executes the transactions securely.</p>\n<h2 id=\"digital-id\" style=\"position:relative;\"><a href=\"#digital-id\" aria-label=\"digital id permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Digital ID</h2>\n<p>Blockchain can keep track of many commercial transactions and efficiently hold sensitive information. A digital id via blockchain secures the data stored and can be used worldwide in your fingertips.</p>\n<h2 id=\"supply-chain\" style=\"position:relative;\"><a href=\"#supply-chain\" aria-label=\"supply chain permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Supply chain</h2>\n<p>Blockchain can be very handy in monitoring the supply chain in food and manufacturing industries by removing paper-based trails and also removing intermediaries between producers to customers. Not just the above applications it is used in many more places and has changed, is going to change the world around us.</p>\n<h2 id=\"blockchain-the-next-gen-technology\" style=\"position:relative;\"><a href=\"#blockchain-the-next-gen-technology\" aria-label=\"blockchain the next gen technology permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Blockchain the next-gen technology</h2>\n<p>Though it is a new technology, it has an enormous ability to transform everything existing now. As a coin has its two faces, blockchain technology also has some glitches as it can destroy the middlemen in many of the industries.\nBlockchain has already spread its root firmly in soils of the new world, and the swarm of transformation has already begun. It is the responsibility of all the young generation to make complete usage of this technology as it matures and make it to become a huge money plant.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"October 08, 2020","updated_date":null,"description":"Learn about Blockchain technology and how it works.","title":"Blockchain: The new technology of trust","tags":["Blockchain","Cyber Security"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.6666666666666667,"src":"/static/01f18fbf0dec445fa25aa3b13483883e/58556/CoverPage.webp","srcSet":"/static/01f18fbf0dec445fa25aa3b13483883e/61e93/CoverPage.webp 200w,\n/static/01f18fbf0dec445fa25aa3b13483883e/1f5c5/CoverPage.webp 400w,\n/static/01f18fbf0dec445fa25aa3b13483883e/58556/CoverPage.webp 800w,\n/static/01f18fbf0dec445fa25aa3b13483883e/1fb14/CoverPage.webp 960w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Shraddha V Prasad","github":"shraddhavp","avatar":null}}}}]},"markdownRemark":{"excerpt":"Identity is evolving, and developers are at the forefront of this transformation. Every day brings a new learning—adapting to new standards…","fields":{"slug":"/identity/developer-first-identity-provider-loginradius/"},"html":"<p>Identity is evolving, and developers are at the forefront of this transformation. Every day brings a new learning—adapting to new standards and refining approaches to building secure, seamless experiences.</p>\n<p>We’re here to support developers on that journey. We know how important simplicity, efficiency, and well-structured documentation are when working with identity and access management solutions. That’s why we’ve redesigned the <a href=\"https://www.loginradius.com/\">LoginRadius website</a>—to be faster, more intuitive, and developer-first in every way.</p>\n<p>The goal? Having them spend less time searching and more time building.</p>\n<h2 id=\"whats-new-and-improved-on-the-loginradius-website\" style=\"position:relative;\"><a href=\"#whats-new-and-improved-on-the-loginradius-website\" aria-label=\"whats new and improved on the loginradius website permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What’s New and Improved on the LoginRadius Website?</h2>\n<p>LoginRadius’ vision is to give developers a product that simplifies identity management so they can focus on building, deploying, and scaling their applications. To enhance this experience, we’ve spent the last few months redesigning our interface— making navigation more intuitive and reassuring that essential resources are easily accessible.</p>\n<p>Here’s a closer look at what’s new and why it’s important:</p>\n<h3 id=\"a-developer-friendly-dark-theme\" style=\"position:relative;\"><a href=\"#a-developer-friendly-dark-theme\" aria-label=\"a developer friendly dark theme permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>A Developer-Friendly Dark Theme</h3>\n<p><img src=\"/f46881583c7518a93bb24e94c32320de/a-developer-friendly-dark-theme.webp\" alt=\"This image shows how LoginRadius offers several authentication methods like traditional login, social login, passwordless login, passkeys and more in a dark mode.\">    </p>\n<p>Developers spend long hours working in dark-themed IDEs and terminals, so we’ve designed the LoginRadius experience to be developer-friendly and align with that preference.</p>\n<p>The new dark mode reduces eye strain, enhances readability, and provides a seamless transition between a coding environment and our platform. Our new design features a clean, modern aesthetic with a consistent color scheme and Barlow typography, ensuring better readability. High-quality graphics and icons are thoughtfully placed to enhance the content without adding visual clutter.</p>\n<p>So, whether you’re navigating our API docs or configuring authentication into your system, our improved interface will make those extended development hours more comfortable and efficient.</p>\n<h3 id=\"clear-categorization-for-loginradius-capabilities\" style=\"position:relative;\"><a href=\"#clear-categorization-for-loginradius-capabilities\" aria-label=\"clear categorization for loginradius capabilities permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Clear Categorization for LoginRadius Capabilities</h3>\n<p><img src=\"/e5358b82be414940f3fb146013845933/capabilities.webp\" alt=\"This image shows a breakdown of all the LoginRadius CIAM capabilities, including authentication, security, UX, scalability and multi-brand management.\"></p>\n<p>We’ve restructured our website to provide a straightforward breakdown of our customer identity and access management platform capabilities, helping you quickly find what you need:</p>\n<ul>\n<li>Authentication: Easily understand <a href=\"https://www.loginradius.com/blog/identity/authentication-option-for-your-product/\">how to choose the right login method</a>, from traditional passwords and OTPs to social login, federated SSO, and passkeys with few lines of code.</li>\n<li>Security: Implement no-code security features like bot detection, IP throttling, breached password alerts, DDoS protection, and adaptive MFA to safeguard user accounts.</li>\n<li>User Experience: Leverage AI builder, hosted pages, and drag-and-drop workflows to create smooth, branded sign-up and login experiences.</li>\n<li>High Performance &#x26; Scalability: Confidently scale with sub-100ms API response times, 100% uptime, 240K+ RPS, and 28+ global data center regions.</li>\n<li>Multi-Brand Management: Efficiently manage multiple identity apps, choosing isolated or shared data stores based on your brand’s unique needs.</li>\n</ul>\n<p>This structured layout ensures you can quickly understand each capability and how it integrates into your identity ecosystem.</p>\n<h3 id=\"developer-first-navigation\" style=\"position:relative;\"><a href=\"#developer-first-navigation\" aria-label=\"developer first navigation permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Developer-First Navigation</h3>\n<p><img src=\"/a8c155c2b6faf3d5f4b4de4e2b14d763/developers-menu.webp\" alt=\"This image shows the LoginRadius menu bar, highlighting the developer dropdown.\">   </p>\n<p>We’ve been analyzing developer workflows to identify how you access key resources. That’s why we redesigned our navigation with one goal in mind: to reduce clicks and make essential resources readily available.</p>\n<p>The new LoginRadius structure puts APIs, SDKs, and integration guides right at the menu bar under the Developers dropdown so you can get started faster. Our Products, Solutions, and Customer Services are also clearly categorized, helping development teams quickly find the right tools and make informed decisions.</p>\n<h3 id=\"quick-understanding-of-integration-benefits\" style=\"position:relative;\"><a href=\"#quick-understanding-of-integration-benefits\" aria-label=\"quick understanding of integration benefits permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Quick Understanding of Integration Benefits</h3>\n<p><img src=\"/b2f9a964a2da0ea83e2f8596b833bba7/we-support-your-tech-stack.webp\" alt=\"This image shows a list of popular programming languages and frameworks offered by LoginRadius.\"></p>\n<p>Developers now have a clear view of the tech stack available with LoginRadius, designed to support diverse business needs.</p>\n<p>Our platform offers pre-built SDKs for Node.js, Python, Java, and more, making CIAM integration seamless across popular programming languages and frameworks.</p>\n<h2 id=\"over-to-you-now\" style=\"position:relative;\"><a href=\"#over-to-you-now\" aria-label=\"over to you now permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Over to You Now!</h2>\n<p>Check out our <a href=\"https://www.loginradius.com/\">revamped LoginRadius website</a> and see how the improved experience makes it easier to build, scale, and secure your applications.</p>\n<p>Do not forget to explore the improved navigation and API documentation, and get started with our free trial today. We’re excited to see what you’ll build with LoginRadius!</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"February 21, 2025","updated_date":null,"description":"LoginRadius’ vision is to give developers a product that simplifies identity management so they can focus on building, deploying, and scaling their applications. To enhance this experience, we’ve redesigned our website interface, making navigation more intuitive and reassuring that essential resources are easily accessible.","title":"Revamped & Ready: Introducing the New Developer-First LoginRadius Website","tags":["Developer tools","API","Identity Management","User Authentication"],"pinned":true,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.7857142857142858,"src":"/static/80b4e4fbe176a10a327d273504607f32/58556/hero-section.webp","srcSet":"/static/80b4e4fbe176a10a327d273504607f32/61e93/hero-section.webp 200w,\n/static/80b4e4fbe176a10a327d273504607f32/1f5c5/hero-section.webp 400w,\n/static/80b4e4fbe176a10a327d273504607f32/58556/hero-section.webp 800w,\n/static/80b4e4fbe176a10a327d273504607f32/99238/hero-section.webp 1200w,\n/static/80b4e4fbe176a10a327d273504607f32/7c22d/hero-section.webp 1600w,\n/static/80b4e4fbe176a10a327d273504607f32/1258b/hero-section.webp 2732w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Rakesh Soni","github":"oyesoni","avatar":"rakesh-soni.webp"}}}},"pageContext":{"limit":6,"skip":708,"currentPage":119,"type":"///","numPages":164,"pinned":"ee8a4479-3471-53b1-bf62-d0d8dc3faaeb"}},"staticQueryHashes":["1171199041","1384082988","2100481360","23180105","528864852"]}