{"id":16223704,"url":"https://github.com/lykmapipo/python-spark-log-analysis","last_synced_at":"2025-06-22T06:38:03.363Z","repository":{"id":215512305,"uuid":"739111096","full_name":"lykmapipo/Python-Spark-Log-Analysis","owner":"lykmapipo","description":"Python scripts to process, and analyze log files using PySpark.","archived":false,"fork":false,"pushed_at":"2024-07-13T12:54:57.000Z","size":134,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T16:41:49.528Z","etag":null,"topics":["apache-arrow","apache-spark","apache-spark-sql","data-analysis","data-extraction","data-processing","data-transformation","log-analysis","log-analyzer","log-monitor","lykmapipo","pandas","pyarrow","pyspark","python","seaborn","spark-ml","spark-nlp","sparkml-pipelines","sql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lykmapipo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-04T19:50:22.000Z","updated_at":"2025-05-21T00:28:21.000Z","dependencies_parsed_at":"2024-01-16T18:56:10.052Z","dependency_job_id":"9ee5a081-b97e-4935-ad06-8acd372915d6","html_url":"https://github.com/lykmapipo/Python-Spark-Log-Analysis","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"57a1640132511c57b59c019b0f3cd769fdf23cf3"},"previous_names":["lykmapipo/python-spark-log-analysis"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/lykmapipo/Python-Spark-Log-Analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2FPython-Spark-Log-Analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2FPython-Spark-Log-Analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2FPython-Spark-Log-Analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2FPython-Spark-Log-Analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lykmapipo","download_url":"https://codeload.github.com/lykmapipo/Python-Spark-Log-Analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2FPython-Spark-Log-Analysis/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261249798,"owners_count":23130495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-arrow","apache-spark","apache-spark-sql","data-analysis","data-extraction","data-processing","data-transformation","log-analysis","log-analyzer","log-monitor","lykmapipo","pandas","pyarrow","pyspark","python","seaborn","spark-ml","spark-nlp","sparkml-pipelines","sql"],"created_at":"2024-10-10T12:19:48.249Z","updated_at":"2025-06-22T06:37:58.345Z","avatar_url":"https://github.com/lykmapipo.png","language":"Python","readme":"# Python-Spark-Log-Analysis\n\nPython scripts to process, and analyze log files using PySpark.\n\n\u003e 👋 This repository's maintainer is available to hire for Python/PySpark/Spark NLP consulting projects. To get a cost estimate, send email to lallyelias87@gmail.com (for projects of any size or complexity).\n\n## Requirements\n\n- [Python 3.8+](https://www.python.org/)\n- [pip 23.3+](https://github.com/pypa/pip)\n- [pyarrow 14.0+](https://github.com/apache/arrow)\n- [pandas 2.0+](https://github.com/pandas-dev/pandas)\n- [pyspark 3.5+](https://github.com/apache/spark/tree/master/python)\n- [spark-nlp 5.2.2+](https://github.com/JohnSnowLabs/spark-nlp)\n\n## Usage\n\n- Clone this repository\n```sh\ngit clone https://github.com/lykmapipo/Python-Spark-Log-Analysis.git\ncd Python-Spark-Log-Analysis\n```\n\n- Install all dependencies\n\n```sh\npip install -r requirements.txt\n```\n\n- To `parse and prepare` raw log files, run:\n```sh\npython prepare.py\n```\n\n- To get `basic summary report` of structured logs, run:\n```sh\npython summarize.py\n```\n\n- To perform `word frequency analysis` on structured logs, run:\n```sh\npython count_words.py\n```\n\n- To perform `keyword extraction analysis` on structured logs, run:\n```sh\npython keywords.py\n```\n\n## Data\n- Check [data/raw](https://github.com/lykmapipo/Python-Spark-Log-Analysis/tree/main/data/raw) directory for all `raw logs` data. Each file is in `text format`, and each log entry is format as `[timestamp] level: message`.\n\n- Check [data/interim/structured-logs](https://github.com/lykmapipo/Python-Spark-Log-Analysis/tree/main/data/interim/structured-logs) directory for `structured logs` data generated when run `prepare.py`. Each file is in `parquet format`, and each log entry follow below `spark` schema:\n```sh\nroot\n |-- log_timestamp: timestamp (nullable = true)\n |-- log_level: string (nullable = true)\n |-- log_message: string (nullable = true)\n |-- log_length: integer (nullable = true)\n |-- log_year: integer (nullable = true)\n |-- log_month: integer (nullable = true)\n |-- log_day: integer (nullable = true)\n |-- log_hour: integer (nullable = true)\n |-- log_minute: integer (nullable = true)\n |-- log_second: integer (nullable = true)\n |-- log_message_length: integer (nullable = true)\n```\n\n- Check [summary report](https://github.com/lykmapipo/Python-Spark-Log-Analysis/blob/main/data/reports/summary_report.csv) generated when run `summarize.py`.\n\n- Check [word frequency analysis report](https://github.com/lykmapipo/Python-Spark-Log-Analysis/blob/main/data/reports/word_count.csv) generated when run `count_words.py`.\n\n- Check [keywords extraction analysis report](https://github.com/lykmapipo/Python-Spark-Log-Analysis/blob/main/data/reports/keywords.csv) generated when run `keywords.py`.\n\n## Contribute\n\nIt will be nice, if you open an issue first so that we can know what is going on, then, fork this repo and push in your ideas. Do not forget to add a bit of test(s) of what value you adding.\n\n## Questions/Issues/Contacts\n\nlallyelias87@gmail.com, or open a GitHub issue\n\n\n## Licence\n\nThe MIT License (MIT)\n\nCopyright (c) lykmapipo \u0026 Contributors\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flykmapipo%2Fpython-spark-log-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flykmapipo%2Fpython-spark-log-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flykmapipo%2Fpython-spark-log-analysis/lists"}