{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":50947,"databundleVersionId":5741538,"sourceType":"competition"},{"sourceId":17031,"sourceType":"datasetVersion","datasetId":10417},{"sourceId":21410,"sourceType":"datasetVersion","datasetId":15739},{"sourceId":1395439,"sourceType":"datasetVersion","datasetId":813158},{"sourceId":2012814,"sourceType":"datasetVersion","datasetId":5023},{"sourceId":2144875,"sourceType":"datasetVersion","datasetId":1287044},{"sourceId":3046751,"sourceType":"datasetVersion","datasetId":159091},{"sourceId":3385527,"sourceType":"datasetVersion","datasetId":2040968},{"sourceId":8054863,"sourceType":"datasetVersion","datasetId":2370701},{"sourceId":8112112,"sourceType":"datasetVersion","datasetId":612177},{"sourceId":8149852,"sourceType":"datasetVersion","datasetId":9}],"dockerImageVersionId":30513,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"<div style=\"float: center; background-color:black; padding:1em\" >\n    <img src='https://www.bluebutterflyfoundation.org/images/TraffickedGirlFace.jpeg' width=\"300px\"/>\n    <img src='https://www.bluebutterflyfoundation.org/images/TraffickedBoys.jpeg' width=\"300px\"/>\n    <BR>\n    <p style=\"color:gray\">Image source: <a href='https://www.bluebutterflyfoundation.org/child_trafficking_nepal.php'>https://www.bluebutterflyfoundation.org/child_trafficking_nepal.php</a>\n   </p>\n</div>\n    \n**Foreword**\n<p>As the figure below suggests, global attention and resources have been allocated to vaccination development and dissemination efforts, leaving other humanitarian crises less attended. As we transition into post-pandemic times, we hope this report below will solicit your attention to help combat human trafficking with your machine learning and data analytics expertise. Your input of any kind is greatly appreciated and we sincerely thank you all in advance for investing your time and interests to skimming through this report.</p>\n    \n<p>Keywords: child-, adult-, women-, and human- trafficking; sexual exploitation; forced labour; slavery; machine learning solutions</p>\n\n<!-- span style=\"font-family: sans-serif; font-size:1.3em; color:#944;\">If you could recommend <a id=\"sec_films\">documentaries</a> and other resources on this topic, please kindly share in the Comments. Merci beaucoup. Xie, Xie. Thank you!</span -->","metadata":{"_uuid":"9aa4888f-6b22-4b2e-8513-cb12f5dc3e53","_cell_guid":"8988eae8-65bc-4238-a873-e9d82aac0b9b","trusted":true}},{"cell_type":"code","source":"%%capture \n!pip install pycountry-convert","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2023-09-17T04:50:08.837798Z","iopub.execute_input":"2023-09-17T04:50:08.838171Z","iopub.status.idle":"2023-09-17T04:50:18.147448Z","shell.execute_reply.started":"2023-09-17T04:50:08.838135Z","shell.execute_reply":"2023-09-17T04:50:18.145962Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from pycountry_convert import country_alpha2_to_country_name, country_name_to_country_alpha3\n\nimport os,sys\nfrom glob import glob\nimport polars as pl\nimport pandas as pd\nimport numpy as np\nimport plotly.express as px\nimport plotly.graph_objects as go\nimport warnings; warnings.filterwarnings(\"ignore\")\n\n# =========== load CSV files =========== \nif ('d_dfs' in globals())==False:\n    d_dfs={}\n    files =['/kaggle/input/meta-kaggle/Datasets.csv', '/kaggle/input/meta-kaggle/DatasetVersions.csv'] #glob('/kaggle/input/meta-kaggle/Datas*.csv') \n    for i, f in enumerate(files):         \n        f1 = os.path.basename(f).split('.csv')[0]            \n        try:\n            k = 'CreationDate'\n            d_dfs[f1] = pd.read_csv(f,parse_dates= [k] )\n            d_dfs[f1]['creation_time_index'] = d_dfs[f1][k].dt.year*100 + d_dfs[f1][k].dt.month        \n        except:\n            try:\n                k = 'VoteDate'\n                d_dfs[f1] = pd.read_csv(f,parse_dates = [k] )\n                d_dfs[f1]['vote_time_index'] = d_dfs[f1][k].dt.year*100 + d_dfs[f1][k].dt.month                \n            except:\n                d_dfs[f1] = pd.read_csv(f)\n                    \n# =========== join 2 dataframes ===========                     \nall_on_ds_df=pl.DataFrame( d_dfs['Datasets'] ).join( pl.DataFrame( d_dfs['DatasetVersions'] ), left_on ='Id', right_on ='DatasetId' )\nd_dfs['Datasets']=d_dfs['Datasets'].sort_values('Id')\ntry:\n    del Records\nexcept:\n    pass\n\n# =========== Search on relevant datasets and those on covid and fraud for comparison =========== \nwordlist = [ 'COVID', 'Fraud', 'smuggle people', 'smuggling of people', 'kidnapping','missing migrant', 'missing people', 'abduction', 'human traffick', 'child traffick', 'drug traffick', 'adult traffick', 'sex traffick','women traffick', 'labour exploitation','labor exploitation', 'forced labour', 'forced labor', 'modern slave' ]\nfor i,word in enumerate(wordlist):\n    if i>1:\n        df1= all_on_ds_df.filter( pl.col('Title').str.contains(r'(?i)%s'%word) | pl.col('Subtitle').str.contains(r'(?i)%s'%word)  | pl.col('Description').str.contains(r'(?i)%s'%word)  )\n    else:\n        df1= all_on_ds_df.filter( pl.col('Title').str.contains(r'(?i)%s'%word) | pl.col('Subtitle').str.contains(r'(?i)%s'%word)  )    \n    \n    if ('traffick' in word) | ('smuggl' in word):\n        w = 'human trafficking'\n        df = df1.with_columns( pl.lit(2).alias('marker'))        \n    elif ('labour' in word) | ('labor' in word) | ('slave' in word):\n        w = 'forced labour'\n        df = df1.with_columns( pl.lit(2).alias('marker'))        \n    elif ('missing' in word) | ('kidnapping' in word)  | ('abduction' in word) :\n        w = 'Missing people'\n        df = df1.with_columns( pl.lit(2).alias('marker'))            \n    else: # COVID, fraud\n        w = word\n        df = df1.with_columns( pl.lit(1).alias('marker'))                \n        \n    df = df.with_columns( pl.lit(w).alias('theme'))        \n    df = df.with_columns( (pl.concat_str(pl.col('theme'), pl.col('Slug'), separator=\" | \")).alias('theme_slug') )    \n    try:\n        Records = pl.concat( [Records, df], )\n    except:        \n        Records = df.clone()\n        \n# =========== Preprocess =========== \ndf = Records.to_pandas() \n\nfrom datetime import datetime\nday=datetime.today().day\nmon=datetime.today().month\nyr=datetime.today().year\ntoday = pd.to_datetime( f'{yr}-{mon:2d}-{day:2d} 00:00:00' )\n\ndf['age'] = np.log1p( (today - df[['CreationDate']] )/ np.timedelta64(1, 'M') )\n\n\ndf['time_index'] = (df['creation_time_index']-200000) \n\ndf['nViews'] = df['TotalViews']/(df['age']+1e-10)*100\ndf['nvotes'] = df['TotalVotes']/(df['age']+1e-10)*100\ndf['ndownloads'] = df['TotalDownloads']/(df['age']+1e-10)*100\ndf['nkernels'] = df['TotalKernels']/ ( df['age']+1e-10)*100\ndf['popularity'] = (df['nViews'] + 2*df['nvotes'] + df['ndownloads'] +df['nkernels'] )+10\n\n# =========== Plot =========== \nfig = go.Figure()    \nd1=df.sort_values( 'time_index')\nfig=px.scatter( d1, y='theme_slug', x='time_index',  \\\n               color='theme', symbol='theme',hover_data=['Slug', 'TotalViews','TotalVotes', 'TotalDownloads','TotalKernels'] )    \nfig.update_xaxes(tickangle=40, tickvals=[1600,1700,1800,1900,2000,2100,2200,2300], \\\n                 ticktext=['2016', '2017','2018','2019','2020', '2021', '2022', '2023'] )            \n\ndef show_viewing_tips(fig):\n    fig.update_layout( title=dict( font={'color':'darkred', 'size':13}, text='<b>- Zoom in to view data on a monthly scale<br>- Deselect topics on the legend to focus on forced labour and human trafficking<br>- Click AutoScale button (top-right) to reset view</b>') )   \n    fig.show()\n\nshow_viewing_tips(fig)","metadata":{"_uuid":"a1ec59cb-74df-4b95-bb99-ca83722002e2","_cell_guid":"ef702746-0647-46b0-8be7-28b2f8960db3","_kg_hide-input":true,"execution":{"iopub.status.busy":"2023-09-17T04:50:18.150356Z","iopub.execute_input":"2023-09-17T04:50:18.150729Z","iopub.status.idle":"2023-09-17T04:50:27.470707Z","shell.execute_reply.started":"2023-09-17T04:50:18.150694Z","shell.execute_reply":"2023-09-17T04:50:27.468951Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"<hr>\n<figure width=\"300px\" style=\"display: table; float: right; margin: 2em;\" >\n    <img src='https://raw.githubusercontent.com/tcw1470/HT/main/figs/humant_tcw.png' width=\"300px\"/>\n    <p  style=\"display: table-caption; caption-side: bottom; color:gray\">Author's summary illustration on some of the human trafficking problems the world faces.</p>   \n</figure>\n\n<span style=\"font-size: 2em; font-family: Georgia; color: #A22;\" >Anti-human trafficking solutions using data analytics and operational research: narrative review</span>  \n<span style=\"font-size: 1.2em; font-family: Georgia; color: #A22;\" ><em></em></span>\n    \n\n\n<!--# S1. Introduction <a id=\"intro\"></a-->\n\n\n<!--span style='font-size: 2em; color: #a44'-->\n<span style=\"float: left; line-height: 35px; font-size: 55px; font-family: Georgia; color: #A22;  padding-top: .18em; padding-bottom: .02em; padding-right: .02em; padding-left: .02em; margin-right: .01em; margin-bottom: -.15em;\">H</span>uman trafficking is a serious violation of our basic human rights. Estimates from the International Labour Organization made in 2016 suggest that more than five people across the globe fall prey to human trafficking each day [(Toney-Butler et al., 2023)](#ref_defn), affecting more than forty three million families worldwide, with 72% of the victims being women and girls. Unfortunately, most of the published statistics are underestimated [(TIP 2023](#ref_tipreport); [Chaney et al., 2023](#ref_hiddenfigs); [IOM 2023)](#ref_imo). This is because HT crimes often go unreported and victims' survival rates are low especially in cases involving forced begging [(Borgen Project, 2023)](#ref_beg), child soldiers [(Cockbain et al., 2021)](#ref_refugees), organ removals [(Li et al., 2022)](#ref_kidney), etc.\n\nThe physical and psychological harms done to victims are permanent, if not fatal [(Bekogianni et al. 2019](#ref_albania); [TIP 2021)](#ref_russia). Take as examples from the study by [Gezie et al. (2021)](#ref_harm) in which survivors of forced labour were studied to analyze the extents of their physical health after their rescues. Among the 1,387 study participants who transited through the corridors of Ethiopia for forced labour, 37% of them got exploited in housework; 27% in animal and agriculture farming; 18% in services and manufacturing industries. After they were rescued, a majority of them reported health problems such as urinary tract infections, gynaecological problems, bone fracture, back pain, stomachache, forgetfulness, etc. \n\nFrom an economic standpoint, human trafficking is a $150,000,000,000 illegal business that plagues all industry sectors, including forced labour in beauty industries, entertainment, hospitality, construction, agriculture, commercial fishing. Trafficking criminal networks typical run under the **A-M-P model** [(Dimas et al., 2022)](#ref_analytics):\n- **A**ctions that perpetrators take to induce (recruits, harbors, transports, provides, etc.); via...\n- **M**eans of \"force, fraud, or coercion\" [(Toney-Butler et al., 2023)](#ref_defn); for... \n- **P**urposes of illegal recruitment for commercial sex or labour trafficking.\n\nDissecting the A-M-P model with more accessible terms, traffickers' steps are **luring, grooming/ gaming, coercion/ manipulation, exploitation**, and **recruitment** at slavery sites.\n\nThey disguise themselves as friendly neighbour, intimate partner, and/or loving family member [(Shen, 2016)](#ref_china). Anyone who is vulnerable risks being their next target. Vulnerability risk factors include having suffered from adverse childhood experiences and/or prior experiences of sexual abuse, sexual assault, domestic violence, gang violence, community-violent exposures, as well as the lack of education, awareness, cultural exploitations. \n\nTraffickers recruit *anywhere* around the world, predominantly more successful in developing countries and countries at war. According to Mileski\net al. [(2020)](#ref_fishing), forced labour in commercial fishing *alone* is occurring in the U.S., United Arab Emirate, Thailand, Taiwan, Sudan, Philippines, Ireland, etc. Incident counts from the *Global Human Trafficking dataset* released by the Counter-Trafficking Data Collaborative (see [later section](#ds_ght)) as shown in the map below reveals how prevalent the problem is around the world. Note that the map only captures partial statistics; many other trafficking crimes go unreported as mentioned earlier. Even in developed countries, stories from survivors are countless. For instance, the [European Council (2023)](#ref_eu) presents cases of teens from Netherlands who got seduced by their partners into prostitution within their home countries, as well as stories from transiting foreigners who got illegally detained and forced into domestic services when their passports got confiscated in countries such as France and Syria.","metadata":{"_uuid":"62f231c0-3bd3-4280-bb59-aeff6e8c4de6","_cell_guid":"d1bced82-702a-448c-bc05-e5df6cda7245","trusted":true}},{"cell_type":"code","source":"import os, sys\nimport IPython\nfrom IPython.display import display, HTML\nfrom pathlib import Path\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport numpy as np\nimport seaborn as sns\nimport plotly\nimport plotly.express as px\nimport warnings; warnings.filterwarnings('ignore')\nimport umap # order the areas/ themes\n# https://www.kaggle.com/discussions/product-feedback/43354\nfrom plotly.offline import init_notebook_mode; init_notebook_mode(connected=True);\nght_df = pd.read_csv('/kaggle/input/global-human-trafficking/human_trafficking.csv')\nght_df.replace('-99', np.nan, inplace=True)\nght_df.replace(-99, np.nan, inplace=True)\n\nfrom pycountry_convert import country_alpha2_to_country_name, country_name_to_country_alpha3\ndef get_alpha3(col):\n    try:\n        iso_3 =  country_name_to_country_alpha3(col)\n    except:\n        iso_3 = 'Unknown'\n    return iso_3\n\ndef get_name(col):\n    try:\n        name =  country_alpha2_to_country_name(col)\n    except:\n        name = 'Unknown'\n    return name\n\nght_df['country'] = ght_df['citizenship'].apply(lambda x: get_name(x))\nght_df['alpha_3'] = ght_df['country'].apply(lambda x: get_alpha3(x))\nght_map = pd.DataFrame(ght_df.groupby(['country', 'alpha_3'])['alpha_3'].agg(Victims='count')).reset_index()\n\nfig = px.choropleth(ght_map, locations=\"alpha_3\", color=\"Victims\",  hover_name=\"country\")\nfig.update_layout( autosize=False, width=800, title_text=\"Worldwide prevalence of human trafficking using 2002-2019 statistics collected by the global data hub called Counter-Trafficking Data Collaborative\")\nfig.show()","metadata":{"_uuid":"96c5d43e-2d01-46e8-a261-021860c4c0ee","_cell_guid":"0d33911c-c087-4f2a-b9dd-09eee75aab04","_kg_hide-input":true,"execution":{"iopub.status.busy":"2023-09-17T04:50:27.472753Z","iopub.execute_input":"2023-09-17T04:50:27.473070Z","iopub.status.idle":"2023-09-17T04:50:27.946466Z","shell.execute_reply.started":"2023-09-17T04:50:27.473043Z","shell.execute_reply":"2023-09-17T04:50:27.945804Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"$\\def\\euro{\\unicode{x20AC}}$\n\nThe search for solutions to rescue victims is immensely difficult due to the global scale of the problem. The Ukraine-Russia conflict [(Cockbain et al., 2021)](#ref_refugees), for instance, resulted in a soaring [estimate](#ref_ukraine) of 46,000 trafficked Ukrainians during 2019-2021. Temporary reliefs include the European Union's four-year strategy that allocated $\\euro$13,000,000 to address trafficking problems worldwide. Sadly, funding is never enough to solve a global crisis involving over 43 million victims (average to $\\euro$0.3 per victim). In the [U.S.](#ref_062023), legislation combats human trafficking with the **3P's: protect, prosecute, and prevent**. Scholars such as [Dimas et al. (2022)](#ref_analytics) add **partnership** to emphasize the critical importance of collaborations across multiple disciplines with social workers, prosecutors, police, healthcare providers, rehabilitation centres, etc. \n\nAdvanced technologies may shed new lights; data from various meta reviews [(Athreya, 2020](#ref_econ); [Milivojevic et al. 2021)](#ref_tech) show that they have been deployed to:\n- **Prevent and intervene**: educate victims and their family members; intervene smuggling process\n- **Resue**: immediate, time-sensitive rescues *and* recoveries of long-lost abducted victims\n- **Tracking**: identify sources of slavery perpetrators and track their activities\n- **Prosecution**: punish criminals using technologies that lead to successful prosecution \n\n<div style=\"background-color: #EEF; margin: 1em; padding: 1em;\">\nIn this report, we will describe what the Kaggle and the machine learning (ML) communities have learned to <span style=\"color: #44a; font-weight: bold\">advance anti-trafficking technologies along some of these fronts via  competitions, winning solutions, Kaggle datasets and corresponding literature published</span> over the past two years. \n</div>\n\nTo optimally balance between breadth and depth on our explorations of this question, we also\n- ... color-code key observations which we categorize as <span style=\"background-color: #EDD; padding: .2em;\"><strong>NOT</strong> specific to human trafficking</span> versus those <span style=\"background-color: #DED; padding: .2em;\">specific to human trafficking</span> to facilitate two classes of readers, i.e. ML scientists/engineers, and social science researchers, respectively \n- ... compile a list of external resources in the ([Supplementary](#sec_kdsets)),\n- ... provide code snippets for some of the datasets inked in this Kernel notebook, and \n- ... present manually compiled tables of relevant HT datasets archived on Kaggle with usage notes.\n\nWe hope these conscious efforts to provide a warm start for new researchers can invite you to join this emergent mission against inhuman crimes soon. \n\n<a id='toc'><a/> Contents:\n- [Background](#background)\n- [Methods](#methods)\n- [Findings](#res)\n    - [Kaggle competitions & winning solutions to the rescue](#k_winning)\n    - [Kaggle datasets and grey literature](#k_greylit)\n    - [Advances in general ML communities](#cs_applics)\n- [Discussions & Conclusions](#discuss)    \n    - What have we learned?\n    - [Never-ending battle, unless...](#conclusions)\n    - How you and Kaggle matter?\n- [Supplementary data](#suppl)\n    - [Starters code snippets](#ds_kidnap)\n    - [Listing of HT tier ratings by country, WorldFact CIA](#tier)\n    - [Relevant documentaries and books](#did_u_know)\n    - [APA/MLA reminders for fellow participants](#resources)\n\n# S1. Background <a id='background'><a/>\n\n## Overview on operational research and data analytics employed by anti-trafficking communities around the world \n\nDimas et al. [(2022)](#ref_analytics) compiled a list of 140+ articles that employed operational research and data analytics to fight human trafficking. They include each work that: \n- Is in the form of article, thesis, or dissertation\n- Published during 2010 - 2021, inclusive, at the time of their article's publication\n- Involve themes of one or more on: positional commentary, use of analytical, and/or operational research methods \n- Presents application(s) or case study on anti-trafficking efforts\n\nThey then grouped the key themes discussed in these articles into 21 categories, some of which include following computer science subfields and methodologies:\n- Active learning, supervised learning, unsupervised learning/clustering \n- Natural language processing, web scraping\n- Data envelopment analysis, facility location, simulation, game theory \n- Link inference, social network analysis, investigative search\n\n\nIn [a later section](#cs_applics), we present brief introductions to some of these subfields and examples of their anti-trafficking applications.\n \n<!-- div style=\"float: left;\" >\n<a href=\"https://medium.com/@juanchobanano/combating-human-trafficking-using-data-part-2-f745a421a485\"><img src=\"https://miro.medium.com/v2/resize:fit:720/format:webp/1*L4jLcGl2uEfC4i0VAbeWDQ.png\" width=\"800px\" alt=\"Graph by Mr. Juan Cepeda illustrating the criminal networks identified in his network analysis.\" /></a>\n<p>Network analysis illustration by Kaggle user Mr. Juan Cepeda (to be elaborated in <a href=\"#sec_app\">a later section</a>)</p>\n\n\n</div -->","metadata":{"_uuid":"426e455a-2783-442e-b9f7-354f7a75b16b","_cell_guid":"8977511e-0d54-47c1-ba06-154696a1a387","trusted":true}},{"cell_type":"markdown","source":"# S2. Literature review methods \n<a type='anchor' id='methods'><a/>\n    \n## S2a. Extraction of study materials\n\nIn the first phase, we searched for articles on *Research Square* and the *Journal of Anti-Trafficking Review* using the following keywords and Python packages ```urllib``` and ```BeautifulSoup```:\n- Human trafficking\n- Adult trafficking\n- Women trafficking\n- Child trafficking\n- Sex trafficking    \n- Drug trafficking (included in our search due to its interconnection with sexual trafficking in forms of forced coersion and manipulation of living habits)\n        \nIn the second phase, we conducted searches on **arxiv** as well as Kaggle's grey literature (discussion posts, datasets, competitions) using these keywords in addition to those listed above:    \n- Forced labour, exploitation, modern slavery\n- Artificial intelligence, machine learning, data mining\n\nFor some of the data visualizations done in this report, we used the [code snippet hidden above](#sec_kdsets) to analyze the datasets that have been deposited to Kaggle without restriction on time, owing to the large scales of the problem in time and space.\n       \n## S2b. Summary of data sources examined\n    \nWe created a [*Human Trafficking - Lit Search Notebook*](https://www.kaggle.com/code/chungwaitang/humant-litsearch) to search through:    \n- Kaggle's arxiv dataset\n- Meta Kaggle\n- Research Square \n- Research Gate \n- Journal of Anti-Trafficking Review     \n\nGoogle scholar was also used for follow-up analyses.\n\n# S3. Findings \n<a type='anchor' id='findings'><a/>\n\nAs shown in our [*Human Trafficking - Lit Search Notebook*](https://www.kaggle.com/code/chungwaitang/humant-litsearch)...\n- None of the abstracts archived on ```arxiv-metadata-oai-snapshot.json``` had any of above terms in conjunction with ```kaggle```\n- We identified three review articles on *Journal of Anti-Trafficking Review* \n- A Search on the *Research Square* returned <100 article titles that contain the keyword \"Kaggle\". However, none of these pertains to \"human trafficking\" upon checking the contents in their abstracts.\n\nContributions from Kaggle <span style=\"font-weight: bold; color: #A44;\">over the last two years</span> arrive in three forms:\n- Contributions in rescue efforts made through Kaggle research competitions\n- Dissemination of datasets important for development of anti-trafficking solutions\n- Progresses made through Kaggle notebooks and discussion posts \n                                                  \nWe elaborate these next.\n\n# S3a. Advances in rescue efforts \n\n## Visual recognition of hotel rooms <a id=\"sec_hotel\"></a>\n    \nThe most relevant competitions held in Kaggle on anti-trafficking solutions are the <span style=\"font-style: italic; font-weight: bold; color: #4A4;\">Hotel-ID to combat human trafficking</span> competition series held in 2021 and 2022.\n\nOften, victims of sex trafficking were photographed in hotel rooms for promotional purposes [Stylianou et al. (2019)](#ref_hotel50k). These photos were taken at uncommon camera angles in poor lighting scenarios, leading to images of especially low quality. Therefore, the aforementioned Kaggle competitions asked competitors to develop methods that would accurately identify the hotels pictured in these hotel images. The challenge provided a training set $\\mathcal{T}_\\text{challenge}$. To evaluate the submitted solutions, the competition used the mean average precision @ 5 (MAP@5) so that the five most probable hotel names predicted by a given solution will be compared with the groundtruth prediction in a weighted manner.  \n\n\nIn 2021, the winning solution by [Mr. Ozaki](https://ho.lc/) approached this problem with the following strategies:\n1. **Data curation**: trained a classification model using the Hotels50k dataset  ($\\mathcal{T}_\\text{new}$) that would identify the angle needed to correct the rotated views in 4,859 of the 97,554 photos in the training set\n2. **Dataset expansion**: expand $\\mathcal{T}_\\text{challenge}$ by adding a subset of images from $\\mathcal{T}_\\text{new}$ that were similar to those in $\\mathcal{T}_\\text{challenge}$ \n    - Similarity was determined by the nearest neighbour \n3. Label-constrained data augmentation\n1. **Metric learning** and nearest neighbour search. \n\nIn **metric learning**, the similarity between hotel images are learned, rather than relying on a pre-defined similarity measure to compare images. Based on results from his ablation study, Mr. Ozaki concluded that the three convolutional neural networks (CNNs) that he explored (namely, ResNeSt101e, RegNetY120, and Swin Transformer) yielded minimal differences in terms of performance improvements as compared to the use of a carefully curated and expanded training set of hotel images.\n\nIn the 2022 competition, the winning solution by [Mr. Austin](https://www.linkedin.com/in/david-austin-037630123) examined the hotel room images and noted the following observations: \n- Images were occluded by human figures (e.g. the victims being promoted in the ads)\n- Many vertical and horizontal features salient of hotel brands and styles were repeated against backgrounds.\n\nTo address the problem with occlusions, Mr. Austin impainted the occluded image regions via several approaches (use of generative adversarial networks, traditional computer vision inpainting methods) and proposed the *BlendFlip* algorithm whose objective is to maintain the visual cohesion of the recovered hotel images.\n    \n[Back to TOC](#toc)","metadata":{"_uuid":"c9421652-8663-49ca-a75d-a50929e543de","_cell_guid":"59c6246f-0a16-4244-90b1-b998bb5b3d25","trusted":true}},{"cell_type":"markdown","source":"Inspired by Mr. Austin's ideas and those presented by the forth top-winner, US scholars [Lin et al. (2022)](#ref_lin) also employ metric learning but with the additional use of a *triplet loss* to learn image features that will cluster in the feature space if they were extracted from photos taken from the same hotel, or form different clusters with great inter-cluster distances when they were extracted from images of different hotels. They also conducted ablation studies to benchmark different CNNs and conclude that EfficientNet-B5 was superior to ConvNeXt, ResNet50 in terms of MAP@5. For data augmentation, Lin et al. also employ random erasing, random flip, random crop. Using saliency maps to internally validate their results, they found: \n- Textural features from walls, curtains, vanities are important while shapes of furnitures such as beds and televisions are not;\n- Lamps have shapes unique to hotels (and their levels of budget); tables and chairs occasionally have similar effects.\n\n<div  style=\"background-color: #EDD; margin: 1em; padding: 1em;\">\nAs a quick summary, the aforementioned solutions demonstrate the importance of integrating domain-specific knowledge in the model development process. More examples specific to HT are shown in the coming sections.\n</div>\n\n## Visual kinship recognition\n\n<div width=\"300px\" style=\"display: table; float: right; margin: 1em\">\n<img width=\"300px\" src='https://ieeexplore.ieee.org/mediastore_new/IEEE/content/media/9971791/9971808/9972089/9972089-fig-1-source-large.gif'>    \n<p style=\"display: table-caption; caption-side: bottom; color:gray\">Image source: <a href=\"#ref_cyclegan\">Parate et al. (2022)</a>. Illustration of age-progression modeling to assist with recovery of missing people.</p>\n</div>\n\nPhotos of long-lost people due to human trafficking are likely absent in any databases [(Parate et al., 2022)](#ref_cyclegan). To assist in recovery of missing family members, one objectives of kinship visual recognition software is to model visual cues of age-progression to recovery of missing people.\n\nKaggle's <span style=\"font-style: italic; font-weight: bold; color: #4A4;\">Recognizing Faces in the wild</span> competition held in 2019 asked competitors to develop a model that determines if two faces from two photos are biologically related. The winning solution by [Mr. Milio](https://www.kaggle.com/competitions/recognizing-faces-in-the-wild/discussion/103670) involved a model ensemble that combined  models whenever they were somewhat uncorrelated and individual ones achieved a test score above a threshold (chosen to be 0.82). Based on his [experimental results](https://www.kaggle.com/mattemilio/smile-best-who-smile-last), Mr. Milio opted to combine a model variant based on VGGFace and a model variant based on FaceNet.\n\nWhile the second and third runner-ups did not post their solutions on Kaggle, the fourth place winners did and later elaborated their approach in a technical report [(Tian et al., 2022)](#ref_kinship). Noting that no competitors discussed the *Convolution-Free Vision Transformer* (CFVT), [Tian et al. (2022)](#ref_kinship) hypothesized that CFVT also would generate uncorrelated feature representations. In their paper, they pictorially demonstrated their *Siamese CNN* built of two pyramid vision transformers that combine individual models in a quadratic manner. Their preprocessing step employed *multi-task cascaded CNN* for face-detection to ensure that the training data generated will have the same distribution as the [CASIA-Webface data](https://paperswithcode.com/dataset/casia-webface), which was used in their pretraining step.\n\n[Back to TOC](#toc)\n<a id=\"fig_growth\"></a>","metadata":{"_uuid":"f263af73-9e12-4e6e-b9b4-069bac3431dd","_cell_guid":"503a2331-6eaa-4adc-acf4-ac4f55e565b6","trusted":true}},{"cell_type":"code","source":"# =========== Preprocess =========== \ndf = Records.to_pandas() \ndf = df.loc[ df['marker']==2,: ]\ndf['age'] = ( today - df[['CreationDate']] )/ np.timedelta64(1, 'M') \n\ndf['time_index'] = (df['creation_time_index']-200000) \ndf['nViews'] = df['TotalViews']/ ( df['age']+1e-10)\ndf['nvotes'] = df['TotalVotes']/ ( df['age']+1e-10)\ndf['ndownloads'] = df['TotalDownloads']/ ( df['age']+1e-10)\ndf['nkernels'] = df['TotalKernels']/ ( df['age']+1e-10)\ndf['popularity'] = (df['nViews'] + 2*df['nvotes'] + df['ndownloads'] +df['nkernels'] )+10\n\n# =========== Plot =========== \nfig = go.Figure()    \nd1=df.sort_values( 'time_index')\nfig=px.scatter( d1, y='theme_slug', x='time_index', size='ndownloads', \\\n               color='theme', symbol='theme',hover_data=['Title', 'TotalViews','TotalVotes', 'TotalDownloads','TotalKernels', 'Subtitle'] )    \nfig.update_xaxes(tickangle=40, tickvals=[1600,1700,1800,1900,2000,2100,2200,2300], \\\n                 ticktext=['2016', '2017','2018','2019','2020', '2021', '2022', '2023'] )            \n\nshow_viewing_tips( fig )","metadata":{"_uuid":"e5254aa9-4bb8-4649-95ae-a8941433328d","_cell_guid":"6f82b950-cd22-40e5-82af-227a68f9fe1d","_kg_hide-input":true,"execution":{"iopub.status.busy":"2023-09-17T04:50:27.948215Z","iopub.execute_input":"2023-09-17T04:50:27.949400Z","iopub.status.idle":"2023-09-17T04:50:28.125414Z","shell.execute_reply.started":"2023-09-17T04:50:27.949375Z","shell.execute_reply":"2023-09-17T04:50:28.123851Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"     \n# S3b. Dissemination of HT and related datasets & exploratory analyses published in users' notebooks <a id=\"k_greylit\"></a>\n \n<!-- div>\n    <img src=\"https://github.com/tcw1470/HT/assets/138358213/763e50d5-0ef5-4dca-8357-8a5da42d21c6\"/>\n    <p></p>\n</div -->    \n \nFor brevity, we nicknamed the above figure as the \"growth-plot\" which enumerates HT-relevant datasets deposited to Kaggle over the past decade. Readers may  interact with it to query on dataset title and other vanity statistics (i.e. number of views, upvotes, etc.).  \n\nAs alluded to earlier, one could see from the cover figure that the number of datasets deposited was more motivated by objectives and advances towards healthcare (e.g. COVID19) and finance (e.g. fraud) than for HT efforts. Size of the marker denotes the dataset's average monthly downloads as a proxy of \"popularity\" within the Kaggle community. \n\nIn the tables below, we summarize the relevant datasets hosted on Kaggle and then elaborate those that are highly relevant and/ or under-explored. Note that all but the top two rows strictly involve tabular and/ or time-series data and that at least six datasets listed below involve data acquired in 2021 and beyond. \n\n<div style=\"background-color: #EDD; margin: 1em; padding: 1em;\">\nOlder datasets do not necessarily imply their diminished values as analyses and extensions of replicated notebooks are observed long after datasets' release dates. One example we will highlight is the CAVIAR dataset.\n</div>   \n\n\n[Back to TOC](#toc)\n\n\n| Region | Year | Name | Source | High level info  | Discussion posts within/outside of Kaggle platform | Usage notes |\n| :-- | :-- | :-- | :-- | :-- | :-- | :-- |\n| Global | 2019 | [2019 Hotel-ID-50k dataset](https://www.kaggle.com/competitions/hotel-id-2021-fgvc8/data) | See article by [Stylianou et al, (2019)](#ref_hotel50k) |  See Section III-1a | |\n| Global | 2021 | [2021 Hotel-ID dataset](https://www.kaggle.com/competitions/hotel-id-to-combat-human-trafficking-2022-fgvc9/data) | Hotel room images crowd-sourced and uploaded to database through TraffickCam mobile application [(Kamath et al. 2021)](#ref_hotelid) |  See Section III-1a | | \n| Global | Updated annually | [World Factbook by CIA](https://www.kaggle.com/datasets/lucafrance/the-world-factbook-by-cia) | The World Factbook by CIA | Web-data scraped from almanac by Central Intelligence Agency (CIA) | [1 notebook](https://www.kaggle.com/datasets/lucafrance/the-world-factbook-by-cia/code)  |\n| Global | 2020 | [Global Human Trafficking (GHT)](https://www.kaggle.com/datasets/andrewmvd/global-human-trafficking) | Counter-Trafficking Data Collaborative | Data on 50k cases | [3 Kaggle EDA notebooks](https://www.kaggle.com/datasets/andrewmvd/global-human-trafficking/code)| Missingness is indicated as -99 <br>[Blog from Medium.com explored trafficking in- and out- flows](https://vijayasriiyer.medium.com/understanding-human-trafficking-with-data-2860f6aa10ac) |\n| Global | 2018 | [Modern slavery](https://www.kaggle.com/datasets/milan400/modern-slvery-final) | General Intelligence Service (GIS) report | CSV summary data compiled  | [GIS geospatial visualization app](https://storymaps.arcgis.com/stories/45b740c6a7e440e98817a614ce9e4841)|\n| Europe | 2018 |  [Detecting individuals at risk using semi-supervised learning](https://www.kaggle.com/datasets/panoskostakos/online-sex-work) | [2018 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining conference](https://asonam.cpsc.ucalgary.ca/2018/) | Covert online ethnography data with 18 attributes and 1,048,575 samples web-scraped from European online adult forums  | [EDA notebook after data-cleansing](https://www.kaggle.com/code/quannguyen135/who-is-at-risk-online-eda-with-python)  | Starter's code in [Supplementary](#ds_online_sex) |\n| UK | 2013-2016 | [UK human trafficking (UKHT) ](https://www.kaggle.com/datasets/algosforgood/uk-human-trafficking-data) |  UK  National Crime Agency (NCA) | Reports from NCA website  | [Notebook visualizing the reported incidents over time](https://www.kaggle.com/code/paultimothymooney/sample-submission-for-january-s-featured-task) |\n| India | 2018-2020 |  [Human Trafficking In India (HTI)](https://www.kaggle.com/datasets/cshefali/human-trafficking-in-india-2018-2020) |  [National Crime Records Bureau of India ](https://ncrb.gov.in/en/node/3454)| Aggregate data such as number of human trafficking cases reported per year per State/Union Territories in India as well as victims' ethnicities | [Kaggle user's analyses in R](https://www.kaggle.com/code/cshefali/india-human-trafficking-analysis-2018-2020) | |\n| Nepal | 2018-2019 | [CID NEPAL 2076 and World Slavery](https://www.kaggle.com/datasets/milan400/cid-nepal-2076-final) | CID magazine 2076 | Fiscal year 2018-2019  | Follow-up by [Kaggle user's preliminary analysis on counts of traffick incidents by month in Nepal](https://www.kaggle.com/code/milan400/world-slavery-and-nepal-trafficking-analysis)|  \n \n[Back to TOC](#toc)\n\n## General crime datasets \n\n| Country of source  | Year | Name | Source | High level info  | Discussion posts within/outside of Kaggle platform | Usage notes |\n| :-- | :-- | :-- | :-- | :-- | :-- | :-- |\n| Canada | 1994-1996 | [Time-varying criminal network](https://www.kaggle.com/datasets/chiragtagadiya/caviar) | CAVIAR investigations from 1994 to 1996 | Matrices describing graph connectivities over different time frames collected during the investigation | [EDA by Kaggle user](https://www.kaggle.com/code/chiragtagadiya/drug-criminal-network-eda-time-varying-network)|\n| US | 2014-2017 | [FBI human trafficking Database](https://www.kaggle.com/datasets/larsen0966/human-trafficking-fbi-data)| Federal Bureau of Investigation |  Data from crime reports  | [An exploratory analysis notebook](https://www.kaggle.com/code/larsen0966/is-human-trafficking-really-a-problem) |  Data records offenses and arrests that may not be \"interpreted as definitive statement of human trafficking\" |\n| US | N/A | [T-Visa Dataset](https://www.kaggle.com/datasets/kehanwang1998/tvisa-dataset) | [US Citizenship & Immigration](https://www.uscis.gov/) | $n$=188 | - As shown in the [Supplementary](#ds_tvisa) code, a quick examination of the [T-Visa Application dataset](#ds_tvisa) reveals that 93.6% of applications were filed by victims of human trafficking.<br>- Not been explored by other Kaggle users<br>-[Linked in the Supplementary](#ds_tvisa)  |\n| US | 2017 | [Denver Crime Data](https://www.kaggle.com/datasets/paultimothymooney/denver-crime-data) | National Incident Based Reporting System  | Data from crime reports  | - Dynamically updated  ~~annually~~ monthly such that corrections may be made in subsequent version(s) <br>- [Shinny app](https://dhallsk8.shinyapps.io/denver-crime-data_appTest7/) promoted by a Kaggle user | \n| US  |  2019 - 2021 | Georgia crime  | [Georgia's Uniform crime reporting program](https://gbi.georgia.gov/services/crime-statistics)| \"penal, prosecutive, arrest, offense and conviction data\" [ibid] | |    \n| US  | 2003-2015 | San Francisco  Crime Classification | San Francisco OpenData | Data from crime reports  | - Classification of criminal activities such as prostitution, sex offenses, pornography, kidnapping, missing person, etc. <br>- [Tableau dashboard promoted by a Kaggle user](https://public.tableau.com/app/profile/jaysha101/viz/CRIMEINSANFRANCISCO/SFCrimeDashboard) |\n| India | 2021 | [Crime in India](https://www.kaggle.com/datasets/rajanand/crime-in-india)| Updated by community user in 2017 | \"state-wise data\" [ibid] |  [Example notebook](https://www.kaggle.com/code/udayanguha/eda-in-crime-of-rape-in-india) | Authenticity of this dataset has been questioned by a [Kaggle user](https://www.kaggle.com/datasets/rajanand/crime-in-india/discussion/383361?sort=votes&select=20_Victims_of_rape.csv) | \n\n[Back to TOC](#toc)\n\n## Other datasets \n| Nature | Year | Name | Source | Discussion posts within/outside of Kaggle platform | Usage notes |\n| :-- | :-- | :-- | :-- | :-- | :-- |\n| Global | 2018-2022 | Human Freedom Index | [Vasquez et al. 2022](#ref_freedom) | Annual reports | Not been explored by other Kaggle users| Includes women-specific attributes |\n| Global | 2019 | [Elliptic Data Set](https://www.kaggle.com/datasets/ellipticco/elliptic-data-set) | Bitcoin Transaction Graph  | [Weber et al.](ref_bitcoin) | \"graph is made of 203,769 nodes and 234,355 edges. Two percent (4,545) of the nodes are labelled ```class1``` for illicit; 21% (42,019) are labelled ```class2``` (licit).\"  |\n| Global | 2020 | [Violence against women and girls](https://www.kaggle.com/datasets/andrewmvd/violence-against-women-and-girls) | [Demographic and Health Surveys nationally-representative household surveys](https://dhsprogram.com/methodology/Survey-Types/DHS.cfm) | Household surveys | [Dash dashboard web-app by a Kaggle user](https://github.com/LukeAC/vio-agnst-wmn-dash) |\n| Global | 2014-2021 | [IMO Missing Migrants Project](https://www.kaggle.com/datasets/snocco/missing-migrants-project) | [International Organization for Migration](https://www.iom.int/about-iom) | Please see starter's code in the Supplementary | - [7 notebooks from first release](https://www.kaggle.com/datasets/snocco/missing-migrants-project/code) <br> Based on EDA, [one Kaggle notebook](https://www.kaggle.com/code/emreusta7/grief-routes) concludes \"US-Mexico Border is the deadliest place for refugees while North Africa take the second place. Total loss of life hit the peek in 2015 while most of the death were cause by drowning.\"| Dataset was discussed by [Pham and Komiyama (2022)](#ref_missing_migrants)|\n| Canada | 2019 | [Canadian sexual advertisements](https://www.kaggle.com/datasets/juanchobanano/canadian-sexual-advertisements) | Chain Breaker, a cloud-based tool that extracts, stores, analyzs web data related to advertisement of sexual services | 3,463 ads |  [Kaggle blogger narrates how he uses cloud-based data-scraping and machine learning to combat trafficking](https://medium.com/mlearning-ai/combating-human-trafficking-using-data-part-1-103e4682e488)  |\n| Pakistan | N/A | [Kidnapping dataset](https://www.kaggle.com/datasets/nomanislam/kidnappingdatset) | Associate Professor at Karachi University, Pakistan |  Related article by [Lolayekar et al. (2022)](#ref_women) | Inquiry may be needed to obtain meta information|\n| Russia | 1980-1996 | [Early Russian news on drug addiction](https://www.kaggle.com/datasets/dadalyndell/early-russian-news-articles-on-drug-addiction)| Kaggle user | News and other publications that mentioned illegal drugs and drug-users; posted in March 2023  |  Not been explored by other Kaggle users |\n| Russia | 2014-2021 | [Missing People in Russia](https://www.kaggle.com/datasets/miniushkin/missing-people-in-russia) (MPR) | Ministry of Internal Affairs of the Russian Federation (link not accessible in North America) | Official data on \"missing and wanted people, identified and unindentified corpses\" | [Kaggle Notebook](https://www.kaggle.com/code/miniushkin/how-to-read-data-on-missing-people-in-russia) translates some columns from Russian to English | As shown in [Supplementary](#sec_russia), this dataset reflects number of unidentified corpses and missing people in Russia |\n| ***Synthetic*** | | [IBM Transactions for Anti Money Laundering (AML)](https://www.kaggle.com/datasets/ealtman2019/ibm-transactions-for-anti-money-laundering-aml) | Synthetic data mimicking  criminal financial transactions  | | \n\n[Back to TOC](#toc)","metadata":{"_uuid":"3d4c38ca-75cc-4002-8d81-dd8ed112ac6e","_cell_guid":"d4cfec1b-65b4-4116-a9ee-b9e35d363c9b","trusted":true}},{"cell_type":"markdown","source":"\n## Observations from the Global Human Trafficking (GHT) dataset <a id=\"ds_ght\"></a>\n\nThe GHT dataset deposited by the *Counter-Trafficking Data Collaborative* (CTDC) is the world's first data portal on human trafficking. CTDC suggests that the dataset could be used to conduct exploratory analysis to help understand the demographics of the victims. The time series data in the GHT dataset may also be used to build models that can predict and/or identify trafficking activities. \n\nPreliminary exploratory analyses by [Ms. Satvik (2023)](https://www.kaggle.com/code/satvik7/time-series-forecasting-using-arima-model), a student from India, reveal that a majority of victims archived in this database came from Philippines, Ukraine, and Republic of Moldova. \n\n<!-- div style=\"display: table;\">\n    As shown on the right figure below, data entries peaked at 2016 due to the integration of data from the Philippines that year (figures below were borrowed from Satvik's notebook). \n<img style=\"float: left; width: 40%; align: top\" src='https://github.com/tcw1470/HT/assets/138358213/8e477c37-0322-433c-b22d-b1b3365b316e' />\n<img style=\"float: left; width: 40%; align: top\" src='https://github.com/tcw1470/HT/assets/138358213/4aef129a-1821-4320-9950-dd4cc5e7f2cb' />\n</div -->\n\nAnother user [Mr. Polevoi](https://www.kaggle.com/code/viktorpolevoi/global-human-trafficking-eda) employed interactive graphs to examine age and gender of the victims. The means of control experienced by a majority of female victims were dominated by psychological abuse, physical abuse, threats, psychoactive substances, and restricted movements. Extending code by Mr. Polevoi will generate below figure which shows that male victims also reported similar means of control but with lower incidence rates than those of females. \n\nOur interpretations based on his EDA include:\n\n<div style=\"background-color: #DED; margin: 0em; padding: 0.01em;\">\n    <ul>\n    <li>There were no gender differences for other types of abuses such as withholding (important) documents, false promises, etc. </li>\n    <li>A majority of the victims (>15.3k) recorded in this database was of female gender who reported sexual exploitation. </li>\n    <li>The sexual exploits were predominantly distributed to prostitution (95.6%), with 3.4% to pornography and 1% to private sexual service locations. </li>\n    <li>There were no significant differences in gender in forced labour. </li>\n    <li>Predators of the female victims were intimate partners, family members, and friends, as shown in the Figure entitled <em>Victim-Predator Relationship</em></li>    \n    </ul>\n</div>\n\n[Back to TOC](#toc)","metadata":{"_uuid":"7258be27-31dc-475a-a682-2de4e8b61cfa","_cell_guid":"1570cabc-9bf7-491f-95b6-edde32e9e0b1","trusted":true}},{"cell_type":"code","source":"ght_df['meansOfControlConcatenated'] = ght_df['meansOfControlConcatenated'].str.replace('Abuse', 'abuse', regex=True)\ndata_bar_f = ght_df[(ght_df.meansOfControlConcatenated.notna()) & (ght_df.gender == 'Female')].meansOfControlConcatenated.apply(lambda x: pd.value_counts(str(x).split(\";\"))).sum(axis = 0)\ndata_bar_m = ght_df[(ght_df.meansOfControlConcatenated.notna()) & (ght_df.gender == 'Male')].meansOfControlConcatenated.apply(lambda x: pd.value_counts(str(x).split(\";\"))).sum(axis = 0)\n\nfrom plotly.subplots import make_subplots\n\nfig = make_subplots(rows=1, cols=2)\n\nfig.add_trace( go.Bar(name='Female', x=data_bar_f.index, y=data_bar_f), row=1, col=1)\nfig.add_trace( go.Bar(name='Male',   x=data_bar_m.index, y=data_bar_m), row=1, col=1)\nfig.update_traces(texttemplate='%{value}', textposition='outside')\n\ndata_bar_f = ght_df[(ght_df.RecruiterRelationship.notna()) & (ght_df.gender == 'Female')].RecruiterRelationship.apply(lambda x: pd.value_counts(str(x).split(\"; \"))).sum(axis = 0)\ndata_bar_m = ght_df[(ght_df.RecruiterRelationship.notna()) & (ght_df.gender == 'Male')].RecruiterRelationship.apply(lambda x: pd.value_counts(str(x).split(\"; \"))).sum(axis = 0)\n\nfig.add_trace( go.Bar(name='Female', x=data_bar_f.index, y=data_bar_f), row=1, col=2) \nfig.add_trace( go.Bar(name='Male',   x=data_bar_m.index, y=data_bar_m), row=1, col=2)\n\nfig.update_traces(texttemplate='%{value}', textposition='outside')\nfig.update_layout(title_text='Figures on Means of Control (left) & Victim-Predator Relationship (right)')\nfig.show()\n\ndf=pd.DataFrame( { 'f':data_bar_f/data_bar_f.sum()*100, 'm':data_bar_m/data_bar_m.sum()*100 })\nfig=px.bar(df)","metadata":{"_uuid":"67778bb3-467f-4edf-bc37-90322c9801dd","_cell_guid":"46866c25-06b5-4075-aa8e-25df7a570965","_kg_hide-input":true,"execution":{"iopub.status.busy":"2023-09-17T04:50:28.127404Z","iopub.execute_input":"2023-09-17T04:50:28.127790Z","iopub.status.idle":"2023-09-17T04:50:44.485996Z","shell.execute_reply.started":"2023-09-17T04:50:28.127758Z","shell.execute_reply":"2023-09-17T04:50:44.484389Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Our follow-up on the UK human trafficking (UKHT) dataset <a id=\"ds_ukht\"></a>\n\nIn the *hidden* code snippet below, we further conducted exploratory data analysis (EDA) on the UKHT dataset and observed the following: \n<div style=\"background-color: #DED; margin: 0em; padding: 0.01em;\">\n<ul>\n    <li>Few instances of organ harvesting have been recorded for a number of years in UK</li>\n    <li>Victims include minors </li>\n<li>Exploitations of all forms have been rising since 2014</li>\n<li>The rise in labour exploitation appears to be the most dramatic as the figure below shows.</li>\n</div>    \n\n [Back to TOC](#toc)","metadata":{"_uuid":"068b91d4-5fd6-4d3c-b036-051e1feaa038","_cell_guid":"3b75395d-f4ca-4515-87c4-ca9e4a087f8d","trusted":true}},{"cell_type":"code","source":"# UK trafficking dataset\nuk_2013 = pd.read_csv('/kaggle/input/uk-human-trafficking-data/2013_exploitation_type.csv')\nuk_2014 = pd.read_csv('/kaggle/input/uk-human-trafficking-data/2014_exploitation_type.csv')\nuk_2015 = pd.read_csv('/kaggle/input/uk-human-trafficking-data/2015_exploitation_type.csv')\nuk_2016 = pd.read_csv('/kaggle/input/uk-human-trafficking-data/2016_exploitation_type.csv')\nuk_2016.rename( columns={'Claimed Exploitation Type':'Claimed exploitation Type'} , inplace=True)\nuk_2016.rename( columns={'Trans- gender':'Transgender'} , inplace=True)\nuk_2015.rename( columns={'Transsexual':'Transgender'} , inplace=True)\n\nuk_2013['Year']=2013\nuk_2014['Year']=2014\nuk_2015['Year']=2015\nuk_2016['Year']=2016\nuk_df=pd.concat( [uk_2013.loc[:9,:],uk_2014.loc[:10,:],uk_2015.loc[:10,:],uk_2016.loc[:9,:] ] )\nfig = px.box( uk_df, y=['Female','Male'], color='Year', x='Claimed exploitation Type' )\nfig.update_layout(title_text='HT incidents reported in UK during 2013-2016')","metadata":{"_uuid":"ff9e6643-2d1c-4c5a-8c51-89df5365e545","_cell_guid":"735eb822-35be-430d-a3fc-e6c2e0b99984","_kg_hide-input":true,"execution":{"iopub.status.busy":"2023-09-17T04:50:44.487236Z","iopub.execute_input":"2023-09-17T04:50:44.487536Z","iopub.status.idle":"2023-09-17T04:50:44.591516Z","shell.execute_reply.started":"2023-09-17T04:50:44.487513Z","shell.execute_reply":"2023-09-17T04:50:44.590595Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Observations from the Human Trafficking in India (HTI) dataset <a id=\"ds_india\"></a>\n   \n<div style=\"float: right; padding: 2em\">   \n<img src=\"https://upload.wikimedia.org/wikipedia/en/a/ac/The_Price_of_Free_poster.jpg\" />    \n<p>Documentary film on human trafficking in India\n</p>\n</div>    \n    \nKaggle expert [Shefali C.](https://www.kaggle.com/code/cshefali/india-human-trafficking-analysis-2018-2020/notebook) was moved by [documentary *The Price of Free*](https://www.youtube.com/watch?v=UsqKz1hd_CY). After being inspired by Kailash Satyarthi (Nobel Peace Laureate) and his team's fight against child trafficking in India, Shefali compiled and posted a number of [Excel files](https://www.kaggle.com/datasets/cshefali/human-trafficking-in-india-2018-2020) which we briefly summarize as follows:\n- ```Charge Sheet``` records complaint    \n- ```Final report``` records conclusion made by police after their investigation   \n   \nHis data analyses reveal:\n<div style=\"background-color: #DED; margin: 0em; padding: 0.01em;\">\n<ul>\n<li> A majority of female victims originated from Andra Pradesh, Assam, Maharashtra, Telangana, Jharkhand and the union territory of Delhi.</li>\n<li> A majority of male victims were originated from Bihar and Rajasthan. </li>\n<li> A majority of foreign victims came from Nepal, the neighbouring country, with a portion from Bangladesh </li>\n<li> The data is exemplary of the A-M-P model of trafficking:\n    <ul>\n    <li> Prostitution is the major outlets of trafficking in Maharashtra, Telangana, Andra Pradesh</li>\n    <li> Forced Labour is often sourced from Union Territoty of Delhi and states of Chattisgarh and Telangana</li>\n    <li> Child pornography is often sourced from Karnataka </li>\n    </ul>    \n</li>    \n</ul>\n</div>    \n\nIn generating the figure below, we wrote new Python code for direct data imports from the website of the *National Crime Records Bureau of India* and show a heatmap to visualize the counts over time at different states of India. Unfortunately, according to the US Department of State, officials in India did not record victim testimonies during the pandemic. Hence, the below heatmap generated with their published statistics may give us the wrong impression of decline in trafficking cases. Future researchers may wish to examine unofficial report entitled *Crime in India - 2021 snapsnots* [(p.1)](https://ncrb.gov.in/sites/default/files/CII-2021/CII%202021%20CITIES%20SNAPSHOTS.pdf) and other high-level reports archived at [ncrb.gov.in](https://ncrb.gov.in).\n\n[Back to TOC](#toc)","metadata":{"_uuid":"7b454079-b44f-47e5-b0e6-70bc4391697a","_cell_guid":"26006aa8-8785-4f3e-91d8-c35943936fac","trusted":true}},{"cell_type":"code","source":"# PDF https://ncrb.gov.in/sites/default/files/crime_in_india_table_additional_table_chapter_reports/Table%2014.1_6.pdf\ntry:\n    indian_df= pd.read_excel('https://ncrb.gov.in/sites/default/files/Table%2014.1.xlsx')\n\n    columns = indian_df.columns \n\n    for j,c in enumerate(columns):\n        df=indian_df[ c]    \n        if j==1:\n            state_names = df.values\n            state_names = np.array(state_names ) \n            q =np.where(state_names == 'West Bengal' )[0][0]+1\n            #print( state_names[5:q])#state_names[5:q] )        \n            state_names = state_names[5:q]    \n        p=[1 if i==2018 else 0 for i in df.values]        \n        if np.sum(p):\n            data2018=df.values\n        p=[1 if i==2019 else 0 for i in df.values]        \n        if np.sum(p):\n            data2019=df.values        \n        p=[1 if i==2020 else 0 for i in df.values]        \n        if np.sum(p):\n            data2020=df.values        \n\n    data=np.vstack((  data2018[5:q] , data2019[5:q], data2020[5:q], ))\n\n    i = np.argsort(data[0,:])\n    data = data[:,i]\n    df = pd.DataFrame( data*1., columns = state_names[i],  index=[ 2018,2019,2020] )\n\n    # sns.barplot( df, orient='h' ) \n    fig = px.imshow(df, y=['2018','2019','2020'], origin='upper', title='Relative severities in different states in India using the HTI dataset (2018-2020)',  text_auto=True, )\n    fig.update(layout_coloraxis_showscale=False,)\n    fig.show()\nexcept Exception as e:\n    print(e)  # URL no longer accessible by 2024-04-18","metadata":{"_uuid":"34a79666-0495-4caf-897e-70fe4c6ecbf2","_cell_guid":"7f0f789e-4161-45a0-acc5-8590e9d665ab","_kg_hide-input":true,"execution":{"iopub.status.busy":"2023-09-17T04:50:44.593023Z","iopub.execute_input":"2023-09-17T04:50:44.593346Z","iopub.status.idle":"2023-09-17T04:50:48.530321Z","shell.execute_reply.started":"2023-09-17T04:50:44.593315Z","shell.execute_reply":"2023-09-17T04:50:48.528588Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Observations from criminal network dataset  <a id=\"ds_caviar\"></a>\n\nSocial network analyses allow researchers to mine for hidden criminal connections by studying and tracking the complex relationships between different members of a network.\n\nWhile this subfield has been explored by numerous scholars (see [later section](#sec_network)), this subfield has emerged only in recent Kaggle discussions:\n- In 2021, [a Kaggle User](https://www.kaggle.com/datasets/chiragtagadiya/caviar) posted crime network data and demonstrated how the evolution of crime networks could be visualized and examined with graph-based methods. \n- Future researchers are encouraged to follow-up the set of research questions raised by [another Kaggle user (2023)](https://www.kaggle.com/discussions/getting-started/383162) on international crime networks.\n\n<div style=\"background-color: #EDD; margin: 1em; padding: 1em;\">\nA classic Kaggle example to bring home is the <span style=\"color: #A44;font-weight: bold\">*CAVIAR investigation*</span>, whose mandate was \"to seize the drugs without arresting the perpetrator\" in order to collect data on communication exchanges among members of a Canada-based international drug trafficking gang ring. This dataset has been uploaded to Kaggle as listed in the above table for users to learn on graph-based analyses as illustrated by <a href=\"https://www.kaggle.com/code/chiragtagadiya/drug-criminal-network-eda-time-varying-network\">a Kaggle user</a>.\n</div>    \n    \n[Back to TOC](#toc)","metadata":{"_uuid":"6f86deb3-a4f0-415e-ac33-5d3d9f3e9722","_cell_guid":"5d0ab707-c1e2-489c-ac3f-269a66bd317e","trusted":true}},{"cell_type":"markdown","source":"# S4. Advances from the ML communities and their recent anti-HT applications<a id='cs_applics'></a>\n\n## Quick refresher\nAs highlighted in the [background](#background), Dimas et al. [(2022)](#ref_analytics) compiled a list of 140+ articles that employed operational research and data analytics to fight human trafficking. Because their meta-review  did not provide contexts on these categories, let us review them before we present their latest applications:\n- **Data envelope analysis** (DEA) is a nonparametric analytical method often used in economics for the assessment of \"best-practices\" that has previously been employed by a Kaggle [winning team](https://www.kaggle.com/code/katemelianova/cdp-a-path-to-efficient-and-sustainable-growth/report). It assesses the performance of units within an entity, or across organizations. \n- **Link inferences** to uncover criminal activities: \n    - Deceptive (non-sex) recruitment offers found on CraigsList.com, SpaStaff.com, Indeed.com often promote job postings looking for non-sex types of skills\n    - Deceptive recruitment offers and commercial sex sale advertisements that are linked to the same enterprise signifies a potential trafficking organization. \n- **Simulation** include mathematical modeling techniques that offer *what-if* scenarios to guide the policing-makers; example models include *discrete-event*, *agent-based* simulations. To detect existing spatiotemporal patterns and predict future behaviour (e.g. target locations), [Keskin et al. (2021)](#ref_simulation) used **network simulation** to construct a directed graph that links individual advertisement posts and then perform simulations of random walks on the graph to predict future target locations (of victims).\n- **Game theory** use mathematical modeling to answer policy questions. For instance, [Gerry et al. (2019)](#ref_gametheory) studied legal liabilities of victims who commit crime and the current legal consequences implemented under the *United Nations Trafficking Protocol* and then contrasted with those in the United Kingdom and Australia. Using game theory models, they attempt to prove why specific legal frameworks *and* policy considerations are necessary to achieve non-liability for criminal victims. \n- **Active learning** refers to a form of machine learning that interactively queries a human user (or oracle/ teacher) to label new data samples. It is often used to label large corpuses that are initially unlabelled as illustrated in an application to be described below [(Ramchandani et al., 2021)](#ref_activelearn). \n \n# S4a. Prevention and intervention <a id=\"sec_prevent\"></a>\n\nAccording to [Dimas et al. 2021](#ref_envelop), Nepal is considered a major \"source country\" (a barplot derived from sample data found in a 2018 magazine article by a Kaggle user can be found in the [Supplementary](#ds_nepal) for starters). As in many developing countries, most of the Nepali victims are women and children who not only suffer gender inequality but also extreme poverty. They were often lured with false promises of better jobs, false marriage proposals, or were threatened by indebted families that their children would be sold otherwise.\n\n- Identifying which units are most efficient than the rest will help end-users form standardized practices that are most efficient in identifying vulnerable victims. Accordingly, [Dimas et al. 2023](#ref_dea) used DEA to analyze data collected at the border stations of an organization called *Love Justice International* in Nepal that is engaged in a trafficking intervention known as *transit-monitoring*, which aims to identify and intervene potential cases of human trafficking as victims transit through border stations. \n- In a nutshell, their DEA employs *linear programming* to score the efficiencies of stations in such a way that each of the identified inefficient units has been outperformed by combination(s) of the most efficient units.\n\nTo disrupt sexual exploitations of trafficked victims, an organization called *Seattle Against Slavery* (SAS) use data mining methods on social media data to build profiles of pimps and their clients to achieve some of their missions:\n- Potential sex-buyers are identified and redirected to web pages that detail the legal consequences of online sex purchases\n- Insights on the patterns of buyers and victims are tracked and mined \n- To identify sources of trafficking, SAS has also deployed conversational chatbots disguised as underage females to faciliate legal actions taht may help with prosecution.\n\n[Back to TOC](#toc)","metadata":{"_uuid":"f8b0c0ea-6c8c-4433-a00a-b4d2d0f0190a","_cell_guid":"dd7127fe-b901-4ad0-8da2-72edec367740","trusted":true}},{"cell_type":"markdown","source":"# S4b. Identify, monitor, prosecute traffickers <a id=\"sec_prosecute\"></a>\n\nUnderstanding the **supply chain** (i.e. source of recruitment of victims and buyers of trafficked sex) of trafficking improves coordination of efforts. In doing so, [Ramchandani et al. (2021)](#ref_activelearn) extracted 13,568,130 posts from commercial sex websites to study where and how sex workers recruitment occurred. They trained a deep neural network to unmask deceptive posts that businesses promote for modelling jobs but sell sex, for instance. \n- Some of the **natural language processing** methods they used:\n\t- Vocabularies such as 'commission', 'audition', 'high pay', 'airfare travel', 'scout' provide domain-specific word contexts; **word2vec** is used to build **word embeddings** of 100 dimensions to encode how frequently pairs of words co-occur\n- To create a training data set, domain-specific human experts had to manually read each unstructured job post, which is a laborious process. Labeling all posts in their corpus was infeasible and labeling a random subset is suboptimal because 99.4% is estimated to be *non-deceptive*. \n\t- To overcome this challenge, **active learning** is used whereby initial classification of posts provide an uncertainty score for each of the preliminary labelings. Their active learning framework then employs two additional metrics to prioritize the labelling of posts from geographically diverse locations and those that promote the discovery of new deception tactics. \n- They reported that mere use of experts' vocabularies identified three types of recruitment tactics while their framework identified 27 tactics.    \n\n\n<div style=\"float: right; padding: 1em;\" >\n<div style='clear: both; border:1px solid #222;'>\n    <a href=\"https://medium.com/@juanchobanano/combating-human-trafficking-using-data-part-2-f745a421a485\">\n     <img  src=\"https://miro.medium.com/v2/resize:fit:720/format:webp/1*SnvOgnjLElnLVo-h62ENUg.png\" width=\"300px\" alt=\"Example from Mr. Juan showing word tokens that are symptomatic of sex trafficking outlets\" /></a>\n</div>\n<div style='clear: both;'>\n    <a href=\"https://medium.com/@juanchobanano/combating-human-trafficking-using-data-part-2-f745a421a485\">\n    <img src=\"https://miro.medium.com/v2/resize:fit:720/format:webp/1*L4jLcGl2uEfC4i0VAbeWDQ.png\" width=\"300px\" alt=\"Graph by Mr. Juan Cepeda illustrating the criminal networks identified in his network analysis.\" /></a>\n    </div>\n</div>\n\n\n\n<a id=\"sec_app\"></a>\nRecently, a computer science student from Columbia named [Mr. Cepeda (2022)](https://www.kaggle.com/code/juanchobanano/canadian-ads-feature-engineering-part-1) also introduced to the Kaggle community the concept of a web-based tool that uses web technologies (e.g. Neo4j, MySQL) to extract, store, and analyze data found on Canadian escort websites. The top image on the right shows examples of data extracted while the bottom image illustrates his network analysis results (blue dots denote geographical regions, purple dots denotes the source of web advertisements, orange dots denotes phone numbers). \n\nHis three-part blog series present domain-specific **feature engineering** on textual data as follows: \n- Traffickers promote as third-party job offers and hence the use of third person pronouns: \"she\", \"hers\", etc.;\n- Word tokens ads used to indicate offer of unprotected sex, e.g. \"without condom\";\n- Employs **bigram window** so that search patterns like \"hot asian chicks\" and \"hot chicks\" will both be recalled. \n\nTo enable the replication and extension of his analyses, he also shares in his post the keywords suggested by domain experts [Stop the Traffik (2022)](#ref_stoptraffik) which we mirror below for readers to use in the future:\n\n\n```\nkeywords_StopTraffik22 = [\"new in town\", \"new girl\", \"came to the town\", \"out off town\", \n               \"few days\",  \"back to town\", \"out of town\", \"in your town\", \n               \"for a few days\", \"back in town\",  \"only stay for a few\", \"new arrived\", \n               \"just arrived\", \"new here\", \"new to this\",  \"new agency\", \"new in town\", \n               \"new to your city\", \"i'm new\", \"i am new\", \"brand new\",  \"little new\",\n               \"very new\", \"look new\", \"short-term\", \"new to the area\", \"new to the industry\", \n               \"new in the business\", \"new face\", \"short time\", \"in town for\", \"new to town\", \n               \"short stay\", \"short term\", \"short time\", \"short period\", \"arrived in town\", \n               \"arrived short term\", \"for a limited time\", \"newly arrived\", \"passing through\", \n               \"on vacation\", \"in town for a few days\", \"i am a newb\", \"i am a newbie\", \"first time to\", \n               \"first time in\", \"first time here\", \"first time visiting\", \"new in the field\",\n               \"just turned 18\", \"turned 18\", \"hot teen\"]\n\n```\n\nWe briefly highlight the multimodal dataset called [Trafficking-10k](#ref_10k) that others may explore and end this section with example predictive tasks most relevant to law enforcement and  prosecution: <a id=\"sec_network\"></a>\n- Noting that court records may be used as proxy for human trafficking data, [Gholizadehy et al. (2020)](#ref_predict_ht) employed a random forest classifier to predict the likelihood of trafficking incidents\n\n- The CAVIR dataset mentioned in previous section has also been employed by [Masias et al. (2016)](#ref_caviar) to predict criminal trials verdict outcomes. Their results suggest that network measures known as *out-flow centrality* (OFC) and *effective network size* (ENS) were most predictive of the verdict outcomes when deployed under a random forest classifier. They explained that OFC reflected how often the higher-ups gave orders to their junior members, while ENS reflected how the higher-ups distributed earnings to other members in the ring. \n\n- [Ahmed et al. (2022)](#ref_ahmed) demonstrated how data from human trafficking and drug trafficking incidents are related and how this data could be used to predict the likelihood of human trafficking incidents occurring within a 7-day window for different countries.\n\n[Back to TOC](#toc)\n\n# S4c. Rescue efforts \n\nNon-government profits such as the Global Emancipation Network (GEN) have been formed to track victims and identify patterns of their migrations. To track victims in-transit to traffickers' destinations, approaches based on computer vision methods include:\n- [Mukherjee et al. (2021)](#ref_school) identify uniformed children during the first 72 hours of their captures\n    - They created a training set of 2000 images with the help of human volunteers recruited from GEN\n    - Faces of children in their training set was then masked out \n    - They built two modules:\n        - The first module detect presence of uniformsdetect presence of uniforms; it operates by feeding outputs of a *VGG16 network* pretrained on ImageNet to a *fully connected network* that would perform binary classification\n        - The second module tries to describe the uniform with attributes that will help GEN volunteers and end-users to identify names of victims' schools \n- As introduced earlier, **visual kinship recognition** softwares are being developed to identify long-time survivors of trafficked children; relevant opensource datasets outside of Kaggle include: \n    - [KinFaceW-II](https://www.kinfacew.com/datasets.html) comprised of 200 pairs for 4 types of kinships\n    - [Families in the Wild](https://web.northeastern.edu/smilelab/fiw/) comprised of 11,932 natural family photos from 1,000 families categorized into 11 relationships\n        \n        \nWe end this section with a quick tour of mobile applications on the rescue front.     \n\nIn a doctoral dissertation, [Graham (2023)](#ref_dark) presents the concept of *Dark Net*, which is an \"untraceable\" cyberspace of hidden (criminal) networks and compares online platforms that use artificial intelligence (AI) methods to mine the hidden parts of the Dark Net to aid law enforcement authorities to better discover, understand, and monitor hidden criminal networks. \n\nHer thesis also enumerates how different AI-based algorithms and mobile applications are fighting HT; her examples include:\n- *Traffick Jam* has been used to find advertisements based on cellular phone numbesr and has successfully assited over 600 criminal cases of human trafficking.\n- *InfoShield*, developed by McGill University and Carnegie Mellon University, is an algorithm that was shown to be capable of identifying 85% of HT advertisements \n- *XIX* distinguishes people in blurry images, mirrors, and security camera footages and can be used to tag objects as license plate numbers to help find victims and their traffickers\n- *Spolight*, one of the largest platforms developed by Thorn and cofounded by celebrities (Ashton Kutcher and Demi Moore) in 2012, assists data sharing aimed at recovering victims. \n\nUsing reports from government website (namely, *Trafficking in Persons*) and quantitative-comparative analysis methods, Graham analyzed the *effectiveness* (and other attributes) of these platforms and concluded that *Spotlight* was the only platform that could be observed to have improved effectiveness over an observation period (2016-2021). \n\nOne explaination of this phenomenon is that developers of *Traffick Cam* have shifted research efforts towards the successful *Hotels50K* project. This hints that limited economical support would render any meaningful cause futile due to the scale of this prolem, in addition to the problem with unequal distribution of experts serving the public good and those serving criminal organizations, as well as the general unequal distribution of wealth in society that contributes to trafficking incidents as can be further elaborated by criminologists [(Chaney et al., 2023)](#ref_hiddenfig).\n\n\n\n[Back to TOC](#toc)\n\n\n# S4d. Summary\n\n\nAs  [Dimas et al. (2022)](#ref_analytics) conclude, a majority of the efforts invested in the above areas have mostly been focused on the prosecution front. We support their claim via visual data analtyics of their Excel sheets (below figures). \n- In generating these figures, we look at the complexity of each article by counting the number of subfields covered by each article. To minimize overlapping markers, we add random jitter to the positional coordinates of each marker.\n- The figures below plot each of the +140 articles examined in the review by [Dimas et al. (2022)](#ref_analytics); the size of each dot reflects the number of technical areas involved.\n- The first figure lists the authors of the articles ordered by year of their publications. Color and shape of each marker denotes the **nature of the article**. \n- The second figure shows the populations these research and studies have aimed to assist. Color and shape of each marker denotes the **type of trafficking** being addressed.\n\nFrom these figures, one could gauge:\n- The multidisciplinary nature of anti-trafficking solutions\n- Applications of data analytics to counteract labour trafficking are relatively less explored\n- Second figure shows that Asian countries only being served more in the last few years, while African countries are currently underserved. \n- Bottom figure may give insights on future research directions.\n\n\n[Back to top](#toc)","metadata":{"_uuid":"7e54fb75-abd6-4fe9-92ea-f5ef2d485073","_cell_guid":"0d243066-319c-4800-80c2-5ec9000a5f3f","trusted":true}},{"cell_type":"code","source":"import pandas as pd\nsheet = '2022_Operations Research and An'\nxlsm_df=pd.read_excel('https://github.com/gldimas/Dimas-et.-al-2022_Human-Trafficking-Literature-Review/raw/main/Updated%20Versions%20of%20Data%20and%20Dashboard/Current%20Versions%20of%20Data%20and%20Dashboard/08_29_2022_ImprovedMacro_DetailedAnalysis_2022_Operations%20Research%20and%20Analytics%20to%20Combat%20Human%20Trafficking%20A%20Review%20of%20Academic%20Literature_Data.xlsm', sheet_name=sheet)\nsolution_fronts=['Prevention', 'Protection', 'Prosection','Partnership'] \nregions=['North America', 'South America','Europe', 'Asia', 'Africa', 'Australia/Oceania', 'Unspecified/All regions']\n\n#print(xlsm_df.columns)\nsubthemes=['Decision Support', 'Inferential Statistics / Detection',' Network Flow', 'Resource Allocation', 'Supply Chain', 'Other / Unspecified']\nflds=['Network Flow','Resource Alloction','Supply Chain','Decision Support','Other / Unspecified','Inferential Statistics / Detection']\nflds+=['Data Envelopment Analysis','Network Interdiction','Integer Programming','Facility location']\nflds+=['Queuing Theory','Simulation','(Social) Network Analysis','Empirical Analysis','Active Learning']\nflds+=['Graph Construction','Link Inference','Machine / Deep Learning (General)','Clustering or Classification']\nflds+=['Unsupervised or Minimally Supervised Learning','Natural Language Processing','Information Extraction','Investigative Search']\nflds+=['Game Theory','Other','Network / Graph Theory','Web Crawling / Scraping']\ndf=xlsm_df[flds] \n\n# =========== figure 1 =========== \nfig = go.Figure();\nl1='Year of publication'\nl2='ML/ data mining areas'\nclrs=['red','green','blue','purple', 'yellow', 'black', 'lightgreen']\n\n#from plotly.validators.scatter.marker import SymbolValidator\n#raw_symbols = SymbolValidator().values\n#raw_symbols= ['','star', 'square', 'triangle-down-open', 'bowtie-open','x', 'triangle-up-open', 'hourglass', 'diamond-x']\n\ndf=xlsm_df.loc[:,['PaperName','Year Published','Context','Category']+ solution_fronts + regions + flds]\ndf= df.sort_values( by=['Year Published','PaperName' ])\ndf[['size']] = 0 \nfor i,r in df.iterrows():    \n    df.loc[i, 'solution fronts'] = '+'.join(np.array( solution_fronts)[ np.where( r[solution_fronts] == 1 )[0] ] ) \n    q = np.where( r[flds] == 1 )[0]\n    df.loc[i, 'fields']= '+'.join(np.array( flds)[ q ] )   \n    df.loc[i, 'size'] = len( q)    \n    df.loc[i, 'regions']= '+'.join( np.array( regions)[ np.where( r[regions] == 1 )[0] ] ) \n    \ndf=df.reset_index()\ndf['order'] = df[['Year Published']] *1.\ndf['order'] += np.random.random( df.shape[0] )*1\ndf[['size']] = df[['size']]**2\n\n\n# =========== figure 1 =========== \nfig=px.scatter( df, x='order',y='PaperName',size='size', color='Category',hover_data=['PaperName','fields', 'solution fronts'], \\\n               title='Publications\\' complexity in terms of number of subfields covered' );\nfig.update_xaxes(title_text='', tickangle=40, tickvals=np.arange(2010, 2024) )            \nfig.update_traces( marker=dict(symbol='diamond') )\nfig.show();\nplt.savefig('/kaggle/working/Dimas2022_lit_category.png' );\n# =========== figure 2 =========== \nfig=px.scatter( df, x='order',y='regions',size='size', color='Context',hover_data=['PaperName','fields', 'solution fronts'], \\\n               title='Publications\\' complexity stratified by context' );\nfig.update_xaxes(title_text='', tickangle=40, tickvals=np.arange(2010, 2024) )            \nfig.show();\nplt.savefig('/kaggle/working/Dimas2022_lit_context.png' );\n\n['PaperName', 'Context', 'Female', 'Male', 'Child/Underage', 'LGBTQ+',\n       'Unspecfied or All individuals', 'North America', 'South America',\n       'Europe', 'Asia', 'Africa', 'Australia/Oceania',\n       'Unspecified/All regions', 'Prevention', 'Protection', 'Prosection',\n       'Partnership', 'Data Type', 'Network Flow', 'Resource Alloction',\n       'Supply Chain', 'Decision Support', 'Other / Unspecified',\n       'Inferential Statistics / Detection', 'Category',\n       'Data Envelopment Analysis', 'Network Interdiction',\n       'Integer Programming', 'Facility location', 'Queuing Theory',\n       'Simulation', '(Social) Network Analysis', 'Empirical Analysis',\n       'Active Learning', 'Graph Construction', 'Link Inference',\n       'Machine / Deep Learning (General)', 'Clustering or Classification',\n       'Unsupervised or Minimally Supervised Learning',\n       'Natural Language Processing', 'Information Extraction',\n       'Investigative Search', 'Game Theory', 'Other',\n       'Network / Graph Theory', 'Web Crawling / Scraping', 'N/A',\n       'Year Published'];\n\n\n# =========== figure 3 =========== \nsolutions_area = np.zeros( ( 4, len(flds) ))\nfor i in range(xlsm_df.shape[0]):    \n    Q1= np.where( xlsm_df.loc[i, flds ] )[0]\n    Q2= np.where( xlsm_df.loc[i, solution_fronts ] )[0]   \n    for q1 in Q1:  \n        for q2 in Q2:\n            solutions_area[ q2, q1 ]+=1    \ndf=pd.DataFrame( solutions_area, columns = flds, index=solution_fronts );\nfig=px.imshow(df, text_auto=True, aspect='auto', labels={'x':'ML/ Data mining areas of research/ application','y':'Solution fronts'},  title='Areas under-explored'); \nfig.show();           \nplt.savefig('/kaggle/working/Dimas2022_heatmap.png' );","metadata":{"_uuid":"7470534e-b273-4c61-9550-f1556fdc5555","_cell_guid":"c35f72bb-56d4-4f39-b204-0bf49dbcf6d5","_kg_hide-input":true,"execution":{"iopub.status.busy":"2023-09-17T04:50:48.531946Z","iopub.execute_input":"2023-09-17T04:50:48.532759Z","iopub.status.idle":"2023-09-17T04:50:50.158456Z","shell.execute_reply.started":"2023-09-17T04:50:48.532726Z","shell.execute_reply":"2023-09-17T04:50:50.156719Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"my_lit_df = pd.read_csv('https://raw.githubusercontent.com/tcw1470/HT/main/meta_data/my_lit_review.csv')\nmy_lit_df = my_lit_df.sort_values(' Year')\nmy_lit_df = my_lit_df.reset_index()\nmy_lit_df[' Ensemble']=my_lit_df[' Ensemble'].astype(int)\nmy_lit_df.head(100)","metadata":{"_uuid":"a3fd1bae-dc07-488a-9849-096ee972119b","_cell_guid":"de54e818-04a0-45a0-b830-b07fa18c9fee","_kg_hide-input":true,"execution":{"iopub.status.busy":"2023-09-17T04:50:50.161723Z","iopub.execute_input":"2023-09-17T04:50:50.162035Z","iopub.status.idle":"2023-09-17T04:50:50.333606Z","shell.execute_reply.started":"2023-09-17T04:50:50.162011Z","shell.execute_reply":"2023-09-17T04:50:50.332034Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# S5. Discussions <a id=\"discuss\"></a>\n\n<div style=\"display: table; float: right; margin: 2em; width: 40%\" >\n    <img src='https://raw.githubusercontent.com/tcw1470/HT/main/figs/anti_humant_ai_tcw.png' />\n    <p style=\"display: table-caption; caption-side: bottom; color:gray\">Author's summary illustration on  ML-based anti-trafficking solutions.</p>\n</div>\n\n## What have we gathered?\n\nWe summarized the articles highlighted in this report in a dateframe as shown above and then collected these thoughts:\n\n**1) Alarming evidence calls for global attention and action.**\n\nGrey literature such as informal interpretations from exploratory data analyses by numerous Kaggle users show *reproducible* visualizations that convey how serious (and *local*) human trafficking is:\n    - Organ harvesting has been recorded in UK for a number of years, as we saw in our [EDA of UKHT dataset](#ds_ukht).\n    - Predators were often intimate partners, family members, and friends of the trafficked victims, as we saw in [EDA of GHT dataset](#ds_ght).     \n    - Nation-wide initatives (e.g. on social media) to educate (young) citizens in developed countries are urgently needed.  \n\nProjects that intervene and disrupt online illicit activites (e.g. [Seattle Against Slavery](#sec_prevent)) should be implemented worldwide to counteract cyber crimes and deceptive job ads.\n\n**2) Datasets - don't let age and size hold us back**\n\nAge of datasets do not reflect their long-term values. \n- Analyses and extensions of replicated notebooks are observed long after datasets' release dates as we saw throughout in this report. \n- We recommend inclusion of \"old\" datasets especially when pandemic has led to  worldwide disruptions.\n\n**3) Integration of domain knowledge to build on existing frameworks**\n\nAs suggested in an insightful essay on [*Data-Centric AI*](https://www.kaggle.com/code/muhammadirfanakbar/data-centric-ai-the-underdog-game-changer-in-ai), complexity and quality of data, not model, may be key to achieving groundbreaking results as in the approach of Facebook's \"Segment Anything\".\n\nFeature engineering on textual data involved paying attention to pronouns and domain-specific knowledge such as the occurrences of \"without\" and \"condoms\" would reflect negligence of health concerns in sex trafficking premises [(see S4b)](#sec_hotel).\n        \n**4) Internal validation and error analyses are never obsolete**\n    \nPost-hoc use of saliency maps helped us understand what image features render hotel rooms recognizable [(see S3a)](#sec_hotel). \n\n**5) A gallery of \"Smart\" Ensembles**\n\nWhile the effectiveness of ensemble methods have been showcased as elaborated in [another valuable essay](https://www.kaggle.com/code/yeemeitsang/unreasonably-effective-ensemble-learning), this approach is less deployed in the subfields for anti-HT solutions, perhaps because the applications of deep learning and machine learning methods have not matured yet and the focus has been on benchmarking individual algorithms (e.g.).\n\nIn this report, we recap the two use cases we saw advocated by researchers in computer vision communities [(see S3a)](#sec_hotel):\n    1. Employing uncorrelated feature representations (models) to optimize model ensembles. \n    2. Combining individual models in a *quadratic manner* was deemed optimal according to an ablation study.  \n     \n      \n**6) Knowledge distillation** in its vanilla form comes at the cost of requiring the source and target domains to have the same distribution.\n\nTo overcome this, preprocessing steps may be carefully desigend using domain knowledge; e.g. a face-detector may be deployed so that the regions-of-interest of the target domain will be similar to the samples of the source dataset [(see S3a)](#sec_hotel).\n     \n**7) Promotion of bias-free solutions are needed** \n\nConscious efforts to avoid built-in (racial) biases as demonstrated in the bigram window designed by Cepeda that would not focus on ethnicities of minority groups [(see S3b)](#sec_prosecute).\n\nMany data holdings were derived from developed countries. For instance, compared to other countries, Philippines joined the global data hub only after 2012. How might this racial-disparity introduced in the data collection process render anti-HT algorithms unsuitable when applied to developing countries?\n \n**8) Thoughtful integrative uses of multiple datasets** \n\nIn the hotel recognition competition, [Mr. Ozaki](#sec_hotel) expanded the challenge's dataset to include a subset of images from another dataset for data augmentation.\nFurthermore, the new pool of data was also used to train a separate camera-angle corrector to improve image quality\n   \n**9) Need of more multidisciplinary collaborations**\n    \nThe socio-economical nature of the problem render classical econometrics and economics readily applicable. Techniques such as *document envelop analysis* can be used to estimate performance for sustainability projects, and in our context, identify which trafficking monitoring stations are ineffective ([see S4a](#sec_prevent)). \n\n**10) Need to adopt explainable machine learning analyses**\n\nAs shown in the figure below, **explainable machine learning analyses**, **active learning**, and **model ensembles** that are so popular in healthcare and other fields are only emerging in anti-HT solutions (was mentioned in small fraction of the articles reviewed by Dimas et al. 2022). The successful applications of these methods to anti-trafficking are yet to come.","metadata":{"_uuid":"6710de59-89e8-459e-aeea-d747ff55f333","_cell_guid":"1cea4d75-21ef-497e-84f4-6c339033fdf3","trusted":true}},{"cell_type":"code","source":"fig = px.scatter( my_lit_df, y=' Authors', size=' Year', hover_data= [' Ensemble', ' Active learning'], \\\n                 color=' Ensemble', x=' Tasks' )\nfig.update_traces( marker=dict(symbol='diamond') )","metadata":{"_uuid":"e1cff20d-2b54-4aca-b7d5-469d34fe198f","_cell_guid":"29df9024-1b2d-413e-9a52-df90a6ad8c4d","execution":{"iopub.status.busy":"2023-09-17T04:50:50.337724Z","iopub.execute_input":"2023-09-17T04:50:50.338068Z","iopub.status.idle":"2023-09-17T04:50:50.400721Z","shell.execute_reply.started":"2023-09-17T04:50:50.338040Z","shell.execute_reply":"2023-09-17T04:50:50.399223Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"\n\n## Other remedies...\n\nIndirect approaches to disrupt the A-M-P model (see Introduction) include:\n- Preventing poverty;\n- Providing resources to meet basic survival needs;\n- Ensure equitable access to education.\n\nThese ideologies collectively reduce the vulnerability of underprivileged victims. While important, progress on this front remains challenging in developing countries and require global and multidisciplinary partnerships. \n\nOne [Kaggle analytical competition](https://www.kaggle.com/competitions/cdp-unlocking-climate-solutions/overview) entitled <span style=\"font-style: italic; font-weight: bold; color: #4A4;\">Unlocking Climate Solutions</span> examined sustainable development goals and raised open-ended questions that can be placed equally well in our context:\n> What are the practical and actionable points where [partnerships can] join? \n>\n> How can we measure the intersection between [risks] and social equity, as a contributor to [make human settlements resilient, inclusive, safe, and sustainable]?\n\nAlthough arguably the solutions presented at this particular competition are not readily applicable to anti-trafficking, they may be a great source of inspiration in years to come.\n\n[Back to TOC](#toc)","metadata":{"_uuid":"3a421d80-f105-4015-a6ea-b2804b5d1e9d","_cell_guid":"15fb528c-5fb9-4327-88c5-851910a98961","trusted":true}},{"cell_type":"markdown","source":"# S6. Conclusions <a id=\"conclusions\"></a>\n\n## A never-ending battle, unless...\n\nResearchers in the ML communities from 25+ computer science subfields are developing advanced methods to counter human trafficking. On the other hand, criminal organizations are also employing advanced technologies to scale up their victim-recruitment process, and to disguise and expand their criminal activities in all sectors. \n\nTo illustrate how the battle, without your help, may never end, we share some statistics:\n- Newer global statistics estimate that forced labour had victimized 25 million people and forced marriages victimized another 15.4 million individuals globally.\n- While [Dutta (2020)](#ref_southasia) elaborated how AI-based developments like *Hotels50k*, *Traffick Jam*, and *Be My Protector* are being used to identify and rescue victims, some of which at an approximate rate of **eight children saved per day**, it has also been estimated that **one child is trafficked every eight minutes** just in India alone (National Crime Records Bureau, 2016).\n\n## How you and Kaggle matter?\n\n**Your attention and curiosity.** \n\nEarlier, we have enumerated Kaggle datasets available for immediate analysis by the research communities. A quick glance at the tables above show that only a fraction of these datasets have been studied at great depths. We raise some open-ended questions in the [Supplement](#sec_qs) and remain optimistic that some of these questions will be addressd as community-wide interest on anti-HT efforts grows, which is being projected by our [growth-plot](#fig_growth) shown earlier. \n\n**Your creativity.** \n\nInnovative ideas to transfer knowledge from related domains to anti-trafficking solutions are only emerging. For instance, the [Elliptic Bitcoin Dataset](#ref_bitcoin) was posted on Kaggle for classification of illicit transactions, and researchers (e.g. [Ruiz et al. (2021)](#ref_laundering)) have since deployed it for the task of deanonymizing criminals and suggested new anti-HT applications. Future directions also includes examining how winning Kaggle solutions based on computer vision and social network analysis methods may resolve (child) sexual abuse problems and other illegal activities in other muddy industries such as pornography and (sexual) tourism.\n\n**Your time and kind contributions.**\n\nStrategically, anti-HT efforts consume large amounts of resources, computationally and financially. \n\nTo solicit funds, call for legislative changes, and revise global anti-HT protocols, digestible data must be presented to regional policy-makers and national leaders. This is where the beauty of open-source notebooks hosted on Kaggle comes in whereby academic researchers (often unfunded) and volunteers from budget-tight non-profit groups may learn to quickly derive their own visual analytics tools off of existing notebooks. \n\nEase of access to data on Kaggle is also feasible thanks to Kaggle users who kindly share their web-scraping scripts and outputs (e.g. *Missing Migrant Projects*, *Russian dataset*, *Canadian ads* datasets). Educational resources such as tutorials on how to conduct variable analysis via ```Shapley``` and ```LIME``` or to create interactive plots via ```Plotly``` and ```Seaborn``` will empower anti-HT reseachers with new skills to create interpretable analyses for use when communicating with policy-makers and potential sponsors.  \n\nLastly, the numbers of Kaggle competitions specifically on anti-HT are countable, suggesting that formation of new partnerships with the ML communities *and* those from social science, law enforcement, and operations research, will hold promise in propelling anti-HT efforts. \n\nWe sincerely hope you will one day join this meaningful mission that will help innocent children and victims of human trafficking, one of the cruelest crimes of all times. \n\nAnd for that, we thank you in advance. ❤\n\n[Back to TOC](#toc)","metadata":{"_uuid":"e9bc6b48-56e2-4f7b-8f7a-817ec7c785a6","_cell_guid":"b54b2a57-a626-424d-8889-705f5e6fb3f6","trusted":true}},{"cell_type":"markdown","source":"# Acknowledgements\n\nWe gratefully acknowledge authors of the following notebooks:\n- @viktorpolevoi for their [Exploratory data analysis (EDA) on the Global Human Trafficking (GHT) dataset](https://www.kaggle.com/code/viktorpolevoi/global-human-trafficking-eda)\n    - Part of the code in this notebook was adapted so that the two figures mentioned in my article expresses data in percentages instead of absolute numbers\n- @quannguyen135 for their [EDA to answer \"Who is at risk online?\"](https://www.kaggle.com/code/quannguyen135/who-is-at-risk-online-eda-with-python)\n    - Part of the code in this notebook was adapted and appended to the Supplementary\n\nThe initial draft of this report is facilitated by stackedit.io.\n\n[Back to top](#toc)","metadata":{"_uuid":"f28f4f0d-459e-4fed-a88d-dd9220c0adf1","_cell_guid":"418cd184-f38b-4a3c-b0e2-245a6ab22dfd","trusted":true}},{"cell_type":"markdown","source":"## References [APA] <a type='anchor' id='refs'></a>\n\n1. <a id=\"ref_stats\"></a> Bouché, V., & Bailey, M. (2020). The UNODC Global Report on Trafficking in Persons: An Aspirational Tool with Great Potential. The Palgrave International Handbook of Human Trafficking, 163-176.\n1. <a id=\"ref_china\"></a> Shen, A. (2016). Female perpetrators in internal child trafficking in China: An empirical study. Journal of Human Trafficking, 2(1), 63-77.\n3. <a id=\"ref_beg\"></a> The Borgen Project (2023, March 7). Addressing Human Trafficking in India  https://www.borgenmagazine.com/human-trafficking-in-india \n4. <a id=\"ref_fishing\"></a> Mileski, J. P., Galvao, C. B., & Forester, Z. D. (2020). Human trafficking in the commercial fishing industry: a multiple case study analysis. *Marine Policy*, 116, 103616.\n5. <a id=\"ref_lin\"></a> Lin, Y., Chen, P., Ho, C. (2022) Hotel Recognition to Combat Human Trafficking. Stanford, CA.\n6. <a id=\"ref_econ\"></a> Athreya, B. (2020). Slaves to Technology: Worker control in the surveillance economy. *Anti-Trafficking Review*, (15), 82-101.\n7. <a id=\"ref_harm\"></a> Gezie, L.D., & Atinafu, A. (2021), Physical health symptoms among Ethiopian returnees who were trafficked aboard, *International Journal of Migration, Health and Social Care*, Vol. 17 No. 2, pp. 215-223. https://doi.org/10.1108/IJMHSC-05-2020-0051\n8. <a id=\"ref_tech\"></a> Milivojevic, S., Moore, H., & Segrave, M. (2022). Freeing the Modern Slaves, One Click at a Time: Theorising human trafficking, modern slavery, and technology. *Anti-Trafficking Review*, issue 14, pp. 16-32,  https://doi.org/10.14197/atr.201220142\n9. <a id=\"ref_defn\"></a>  Toney-Butler, T.J., Ladd, M., Mittel, O. (2023, Jan, 29). Human Trafficking. In: StatPearls. Treasure Island (FL): StatPearls Publishing. https://www.ncbi.nlm.nih.gov/books/NBK430910/\n10. <a id=\"ref_analytics\"></a> Dimas, G. L., Konrad, R. A., Lee Maass, K., & Trapp, A. C. (2022). Operations research and analytics to combat human trafficking: A systematic review of academic literature. PLoS one, 17(8), e0273708.\n12. <a id=\"ref_hotel50k\"></a> Stylianou, A., Xuan, H., Shende, M., Brandt, J., Souvenir, R., & Pless, R. (2019). Hotels-50K: A Global Hotel Recognition Dataset. Proceedings of the AAAI Conference on Artificial Intelligence, 33(01), 726-733. https://doi.org/10.1609/aaai.v33i01.3301726 \n13. <a id=\"ref_farrell\"></a> Farrell, A., Dank, M., de Vries, I., Kafafian, M., Hughes, A., & Lockwood, S. (2019). Failing victims? Challenges of the police response to human trafficking. *Criminology & Public Policy*, 18(3), 649-673.\n14. <a id=\"ref_massage\"></a> Tobey, M., Li, R., Özaltın, O. Y., Mayorga, M. E., & Caltagirone, S. (2022). Interpretable models for the automated detection of human trafficking in illicit massage businesses. *IISE Transactions*, 1-14.\n1. <a id=\"ref_kinship\"></a> Tian, M., Teng, G., & Bao, Y. (2022). Kaggle Kinship Recognition Challenge: Introduction of Convolution-Free Model to boost conventional. arXiv preprint arXiv:2206.05488.\n1. <a id=\"ref_school\"></a> Mukherjee, S., Sederholm, T., Roman, A. C., Sankar, R., Caltagirone, S., & Ferres, J. L. (2021, September). A machine learning pipeline for aiding school identification from child trafficking images. In Proceedings of the Conference on Information Technology for Social Good (pp. 297-300).\n1. <a id=\"ref_stop\"></a> Stop the Traffik (2022). Human trafficking keywords dataset (2022). \n<!-- Frank, R. W. (2022). Human trafficking indicators: A new dataset. International Interactions, 48(1), 152-171.-->\n1. <a id=\"ref_freedom\"></a> Vásquez, I., McMahon, F., Murphy, R., & Schneider, G. (2022). The Human Freedom Index 2022: A Global Measurement of Personal, Civil, and Economic Freedom (Washington: Cato Institute and the Fraser Institute).\n1. <a id=\"ref_refugees\"></a> Cockbain, E., & Sidebottom, A. (2022). War, Displacement, and Human Trafficking and Exploitation: Findings from an evidence-gathering Roundtable in Response to the War in Ukraine. Journal of Human Trafficking, 1-29.\n1. <a id=\"ref_ukraine\"></a> US Department of State. (2022, Dec 26) https://www.usaid.gov/ukraine/fact-sheet/dec-16-2022-trafficking-persons.\n1. <a id=\"ref_tipreport\"></a> US Department of State. (2023, June 1) *Trafficking in Persons Report* https://www.state.gov/wp-content/uploads/2023/06/Trafficking-in-Persons-Report-2023.pdf\n1. <a id=\"ref_russia\"></a> US Department of State. (2023, June 1) *Trafficking in Persons Report: Russia* https://www.state.gov/reports/2023-trafficking-in-persons-report/russia/\n1. <a id=\"ref_hiddenfig\"></a> Chaney, C. D., Lee-Johnson, N. M., Wooten, C. C., Doub, D. C., & George Tilley, E. C. (2023). “The Hidden Figure of a Global Crime”: From Human Trafficking to Human Rights: Complexities and Pitfalls. In Politics Between Nations: Power, Peace, and Diplomacy (pp. 423-447). Cham: Springer International Publishing.\n1. <a id=\"ref_hotelid\"></a> Kamath, R., Rolwes, G., Black, S., & Stylianou, A. (2021). The 2021 hotel-id to combat human trafficking competition dataset. arXiv preprint arXiv:2106.05746.\n1. <a id=\"ref_crime_networks\"></a> Ahmed, S., Gentili, M., Sierra-Sosa, D., & Elmaghraby, A. S. (2022). Multi-layer data integration technique for combining heterogeneous crime data. Information Processing & Management, 59(3), 102879.    \n1. <a id=\"ref_cyclegan\"></a> Parate, V., Dey, A., Bhandarkar, M., Dafedar, S., & Chavan, S. (2022, October). Age Progression and Regression using cycleGAN. In 2022 IEEE 3rd Global Conference for Advancement in Technology (GCAT) (pp. 1-6). IEEE.\n1. <a id=\"ref_recruit\"></a> Andrade-Rubio, K. L., & Izcara-Palacios, S. P. (2020). Recruiting mechanisms used by sex trafficking networks in Nevada, United States. CienciaUAT, 15(1), 117-132.\n1. <a id=\"ref_sex\"></a> Forza, A. (2020). *Data Analysis of Sex Trafficking.* [Honours' thesis, Florida State University]. Tallahassee, Florida. https://purl.lib.fsu.edu/diginole/FSU_libsubv1_scholarship_submission_1607709044_53ddc2dc\n1. <a id=\"ref_dark\"></a> Graham, J. (2023). *The Dark Web and Human Trafficking.* [Doctoral's thesis, Liberty University]. Lynchburg, Virgini. https://digitalcommons.liberty.edu/doctoral/4215\n15. <a id=\"ref_game\"></a> Peterson, E. (2019). *Analysis of 2018 Human Trafficking Location Data from skipthegames.* [Honours' thesis, University of Portland] Portland, Oregon.\n1. <a id=\"ref_smugglers\"></a> Pham, K. H., & Komiyama, J. (2022). Strategic Choices of Migrants and Smugglers in the Central Mediterranean Sea. arXiv preprint arXiv:2207.04480.\n1. <a id=\"ref_albania\"></a> Bekogianni, I. *Labor market Integration of sex-trafficked women returnees in Albania: Challenges and Coping Mechanisms.* [Masters' thesis, Tilburg University]  Tilburg Noord, Netherlands \n1. <a id=\"ref_missing_migrants\"></a> Missing Migrants Project, International Organization for Migration. (n.d.). *Methodology*  https://missingmigrants.iom.int/methodology\n1. <a id=\"ref_gametheory\"></a> Gerry QC, F., Vallabhaneni, S., & Shaw, P. (2021). Game theory and the human trafficking dilemma. *Journal of human trafficking*, 7(2), 168-186.\n1. <a id=\"ref_eu\"></a> European Council. (n.d.). *The EU's work to combat human trafficking* https://www.consilium.europa.eu/en/eu-against-human-trafficking/\n1. <a id=\"ref_women\"></a> Lolayekar, A. P., Desouza, S., & Mukhopadhyay, P. (2022). Crimes against women in India: a district-level analysis (1991–2011). *Journal of interpersonal violence*, 37(9-10), NP7289-NP7314.\n1. <a id=\"ref_chicago\"></a> Saleh, M. A., & Khan, I. R. (2019). Crime data analysis in Python using K-means clustering. *Int. Journal for Research in Applied Science and Eng. Tech*, 7(4), 151-155\n1. <a id=\"ref_kidney\"></a> Li, M. H., Siddique, A. B., Wilson, B., Patel, A., El-Amine, H., & Koizumi, N. (2022). Identifying kidney trade networks using web scraping data. *BMJ Global Health*, 7(9), e009803.\n1. <a id=\"ref_laundering\"></a>  Pettersson Ruiz, E., & Angelis, J. (2022). Combating money laundering with machine learning–applicability of supervised-learning algorithms at cryptocurrency exchanges. *Journal of Money Laundering Control*, 25(4), 766-778.\n1. <a id=\"ref_dea\"></a> Dimas, G. L., El Khalkhali, M., Bender, A., Maass, K. L., Konrad, R. A., Blom, J. S., ... & Trapp, A. C. (2023). Estimating effectiveness of identifying human trafficking via data envelopment analysis. *INFORMS Journal on Applied Analytics*.\n1. <a id=\"ref_caviar\"></a> Masías, V. H., Valle, M., Morselli, C., Crespo, F., Vargas, A., & Laengle, S. (2016). Modeling verdict outcomes using social network measures: the watergate and caviar network cases. *PloS one*, 11(1), e0147248.\n1. <a id=\"ref_bitcoin\"></a> Weber, M., Domeniconi, G., Chen, J., Weidele, D. K. I., Bellei, C., Robinson, T., & Leiserson, C. E. (2019). Anti-money laundering in bitcoin: Experimenting with graph convolutional networks for financial forensics. arXiv preprint arXiv:1908.02591.\n1. <a id=\"ref_10k\"></a> Tong, E., Zadeh, A., Jones, C., & Morency, L. P. (2017). Combating human trafficking with deep multimodal models. arXiv preprint arXiv:1705.02735.\n\n[Back to TOC](#toc)\n\n# Supplementary <a class=\"anchor\" id=\"suppl\"></a>","metadata":{"_uuid":"b8a9c4c6-de6d-488a-add2-ec4eb71bde48","_cell_guid":"8ba48a62-3bb7-4464-ad72-ff79ac1dae97","trusted":true}},{"cell_type":"markdown","source":"##  Notebook to literature search conducted on Research Gate, etc\n\nhttps://www.kaggle.com/code/chungwaitang/humant-litsearch\n\n## Datasets posted on Kaggle\n\n### Starters' code for the *Kidnapping Dataset*<a id=\"ds_kidnap\"></a>","metadata":{"_uuid":"c261f54f-3799-4aa6-a6ce-22dc67a731df","_cell_guid":"f2e90b05-b840-4dc2-b820-933e93b8746e","trusted":true}},{"cell_type":"code","source":"df = pd.read_csv('/kaggle/input/kidnappingdatset/acc-data.csv')\ndisplay(df.groupby(['Location','Classs']).count() )\npx.pie( df, names = 'Location' )","metadata":{"_uuid":"853495fc-5261-47ed-a478-1e6f695fd8d4","_cell_guid":"c7d1499a-b544-4525-aef4-b88bdf5a833f","execution":{"iopub.status.busy":"2023-09-17T04:50:50.402218Z","iopub.execute_input":"2023-09-17T04:50:50.403527Z","iopub.status.idle":"2023-09-17T04:50:50.477021Z","shell.execute_reply.started":"2023-09-17T04:50:50.403472Z","shell.execute_reply":"2023-09-17T04:50:50.475847Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Starters' code on the *Risk of Being Drawn to Online Sex* (RDOS) <a id=\"ds_online_sex\"></a>","metadata":{"_uuid":"95091aca-bfb6-4084-8531-6ad0ee7bcc22","_cell_guid":"b7763996-a86a-4eee-b93f-e4ee73eb2869","trusted":true}},{"cell_type":"code","source":"df = pd.read_csv('/kaggle/input/cleaned-online-sex-work/cleaned_online_sex_work.csv', index_col=0)\ndf = df.iloc[: 28831, :]\ndf = df[~ df.index.duplicated(keep='first')]\ndf.head()","metadata":{"_uuid":"c2915aca-39aa-4af6-99c3-93d9ec5836b4","_cell_guid":"d8e61ea9-589e-4a75-81a1-02a4ce62708a","execution":{"iopub.status.busy":"2023-09-17T04:50:50.478253Z","iopub.execute_input":"2023-09-17T04:50:50.478546Z","iopub.status.idle":"2023-09-17T04:50:50.585276Z","shell.execute_reply.started":"2023-09-17T04:50:50.478524Z","shell.execute_reply":"2023-09-17T04:50:50.584278Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"orientation_df = df[['Heterosexual', 'Homosexual', 'bicurious', 'bisexual']].idxmax(1)\norientation_df = pd.concat([orientation_df, df['Risk']], axis=1).rename(columns={0: 'Orientation'})\npx.histogram( orientation_df, x='Orientation', color='Risk', )","metadata":{"_uuid":"3605bd6d-7c37-48c5-87b1-9b172774a264","_cell_guid":"568a9ea2-0d63-44e0-a8d5-0f98ea851819","execution":{"iopub.status.busy":"2023-09-17T04:50:50.586629Z","iopub.execute_input":"2023-09-17T04:50:50.587994Z","iopub.status.idle":"2023-09-17T04:50:50.696560Z","shell.execute_reply.started":"2023-09-17T04:50:50.587943Z","shell.execute_reply":"2023-09-17T04:50:50.695591Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Sample data from Nepal <a id=\"ds_nepal\"></a>","metadata":{"_uuid":"4849bc9e-8473-41c8-9232-d3f7559edeaf","_cell_guid":"64806cc6-377d-441f-a69c-e048beead0ab","trusted":true}},{"cell_type":"code","source":"import pandas as pd\n# search by cid-nepal-2076-final\n# nepal_crime_month = pd.read_csv('/kaggle/input/cid-nepal-2076-final/CID_CSV_final/Number of trafficking cases registered in Nepal Police by Nepali months, FY 2018_19.csv')\n# nepal_crime_month = nepal_crime_month.fillna(nepal_crime_month.mean())\n# nepal_crime_month['Trafficking Cases'] = nepal_crime_month['Trafficking Cases'].astype(int)\nnepal_data=['Baisakh',22,\n'Jestha',53,\n'Asar',22,\n'Srawan',27,\n'Bhadra',23,\n'Aswin',19,\n'Kartik',10,\n'Mangsir',16,\n'Poush',20,\n'Magh',17,\n'Falgun' ,22,\n'Chaitra', 20]\ndf= pd.DataFrame( {'Month':nepal_data[0::2], 'Counts':nepal_data[1::2] } )\ndf['Month'] = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul','Aug','Sep', 'Oct','Nov', 'Dec']\nfig=px.bar(df, x='Month',y='Counts' )\nfig.show()","metadata":{"_uuid":"e8b7f1a4-b522-4326-b8bc-8d4f3fc61d34","_cell_guid":"c0354201-fbae-42f3-9f4d-bff94aa07a6e","execution":{"iopub.status.busy":"2023-09-17T04:50:50.697996Z","iopub.execute_input":"2023-09-17T04:50:50.698352Z","iopub.status.idle":"2023-09-17T04:50:50.759552Z","shell.execute_reply.started":"2023-09-17T04:50:50.698321Z","shell.execute_reply":"2023-09-17T04:50:50.758216Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Starters' code on the T-Visa dataset<a id=\"ds_tvisa\"></a>","metadata":{"_uuid":"550f6ba2-9d95-4e77-bf3f-6634ca6d021a","_cell_guid":"0f743903-34cd-44b0-859d-a63d5ee856f6","trusted":true}},{"cell_type":"code","source":"tvisa_df=pd.read_csv('/kaggle/input/tvisa-dataset/tvisa_AAO.csv')\ntvisa_df=pl.DataFrame( tvisa_df)\n\nm, n= tvisa_df.filter( pl.col('description').str.contains( '(?i)traffick' ) ).shape[0], tvisa_df.shape[0]\nprint( '# of claims from victim of human trafficking:',m, '(%.2f%%)'%(100*m/n) )","metadata":{"_uuid":"105cd198-6bc2-40c5-ac7b-2dff85f0196c","_cell_guid":"02e0ad60-4560-4603-9ce8-984f205e1685","execution":{"iopub.status.busy":"2023-09-17T04:50:50.761331Z","iopub.execute_input":"2023-09-17T04:50:50.761706Z","iopub.status.idle":"2023-09-17T04:50:50.786627Z","shell.execute_reply.started":"2023-09-17T04:50:50.761677Z","shell.execute_reply":"2023-09-17T04:50:50.784934Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Starters' code on the Missing People in Russia (MPR) dataset<a id=\"sec_russia\"></a>","metadata":{"_uuid":"f2987fb6-cf60-4a6c-8d8d-cb43004d399b","_cell_guid":"cc0864d2-03cd-4f75-b714-af15e21a8c2c","trusted":true}},{"cell_type":"code","source":"translation = pd.read_csv('/kaggle/input/missing-people-in-russia/translate.csv', header = None, names = ['ru', 'en'], index_col = False)\ntranslation.shape\n\ndata_files_to_read = glob(\"/kaggle/input/missing-people-in-russia/data*\")\nall_files = [(int(x.split(\"-\")[4][0:4]), int(x.split(\"-\")[4][4:6])//3, x) for x in data_files_to_read]\nyear_stats = [(year-1, 4, file) for year, quarter, file in all_files if quarter == 0]\nall_stats = year_stats + [(year, quarter, file) for year, quarter, file in all_files if quarter != 0]\n\ndata = pd.DataFrame()\nfor (y, q, fn) in all_stats:\n    df = pd.read_csv(fn, skiprows=1)\n    df['year'] = y\n    df['quarter'] = q\n    data = pd.concat([data, df], axis=0)\n    \ntranslation['ru'] = translation['ru'].apply(lambda x: x.strip())\ntranslation['en'] = translation['en'].apply(lambda x: x.strip())\ndata['Subject'] = data['Subject'].apply(lambda x: x.strip())\n\ndata = pd.merge(data, translation, left_on='Subject', right_on='ru')\ndata.rename(columns={'en':'Subject (en)'},inplace=True)\ndata.drop('ru', axis=1, inplace=True)\n\ndata = pd.merge(data, translation, left_on='Name of the statistical factor', right_on='ru')\ndata.drop('ru', axis=1, inplace=True)\ndata.rename(columns={'en':'Name of the statistical factor (en)'},inplace=True)\n\ndata.drop(['Subject', 'Point FPSR', 'Name of the statistical factor'], axis=1, inplace=True)\ndata = data[data['Subject (en)']==\"Total for Russia\"]\ndata.head()","metadata":{"_uuid":"5d5b1ba3-13dc-4737-8464-e23254595474","_cell_guid":"f0fc026b-cca4-4508-bacd-b04aa4bb8987","execution":{"iopub.status.busy":"2023-09-17T04:50:50.788829Z","iopub.execute_input":"2023-09-17T04:50:50.789143Z","iopub.status.idle":"2023-09-17T04:50:51.145262Z","shell.execute_reply.started":"2023-09-17T04:50:50.789118Z","shell.execute_reply":"2023-09-17T04:50:51.143966Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"np.unique( data[['Name of the statistical factor (en)']] )","metadata":{"_uuid":"f5e1f5bb-fe11-45fc-9643-20f5dad7f65e","_cell_guid":"a7f19349-4f98-4332-9235-7ac851314333","execution":{"iopub.status.busy":"2023-09-17T04:50:51.146729Z","iopub.execute_input":"2023-09-17T04:50:51.147060Z","iopub.status.idle":"2023-09-17T04:50:51.157345Z","shell.execute_reply.started":"2023-09-17T04:50:51.147033Z","shell.execute_reply":"2023-09-17T04:50:51.156056Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Starters' code on the Missing Migrants Project <a id=\"ds_mmp\"></a>","metadata":{"_uuid":"5b1f625d-c881-4118-aa8e-5f7041d49a2d","_cell_guid":"b524cd07-84b8-48b2-bb3e-dc0a93948e44","trusted":true}},{"cell_type":"code","source":"countries = pd.read_csv((\"/kaggle/input/the-world-factbook-by-cia/countries.csv\"))\nprint( countries.shape )\ncountries.head()","metadata":{"_uuid":"4978bf4d-543a-4904-b8c1-805b5f984020","_cell_guid":"921f0d76-f2bf-44cf-bf25-aa84e4d7b2cc","execution":{"iopub.status.busy":"2023-09-17T04:50:51.159528Z","iopub.execute_input":"2023-09-17T04:50:51.160024Z","iopub.status.idle":"2023-09-17T04:50:51.420494Z","shell.execute_reply.started":"2023-09-17T04:50:51.159986Z","shell.execute_reply":"2023-09-17T04:50:51.419261Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"related_keys=[]\nfor k in countries.keys():    \n    if 'Trafficking' in k:\n        related_keys.append(k)\n        print(k)","metadata":{"_uuid":"ccf93d18-af2d-4604-a933-2b6ce0dc05db","_cell_guid":"ec13c271-8693-4ac0-a0b2-362045080f40","execution":{"iopub.status.busy":"2023-09-17T04:50:51.422107Z","iopub.execute_input":"2023-09-17T04:50:51.422490Z","iopub.status.idle":"2023-09-17T04:50:51.429746Z","shell.execute_reply.started":"2023-09-17T04:50:51.422457Z","shell.execute_reply":"2023-09-17T04:50:51.428592Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import json\ncountries = json.load(open(\"/kaggle/input/the-world-factbook-by-cia/countries.json\", \"rt\"))\n\nL = []\nkeywords = [\"England\", \"British\", \"United Kingdom\", \"UK\"]\nfor country_name, country in countries.items():\n    country_background = country[\"Introduction: Background\"]\n    if country_background is None:\n        continue\n    for keyword in keywords:\n        if keyword in country_background:\n            L.append(country_name)            \n            break\nprint(\"Countries described by this dataset:\\n\", \", \".join(L))","metadata":{"_uuid":"0a014f8f-c4c4-420c-aab9-94a1cc9a80bb","_cell_guid":"4fd8b8a9-70c7-4955-a0d8-e8f231a9dddb","execution":{"iopub.status.busy":"2023-09-17T04:50:51.431126Z","iopub.execute_input":"2023-09-17T04:50:51.432037Z","iopub.status.idle":"2023-09-17T04:50:51.589751Z","shell.execute_reply.started":"2023-09-17T04:50:51.432008Z","shell.execute_reply":"2023-09-17T04:50:51.588173Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## B-1. Theories  \n\n\n### Recruitment <a id=\"sec_recruitment\"></a>\n\nAs mentioned in the Introduction, criminals leverge substance abuse, intimate relationships, fraud, and countless other means to enable human trafficking. Theoretical theories that could explain the vulnerability of individual include:\n- **Lifestyle exposure**: lack of adult guardianship\n- **General strain**: sociological factors and individual's immediate surroundings can be forced into trafficking via emotional, behavioural, and cognitive processes \n- **Routine activities**: individuals are at risk when their routines are disrupted, or when they are in s foreign country.\n\n### Research questions (aka topic proposals for future analytic competitions)<a id=\"sec_qs\"></a>\n\nWhat would you propose to address each of below concerns?\n\n1. Organized criminals nowadays use technologies to fuel their industries (e.g. e-trafficking and cyber-modern slavery [(Gezie & Atinafu 2021)](#ref_econ)). Although more than dozens of crime datasets can be found on Kaggle, the applicability of a dataset from one country to another may be questioned due to variations in data collection procedures that cross different intra-national and international borders. \n\n2. On the rescue front, Kaggle's research communities have called for the development of visual kinship recognition systems and photo recognition of hotel identifiers that may help anti-trafficking organizations to track and recover victims.  \n    - While the results from Hotel-ID competitions held in these past research competitions are promising and motivating, we have yet to see them in real-world deployment. \n    - Furthermore, as sex industries also involve escort services, brothels in low-income countries, one is left to wonder how the above approaches may generalize to broader settings.","metadata":{"_uuid":"143e46d4-fedc-46ee-9ad6-be328d45c772","_cell_guid":"f4b5ad4a-4022-44fc-946a-290ca67daa82","trusted":true}},{"cell_type":"markdown","source":"","metadata":{}},{"cell_type":"markdown","source":"## B-1. Trafficking in persons - tier ratings/ descriptions by country, according to *World Factbook* by *Central Intelligence Agency* <a id=\"tier\"></a>","metadata":{"_uuid":"c68a82a7-e9c7-47f6-8f05-5ccf749fb56f","_cell_guid":"e90c5386-529f-442b-a992-1a4b92c07bf5","trusted":true}},{"cell_type":"code","source":"for country_name, country in countries.items():\n    for a in country.items():\n        for k in related_keys:            \n            if a[0] == k:\n                print(country_name, '\\n', a[0], '\\n', a[1], '\\n' )\n                break","metadata":{"_uuid":"f73fb2b3-b8c3-4918-8024-e7f0db62d56a","_cell_guid":"dfafbaae-614f-4d31-9bd5-4369b00e41ee","execution":{"iopub.status.busy":"2023-09-17T04:50:51.591173Z","iopub.execute_input":"2023-09-17T04:50:51.591513Z","iopub.status.idle":"2023-09-17T04:50:51.666890Z","shell.execute_reply.started":"2023-09-17T04:50:51.591488Z","shell.execute_reply":"2023-09-17T04:50:51.665556Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Other relevant datasets outside Kaggle\n\n| Name | Source | High level info  | Misc. notes |\n| :-- | :-- | :-- | :-- |\n| [Trafficking in persons](https://dataunodc.un.org/sites/dataunodc.un.org/files/data_glotip.xlsx) | United Nations | - Number of people prosecuted |\n| [Kentucky Drug and Sex Crimes](https://data.mendeley.com/datasets/ykwnrjm7f7/2) | U.S. state of Kentucky | - Data from 2017, 2018 and 2019, containing a total of 1,939,990 unique incidents |\n\n## C. Listing of anti-trafficking organizations <a id=\"anti\"></a>\n\nOrganizations that were accessible at the URLs listed below as of July 10, 2023 and *focus* on anti-human trafficking efforts are tic-marked:\n- [x] https://anniecannons.org/ \n- [ ] [Blue Butterfly](https://www.bluebutterflyfoundation.org/index.php)\n- [x] https://chainbreakerteam.org/\n- [ ] [Code of Conduct for the Protection of Children from Sexual Exploitation in Travel and Tourism](https://www.thecode.com)\n- [x] [Counter-trafficking data collaborative](https://www.ctdatacollaborative.org/) \n- [x] https://www.destinyrescue.org/ \n- [x] [Global Emancipation Network](https://www.globalemancipation.ngo/)\n- [x] https://hagarinternational.org/ \n- [ ] https://www.libertyasia.org/\n- [x] [Love Justice International](https://www.lovejustice.ngo/)\n- [x] https://www.missingkids.org\n- [x] https://polarisproject.org/\n- [x] [Stop the Traffik](https://www.stopthetraffik.org/)\n- [x] [TIP Report Heroes Global Network](https://www.tipheroes.org)\n- [x] [Unseen UK](https://www.unseenuk.org/)\n- [ ] United Nations\n- [ ] Unicef \n- [ ] World Health Organization\n\n## D. Did you know...?  <a id=\"did_u_know\"></a>\n\n## Documentaries <a id=\"sec_films\"></a>\n\n| Title | Description |\n| :-- | :-- |\n| *Fatima* | Directed by Sourabh Kanti Datta, provides a documentary on a girl from India who was forced into marriage at age 9 and became a mother at 12. The film protrayed the rescue and rehabilitation process of trafficked sex workers |\n|  *The Price of Free* | [resource suggested by Kaggle expert Shefali C.](https://www.youtube.com/watch?v=UsqKz1hd_CY) |\n| Documentary on *Devadasis* | - The term means \"servants of God\" is an inhuman practice that places citizens of the lowest caste to sex slavery, often by force <br>- Although it was officially outlawed forty years ago, this practice still exists in India today     |\n| *Sound of Freedom* | Movie adatped from real accounts from a former member of the Central Intelligence Agency who infiltrated trafficking networks | \n\n## Books <a id=\"sec_films\"></a>\n- *The Color of Our Sky*, novel by Amita Trasi narrates the abduction of a Mumbai underage girl for sex slavory and the horrible experiences she endured before her rescue \n\n\n## Kaggle's datasets on *Social Issues and Advocacy*\n\nAs of July 4th 2023, Kaggle houses 879 datasets tagged under...\n- 36 on pollution\n- 27 on poverty\n- 24 on climate issues\n- 21 on water sustainability \n- 13 on human trafficking\n\n[Back to top](#toc) \n\n# Resources for fellow users <a id=\"resources\"></a>\n\n## How to cite in MLA format?\n\nExample using 7th Edition of MLA:\n> Flood, A. (2019, December 6). Britain has closed almost 800 libraries since 2010, figures show. The Guardian. https://www.theguardian.com/books/2019/dec/06/britain-has-closed-almost-800-libraries-since-2010-figures-show\n\nTemplate:\n> Name, Name. (Yr, Month Date) Title of webpage. figures show. Newspaper Title. URL\n\n## How to cite in APA format?\n\n### Summary on paraphrasing\n\n[Purdue University - APA style](https://owl.purdue.edu/owl/research_and_citation/apa_style/apa_formatting_and_style_guide/in_text_citations_the_basics.html) guidelines write:\n\n> If you are paraphrasing an idea from another work, you only have to make reference to the author and year of publication in your in-text reference and may omit the page numbers. APA guidelines, however, do encourage including a page range for a summary or paraphrase when it will help the reader find the information in a longer work.\"  \n \nExample 1:\n> According to Jones (1998), APA style is a difficult citation format for first-time learners.\n\nExample 2:\n> APA style is a difficult citation format for first-time learners (Jones, 1998, p. 199).\n\n\n#### Examples of [citing theses](https://aut.ac.nz.libguides.com/APA7th/theses)\n\nExample 1:\n> Miller, T. (2019). Enhancing readiness: An exploration of the New Zealand Qualified Firefighter Programme [Master's thesis, Auckland University of Technology]. Tuwhera. https://openrepository.aut.ac.nz/handle/10292/12338\n\nExample 2:\n> Kelly, C. B. D. (2018). The art of coffee roasting: Investigations into sensor development for the application of controlling coffee roasting [Doctoral thesis, The University of Waikato]. The University of Waikato Research Commons. https://hdl.handle.net/10289/11614\n\n\n\nBelow from https://www.easybib.com/guides/citation-guides/apa-format/apa-in-text-citation/\n\n![image](https://www.easybib.com/wp-content/uploads/2020/03/APA-7-in-text-citations-chart-EasyBib-679x1024.webp)\n\n\n[Back to top](#toc) \n \n<!--\n# Visual summary with figures on human trafficking\n\nHere's an infographic to help us map out the urgent problems we need to solve soon: \n\n<img src=\"https://img.freepik.com/free-vector/human-trafficking-report-infographic-layout-chart_1284-8451.jpg?w=740&t=st=1688421057~exp=1688421657~hmac=e1cde90c0dc1cad10235da5d7dde4346c22b3c359586284fd31b02e352e9a2a1\" alt=\"\" style=\"height: 1000px; width:1000px\"/>\n\n<a href='https://www.dhs.gov/blue-campaign/infographic'>Source: Blue Campaign</a> -->","metadata":{"_uuid":"dbac8320-1b47-4c2d-9e59-8f52f811764d","_cell_guid":"f5bf2fdc-80d1-4275-88f3-1e1f2cf3a20e","trusted":true}},{"cell_type":"code","source":"import pandas as pd\ndata={}\ndata['type']=['essay_category', 'essay_url', 'feedback1_url','feedback2_url','feedback3_url'] \ndata['value']= ['other', \n                'https://www.kaggle.com/code/chungwaitang/humant',\n                'https://www.kaggle.com/code/bensonwamae/modern-uses-of-artificial-intelligence-in-finance/comments#2340021',\n                'https://www.kaggle.com/code/dmitriygakh/kaggle-ai-report-maturity-at-a-glance/comments#2342181',\n                'https://www.kaggle.com/code/hridaym25/a-symphony-of-senses-multimodal-machine-learning/comments#2342275'] \ndata = pd.DataFrame.from_dict( data )\ndata = data.set_index('type')\ndata.to_csv('submission.csv' )\ndata","metadata":{"_uuid":"a1a64c38-db92-4564-b52a-9f96b4a17e5d","_cell_guid":"e445c5c5-6f68-4af2-a9f8-85c7815b615b","execution":{"iopub.status.busy":"2023-09-17T04:50:51.669175Z","iopub.execute_input":"2023-09-17T04:50:51.669599Z","iopub.status.idle":"2023-09-17T04:50:51.688999Z","shell.execute_reply.started":"2023-09-17T04:50:51.669568Z","shell.execute_reply":"2023-09-17T04:50:51.687704Z"},"trusted":true},"execution_count":null,"outputs":[]}]}