{"id":21844042,"url":"https://github.com/blaylockbk/synopticpy","last_synced_at":"2025-04-06T22:06:14.263Z","repository":{"id":47006583,"uuid":"288617886","full_name":"blaylockbk/SynopticPy","owner":"blaylockbk","description":"Retrieve data from thousands of mesonet stations as Polars DataFrames from Synoptic's Weather API. ","archived":false,"fork":false,"pushed_at":"2024-10-19T06:15:38.000Z","size":27210,"stargazers_count":48,"open_issues_count":9,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-29T21:01:19.676Z","etag":null,"topics":["mesonet","mesowest","polars","python","synoptic-api","weather"],"latest_commit_sha":null,"homepage":"https://synopticpy.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blaylockbk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-19T02:52:50.000Z","updated_at":"2024-10-13T02:57:13.000Z","dependencies_parsed_at":"2024-11-05T23:46:38.465Z","dependency_job_id":null,"html_url":"https://github.com/blaylockbk/SynopticPy","commit_stats":{"total_commits":353,"total_committers":9,"mean_commits":39.22222222222222,"dds":0.2974504249291785,"last_synced_commit":"378b3e1a0cc4b7170034cb0e1386c19a2f354eb1"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaylockbk%2FSynopticPy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaylockbk%2FSynopticPy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaylockbk%2FSynopticPy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blaylockbk%2FSynopticPy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blaylockbk","download_url":"https://codeload.github.com/blaylockbk/SynopticPy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557767,"owners_count":20958047,"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":["mesonet","mesowest","polars","python","synoptic-api","weather"],"created_at":"2024-11-27T22:18:14.140Z","updated_at":"2025-04-06T22:06:14.240Z","avatar_url":"https://github.com/blaylockbk.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv\n    align='center'\n\u003e\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/blaylockbk/SynopticPy/refs/heads/56-rewrite-using-polars/docs/_static/SynopticPy_white.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/blaylockbk/SynopticPy/refs/heads/56-rewrite-using-polars/docs/_static/SynopticPy_blue.svg\"\u003e\n  \u003cimg alt=\"Shows a black logo in light color mode and a white one in dark color mode.\" src=\"https://raw.githubusercontent.com/blaylockbk/SynopticPy/refs/heads/56-rewrite-using-polars/docs/_static/SynopticPy_blue.svg\" width=300\u003e\n\u003c/picture\u003e\n\n## Synoptic API for Python\n\n\u003c!-- Badges --\u003e\n\n[![PyPI](https://img.shields.io/pypi/v/SynopticPy)](https://pypi.python.org/pypi/SynopticPy/)\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/synopticpy.svg)](https://anaconda.org/conda-forge/synopticpy)\n[![DOI](https://zenodo.org/badge/288617886.svg)](https://zenodo.org/badge/latestdoi/288617886)\n\n![License](https://img.shields.io/github/license/blaylockbk/SynopticPy)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![Tests (Python)](https://github.com/blaylockbk/SynopticPy/actions/workflows/tests-python.yml/badge.svg)](https://github.com/blaylockbk/SynopticPy/actions/workflows/tests-python.yml)\n[![Documentation Status](https://readthedocs.org/projects/synopticpy/badge/?version=latest)](https://synopticpy.readthedocs.io/?badge=latest)\n[![Python](https://img.shields.io/pypi/pyversions/SynopticPy.svg)](https://pypi.org/project/SynopticPy/)\n[![Conda Recipe](https://img.shields.io/badge/recipe-synopticpy-green.svg)](https://anaconda.org/conda-forge/synopticpy)\n[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/synopticpy.svg)](https://anaconda.org/conda-forge/synopticpy)\n\n\u003c!-- (Badges) --\u003e\n\n## 📘 [Documentation](https://synopticpy.readthedocs.io/) | [💬 Discussions](https://github.com/blaylockbk/SynopticPy/discussions) | [🚑 Issues](https://github.com/blaylockbk/SynopticPy/issues)\n\n\u003c/div\u003e\n\n[Synoptic's Weather API](https://synopticdata.com/weatherapi/) provides real-time and historical surface-based weather and environmental observations for thousands of mesonet stations, and the [open-access data](https://synopticdata.com/pricing/open-access-pricing/) is _free_. More data and enhanced services may be purchased (from Synoptic, not me).\n\nI'm a Synoptic user. I wrote this package to conveniently request data from Synoptic in a Pythonic way and convert its returned JSON to a **[Polars DataFrame](https://docs.pola.rs/user-guide/getting-started/)**.\n\n```python\nfrom datetime import timedelta\nfrom synoptic import TimeSeries\n\ndf = TimeSeries(\n    stid=\"wbb\",\n    recent=timedelta(minutes=30)\n).df()\n```\n\n![alt text](docs/_static/json_to_polars.png)\n\nI'm sharing this package to improve my skills with Polars and gain more experience in building and maintaining open-source Python packages. If you came across this package, I hope you find it valuable.\n\n**Best of Luck 🍀**  \n-Brian\n\n# 🐍 Install\n\n```bash\npip install SynopticPy\n```\n\n```bash\nconda install -c conda-forge synopticpy\n```\n\n## Configure Token\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e ## 🎟️ To use SynopticPy you need a [Synoptic API token](https://customer.synopticdata.com/).\n\nThere are three ways you can configure your Synoptic API token:\n\n1. Set an environment variable `SYNOPTIC_TOKEN` with your token. For example, in bash:\n   ```bash\n   export SYNOPTIC_TOKEN=\"yourTokenHere123456789\"\n   ```\n1. Create a file `~/.config/SynopticPy/config.toml` with the following\n   ```toml\n   token = \"yourTokenHere123456789\"\n   ```\n1. Pass your token whenever you use one of SynopticPy's classes.\n   ```python\n   TimeSeries(\n       stid=\"wbb\",\n       recent=30,\n       token=\"yourTokenHere123456789\"\n   )\n   ```\n\n# How to Cite and Acknowledge\n\nIf SynopticPy played an important role in your work, please [tell me about it](https://github.com/blaylockbk/SynopticPY/discussions/categories/show-and-tell)! Also, consider including a citation or acknowledgement in your article or product.\n\n**_Suggested Citation_**\n\n\u003e Blaylock, B. K. (YEAR). SynopticPy: Synoptic API for Python (Version 20??.?.?) [Computer software]. https://github.com/blaylockbk/SynopticPy\n\n**_Suggested Acknowledgment_**\n\n\u003e A portion of this work used code generously provided by Brian Blaylock's SynopticPy Python package (https://github.com/blaylockbk/SynopticPy)\n\n\u003cbr\u003e\n\u003chr\u003e\n\n\u003e [!TIP]\n\u003e\n\u003e ### 📈 See also my [SynopticPy Web App](https://blaylockbk.github.io/SynopticPy) which lets you plot station data in your browser powered by [pyscript](https://pyscript.net/)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaylockbk%2Fsynopticpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblaylockbk%2Fsynopticpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaylockbk%2Fsynopticpy/lists"}