{"id":22243716,"url":"https://github.com/ericoc/watertable","last_synced_at":"2025-07-28T01:33:13.577Z","repository":{"id":263039332,"uuid":"889121225","full_name":"ericoc/watertable","owner":"ericoc","description":"Water (Data)Table(s) Usage","archived":false,"fork":false,"pushed_at":"2024-11-30T17:18:32.000Z","size":957,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-30T18:27:19.910Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/ericoc.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":"2024-11-15T16:45:28.000Z","updated_at":"2024-11-30T17:18:35.000Z","dependencies_parsed_at":"2024-11-20T21:02:15.750Z","dependency_job_id":null,"html_url":"https://github.com/ericoc/watertable","commit_stats":null,"previous_names":["ericoc/watertable"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericoc%2Fwatertable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericoc%2Fwatertable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericoc%2Fwatertable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericoc%2Fwatertable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericoc","download_url":"https://codeload.github.com/ericoc/watertable/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227855406,"owners_count":17830159,"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-12-03T04:28:41.246Z","updated_at":"2025-07-28T01:33:13.534Z","avatar_url":"https://github.com/ericoc.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"See https://github.com/ericoc/utilities/\n\n\n\n\n# 💧 Water Table 🚰\n\nThe [Philadelphia Water Department](https://water.phila.gov/) website\nallows for a residential account holder to download an export of their water usage\nin \"comma-separated values\" (CSV) file format.\n\n---\n\n## Export\nA CSV can be downloaded by \"Gallons\" of water used \"Daily\" from the\n\"[Detailed Usage](https://secure8.i-doxs.net/CityOfPhiladelphiaWRB/Secure/Usage.aspx)\"\nsection of the Philadelphia Water Department (PWD) website.\n\n![Export Philadelphia Water Department Detailed Usage Screenshot](export.png)\n\nThe default export file is named \"`ChartData.csv`\", containing data such as\nthe following:\n```\nAccess Code, Time Interval, Consumption, Units\n00145xxxx, 11/27/2024, 18.7013, Gallons\n00145xxxx, 11/28/2024, 35.9065, Gallons\n00145xxxx, 11/29/2024, 35.1584, Gallons\n00145xxxx, 11/30/2024, 44.8831, Gallons\n00145xxxx, 12/01/2024, 71.8130, Gallons\n00145xxxx, 12/02/2024, 25.4338, Gallons\n00145xxxx, 12/03/2024, 23.9377, Gallons\netc..\n```\nOnly the second and third columns of this CSV file truly matter, since the first\ncolumn seems to be associated to the PWD account, while the fourth column value\nshould always be \" ` Gallons`\".\n\n## Import\nWith a `ChartData.csv` file from PWD, the Django management command `fill`\nis used to import records into the Django database from the `.CSV` file data:\n```python\n$ python3 manage.py fill\nCreated:        Wednesday, November 27, 2024 (2024-11-27) [18.7013 gallons]\nCreated:        Thursday, November 28, 2024 (2024-11-28) [35.9065 gallons]\nCreated:        Friday, November 29, 2024 (2024-11-29) [35.1584 gallons]\nCreated:        Saturday, November 30, 2024 (2024-11-30) [44.8831 gallons]\nCreated:        Sunday, December 01, 2024 (2024-12-01) [71.813 gallons]\nCreated:        Monday, December 02, 2024 (2024-12-02) [25.4338 gallons]\nCreated:        Tuesday, December 03, 2024 (2024-12-03) [23.9377 gallons]\nTotal:          7\nDone.\n```\n\n---\n\n## Refreshing\nFinally, downloading a fresh `ChartData.csv` file from the Philadelphia Water\nDepartment website, and running `manage.py fill` again will update, or create,\nany water usage records for the appropriate days.\n\nIt appears that the Philadelphia Water Department website may only preserve\napproximately two (2) years of historical water usage.\n\n---\n\n## Statistics\nOnce water usage data is present in the database, the management command\n`manage.py weekend` will display interesting statistics about the water usage:\n```python\n$ python3 manage.py weekend\nFrom:           Thursday, September 15, 2022 (2022-09-15)\nTo:             Wednesday, December 04, 2024 (2024-12-04)\nWeekdays:       19,359.5858 gallons / 578 week days = average 33.4941 gallons.\nWeekends:       13,119.3358 gallons / 229 weekend days = average 57.2897 gallons.\nTotal:          32,478.9216 gallons / 807 days = average 40.2465 gallons.\n```\nThe total and average water usage per day is shown, as well as the total\nand average water usage on week-days versus weekends.\n\n---\n\n## Software\nThe main page (`/`) uses DataTables, while `/chart/` uses HighCharts.\n\nBoth DataTables and HighCharts depend upon identical JSON data from the same\nDjango REST framework API location:\n\n`/api/usage/?format=json`\n\n---\n\n## Examples\n\n### DataTables\n- https://water.ericoc.com/\n\n### HighCharts\n- https://water.ericoc.com/chart/\n\n### Django REST framework API\n- https://water.ericoc.com/api/usage/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericoc%2Fwatertable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericoc%2Fwatertable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericoc%2Fwatertable/lists"}