{"id":15955967,"url":"https://github.com/davidcavazos/predictive-maintenance","last_synced_at":"2026-02-07T00:03:15.971Z","repository":{"id":39552999,"uuid":"179626374","full_name":"davidcavazos/predictive-maintenance","owner":"davidcavazos","description":"Predictive maintenance demo for water utilities","archived":false,"fork":false,"pushed_at":"2023-03-02T21:52:05.000Z","size":3317,"stargazers_count":2,"open_issues_count":31,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T14:47:55.966Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidcavazos.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":"2019-04-05T05:51:10.000Z","updated_at":"2022-11-22T04:45:54.000Z","dependencies_parsed_at":"2024-10-27T15:16:33.474Z","dependency_job_id":"a99763d6-c5d3-4d8d-ab15-bb920e4ef720","html_url":"https://github.com/davidcavazos/predictive-maintenance","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidcavazos/predictive-maintenance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcavazos%2Fpredictive-maintenance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcavazos%2Fpredictive-maintenance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcavazos%2Fpredictive-maintenance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcavazos%2Fpredictive-maintenance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidcavazos","download_url":"https://codeload.github.com/davidcavazos/predictive-maintenance/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcavazos%2Fpredictive-maintenance/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266263057,"owners_count":23901355,"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":[],"created_at":"2024-10-07T13:28:00.004Z","updated_at":"2026-02-07T00:03:15.945Z","avatar_url":"https://github.com/davidcavazos.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Predictive Maintenance for Water Utilities\n\n## Setup\n\nFirst, make sure you have [installed the Google Cloud SDK](https://cloud.google.com/sdk/install).\n\nThen, you will need to [create a new Google Cloud project](https://cloud.google.com/resource-manager/docs/creating-managing-projects).\n```sh\nPROJECT_ID=your-project-id\ngcloud projects create $PROJECT_ID\n```\n\nOnce you have a project, you will also need to [create a Cloud Storage bucket](https://cloud.google.com/storage/docs/creating-buckets).\n```sh\nBUCKET_NAME=your-bucket-name\ngsutil mb gs://$BUCKET_NAME\n```\n\n## Generating data\n\nPlease follow the [data-generator.ipynb](https://colab.research.google.com/github/davidcavazos/predictive-maintenance/blob/master/data-generator.ipynb) interactive notebook.\nThis notebook will go through all the steps and explanations on how to create the datasets, upload them to BigQuery, and train the BigQuery ML model.\n\n## Running the app\n\nOnce you have the data, you can now run the applications\n\nTo run the app, you have two options: to run it on Google Cloud, or to run it locally.\n\nRunning locally is only recommended for development and testing.\nIt won't be available to anyone outside your own local computer, and it won't run very fast.\n\nIt is recommended to run on Google Cloud once you are happy with your results.\nIt will run globally and accessible to anyone on the Internet.\n\n### Option A: Deploying to App Engine\n\nDeploying will take a couple minutes, but after that the application will autoscale to match the current load of the application.\n\n```sh\n# Deploy the servr with the BigQuery integration.\nbash server/deploy.sh\n\n# Deploy the Angular web application.\nbash webapp/deploy.sh\n```\n\n### Option B: Running locally\n\nYou will need to run the server and the web application on different terminals.\n\n```sh\n#===--- Terminal A ---===#\n\n# Create and activate a virtual environment.\npython3 -m virtualenv env\nsource env/bin/activate\n\n# Install dependencies.\npip install -U -r requirements.txt\n\n# Run the server locally.\npython server/main.py\n```\n\nNow that the server is running, you can now run the web application on another terminal.\n\n```sh\n#===--- Terminal B ---===#\n\n# Serve the web application.\ncd webapp\nng serve\n```\n\nOnce everything is running, you can browse to the app at localhost.\n\n```sh\nhttp://localhost:5000\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidcavazos%2Fpredictive-maintenance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidcavazos%2Fpredictive-maintenance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidcavazos%2Fpredictive-maintenance/lists"}