<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
    <meta name="description" content=""/>
    <meta name="author" content=""/>
    <title>Data</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
    <link href="https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css" rel="stylesheet"
          crossorigin="anonymous"/>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/js/all.min.js"
            crossorigin="anonymous"></script>
</head>
<body class="sb-nav-fixed">
<nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
    <a class="navbar-brand" ><b>AutoNeuro</b></a>
    <button class="btn btn-link btn-sm order-1 order-lg-0" id="sidebarToggle" href="#"><i class="fas fa-bars"></i>
    </button>
</nav>

<div id="layoutSidenav">
    <div id="layoutSidenav_nav">
        <nav class="sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
            <div class="sb-sidenav-menu">
                <div class="nav">
                    <div class="sb-sidenav-menu-heading">AutoML</div>
                    <a class="nav-link" href="/">
                        <div class="sb-nav-link-icon"><i class="fas fa-tachometer-alt"></i></div>
                        Home Page
                    </a>
                    <div class="sb-sidenav-menu-heading">Useful Links</div>
                    <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseLayouts"
                       aria-expanded="false" aria-controls="collapseLayouts">
                        <div class="sb-nav-link-icon"><i class="fas fa-columns"></i></div>
                        Documentation
                        <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
                    </a>
                    <div class="collapse" id="collapseLayouts" aria-labelledby="headingOne"
                         data-parent="#sidenavAccordion">
                        <nav class="sb-sidenav-menu-nested nav">
                            <a class="nav-link" href="layout-static.html">How to doc</a>
                            <a class="nav-link" href="layout-sidenav-light.html">Links</a>
                        </nav>
                    </div>
                    <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePages"
                       aria-expanded="false" aria-controls="collapsePages">
                        <div class="sb-nav-link-icon"><i class="fas fa-book-open"></i></div>
                        Pages
                        <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
                    </a>

                    <div class="collapse" id="collapsePages" aria-labelledby="headingTwo"
                         data-parent="#sidenavAccordion">
                        <nav class="sb-sidenav-menu-nested nav">
                            <a class="nav-link" href="layout-static.html">Github

                            </a>
                        </nav>
                        <nav class="sb-sidenav-menu-nested nav accordion" id="sidenavAccordionPages">

                            <a class="nav-link collapsed" href="#" data-toggle="collapse"
                               data-target="#pagesCollapseError" aria-expanded="false"
                               aria-controls="pagesCollapseError">
                                PyPi
                                <div class="sb-sidenav-collapse-arrow"><i class="fas fa-angle-down"></i></div>
                            </a>
                            <div class="collapse" id="pagesCollapseError" aria-labelledby="headingOne"
                                 data-parent="#sidenavAccordionPages">
                                <nav class="sb-sidenav-menu-nested nav">

                                </nav>
                            </div>
                        </nav>
                    </div>
                    <div class="sb-sidenav-menu-heading">visit website</div>
                    <a class="nav-link" href="charts.html">
                        <div class="sb-nav-link-icon"><i class="fas fa-chart-area"></i></div>
                        iNeuron
                    </a>
                    <a class="nav-link" href="tables.html">
                        <div class="sb-nav-link-icon"><i class="fas fa-table"></i></div>
                        FAQs
                    </a>
                </div>
            </div>
            <div class="sb-sidenav-footer">

            </div>
        </nav>
    </div>
    <div id="layoutSidenav_content">
        <main>
            <div class="container-fluid">
                <h1 class="mt-4">Tables</h1>
                <ol class="breadcrumb mb-4">
                    <li class="breadcrumb-item"><a href="/">Dashboard</a></li>
                    <li class="breadcrumb-item active">Tables</li>
                </ol>

                <div class="card mb-4">
                    <div class="card-header">
                        <i class="fas fa-table mr-1"></i>
                        Data Table
                    </div>
                    <div class="card-body">
                        <div class="table-responsive">

                            <table class="table table-bordered" id="dataTable1" width="100%" cellspacing="0">
                                <thead>

                                </thead>
                                <tbody>
                                <tr>
                                    {% for table in tables %}
                                        {{ table|safe }}
                                    {% endfor %}
                                </tr>

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>

                <div class="card mb-4">
                    <div class="card-header">
                        <i class="fas fa-table mr-1"></i>
                        Data Profile
                    </div>
                    <div class="card-body">
                        <div class="table-wrapper-scroll-y my-custom-scrollbar">
                            <div class="card-header">
                                Dataset size
                            </div>
                            <table class="table table-bordered table-striped mb-0" id="dataTable2" width="100%"
                                   cellspacing="20">


                                    <th>Number of Rows</th>
                                    <th>Number of Columns</th>

                                <tr>

                                    <td>{{ profile['rows'] }}</td>
                                    <td>{{ profile['columns'] }}</td>
                                </tr>
                            </table>
                            <br>

                            <div class="card-header">
                                Column Wise Missing Values
                            </div>


                                <table class="table table-bordered table-striped mb-0">
                                    <th>Column Name</th>
                                    <th>Missing Values</th>
                                    <th>Missing Value Percent</th>
                                    {% for key in profile['missing_values'].keys() %}
                                        <tr>
                                            <td>{{ key }}</td>
                                            <td>{{ profile['missing_values'][key] }}</td>
                                            <td>{{ profile['missing_vals_pct'][key] }}</td>
                                        </tr>
                                    {% endfor %}
                                </table>

                            <br>
                            <div class="card-header">
                                Categorical Column report
                            </div>
                            <table class="table table-bordered table-striped mb-0" id="dataTable4" width="100%"
                                   cellspacing="20">
                                <tr>
                                    <th>Number of Columns</th>
                                    <th>Categorical Columns</th>
                                </tr>
                                <tr>
                                    <td>{{ (profile['num_categorical_columns']) }}</td>
                                    <td>{{ profile['categorical_columns'] }}</td>
                                </tr>
                            </table>

                            <br>
                            <div class="card-header">
                                Numerical Column report
                            </div>

                            <table class="table table-bordered table-striped mb-0" id="dataTable5" width="100%"
                                   cellspacing="20">
                                <tr>
                                    <th>Number of Columns</th>
                                    <th>Numerical Columns</th>
                                </tr>
                                <tr>
                                    <td>{{ (profile['num_numerical_columns']) }}</td>
                                    <td>{{ profile['numerical_columns'][0] }}</td>
                                </tr>
                            </table>

                            <br>

                            <div class="card-header">
                                Columns with zero standard deviation
                            </div>
                             <table class="table table-bordered table-striped mb-0" id="dataTable6" width="100%"
                                   cellspacing="20">
                                <tr>
                                    <th>Number of columns </th>
                                    <th>Columns name</th>
                                </tr>
                                 <tr>
                                    <td>{{ profile['num_col_with_std_zero'] }}</td>
                                    <td>{{ profile['cols_with_std_zero'] }}</td>

                                </tr>
                             </table>

                            <br>

                            <table class="table table-bordered table-striped mb-0"  width="100%"
                                   cellspacing="20">
                                <col width="50">
                                <col width="100">
                                <tr>
                                    <th>Number of Duplicate Rows</th>
                                    <th>Data Size</th>
                                </tr>

                                <tr>
                                    <td>{{ profile['num_duplicate_rows'] }}</td>
                                    <td>{{ profile['datasize'] }}</td>
                                </tr>
                            </table>


                        </div>
                    </div>
                </div>
                <div class="select_problem">
                    <form action="/start_processing" method="POST" enctype="multipart/form-data">
                        <label for="source" id="label1"><b>Choose a Problem Type:</b></label>

                        <select name="problem_type" id="problem_type" class="form-control">
                            <option value="Regression">Regression</option>
                            <option value="Classification">Classification</option>
                        </select>
                        <br>
                        <br>
                         <label for="source" id="label2"><b>Drop Unwanted Columns:</b></label>
                        <select name="unwanted_cols" id="unwanted_cols" class="form-control" multiple>
                            {% for col in columns %}
                                <option value={{ col }}>{{ col }}</option>
                            {% endfor %}
                        </select>
                        <br>

                        <br>
                        <label for="source" id="label3"><b>Select Target Column:</b></label>
                        <select name="target_column" id="target_column" class="form-control">
                            {% for col in columns %}
                                <option value={{ col }}>{{ col }}</option>
                            {% endfor %}
                        </select>
                        <br>

                        <br>
                        <button type="submit" class="btn" id="loadFile2">Submit</button>

                    </form>
                </div>
            </div>
        </main>
        <br>
        <br>
        <footer class="py-4 bg-light mt-auto">
            <div class="container-fluid">
                <div class="d-flex align-items-center justify-content-between small">
                    <div class="text-muted">Copyright &copy; ineuron.ai</div>
                    <div>

                    </div>
                </div>
            </div>
        </footer>
    </div>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.min.js" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js"
        crossorigin="anonymous"></script>
<script src="static/js/scripts.js"></script>
<script src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.10.20/js/dataTables.bootstrap4.min.js" crossorigin="anonymous"></script>
<script src="static/assets/demo/datatables-demo.js"></script>
</body>
</html>
