{"id":20662423,"url":"https://github.com/ovinc/weatho","last_synced_at":"2026-05-17T06:40:50.201Z","repository":{"id":65576099,"uuid":"330447248","full_name":"ovinc/weatho","owner":"ovinc","description":"Python package to download, manage and plot weather data from Darksky / OpenWeatherMap APIs","archived":false,"fork":false,"pushed_at":"2021-01-25T15:27:43.000Z","size":563,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-22T06:00:53.259Z","etag":null,"topics":["darksky","darksky-api","download","openweathermap","openweathermap-api","plot","python","python-3","python3","weather","weather-api"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ovinc.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}},"created_at":"2021-01-17T17:28:56.000Z","updated_at":"2021-01-19T15:44:14.000Z","dependencies_parsed_at":"2023-01-30T08:55:27.401Z","dependency_job_id":null,"html_url":"https://github.com/ovinc/weatho","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/ovinc/weatho","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovinc%2Fweatho","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovinc%2Fweatho/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovinc%2Fweatho/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovinc%2Fweatho/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ovinc","download_url":"https://codeload.github.com/ovinc/weatho/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ovinc%2Fweatho/sbom","scorecard":{"id":715522,"data":{"date":"2025-08-11","repo":{"name":"github.com/ovinc/weatho","commit":"1086b3f596a2396db0da587abab1a21b4fbc3643"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T09:30:33.526Z","repository_id":65576099,"created_at":"2025-08-22T09:30:33.526Z","updated_at":"2025-08-22T09:30:33.526Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013887,"owners_count":26085325,"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-10-12T02:00:06.719Z","response_time":53,"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":["darksky","darksky-api","download","openweathermap","openweathermap-api","plot","python","python-3","python3","weather","weather-api"],"created_at":"2024-11-16T19:14:05.943Z","updated_at":"2025-10-13T01:23:22.707Z","avatar_url":"https://github.com/ovinc.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\nAccess, download and plot weather data from the following APIs:\n- Darksky (https://darksky.net/dev)\n- OpenWeatherMap (https://openweathermap.org/api)\n\nBoth sources require an API key to get access to the data. However, when dealing with data already downloaded as files and stored locally, the API key is not necessary.\n\n# Install\n\n```bash\npip install weatho\n```\n\n# Quick Start\n\n```python\nfrom weatho import Weather, plot\n\n# source can be 'owm' or 'darksky'\nw = Weather(location=(45.77, 4.84), source='owm', api_key='xyz')\n\n# Get raw data from the API (source-dependent)\n# --------------------------------------------\n\nw.url()    # get URL at which to downlowd data\nw.fetch()  # get data as a dictionary\n\n# By default, current data; get historical data by passing a datetime.datetime:\n\nfrom datetime import datetime, timedelta\nfrom pytz import timezone\ntz = timezone('Europe/Paris')\ndate = tz.localize(datetime(2021, 1, 15, 12))  # 15 Jan. 2021 at Noon in Paris timezone\n\nw.url(date)\nw.fetch(date)\n\n# Get and plot formatted, source-independent data\n# -----------------------------------------------\n\nw.current()   # current weather conditions\nw.hourly()    # hourly data for present day, including forecast\n\n# It is also possible to access historical data:\nw.current(date)\nw.hourly(date, until=date + timedelta(days=3))\n\n# Plot hourly data:\nplot(w.hourly())\n```\n\nThere are also options to download the data directly as .json files in a folder and work from this data (see below).\n\nFor detailed examples, see the *Examples.ipynb* notebook (https://github.com/ovinc/weatho/blob/master/Examples.ipynb).\n\n\n# Contents\n\n\n## Weather class\n\nThe following methods are available from a `Weather` object:\n\n- For raw, source-dependent data:\n    - `url()` and copy-paste the link into a browser (returns url link)\n    - `fetch()` to get the raw data from the internet (returns dict of data)\n    - `save()` to save the raw data into a .json file\n    - `load()` to get the raw data from a .json file (returns dict of data)\n\n- For formatted, source-independent data for analysis and plotting:\n    - `current()`: returns a dict of values (data at specific time)\n    - `hourly()`: returns a dict of lists of values (hourly data), can be used in `plot()` directly.\n\n- To download data from the API into local files, possibly in batch:\n    - `download()`: saves API data in .json format in a folder (threaded for multiple requests at the same time).\n    - `missing_days()`: checks if there are any missing files of data between specified dates in a folder.\n    - `download_missing_days()`: same as above, but also downloads the missing data in the folder.\n\n*Note:* To access data from downloaded files, use `load()` to get raw data, and `hourly(path=...)` to get formatted data.\n\n## Plotting weather data\n\n- `plot()`: takes formatted hourly data from `hourly()` (either using the API or downloaded files) as input.\n\n![](https://raw.githubusercontent.com/ovinc/weatho/master/media/example_plot.png)\n\n# Notes\n\n## Date/time and timezone information\n\n- It is preferable to use timezone-aware datetimes when specifying dates to the `Weather` methods.\n\n- In particular, when calling `download()` or `hourly()`, care must be taken because *DarkSky* and *OpenWeatherMap* do not manage hourly data the same way:\n    - *DarkSky* generates hourly data from 00:00 to 23:59 in **local time** (of the requested location)\n    - *OpenWeatherMap* uses 00:00 to 23:59 in **UTC time**\n\nThis means that with *OpenWeatherMap*, calling `hourly()` with a `datetime(2021, 1, 15)` localized in Central European Time will return data from 14/01/2021, 1:00 to 15/01/2021 00:00 (included) in local time, while doing the same thing with *DarkSky* will return data from 15/01/2021, 0:00 to 15/01/2021 23:00 (included) in local time.\n\nData stored in *.json* files using download() follows this pattern. For example:\n- *OWM_45.77,4.84,2021-01-15.json*: data from 00:00 to 23:00 (included) on 15 Jan. 2021, **UTC Time**\n- *DarkSky_45.77,4.84,2021-01-15.json*: data from 00:00 to 23:00 (included) on 15 Jan. 2021, **local Time** (of the requested location)\n\nIn conclusion, to avoid problems with hourly data (`hourly()`, `download()`, etc.):\n- with *DarkSky*, localize all datetimes to the **local timezone** of the place you're requesting weather for,\n- with *OpenWeatherMap*, work with **UTC timezone**.\n- for other calls (e.g. `fetch()`, `current()` etc.), localize to whatever timezone is more convenient to work with (if using naïve, local time of the computer will be used).\n\n\n## Misc.\n\n- If one gets the error `KeyError: 'hourly'`, it's likely that the data is not\ndownloaded correctly or inexistent. Check that the API key is correct and/or\ntest the download URL generated by `url()` in a browser.\n\n- More data might be available compared to the ones in formatted data, see e.g. the raw dictionary returned by functions like `fetch()` or `load()`.\n\n- For tests, the module `weatho.locations` stores coordinates of some cities/locations as a `coordinates` dictionary.\n\n\n# Other information\n\n## Python requirements\n\n- Python \u003e= 3.6\n\n## Package requirements\n\n(installed automatically by pip if necessary)\n- requests\n- matplotlib\n- pytz\n- importlib_metadata\n\n\n## Author\n\nOlivier Vincent\n\n(ovinc.py@gmail.com)\n\n## License\n\nBSD 3-Clause (see *LICENSE* file)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovinc%2Fweatho","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fovinc%2Fweatho","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fovinc%2Fweatho/lists"}