Skip to content

Commit

Permalink
perbaikan upload git: hapus rar, extract, and fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rizkytegar committed Mar 29, 2024
1 parent 4173adc commit 21ca15e
Show file tree
Hide file tree
Showing 10 changed files with 407 additions and 27 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{js,css,scss,yml,yaml,html,json}]
indent_size = 2
172 changes: 172 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
# Files
.DS_Store
npm-debug.log
package-lock.json

# Folders
.idea/
node_modules

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/



Binary file removed CekatanBiz Web.rar
Binary file not shown.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2019-2021 JustBoil.me (https://justboil.me)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn app:app --log-file=-
46 changes: 19 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
CekatanBiz Website
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

CekatanBiz is Website tools Data Analyst,and Business Analyst

Copyright by PT Media Pengembangan Teknologi Indonesia Jaya


Developed by Ananda Rauf Maududi


Developed Date: 27 Maret 2024

How to Use:
1.Extract file Rar CekatanBiz Web.rar
2.[Download Python](https://www.python.org/downloads/)
3.Setting Environtment Variabel in path System and User: pathpython/python388/Scripts and pathpython/python388/Lib
4.Install Library Pyspark,Pandas,Matplotlib and Install Flask: PySpark: pip install pyspark Pandas: pip install pandas Matplotlib: pip install matplotlib
# CekatanBiz Website
CekatanBiz is Website tools Data Analyst, and Business Analyst.

## Copyright
- Copyright by PT Media Pengembangan Teknologi Indonesia Jaya
- Developed by Ananda Rauf Maududi
- Developed Date: 27 Maret 2024

## How to Use:
1. Extract file Rar CekatanBiz Web.rar
2. [Download Python](https://www.python.org/downloads/)
3. Setting Environtment Variabel in path System and User: pathpython/python388/Scripts and pathpython/python388/Lib
4. Install Library Pyspark,Pandas,Matplotlib and Install Flask: PySpark: pip install pyspark Pandas: pip install pandas Matplotlib: pip install matplotlib
Flask: pip install flask
5.Run program: python app.py or flask run
5. Run program: python app.py or flask run


How to Contribute:
1.Extract file Rar CekatanBiz Web.rar
2.[Download IDE Cursor SH](https://cursor.sh/)
3.Open Project Folder
## How to Contribute:
1. Extract file Rar CekatanBiz Web.rar
2. [Download IDE Cursor SH](https://cursor.sh/)
3. Open Project Folder
4. Finish

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Contact Us:
Have any problem?

Contact Us:
1[Send Email](https://mailto:tmdgroupid@gmail.com)

55 changes: 55 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
from flask import Flask, render_template, request
from pyspark.sql import SparkSession
import pandas as pd
import matplotlib.pyplot as plt
import io
import base64

app = Flask(__name__)

@app.route('/')
def beranda():
return render_template('index.html', title='CekatanBiz - Upload File Dataset')

@app.route('/uploadfile', methods=['GET', 'POST'])
def uploadfile():
if request.method == 'POST':
file = request.files['file']
if file.filename.endswith('.csv'):
filename = file.filename
file.save(filename)
return render_template("result-analyst.html", title='CekatanBiz - Result Analyst', name=filename)
else:
return render_template("index.html", title='CekatanBiz - Upload File Dataset', error="File must be in CSV format.")

return render_template("index.html", title='CekatanBiz - Upload File Dataset')

@app.route('/analyst/<filename>')
def analyst(filename):
spark = SparkSession.builder.appName('Data Analyst').getOrCreate()
df = spark.read.csv(filename, header=True, inferSchema=True)

# Analisis data menggunakan PySpark
pie_data = df.groupBy('category').count().toPandas()
bar_data = df.groupBy('category').sum('value').toPandas()

# Menggambar chart pie
pie_data.plot.pie(y='count', labels=pie_data['category'], autopct='%1.1f%%', legend=False)
plt.title('Pie Chart')
pie_chart = io.BytesIO()
plt.savefig(pie_chart, format='png')
pie_chart = base64.b64encode(pie_chart.getvalue()).decode('utf-8')
plt.close()

# Menggambar chart bar
bar_data.plot.bar(x='category', y='sum(value)', legend=False)
plt.title('Bar Chart')
bar_chart = io.BytesIO()
plt.savefig(bar_chart, format='png')
bar_chart = base64.b64encode(bar_chart.getvalue()).decode('utf-8')
plt.close()

return render_template("result-analyst.html", title='CekatanBiz - Analyst', filename=filename, pie_chart=pie_chart, bar_chart=bar_chart)

if __name__ == '__main__':
app.run(host='0.0.0.0', debug=True)
Binary file added static/asset/favicon.ico
Binary file not shown.
63 changes: 63 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!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.0">
<meta name="description" content="CekatanBiz is Website Tools Data Analyz and Business Analyst">
<title>{{ title }}</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f8f8f8;
}

h1 {
text-align: center;
margin-bottom: 20px;
}

form {
display: flex;
flex-direction: column;
align-items: center;
}

input[type="file"] {
margin-bottom: 10px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}

input[type="submit"] {
padding: 10px 20px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 5px;
cursor: pointer;
}

input[type="submit"]:hover {
background-color: #0056b3;
}
</style>
</head>

<body>
<h1>File Dataset Upload</h1>
<form action="/uploadfile" method="post" enctype="multipart/form-data">
<input type="file" name="file" accept=".csv">
<input type="submit" value="Upload">
</form>
</body>

</html>
Loading

0 comments on commit 21ca15e

Please sign in to comment.