{"id":21293346,"url":"https://github.com/ejw-data/sqlalchemy-flask-api-weather","last_synced_at":"2026-04-11T15:36:28.921Z","repository":{"id":39631682,"uuid":"217728325","full_name":"ejw-data/sqlalchemy-flask-api-weather","owner":"ejw-data","description":"SQLite Database accessed with SQLAlchemy to perform analysis and create Flask API of the data","archived":false,"fork":false,"pushed_at":"2022-11-02T06:18:17.000Z","size":1034,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T16:44:29.892Z","etag":null,"topics":["flask","pandas","python","sqlalchemy","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/ejw-data.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}},"created_at":"2019-10-26T15:23:37.000Z","updated_at":"2022-11-02T05:58:20.000Z","dependencies_parsed_at":"2023-01-22T17:00:08.340Z","dependency_job_id":null,"html_url":"https://github.com/ejw-data/sqlalchemy-flask-api-weather","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ejw-data/sqlalchemy-flask-api-weather","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejw-data%2Fsqlalchemy-flask-api-weather","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejw-data%2Fsqlalchemy-flask-api-weather/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejw-data%2Fsqlalchemy-flask-api-weather/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejw-data%2Fsqlalchemy-flask-api-weather/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ejw-data","download_url":"https://codeload.github.com/ejw-data/sqlalchemy-flask-api-weather/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejw-data%2Fsqlalchemy-flask-api-weather/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31686140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["flask","pandas","python","sqlalchemy","sqlite"],"created_at":"2024-11-21T13:54:24.869Z","updated_at":"2026-04-11T15:36:28.888Z","avatar_url":"https://github.com/ejw-data.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sqlalchemy-flask-api-weather  \n\nAuthor:  Erin James Wills, ejw.data@gmail.com \n\n![Weather API](./images/weather-api.png)\n\u003ccite\u003ePhoto by [NASA](https://unsplash.com/@nasa?utm_source=unsplash\u0026utm_medium=referral\u0026utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/weather?utm_source=unsplash\u0026utm_medium=referral\u0026utm_content=creditCopyText)\u003c/cite\u003e  \n\n\u003cbr\u003e\n\n## Overview  \n\u003chr\u003e\n\nThe purpose of this repo is to become familiarized with SQLAlchemy's Object Relational Mapper (ORM).  To do this I will be using a SQLite database that has two tables about Hawaii weather (measurements and stations).  The code associated with this project can be found in the analysis folder within a jupyter notebook named `climate_analysis.ipynb`. In addtion to analyzing the data, a Flask API was created that connects to the database and accepts five different API requests - three of the requests return a predefined query result but the other two API's allow for the user to include one or two user inputs that are used within the API request as database filters.   \n\n\u003cbr\u003e\n\n## Technologies\n* Python\n* Pandas\n* SQLAlchemy\n* Flask\n* SQLite\n\n\u003cbr\u003e\n\n## Data Source\nDataset generated by Trilogy Education Services. Origins beyond this is unknown. \n\n\u003cbr\u003e\n\n## Setup and Installation  \n1. Environment needs the following:  \n    * Python 3.6+\n    * pandas\n    * flask\n    * sqlalchemy.ext.automap\n    * sqlalchemy.orm\n    * datetime\n    * numpy\n1. Activate your environment\n1. Clone the repo to your local machine\n1. Start Jupyter Notebook within the environment from the repo\n1. Run `climate_analysis.ipynb` to test connections and queries\n1. To run the flask app:\n    *  In terminal, navigate to the top-level repo folder\n    *  Activate your environment\n    *  In terminal run:  `python app.py`\n    *  The routes that can be used are listed on the page.\n\n\u003cbr\u003e\n\n## Examples  \n\n\u003cfigure\u003e\n\n![API Routes](./images/api-options.png)\n\u003cfigcaption\u003eFig.1 - API route options displayed in a browser\u003c/figcaption\u003e\n\u003c/figure\u003e\n\n\u003cbr\u003e\n\n\u003cfigure\u003e\n\n![API Results](./images/api-results.png)\n\u003cfigcaption\u003eFig.2 - API results returning a single day's precipation and temperature measurements\u003c/figcaption\u003e\n\u003c/figure\u003e  \n\n\u003cbr\u003e\n\n\u003cfigure\u003e\n\n![Analysis Histogram](./images/temperature-output-histogram.png)\n\u003cfigcaption\u003eFig.3 - Matplotlib histogram of temperatures returned from a date range query\u003c/figcaption\u003e\n\u003c/figure\u003e  \n\n\u003cbr\u003e\n\n\u003cfigure\u003e\n\n![Analysis Stacked Area Plot](./images/temperature-output-stacked-area-plot.png)\n\u003cfigcaption\u003eFig.4 - Matplotlib stacked area chart of temperatures returned from a date range query\u003c/figcaption\u003e\n\u003c/figure\u003e  \n\n\n\u003cbr\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejw-data%2Fsqlalchemy-flask-api-weather","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fejw-data%2Fsqlalchemy-flask-api-weather","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejw-data%2Fsqlalchemy-flask-api-weather/lists"}