USDA hardiness zones
USDA 2023 hardiness zones by ZIP, point or temperature, and USDA PLANTS data with derived zones
- Connector software
- Free and open source
- Service credentials
- Not needed
- Query Farm hosting
- Available · $10/month organization minimum
Use with an agent
Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.
npx skills add Query-farm/vgi-skills --skill orchard
Copy this request into your coding agent to get started.
Use https://query.farm/products/orchard/connectors/us-hardiness/index.md to help me query USDA hardiness zones with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.
Half zones of ZIPs in New York, Portland, Anchorage and Honolulu
Example output · captured
- Connector release
- v0.2.0
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
SELECT z AS zip, us_hardiness.main.zone_for_zip(z).half_zone AS half_zone
FROM (VALUES ('10001'), ('97201'), ('99501'), ('96813')) v(z)
ORDER BY z
| zip | half_zone |
|---|---|
| 10001 | 7b |
| 96813 | 12b |
| 97201 | 8b |
| 99501 | 5a |
Quick start
Choose where to run USDA hardiness zones, then follow the steps below.
The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.
1. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
2. Attach the connector
Attach with uvx
Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.
ATTACH 'us_hardiness' AS us_hardiness (
TYPE vgi,
LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-us-hardiness-worker'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'us_hardiness' AS us_hardiness (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-us-hardiness:0.2.0'
);
3. Run a query
SELECT z AS zip, us_hardiness.main.zone_for_zip(z).half_zone AS half_zone
FROM (VALUES ('10001'), ('97201'), ('99501'), ('96813')) v(z)
ORDER BY z
Run the connector on a server you manage. You operate the service and choose who can connect.
1. Deploy the connector on your server
Follow the connector’s deployment instructions. Use its supported HTTP transport, or launch it remotely over SSH. The connection guide explains both options.
2. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach the connector
For an HTTP deployment, replace the example URL with your endpoint. Add the authentication options your deployment requires. For SSH, use the SSH connection instructions.
ATTACH 'us_hardiness' AS us_hardiness
(TYPE vgi, LOCATION 'https://your-connector.example.com');
4. Run a query
SELECT z AS zip, us_hardiness.main.zone_for_zip(z).half_zone AS half_zone
FROM (VALUES ('10001'), ('97201'), ('99501'), ('96813')) v(z)
ORDER BY z
Query Farm operates USDA hardiness zones for your team. Hosting has a $10 monthly minimum per organization; usage counts toward it. From $2.97 per instance-month ($10 monthly minimum).
1. Create your hosted connector
Open the console, choose your organization and deployment size, and add any service credentials there.
2. Install the vgi extension
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach your deployment
Copy the ATTACH statement from your deployment in the console and run it in DuckDB or Haybarn. Use us_hardiness as the catalog alias for the query below.
4. Run a query
SELECT z AS zip, us_hardiness.main.zone_for_zip(z).half_zone AS half_zone
FROM (VALUES ('10001'), ('97201'), ('99501'), ('96813')) v(z)
ORDER BY z
Technical details
- Verified connector release
- v0.2.0
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
- Verified on
- December 1, 2026
Pin a version for production
When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.
Attach with uvx
Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.
ATTACH 'us_hardiness' AS us_hardiness (
TYPE vgi,
LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-us-hardiness-worker'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'us_hardiness' AS us_hardiness (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-us-hardiness:0.2.0'
);
Overview
USDA 2023 plant hardiness zones by ZIP code, coordinates or temperature, and USDA PLANTS data with derived plant zones. Not the official USDA Plant Hardiness Zone Map: derived from the PRISM/Oregon State GIS datasets.
What hardiness zone is a ZIP code or a point in, and which plants tolerate its winters? This VGI worker answers both in DuckDB SQL from public data: the 2023 USDA Plant Hardiness Zone Map GIS datasets from the PRISM Group, Oregon State University and the USDA NRCS PLANTS Database.
ZIP-code zones and the plant checklist are bundled, so they work offline. Point lookups read the 1991-2020 mean annual extreme minimum temperature grid, downloaded once into a local cache the first time a point in that region is looked up.
Not the official USDA Plant Hardiness Zone Map: values are derived from the 2023 USDA PHZM GIS datasets (PRISM Group, Oregon State University); see planthardiness.ars.usda.gov for the official map.
plant_min_zone_derived is DERIVED by this worker from the USDA PLANTS 'Temperature, Minimum (°F)' characteristic; neither USDA PLANTS nor the USDA hardiness map publishes a zone for a plant.
ATTACH options
- cache_dir
- Directory for downloaded PRISM temperature grids; empty (default) uses the per-user cache directory (e.g. ~/.cache/vgi-us-hardiness).VARCHAR
- grid_url
- Where zone_for_point fetches phzm_<region>_grid_2023.zip: an http(s) base URL or a local directory; empty (default) uses the PRISM site.VARCHAR
Catalog
Everything us_hardiness exposes once attached — read straight from the worker's
released build.
main 5 tables · 4 functions
Hardiness zone lookups (ZIP, point, temperature), the zone legend, and USDA PLANTS data with a derived plant minimum zone. Not the official USDA Plant Hardiness Zone Map: values are derived from the 2023 USDA PHZM GIS datasets (PRISM Group, Oregon State University); see planthardiness.ars.usda.gov for the official map.
Schema examples (12)
Half zones of ZIPs in New York, Portland, Anchorage and Honolulu
SELECT z AS zip, us_hardiness.main.zone_for_zip(z).half_zone AS half_zone
FROM (VALUES ('10001'), ('97201'), ('99501'), ('96813')) v(z)
ORDER BY z;
| zip | half_zone |
|---|---|
| 10001 | 7b |
| 96813 | 12b |
| 97201 | 8b |
| 99501 | 5a |
Zone and winter low at Honolulu (downloads the small Hawaii grid on first use)
SELECT p.half_zone, p.min_temp_f
FROM (SELECT us_hardiness.main.zone_for_point(21.3069, -157.8583) AS p);
Half zones for a few winter low temperatures in °F
SELECT t AS temp_f, us_hardiness.main.zone_for_temperature(t) AS half_zone
FROM (VALUES (-25.0), (0.0), (5.0), (42.5)) v(t)
ORDER BY t;
Half zones for winter lows given in Celsius
SELECT c AS temp_c,
us_hardiness.main.zone_for_temperature(c, 'C') AS half_zone
FROM (VALUES (-40.0), (-20.0), (-5.0)) v(c)
ORDER BY c;
8 more examples
Native shrubs for a Minneapolis ZIP code's zone
SELECT scientific_name, common_name, mature_height_ft_high
FROM us_hardiness.main.plants_for_zone(us_hardiness.main.zone_for_zip('55401').half_zone, state := 'MN', native_only := true)
WHERE list_contains(growth_habit, 'Shrub')
ORDER BY scientific_name
LIMIT 10;
Plants hardy in zone 7b, grouped by their derived minimum zone
SELECT plant_min_zone_derived, count(*) AS plants
FROM us_hardiness.main.plants_for_zone('7b')
GROUP BY plant_min_zone_derived
ORDER BY plants DESC
LIMIT 5;
Celsius bands of zones 5 and 6
SELECT half_zone, min_temp_c_low, min_temp_c_high
FROM us_hardiness.main.zones
WHERE zone BETWEEN 5 AND 6
ORDER BY zone_index;
The five most common half zones among contiguous-US ZIP codes
SELECT half_zone, count(*) AS zips
FROM us_hardiness.main.zip_zones
WHERE region = 'conus'
GROUP BY half_zone
ORDER BY zips DESC
LIMIT 5;
The five plant families with the most accepted taxa
SELECT family, count(*) AS accepted_taxa
FROM us_hardiness.main.plants
WHERE is_accepted
GROUP BY family
ORDER BY accepted_taxa DESC
LIMIT 5;
How many documented trees have each derived minimum zone
SELECT plant_min_zone_derived, count(*) AS trees
FROM us_hardiness.main.plants
WHERE list_contains(growth_habit, 'Tree') AND plant_min_zone_derived IS NOT NULL
GROUP BY plant_min_zone_derived
ORDER BY trees DESC
LIMIT 5;
How many documented taxa have each flower color
SELECT value AS flower_color, count(*) AS taxa
FROM us_hardiness.main.plant_characteristics
WHERE characteristic = 'Flower Color'
GROUP BY value
ORDER BY taxa DESC;
Which grids are already downloaded
SELECT region, cached, size_bytes
FROM us_hardiness.main.grids
ORDER BY region;
grids
One row per temperature-grid region: download URL, local cache path, cached or not, size
Which grids are already downloaded
SELECT region, cached, size_bytes
FROM us_hardiness.main.grids
ORDER BY region;
The four grid regions
SELECT region FROM us_hardiness.main.grids ORDER BY region;
plant_characteristics
All USDA PLANTS characteristics (~83 attributes such as flower color, pH range, toxicity) for ~2,200 taxa, one row per plant, characteristic and value
How many documented taxa have each flower color
SELECT value AS flower_color, count(*) AS taxa
FROM us_hardiness.main.plant_characteristics
WHERE characteristic = 'Flower Color'
GROUP BY value
ORDER BY taxa DESC;
Red maple's flower color and shade tolerance
SELECT characteristic, value
FROM us_hardiness.main.plant_characteristics
WHERE symbol = 'ACRU' AND characteristic IN ('Flower Color', 'Shade Tolerance')
ORDER BY characteristic;
plants
The USDA PLANTS checklist (~93,000 accepted names and synonyms) with habit, nativity, states, minimum temperature and a DERIVED minimum hardiness zone for ~2,200 taxa with characteristics
The five plant families with the most accepted taxa
SELECT family, count(*) AS accepted_taxa
FROM us_hardiness.main.plants
WHERE is_accepted
GROUP BY family
ORDER BY accepted_taxa DESC
LIMIT 5;
How many documented trees have each derived minimum zone
SELECT plant_min_zone_derived, count(*) AS trees
FROM us_hardiness.main.plants
WHERE list_contains(growth_habit, 'Tree') AND plant_min_zone_derived IS NOT NULL
GROUP BY plant_min_zone_derived
ORDER BY trees DESC
LIMIT 5;
Red maple's PLANTS minimum temperature and derived zone
SELECT symbol, common_name, min_temp_f_low, min_temp_f_high,
plant_min_zone_derived
FROM us_hardiness.main.plants
WHERE symbol = 'ACRU';
zip_zones
Every US ZIP code with its 2023 USDA hardiness zone and °F band (about 40,500 rows). Not the official USDA Plant Hardiness Zone Map: values are derived from the 2023 USDA PHZM GIS datasets (PRISM Group, Oregon State University); see planthardiness.ars.usda.gov for the official map.
The five most common half zones among contiguous-US ZIP codes
SELECT half_zone, count(*) AS zips
FROM us_hardiness.main.zip_zones
WHERE region = 'conus'
GROUP BY half_zone
ORDER BY zips DESC
LIMIT 5;
Puerto Rico ZIPs per whole zone
SELECT zone, count(*) AS zips
FROM us_hardiness.main.zip_zones
WHERE region = 'puerto_rico'
GROUP BY zone
ORDER BY zone;
zones
The 26 USDA hardiness half zones (1a..13b) with their °F and °C minimum-temperature bands. Not the official USDA Plant Hardiness Zone Map: values are derived from the 2023 USDA PHZM GIS datasets (PRISM Group, Oregon State University); see planthardiness.ars.usda.gov for the official map.
Celsius bands of zones 5 and 6
SELECT half_zone, min_temp_c_low, min_temp_c_high
FROM us_hardiness.main.zones
WHERE zone BETWEEN 5 AND 6
ORDER BY zone_index;
The two halves of zone 7
SELECT half_zone, min_temp_f_low, min_temp_f_high
FROM us_hardiness.main.zones
WHERE zone = 7
ORDER BY zone_index;
zone_for_point (lat DOUBLE, lon DOUBLE)
Hardiness zone and 1991-2020 mean annual extreme minimum temperature at a latitude/longitude, from the PRISM 2023 PHZM grid (downloaded to a cache on first use). Not the official USDA Plant Hardiness Zone Map: values are derived from the 2023 USDA PHZM GIS datasets (PRISM Group, Oregon State University); see planthardiness.ars.usda.gov for the official map.
-
half_zoneVARCHAR
-
zoneINTEGER
-
min_temp_fDOUBLE
-
min_temp_cDOUBLE
-
regionVARCHAR
Zone and winter low at Honolulu (downloads the small Hawaii grid on first use)
SELECT p.half_zone, p.min_temp_f
FROM (SELECT us_hardiness.main.zone_for_point(21.3069, -157.8583) AS p);
zone_for_temperature (temp DOUBLE, unit VARCHAR) +1 overload
USDA hardiness half zone ('1a'..'13b') for a mean annual extreme minimum temperature in °F; NULL outside -60..70 °F. Not the official USDA Plant Hardiness Zone Map: values are derived from the 2023 USDA PHZM GIS datasets (PRISM Group, Oregon State University); see planthardiness.ars.usda.gov for the official map.
zone_for_temperature(temp_f DOUBLE) → VARCHARzone_for_temperature(temp DOUBLE, unit VARCHAR) → VARCHAR
Half zones for a few winter low temperatures in °F
SELECT t AS temp_f, us_hardiness.main.zone_for_temperature(t) AS half_zone
FROM (VALUES (-25.0), (0.0), (5.0), (42.5)) v(t)
ORDER BY t;
Half zones for winter lows given in Celsius
SELECT c AS temp_c,
us_hardiness.main.zone_for_temperature(c, 'C') AS half_zone
FROM (VALUES (-40.0), (-20.0), (-5.0)) v(c)
ORDER BY c;
zone_for_zip (zip VARCHAR)
2023 USDA hardiness zone of a US ZIP code as STRUCT(zone, half_zone, min_temp_f_low, min_temp_f_high, region); NULL for unknown ZIPs. Not the official USDA Plant Hardiness Zone Map: values are derived from the 2023 USDA PHZM GIS datasets (PRISM Group, Oregon State University); see planthardiness.ars.usda.gov for the official map.
-
zoneINTEGER
-
half_zoneVARCHAR
-
min_temp_f_lowINTEGER
-
min_temp_f_highINTEGER
-
regionVARCHAR
Half zones of ZIPs in New York, Portland, Anchorage and Honolulu
SELECT z AS zip, us_hardiness.main.zone_for_zip(z).half_zone AS half_zone
FROM (VALUES ('10001'), ('97201'), ('99501'), ('96813')) v(z)
ORDER BY z;
| zip | half_zone |
|---|---|
| 10001 | 7b |
| 96813 | 12b |
| 97201 | 8b |
| 99501 | 5a |
plants_for_zone (zone VARCHAR, native_only := BOOLEAN, state := VARCHAR)
Accepted PLANTS taxa whose DERIVED minimum zone is the given zone or colder, optionally limited to a state and to native plants
Native shrubs for a Minneapolis ZIP code's zone
SELECT scientific_name, common_name, mature_height_ft_high
FROM us_hardiness.main.plants_for_zone(us_hardiness.main.zone_for_zip('55401').half_zone, state := 'MN', native_only := true)
WHERE list_contains(growth_habit, 'Shrub')
ORDER BY scientific_name
LIMIT 10;
Plants hardy in zone 7b, grouped by their derived minimum zone
SELECT plant_min_zone_derived, count(*) AS plants
FROM us_hardiness.main.plants_for_zone('7b')
GROUP BY plant_min_zone_derived
ORDER BY plants DESC
LIMIT 5;
SELECT count(*) AS trees
FROM us_hardiness.main.plants_for_zone('4a', state := 'MN', native_only := true)
WHERE list_contains(growth_habit, 'Tree');
Try these queries
Zone and winter low at Honolulu (downloads the small Hawaii grid on first use)
SELECT p.half_zone, p.min_temp_f
FROM (SELECT us_hardiness.main.zone_for_point(21.3069, -157.8583) AS p)
Uses zone_for_point
Half zones for a few winter low temperatures in °F
SELECT t AS temp_f, us_hardiness.main.zone_for_temperature(t) AS half_zone
FROM (VALUES (-25.0), (0.0), (5.0), (42.5)) v(t)
ORDER BY t
Uses zone_for_temperature
Native shrubs for a Minneapolis ZIP code's zone
SELECT scientific_name, common_name, mature_height_ft_high
FROM us_hardiness.main.plants_for_zone(us_hardiness.main.zone_for_zip('55401').half_zone, state := 'MN', native_only := true)
WHERE list_contains(growth_habit, 'Shrub')
ORDER BY scientific_name
LIMIT 10
Celsius bands of zones 5 and 6
SELECT half_zone, min_temp_c_low, min_temp_c_high
FROM us_hardiness.main.zones
WHERE zone BETWEEN 5 AND 6
ORDER BY zone_index
Uses zones
The five most common half zones among contiguous-US ZIP codes
SELECT half_zone, count(*) AS zips
FROM us_hardiness.main.zip_zones
WHERE region = 'conus'
GROUP BY half_zone
ORDER BY zips DESC
LIMIT 5
Uses zip_zones
The five plant families with the most accepted taxa
SELECT family, count(*) AS accepted_taxa
FROM us_hardiness.main.plants
WHERE is_accepted
GROUP BY family
ORDER BY accepted_taxa DESC
LIMIT 5
Uses plants
11 more examples in the Catalog, each listed under the table or function it uses.
Questions it can answer
Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.
- What are the Celsius lower and upper bounds of hardiness half zone 7a?
- What hardiness half zone is the point at latitude 21.3069, longitude -157.8583 (Honolulu) in?
- According to USDA PLANTS, what is the minimum temperature range (°F) for red maple, symbol ACRU?
- What flower color does USDA PLANTS record for symbol ACRU?
- List the temperature-grid regions this worker can cache, alphabetically.
- Using the us_hardiness worker, what USDA hardiness half zone is ZIP code 10001 in?
USDA hardiness zones is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.
Related workers
Buoys
Weather, ocean & earth
NOAA NDBC buoy stations, latest observations and recent station histories for marine analysis
Earth observation
Weather, ocean & earth
Optical index and calibrated radar histories for geospatial SQL queries
Earthquakes
Weather, ocean & earth
Live & historical USGS earthquake catalog as SQL tables in DuckDB — runs on Cloudflare Workers