Calibrated mean annual sunshine hours for 270 cities worldwide (CC-BY-4.0). Derived from EUMETSAT SARAH-3, ERA5, and CHELSA, calibrated against 56 WMO stations.
Project description
sunshine-hours-by-city
Calibrated mean annual sunshine hours for 270 cities worldwide. Available as a tiny zero-dependency package for both JavaScript and Python, with the raw CSV bundled.
Data by GeoRank.place — see the interactive sunshine map. Licensed CC-BY-4.0.
Method
Values blend EUMETSAT CM SAF SARAH-3 satellite radiation (1991–2020) with ECMWF ERA5,
bias-corrected against 56 WMO reference stations (actual ≈ 1.14 × ERA5 − 1,550,
R² = 0.82, n = 56). Each city is snapped to the nearest cell of the calibrated grid. Full
sources and licensing in ATTRIBUTION.md.
Install
npm install sunshine-hours-by-city # JavaScript / TypeScript
pip install sunshine-hours-by-city # Python
Usage
JavaScript / TypeScript
import { cities, byCity, byCountry } from "sunshine-hours-by-city";
byCity("Lisbon", "PT"); // { city: "Lisbon", countryIso2: "PT", annualHours: 2799, ... }
byCountry("ES"); // every Spanish city
cities().length; // 270
Python
from sunshine_hours_by_city import cities, by_city, by_country
by_city("Lisbon", "PT") # {"city": "Lisbon", "country_iso2": "PT", "annual_hours": 2799, ...}
by_country("ES") # every Spanish city
len(cities()) # 270
Data schema
| Field | Type | Description |
|---|---|---|
city |
string | City name |
countryIso2 / country_iso2 |
string | ISO-3166 alpha-2 country code |
lat, lon |
number | Coordinates (decimal degrees) |
annualHours / annual_hours |
number | Calibrated mean annual sunshine hours |
calibrated |
boolean | WMO-calibrated flag |
source |
string | Methodology label |
The raw CSV ships in the package (sunshine_hours_by_city/sunshine-hours.csv).
Pairs well with
georank — rank these cities by weighted criteria
(sunshine, cost, climate). See it live at georank.place.
License
Data: CC-BY-4.0 © GeoRank.place. Attribution required — see ATTRIBUTION.md. Package code: MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sunshine_hours_by_city-0.1.0.tar.gz.
File metadata
- Download URL: sunshine_hours_by_city-0.1.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a768b6de074bad83e19ef2e9092ae8ff8ecfce1e86ba1de3b89d09105dcc6ec5
|
|
| MD5 |
72e9aa78a83a72427b19449f98134eb1
|
|
| BLAKE2b-256 |
ce80f3875c1b2f9c68a337e7721bf3d0a1d7c3fb7bbc974e700c367698c05a10
|
File details
Details for the file sunshine_hours_by_city-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sunshine_hours_by_city-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2e2f46459b0a9bba2fc62380efc4fc782518441465c9b98585609e36abc5a59
|
|
| MD5 |
dc872f62d09ab024e4b15ecbe318d208
|
|
| BLAKE2b-256 |
3a3bb0ffad6590ae16da5b0a15d5fd246cb3aaf8ae19db9559dc398a79784ac7
|