{"id":14067587,"url":"https://github.com/timoschd/Dockerized-Plumber-API","last_synced_at":"2025-07-30T02:30:43.981Z","repository":{"id":171222736,"uuid":"228042673","full_name":"timoschd/Dockerized-Plumber-API","owner":"timoschd","description":"Containerized Plumber REST API which offers data from a containerized Cron job on a Google Big Query data source within a container network. ","archived":false,"fork":false,"pushed_at":"2020-04-16T17:05:54.000Z","size":75,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-19T12:08:58.748Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","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/timoschd.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}},"created_at":"2019-12-14T15:11:14.000Z","updated_at":"2023-06-01T13:59:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a8e7f82-6b18-4bf7-a574-c69378ee272f","html_url":"https://github.com/timoschd/Dockerized-Plumber-API","commit_stats":null,"previous_names":["timoschd/dockerized-plumber-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timoschd/Dockerized-Plumber-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoschd%2FDockerized-Plumber-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoschd%2FDockerized-Plumber-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoschd%2FDockerized-Plumber-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoschd%2FDockerized-Plumber-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timoschd","download_url":"https://codeload.github.com/timoschd/Dockerized-Plumber-API/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timoschd%2FDockerized-Plumber-API/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267798625,"owners_count":24145727,"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-07-30T02:00:09.044Z","response_time":70,"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":[],"created_at":"2024-08-13T07:05:40.596Z","updated_at":"2025-07-30T02:30:43.737Z","avatar_url":"https://github.com/timoschd.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"This project is described in detail in the corresponding blog post series:\n\n**Part I:** https://medium.com/analytics-vidhya/google-big-query-with-r-875facef7844 \u003cp\u003e\n**Part II:** https://medium.com/analytics-vidhya/live-data-extraction-with-cron-and-r-f29324bf153e \u003cp\u003e\n**Part III:** https://medium.com/analytics-vidhya/easy-api-building-for-data-scientists-with-r-673b381c4ae1\n\n\n# Dockerized Plumber API\n\nThese REST APIs provide a way for platform/language independent access to the public Google Big Query dataset  `bigquery-public-data:openaq.global_air_quality` of air pollution measured soley at Indian measurement points. The dataset is updated daily, however older data seem to get deleted. To access this data a Cron job fetches new data in 12 hour intervals from Google through the R script `get_data_big_query.R` and adds new rows to the saved dataset. The data can be requested fully or aggregated on date intervals through the APIs provided in the Rscript `API.R`. The data import via Cron and the APIs are run seperately in two Docker containers with a shared volume for the data as specified in the `docker-compose.yml`.\u003cbr\u003e\u003cbr\u003e The APIs for Cloud Storage and Big Query have to be activated first for the used Google account at https://console.cloud.google.com/ and a Service Account Token (here not included, should go in cron/src/) needs to be generated and downloaded for authentification as described in section \"Service account token\" at https://gargle.r-lib.org/articles/get-api-credentials.html. For information about the r package `bigrquery`  see https://github.com/r-dbi/bigrquery. \n\n\n## API Documentation:  \n\n- Get complete data from all Indian measurement points   \n\n      POST */all\n\n      NO parameters\n      content-type: application/json \n\n- Get all Indian measurement locations \n\n       POST */locations\n\n      NO parameters\n      content-type: application/json  \n\n- Get median airquality metrics of the current date with date horizon for averaging at measurement location.\n\n      POST */summed_quality_now?measurment_location=\u0026date=\n\n      measurment_location: Takes all values from the Indian measurement locations, defaults to all\n      date: The daterange, takes either today, week, month, quarter, year, defaults to today\n      content-type: application/json   \n      \n\n- Get median air quality for all dates. The timerange for averaging and the measurement location can be set. \n\n      POST */summed_quality?measurment_location=\u0026date=\n\n      measurment_location: Takes all values from the Indian measurement locations, defaults to all\n      date: The daterange, takes either day, week, month, quarter, year, defaults to day\n      content-type: application/json  \n\n\n\n- Plot a test histogram\n\n      GET */plot\n\n      NO parameters\n      content-type: application/json  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimoschd%2FDockerized-Plumber-API","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimoschd%2FDockerized-Plumber-API","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimoschd%2FDockerized-Plumber-API/lists"}