<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Arafat Bin Hossain on Medium]]></title>
        <description><![CDATA[Stories by Arafat Bin Hossain on Medium]]></description>
        <link>https://medium.com/@pioneer21st?source=rss-b54cb77a1e1d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*s-eM-6t5sbgWqKPRpj_84w.jpeg</url>
            <title>Stories by Arafat Bin Hossain on Medium</title>
            <link>https://medium.com/@pioneer21st?source=rss-b54cb77a1e1d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 01:45:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pioneer21st/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Data Privacy and Federated Machine Learning]]></title>
            <link>https://medium.com/omdena/data-privacy-and-federated-machine-learning-d04da8599896?source=rss-b54cb77a1e1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d04da8599896</guid>
            <category><![CDATA[secret-sharing]]></category>
            <category><![CDATA[federated-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-privacy]]></category>
            <dc:creator><![CDATA[Arafat Bin Hossain]]></dc:creator>
            <pubDate>Thu, 09 Apr 2020 13:38:56 GMT</pubDate>
            <atom:updated>2020-04-09T13:38:56.967Z</atom:updated>
            <content:encoded><![CDATA[<h3>Improving Data Privacy Through Federated Machine Learning</h3><h4>An introduction to the concept of federated ML and <strong>Additive Secret Sharing.</strong></h4><p>The AI market is dominated by tech giants such as Google, Amazon, and Microsoft, offering cloud-based AI solutions and APIs. In traditional AI methods, sensitive user data are sent to the servers where models are trained.</p><p>This centralized model comes with a problem, user’s privacy. User or customer data is exposed to the centralized model with other raw labeled data. As a result, a local user has no control over it.</p><h3><strong>The solution? Federated Machine Learning</strong></h3><p>With the advent of billions of smartphones with incredible computing powers, the platform where machine learning models can run is no more confined to high computational powered CPUs.</p><p>It was about time to devise an architecture where a centralized model makes use of all the local models in order to form a<strong> super-efficient model</strong> that can be used by all contributing devices.</p><p>This decentralizes the model training phase, which comes with a few advantages:</p><ol><li>A central model sharing platform/cloud, which contains the initial model that is being broadcasted to all the devices</li><li>The devices connected to the central model apply local optimization using the local data</li><li>The central model updates its own model using the models from other local devices</li><li>Step 1 is repeated</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/0*D5OLZkO5rx386LNJ" /><figcaption>Figure 1: Federated Machine Learning (Image Credit: Medium <a href="https://medium.com/sap-machine-learning-research/privacy-preserving-collaborative-machine-learning-35236870cd43">Article</a> )</figcaption></figure><h3><strong>Why is this an incredible design?</strong></h3><p>This design helps you to get the best and updated model from the cloud which is being fine-tuned by other collaborators building the model.</p><p>Not only can you use your own local model to do the prediction but also use the aggregated and more refined model from others to do better predictions.</p><p>Even if your device is not contributing enough to the central model, you are actually able to consume the best model once you are connecting to the cloud.</p><p>Sounds great, doesn’t it?</p><h3>What is the connection to data privacy?</h3><p>While the design above is very efficient, it is not preserving privacy.</p><p>The model being fetched from the cloud by the other devices for local optimizations contains information from each device. Reverse engineering the model can substantially put the data privacy at risk:</p><ol><li>A local device can get information about the data from other devices when it fetches the central model.</li><li>The central model has exposure to the data from the local devices.</li></ol><h3><strong>Additive Secret Sharing for rescue?</strong></h3><p>In order to solve this problem, a cryptography method called <strong>Additive Secret Sharing (ASS) </strong>is introduced.</p><p>The model update would require calculations of several hyper-parameters. Ass provides a method of encrypted calculation while aggregating the models from different devices in the central model aggregator(cloud) and passes over the encrypted outcome back to the devices to be decrypted privately by the devices which are connected.</p><p>In this way, the devices are unaware of any ideas/interpretations of weights from the other models used in the calculation.</p><p>This way, the basic privacy concern can be minimized. The user data can be protected from the cloud and the calculations would now be less vulnerable to leak information about the data.</p><h3>How can an organization benefit</h3><p>After going through the article, you might wonder how an organization can benefit from the concepts being discussed above. <em>What if an organization wants to use your model but doesn’t want to share the real data? Also, what if they want to run your model locally and not in the server where the model is deployed?</em> That’s where the concepts like Federated Learning and Encrypted Machine Learning can be a handy tool: both for model tuning and model sharing.</p><p>Lastly, Omdena has a huge scope for exploring this concept since organizations like Omdena can come around with requirements where they might require to apply machine learning on data that they are not allowed to see. For those situations, encrypted machine learning and federated learning can be a handy tool.</p><blockquote>You can learn more about Additive Secret Sharing from <a href="https://mortendahl.github.io/2017/06/04/secret-sharing-part1/">this</a> article.</blockquote><p>Google is using federated machine learning in their <a href="https://blog.google/products/search/gboard-now-on-android/">GBoard</a> while Apple is using it in <a href="https://www.technologyreview.com/s/614900/apple-ai-personalizes-siri-federated-learning/">Siri</a>.</p><p>You can visit <a href="https://www.openmined.org/">OpenMined</a> who provides python library PySyft to implement federated learning, a great tool to get started with data privacy.</p><p>Udacity has a course on <a href="https://www.udacity.com/course/secure-and-private-ai--ud185">Private AI</a> which is a MUST HAVE course in your bucket if you want to implement PySyft in your application.</p><p>Federated Learning is still in its early stages and faces numerous challenges with its design and deployment but yields promising initial results.</p><h3>More about Omdena</h3><p><strong><em>Solving Challenges Through Collaboration</em></strong></p><p><a href="http://www.omdena.com/"><strong>Omdena</strong></a> is an innovation platform for building AI solutions to real-world problems through the power of bottom-up collaboration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d04da8599896" width="1" height="1" alt=""><hr><p><a href="https://medium.com/omdena/data-privacy-and-federated-machine-learning-d04da8599896">Data Privacy and Federated Machine Learning</a> was originally published in <a href="https://medium.com/omdena">Omdena</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Orchestrating ETL Jobs in AWS Glue using Workflow]]></title>
            <link>https://medium.com/@pioneer21st/orchestrating-etl-jobs-in-aws-glue-using-workflow-758ef10b8434?source=rss-b54cb77a1e1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/758ef10b8434</guid>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[workflow-automation]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[big-data-analytics]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Arafat Bin Hossain]]></dc:creator>
            <pubDate>Mon, 28 Oct 2019 15:41:36 GMT</pubDate>
            <atom:updated>2019-10-30T08:18:25.540Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FGGQiBgyqqspcD2cBvYESg.png" /></figure><p>In the <a href="https://medium.com/@pioneer21st/data-engineering-using-amazon-glue-amazon-athena-and-quicksight-2c9986ab6015">previous article</a>, I showed you how to scrape data, load it in AWS S3 and then use Amazon Glue, Athena to effectively design crawler &amp; ETL jobs and query the data in order to be presented to reporting tool like Amazon QuickSight.</p><p>In this short article, I will try to explain how to orchestrate the overall flow I described in the <a href="https://medium.com/@pioneer21st/data-engineering-using-amazon-glue-amazon-athena-and-quicksight-2c9986ab6015">previous article</a> in the form of workflow so that all the steps are not required to be executed manually again and again weekly. I am saying weekly because I want to update the dataset at the end of the week by running the scraper and eventually run the ETL afterwards. It makes sense because the dataset actually gets impacted due to the releases of movies at the end of the week. So, what I will try to cover in this tutorial are the steps you will need to take to orchestrate the overall flow.</p><p>What we already have — (refer to <a href="https://medium.com/@pioneer21st/data-engineering-using-amazon-glue-amazon-athena-and-quicksight-2c9986ab6015">previous article</a>)<br>1. A crawler that takes csv from S3 bucket</p><p>2. ETL job that converts csv to parquet format and saves it to S3 bucket</p><p>3. A crawler that takes parquet file from S3</p><p>We have database and QuickSight but they don’t require any manual intervention in the context of this project. The aforementioned objects above are the ones which would require orchestration or automation in their execution. In order to be automated, we need to fix an execution plan which in our case is the sequence described above. Amazon Glue have workflow where you can add the steps sequentially and then add a trigger to initiate the events.</p><p><strong>What is trigger?</strong></p><p>Trigger is the most important part in this context. For each of the steps to initiate, there has to be a trigger. We will be concerned with two types of triggers — <strong>job event</strong> &amp; <strong>scheduled</strong>.</p><p><strong><em>Job Event</em></strong> are the kind of triggers which are basically an indicator of the state of executions of the previous steps — FAILED, SUCCEEDED, etc.</p><p><strong><em>Scheduled</em></strong> are the kind of triggers where you can set time and tell it to initiate the event(crawler/jobs to run) at that particular time.</p><p>So, let’s try to create the workflow now.</p><p>From the Glue Dashboard, go to <em>Workflows</em> → <em>Add workflow</em>. Give a name to your workflow and click <em>Add workflow</em> button below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*T0v7u2LVuV1QikWw" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/0*PB1CZJyVSCdhmQsH" /></figure><p>You will see that a workflow has been created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cXETcjM-W_LLLy_q" /></figure><p>Now, once you click on the checkbox as above, you will see a graph below where there will be a <em>Add trigger </em>button. Click it. As you can see below that this is the trigger that we want would initiate our csv-crawling at the friday of each week at 12:09 AM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/0*EY96Pwh5BIqUfH2g" /></figure><p>Now that we have created our first trigger, we would want it to start the crawler and hence we would add a step of csv crawler.</p><p>Once we created the first trigger, the graph would automatically look like this and would expect that you add a node followed by this trigger. A node would be either Job or a Crawler. Click <em>Add Node</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/0*8chGjzdz6INQAzCm" /></figure><p>Then a window like this would appear with two tabs- Jobs and Crawlers. Click <em>Crawlers </em>and add the csv-crawler.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/0*EwSbVTYptTFMhPYV" /></figure><p>Now, the graph would look like this-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/0*1d0adnYXh0ExI1QI" /></figure><p>Click on <em>Add Trigger</em>. Follow the steps as per the picture. The default Event type trigger would check if the crawler executed successfully. Click <em>Add</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/0*NE5yfyU9vf4YCsti" /></figure><p>The Graph would now look like this-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5gdCQk4sDq0bTRED" /></figure><p>In this way, you can now add another node which in our case would be Job and then add another similar trigger. The last step would be another node which in our case would be the parquer-crawler. The final graph would be something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5qjBSPLuaPOi0jZJ" /></figure><p>So, you can either run this workflow right now or wait for the trigger to initiate the first step of the workflow. What this would do now is initiate csv-crawling at each Friday and then upon successful execution, run the ETL job of converting or shipping the csv data to parquet format and then executing parquet crawler — all automatically. In this way you can orchestrate your ETL planning in Amazon Glue.</p><p>So, I hope this simple tutorial helps you getting started with data engineering in AWS. In future article, I will try to come up with some more interesting tech stack related to effective Data Engineering. Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=758ef10b8434" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Engineering using Amazon Glue, Amazon Athena and QuickSight]]></title>
            <link>https://medium.com/@pioneer21st/data-engineering-using-amazon-glue-amazon-athena-and-quicksight-2c9986ab6015?source=rss-b54cb77a1e1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c9986ab6015</guid>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[amazon-athena]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[s3-bucket]]></category>
            <dc:creator><![CDATA[Arafat Bin Hossain]]></dc:creator>
            <pubDate>Tue, 22 Oct 2019 16:34:31 GMT</pubDate>
            <atom:updated>2019-10-30T08:22:56.138Z</atom:updated>
            <content:encoded><![CDATA[<p>After attending several online sessions and courses on various technology served by AWS, the ones that enthralled me the most are the utilities provided by the services like Amazon Glue, Amazon Athena and Amazon Quicksight. Also, the power of <strong>Serverless Data Engineering</strong> is something I already have been trying to learn about and play around with. From the knowledge I had from various sessions, I decided to build a personal project of Interactive Dashboard using various services.</p><p>Being someone who is working in the field of Data Engineering and Business Intelligence, I was definitely amazed by the sheer efficiency that AWS tries to bring about in building BI Dashboards by minimising the workload.</p><p>In this article, I will try to discuss:</p><ol><li>The core concepts like ETL, Source Schema, Target Schema which are crucial in understanding the development workflow of a Business Intelligence system.</li><li>How to scrap and prepare data using python.</li><li>How to make crawlers to ship the data to Database using Amazon Glue.</li><li>How to design ETL to map source data to target.</li><li>Hence, how to import the data to Quicksight in order to build the dashboard.</li></ol><p><strong>Note</strong>: This article is not about <em>How to build the dashboard </em>and is more about the Data Engineering behind the preparation of Data which is hence imported to the presentation layer to create the dashboard.</p><p>Before talking about how to build the dashboard on AWS, it is important to understand what the underlying development flow for building a dashboard in a system like Business Intelligence is all about. This is something that this article will be all about.</p><p>The diagram below shows what a typical workflow for building a typical BI dashboard looks like. It is a very simplified version because in reality you are going to have several other layers like Staging DB, different other layers of ETL. The in depth understanding of Business Intelligence is not the purpose of this article and hence the basic knowledge of BI required to understand the project is discussed in the diagram below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*tdtF4dn7TTjWZMeSeWOfuA.png" /></figure><p>Now, let’s talk about the project. What I built is something like this- A dashboard that contains visualisation of gross profits of several popular movies over the years (1982–2019)</p><p>Here is the flow of tasks that I used to build this dashboard:</p><ol><li>Scraped data from boxofficemojo.com and uploaded it to AWS S3 using python boto3 library</li><li>Crawled the csv format data from S3 to Database Schema using Amazon Glue</li><li>Converted the data from csv to parquet using ETL and crawled the parquet data to Database Schema too using Amazon Glue</li><li>Designed the dashboard using Amazon Quicksight with editing necessary queries using Amazon Athena(optional)</li></ol><h4><strong><em>Scraping data from boxofficemojo.com and uploaded it to AWS S3 using python boto3 library:</em></strong></h4><p>The details of scraping is also beyond the scope of the discussion I am trying to have.</p><p>However, just for a quick brief — what I did is scrap the weekly box office data of the movies over a year from 1982–2019 from <a href="https://www.boxofficemojo.com/weekly/">https://www.boxofficemojo.com/weekly/</a>. Using python libraries like requests and BeautifulSoup, you can easily do the scraping steps. <a href="https://colab.research.google.com/drive/1wgy22V_9rpjEECxFzWq7eLGMVDMMKI5h">Here</a> is the link to the code which I used to scrap the site.</p><p><strong><em>Disclaimer</em></strong><em>: Don’t forget to clean your data before you actually upload it to S3. Trust me, that cleaning part took most of the time for this project and this is something you can never avoid and you should never intend to.</em></p><p>After creating the pandas dataframe and converting it to csv, I used boto3 to upload the csv to S3 -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/0*B2q4j9fQo0iymUxa" /></figure><p>The code above puts your csv to the S3 bucket called boxofficedumpv1(figure below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Hmhu8YyvP68ZLLbO" /></figure><h4><strong><em>Crawling the csv format data from S3 to Database Schema using Amazon Glue:</em></strong></h4><p>Amazon Glue helps in cataloging, preparing and transforming the data very easily and it does so serverlessly. It also helps create ETL processes, customize the ETL processes by providing the python and scala code they automatically build for you. For this project, Amazon Glue is very crucial and was used to crawl the csv file from S3 to Database, create the ETL job to map the csv format data to parquet format and then crawl the parquet data from S3 to the Database.</p><p>To crawl the data from S3, your crawler needs to be able to access S3 on your behalf. <a href="https://docs.aws.amazon.com/glue/latest/dg/create-an-iam-role.html">This</a> is a good resource to know how you can do that. Below are the steps to create a crawler.</p><p>From <a href="https://console.aws.amazon.com/glue/home?region=us-east-1#catalog:tab=crawlers">Amazon Glue Console</a>, click the <em>Crawler </em>→ click <em>Add Crawler</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Dr2Tv_p_FwFy6SnZ" /></figure><p>Add name of your crawler and leave everything as it is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tcNwrtOmoXDgcJ_C" /></figure><p>Create a new data store</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hVhxGjryoM3gu2AM" /></figure><p>Choose S3 as data store and refer the path of the bucket where you uploaded your CSV file to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IwlOn_y2S9q9X2GC" /></figure><p>Choose the IAM Role you created earlier in the tutorial.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6vM_8WbkzWRR86MT" /></figure><p>Choose to Run this crawler on demand</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DmOl83czPfYmScSb" /></figure><p>Send the output of the crawler to the database and name the database. Click <em>Next</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2b-OJcwLWnBOsu5M" /></figure><p>The next page will be a summary and review of your configuration. Click <em>Finish</em>.</p><p>Now run the crawler until you see the crawler state to be as below.Specially wait until you see the Tables added.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QcXfwZcDYiIPjbtL" /></figure><p>From the tab on the left, <em>Database</em> → <em>Tables</em>. Here, you will see the tabular representation of the csv in the database. The name of the table turns out to be same as the bucket name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WZtmoaNgCNuOquxo" /></figure><p>As you click on the table, you will see that the columns are there and he data have been successfully imported too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GGRUwuA4aJDrh0qu" /></figure><p>In this way, you can use Glue to infer your data residing in S3 in any format — csv, json or anything. If you care using json, you have to use custom classifier to crawl the data to database. You can use <a href="https://medium.com/i-like-big-data-and-i-cannot-lie/serverless-data-engineering-aws-glue-lambda-athena-quicksight-de3ef177884f">this</a> link to understand how json data can be used to do the same thing we are doing in this project.</p><h4><strong><em>Converting the data from csv to parquet using ETL and crawling the parquet data to Database Schema using Amazon Glue:</em></strong></h4><p>Now, we are going to convert this data to parquet format using ETL job. Why is this so? There are two reasons behind doing so — 1. Parquet format of data is a columnar optimised storage that provides smaller file size than json/csv. 2. Provides much faster querying when you are going to use <strong>Amazon Athena </strong>to query the tables. In order to create the ETL job, click on the <em>ETL → Jobs </em>→ <em>Add Job </em>in Amazon Glue console.</p><p>We will try to generate python script. So, set the name of the job and keep all things as default.Click <em>Next</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D73VvieGcVhF-rsc" /></figure><p>We will choose the table we crawled as the data source. Click <em>Next</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qoHSDhqwhAf7OhrQ" /></figure><p>It actually show the table, the s3 bucket associated with the tables as well. So, for more complex design, you will have the information about the s3 buckets each table is associated with.</p><p>We will choose the target data to be produced as parquet format and the parquet file will be stored to S3. In the <em>Target path</em>, choose the file path to respective bucket. Click <em>Next</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GJG3Io35XfESyS0f" /></figure><p>There you go, this is the page where you see what this ETL will do. It will transform the source data to parquet format data which is the target data. This is a simple design and so it is a straight forward direct mapping of the source data to the target data. Click <em>Next</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2kzdGdyEcGK7e7Kr" /></figure><p>(Usually, you can set your own business logic in the ETL. To do so, you can edit the python script this job is going to generate now and then run it in the Glue Console.)</p><p>In this step, you will see a python script gets auto generated. <em>Run</em> this script</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sGShSdCOG8aBHUO3" /></figure><p>After successful execution of the script, you will see a parquet file getting created in your bucket specified. At this point, create a crawler just using the same configuration as before except change the source bucket to the one where the parquet file resides. Run the crawler and see a different table getting generated at the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D8rZu6PVTLcwwi0S" /></figure><p>Now, check the parquet table and click on <em>View Data.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3ylkNGtDH3scmqzb" /></figure><p>Upon clicking the <em>View Data</em>, you will see a prompt which will take you to Amazon Athena. Athena is a service which allows you to write custom queries against your data. A prompt will warn you that Amazon Athena charges for each query. But you won’t need custom query at this moment and select queries are free of charge. Click <em>Preview.</em> If everything’s good, you are supposed to see a result like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nmotMwjG9DpBkI6m" /></figure><p>Phew! At this point, you can say that the basic data preparation is done. Now,all you need is to import this data to Amazon Quicksight.</p><p>Amazon Quicksight is an Amazon Service that lets you import your data and use their tool to build beautiful and interactive dashboard out of them. You need to sign up in order to use the dashboard tool. On the landing page of Quicksight, do the following to import the data :</p><ol><li><em>Manage Data → New Data Set → Athena</em></li><li>Click <em>Create Data Source</em> after setting a name</li><li>Choose the schema and choose your table(s). You should choose parquet table for query efficiency. Click Select and then wait for the data to import to the dashboard design page.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/0*9fuWwS0-SXSVJunv" /></figure><p>If your data have been imported properly, you will see the columns fields and visual types in the dashboard design page. You can play around with the tool to come up with your own idea of analysis. In this article, I won’t really discuss about how to build a dashboard because that is a vast discussion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pF3oN8yAe2ayarxq" /></figure><p>In this way, you can play around with Amazon Glue, S3, Amazon Athena and Amazon Quicksight to properly design your ETL, Crawlers and Dashboard. Now that you have designed dashboard like this , each week you can run the python script to scrape the data, and crawl it to s3 and hence re-run the ETL to refresh my dashboard. You can do all the steps manually or you can create a workflow using Amazon Glue so that all these processes get executed sequentially and then the dashboard gets automatically refreshed at the end of the week and hence showing the updated state of Box Office and how each movies are getting affected due to new releases. You can also use lambda function to trigger the scraper. This is something you can immediately do if you want to replicate the project.</p><p>Another important note, about the costing of this project. If you run a crawler weekly for a month, a cost around $1.45 would be charged while $3.67 will be charged for ETL jobs(monthly). S3 will cost about $0.04. So, it is quite cheap and awesome!</p><p>I hope this article helps people who want to start learning how services like Amazon Glue and QuickSight and be combined to explore the concepts of Data Engineering and Dashboard designing in AWS.</p><p>In my <a href="https://medium.com/@pioneer21st/orchestrating-etl-jobs-in-aws-glue-using-workflow-758ef10b8434">next article</a>, I will show you how can you automate the weekly refresh of this Dashboard. Cheers and let me know if you have any questions and ideas!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c9986ab6015" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Network Analysis to Find out the Context of a Tweet: A Community Detection Based Approach]]></title>
            <link>https://medium.com/omdena/network-analysis-to-find-out-the-context-of-a-tweet-a-community-detection-based-approach-299918d964f1?source=rss-b54cb77a1e1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/299918d964f1</guid>
            <category><![CDATA[network-analysis]]></category>
            <category><![CDATA[graph-theory]]></category>
            <category><![CDATA[pagerank]]></category>
            <category><![CDATA[community-detection]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Arafat Bin Hossain]]></dc:creator>
            <pubDate>Thu, 10 Oct 2019 13:50:43 GMT</pubDate>
            <atom:updated>2019-12-03T00:13:19.088Z</atom:updated>
            <content:encoded><![CDATA[<p>Being someone who believes in learning by getting my hands dirty, Omdena came to me as a savior when I first got to know about it on a social networking site. After working in several small ML projects, I was looking for an opportunity to work for a larger group collaborating together and working to build something meaningful. I applied for an Omdena challenge as soon as I got to know about them and eventually got selected.</p><p>One of the most interesting things that I loved about the first challenge was- my personal learning curve. I observed that I am learning about a particular thing more quickly than I usually do. The reason behind this is the frequent communication between other collaborators who have different levels of experience and the environment of sharing those selflessly.</p><p>For my first challenge, I was assigned the role of a Data Wrangler where I was really active and received accolades and appreciation from my seniors. The experience of working with the Data Labelling team and then helping fellow teammates running the model on AWS EC2 was outstanding.</p><blockquote>This collaborative spirit is one of the reasons I definitely want to keep collaborating in this community.</blockquote><h4>The challenge: Analyzing tweets to prevent gun violence</h4><p>For my second challenge, I was assigned the role of an ML Engineer and hence I got an important opportunity to get hands-on experience with a real-world ML project.</p><blockquote>The problem statement of this challenge was straight forward- performing sentiment analysis on tweets without profiling the user so that the results could be used to prevent gang violence in Chicago.</blockquote><p>As a subtask of the sentiment analysis, a network analysis team was formed which I was assigned as the task manager. The main purpose of the task was to help the sentiment analysis team by providing them with the context that the text of each tweet is about. It was tricky to come with a quantitative value that would depict the context if a tweet is violent or not. After reading several research papers and graph theories, I decided to implement community detection algorithms and combine the reservoir of violent signal words to come up with probability value (the probability that a tweet is more prone to using violent words) against each tweet.</p><h4>5 steps to build an effective network analysis of tweets</h4><ol><li>Using python’s networkX, I created a graph using the mentions and authors of the tweets</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*ctnIDXDx4rLlP6Cq" /></figure><p>The nodes represent mentions in the tweet/author of a tweet. Edge A →B means B was mentioned in the tweet posted by A.</p><p>2. Thousands of tweets were used to create a directed graph and using <strong>Girvan Newmann algorithm</strong>, the communities in the networks were detected. Also, using <strong>PageRank</strong> values of each node, the influential members in the network could be identified. This value is not crucial to the network analysis but can be useful if one tries to track any gang member who is influential in the network.</p><p>3. The members in the communities are either authors or mentions. So, the tweets were then tagged with the community number based on the mention or author names.</p><p>4. The total number of signal keywords in all the communities was calculated and so was the total number of signal words for individual communities.</p><p>5. The final result was a dataset of tweets that had the community tag and probability of using violent words — based on usage of signal words within the community relative to all the communities. For example, In the picture below, members from Community 1 who are authors or mentions in the tweets are more likely to be inclined towards using violent keywords. So, the tweets which contain authors/mentions from this community are contextually more violent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/0*5VWL_J2dWoIz6H0F" /></figure><p>Also, the network analysis can give an insight into which members are more influentials within the community. One can get a notion by looking at the PageRank values of the members of the community. The greater the PageRank, the more influential a member is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QP5grXJRZvQkd1zG" /></figure><p>It was an amazing group work with frequent feedback sessions about my work. The whole experience was really motivating. It is not only ML Engineering all through- you get to learn a lot about Data Cleaning, Data Engineering, and Data Analysis as well. Lastly, the real motivation came from the fact that I am working on this project to solve an existing real-world problem. What can be more exciting than this?</p><blockquote>It was an amazing group work with frequent feedback sessions about my work. The whole experience was really motivating. It is not only ML Engineering but also you get to learn a lot about data cleaning, data engineering, and data analysis as well.</blockquote><p>Lastly, the real motivation came from the fact that I am working on this project to solve an existing real-world problem.</p><p>What can be more exciting than this?</p><h4>Want to become an Omdena Collaborator? Join one of our tough AI for Good challenges and <a href="https://omdena.com/our-projects/">apply here</a>.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*fbm6oiUlp5k5eEc2.png" /></figure><p>If you want to receive updates on our AI Challenges, get expert interviews, and practical tips to boost your AI skills, <a href="http://eepurl.com/gto7Xn?source=post_page---------------------------">subscribe</a> to our monthly newsletter.</p><p>We are also on <a href="https://www.linkedin.com/company/14052175?source=post_page---------------------------">LinkedIn</a>, <a href="https://www.instagram.com/omdenaglobal/">Instagram</a>, <a href="https://web.facebook.com/OmdenaAI/?source=post_page---------------------------">Facebook</a>, and <a href="https://twitter.com/OmdenaAI?source=post_page---------------------------">Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=299918d964f1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/omdena/network-analysis-to-find-out-the-context-of-a-tweet-a-community-detection-based-approach-299918d964f1">Network Analysis to Find out the Context of a Tweet: A Community Detection Based Approach</a> was originally published in <a href="https://medium.com/omdena">Omdena</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>