{"id":18615046,"url":"https://github.com/andrewjbateman/angular-python-charts","last_synced_at":"2026-04-09T11:01:13.407Z","repository":{"id":96858892,"uuid":"392011628","full_name":"AndrewJBateman/angular-python-charts","owner":"AndrewJBateman","description":":clipboard: Displays data from Firebase database in an Angular frontend chart using Python","archived":false,"fork":false,"pushed_at":"2022-10-24T18:02:16.000Z","size":1780,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-30T11:50:04.929Z","etag":null,"topics":["angular","angular-material","angular-material14","angular14","chartjs","css3","firebase-database","html5","python","python3"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndrewJBateman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-08-02T16:01:22.000Z","updated_at":"2023-01-10T12:20:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"d42965a1-7a98-4a5e-a594-39bdeeba384e","html_url":"https://github.com/AndrewJBateman/angular-python-charts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AndrewJBateman/angular-python-charts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-python-charts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-python-charts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-python-charts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-python-charts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/angular-python-charts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fangular-python-charts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002130,"owners_count":26083307,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["angular","angular-material","angular-material14","angular14","chartjs","css3","firebase-database","html5","python","python3"],"created_at":"2024-11-07T03:27:56.965Z","updated_at":"2025-10-09T22:14:44.325Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :zap: Angular Python Charts\n\n* Angular frontend chart display with a Firestore database storing data supplied by a Python backend\n* **Note:** to open web links in a new window use: _ctrl+click on link_\n\n![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/angular-python-charts?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/angular-python-charts?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/angular-python-charts?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/angular-python-charts?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: Angular Python Charts](#zap-angular-python-charts)\n  * [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)\n  * [:books: General info](#books-general-info)\n  * [:camera: Screenshots](#camera-screenshots)\n  * [:signal_strength: Technologies](#signal_strength-technologies)\n  * [:floppy_disk: Setup](#floppy_disk-setup)\n  * [:flashlight: Testing](#flashlight-testing)\n  * [:computer: Code Examples](#computer-code-examples)\n  * [:cool: Features](#cool-features)\n  * [:clipboard: Status \u0026 To-Do List](#clipboard-status--to-do-list)\n  * [:clap: Inspiration](#clap-inspiration)\n  * [:file_folder: License](#file_folder-license)\n  * [:envelope: Contact](#envelope-contact)\n\n## :books: General info\n\n* Angular frontend shows chart data\n* Angular Material components such as mat-card, mat-form, mat-input \u0026 mat-list used\n* Python connects to Google Cloud Firestore database using a JSON access key file in the `/_pythonSensor` directory (ignored by Git). Random humidity and temperature data points generated - the number of points and time between samples can be specified by the user. These points are stored by Firestore with timestamps.\n* Requires Pip module: google-cloud-firestore for Python backend to access Firestore database\n* [Chart.js line chart](https://github.com/chartjs/Chart.js/blob/master/docs/charts/line.md#configuration-options) used to display humidity data in a line chart\n\n## :camera: Screenshots\n\n![Example screenshot](./img/chart.png)\n![Example screenshot](./img/firestore.png)\n\n## :signal_strength: Technologies\n\n* [Angular v14](https://angular.io/)\n* [Angular Material v14](https://material.angular.io/)\n* [rxjs v7](https://rxjs.dev/) reactive extensions library\n* [Firebase v9](https://firebase.google.com/)\n* [Python v3.9.5](https://www.python.org/) latest version\n* [Python package: google-cloud-firestore v2.2.0](https://pypi.org/project/google-cloud-firestore/)\n* [Chart.js v3](https://www.chartjs.org/docs/3.7.1/)\n\n## :floppy_disk: Setup\n\n* `npm i` to install dependencies\n* Install Python\n* Install pip\n* `pip install google.cloud` to install python google cloud\n* `pip install firebase-admin` to install python firebase_admin\n* Install pip module using `pip install --upgrade google-cloud-firestore\n* Firebase console: create new project and add Firestore Database\n* **Frontend:** Add firebase access credentials to app `environment` files\n* **Backend** Download firebase credentials to `./data.privateKey.json`\n* **Frontend:** `ng serve` for a dev server. Navigate to `http://localhost:4200/` - app will automatically reload if you change any of the source files\n* **Backend:** Run `cd _pythonSensor` then `python sim.py` to run Python code to generate data points\n* `ng build --prod` for a build folder\n\n## :flashlight: Testing\n\n* `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 2 out of 4 passing. No time spent on tests.\n\n## :computer: Code Examples\n\n* template Angular Material components used to add values to chart\n\n```html\n\u003cmat-card-content\u003e\n  \u003cmat-form-field class=\"card-form-field\"\u003e\n    \u003cmat-label\u003eEnter humidity\u003c/mat-label\u003e\n    \u003cinput matInput type=\"text\" [(ngModel)]=\"humiditySensorReading\" /\u003e\n    \u003cbutton\n      *ngIf=\"humiditySensorReading\"\n      matSuffix\n      mat-icon-button\n      aria-label=\"Clear\"\n      (click)=\"humiditySensorReading = ''\"\n    \u003e\n      \u003cmat-icon\u003eclose\u003c/mat-icon\u003e\n    \u003c/button\u003e\n  \u003c/mat-form-field\u003e\n  \u003cmat-form-field class=\"card-form-field\"\u003e\n    \u003cmat-label\u003eEnter Temperature\u003c/mat-label\u003e\n    \u003cinput matInput type=\"text\" [(ngModel)]=\"temperatureSensorReading\" /\u003e\n    \u003cbutton\n      *ngIf=\"temperatureSensorReading\"\n      matSuffix\n      mat-icon-button\n      aria-label=\"Clear\"\n      (click)=\"temperatureSensorReading = ''\"\n    \u003e\n      \u003cmat-icon\u003eclose\u003c/mat-icon\u003e\n    \u003c/button\u003e\n  \u003c/mat-form-field\u003e\n\u003c/mat-card-content\u003e\n```\n\n## :cool: Features\n\n* Real-time plotting of data points on Angular Chart\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: Working\n* To-Do: Add temperature data points - requires new chart\n\n## :clap: Inspiration\n\n* [D-I-Ry: Real-time Dashboard Charting / Plotting](https://www.youtube.com/watch?v=PY4yjjcThos\u0026t=378s)\n* [Python docs: Unicode HOWTO](https://docs.python.org/3/howto/unicode.html) - Python version used has Unicode UTF-8 strings as standard\n\n## :file_folder: License\n\n* N/A\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@yahoo.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fangular-python-charts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fangular-python-charts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fangular-python-charts/lists"}