Skip to content

Commit

Permalink
add gitignore, example.csv
Browse files Browse the repository at this point in the history
  • Loading branch information
tenapril committed Jul 12, 2019
1 parent a89ed7e commit 6439a9d
Show file tree
Hide file tree
Showing 3 changed files with 366 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*-checkpoint*
*.pyc
key.py
7 changes: 7 additions & 0 deletions example.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"nik"
3374081105960004
1201011105960004
3273062304920002
3175064308910008
3327081009930101
123456789012939
356 changes: 356 additions & 0 deletions kuaci_demo.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,356 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### KUACI (OPEN SOURCE KYC INDONESIA)\n",
"#### The ideas of this is to verify the customer KTP and getting features/data enrichment to see the demography of our customer\n",
"##### Open Source, Python Library\n",
"##### Can be made into API Based with CSV Payload"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"import kuaci\n",
"import pandas as pd\n",
"from key import apikey"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"df_example = pd.read_csv('example.csv')"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>nik</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>3374081105960004</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1201011105960004</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3273062304920002</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>3175064308910008</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>3327081009930101</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>123456789012939</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" nik\n",
"0 3374081105960004\n",
"1 1201011105960004\n",
"2 3273062304920002\n",
"3 3175064308910008\n",
"4 3327081009930101\n",
"5 123456789012939"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_example"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"df_ktp = kuaci.kuaci_ktp_check(df_example)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>ktp</th>\n",
" <th>valid</th>\n",
" <th>kodewilayah</th>\n",
" <th>location_valid</th>\n",
" <th>provinsi</th>\n",
" <th>kabupatenkota</th>\n",
" <th>kecamatan</th>\n",
" <th>gender</th>\n",
" <th>dob</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>3374081105960004</td>\n",
" <td>True</td>\n",
" <td>337408</td>\n",
" <td>True</td>\n",
" <td>Jawa Tengah</td>\n",
" <td>Kota Semarang</td>\n",
" <td>Candisari</td>\n",
" <td>Pria</td>\n",
" <td>1996-05-11 00:00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1201011105960004</td>\n",
" <td>True</td>\n",
" <td>120101</td>\n",
" <td>True</td>\n",
" <td>Sumatera Utara</td>\n",
" <td>Kab. Tapanuli Tengah</td>\n",
" <td>Barus</td>\n",
" <td>Pria</td>\n",
" <td>1996-05-11 00:00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3273062304920002</td>\n",
" <td>True</td>\n",
" <td>327306</td>\n",
" <td>True</td>\n",
" <td>Jawa Barat</td>\n",
" <td>Kota Bandung</td>\n",
" <td>Cicendo</td>\n",
" <td>Pria</td>\n",
" <td>1992-04-23 00:00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>3175064308910008</td>\n",
" <td>True</td>\n",
" <td>317506</td>\n",
" <td>True</td>\n",
" <td>DKI Jakarta</td>\n",
" <td>Kota Jakarta Timur</td>\n",
" <td>Cakung</td>\n",
" <td>Wanita</td>\n",
" <td>1991-08-30 00:00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>3327081009930101</td>\n",
" <td>True</td>\n",
" <td>332708</td>\n",
" <td>True</td>\n",
" <td>Jawa Tengah</td>\n",
" <td>Kab. Pemalang</td>\n",
" <td>Pemalang</td>\n",
" <td>Pria</td>\n",
" <td>1993-09-10 00:00:00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>123456789012939</td>\n",
" <td>False</td>\n",
" <td>123456</td>\n",
" <td>False</td>\n",
" <td></td>\n",
" <td></td>\n",
" <td></td>\n",
" <td>Not Valid</td>\n",
" <td>Not Valid</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" ktp valid kodewilayah location_valid provinsi \\\n",
"0 3374081105960004 True 337408 True Jawa Tengah \n",
"1 1201011105960004 True 120101 True Sumatera Utara \n",
"2 3273062304920002 True 327306 True Jawa Barat \n",
"3 3175064308910008 True 317506 True DKI Jakarta \n",
"4 3327081009930101 True 332708 True Jawa Tengah \n",
"5 123456789012939 False 123456 False \n",
"\n",
" kabupatenkota kecamatan gender dob \n",
"0 Kota Semarang Candisari Pria 1996-05-11 00:00:00 \n",
"1 Kab. Tapanuli Tengah Barus Pria 1996-05-11 00:00:00 \n",
"2 Kota Bandung Cicendo Pria 1992-04-23 00:00:00 \n",
"3 Kota Jakarta Timur Cakung Wanita 1991-08-30 00:00:00 \n",
"4 Kab. Pemalang Pemalang Pria 1993-09-10 00:00:00 \n",
"5 Not Valid Not Valid "
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_ktp"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### On Progress (To be Done) - Google Search Engine API to check whether this customer is valid / not"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'33500'"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"kuaci.google_search('Andrew Tirto K', apikey, False)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'1170'"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"kuaci.facebook_search('Andrew Tirto K', apikey, False)"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'0'"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"kuaci.instagram_search('Andrew Tirto K', apikey, False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit 6439a9d

Please sign in to comment.