From 2573a11aa85278a6b29041b33055391ddc2b803f Mon Sep 17 00:00:00 2001 From: Jacob Fenton Date: Fri, 5 Jun 2026 11:49:41 -0700 Subject: [PATCH 1/2] minor spelling/typos --- .../content/docs/advanced/rate-limiting.mdx | 4 ++-- .../content/docs/guides/geospatial-queries.mdx | 4 ++-- .../src/content/docs/guides/paging-results.mdx | 2 +- docs/src/content/docs/introduction/about.mdx | 6 +++--- docs/src/content/docs/resources/locations.mdx | 2 +- .../content/docs/resources/manufacturers.mdx | 2 +- .../content/docs/resources/measurements.mdx | 18 +++++++++--------- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/src/content/docs/advanced/rate-limiting.mdx b/docs/src/content/docs/advanced/rate-limiting.mdx index 7be11781..9f469eb3 100644 --- a/docs/src/content/docs/advanced/rate-limiting.mdx +++ b/docs/src/content/docs/advanced/rate-limiting.mdx @@ -7,7 +7,7 @@ import FeedbackForm from '@components/FeedbackForm.astro' The OpenAQ Python SDK tracks rate limit state automatically using headers returned by the API. By default, when the rate limit is exhausted the client will call `time.sleep()` and block until the limit resets before continuing. -This behaviour is controlled by the `auto_wait` parameter on the `OpenAQ` client. +This behavior is controlled by the `auto_wait` parameter on the `OpenAQ` client. ## Automatic rate limiting @@ -23,7 +23,7 @@ with OpenAQ(api_key="your-api-key") as client: ## Manual rate limiting -Setting `auto_wait=False` disables the automatic wait behaviour. The client will +Setting `auto_wait=False` disables the automatic wait behavior. The client will instead raise a `RateLimitError` when the rate limit is exhausted, allowing you to handle it yourself. diff --git a/docs/src/content/docs/guides/geospatial-queries.mdx b/docs/src/content/docs/guides/geospatial-queries.mdx index 355121fe..7c3fd912 100644 --- a/docs/src/content/docs/guides/geospatial-queries.mdx +++ b/docs/src/content/docs/guides/geospatial-queries.mdx @@ -11,7 +11,7 @@ import radiusGeoJson from '@data/radius.json'; While the various categorical arguments in the `.list()` method of the Locations resource allow for diverse filtering options for locating air monitoring -stations (e.g. by country, providers, etc), categorical filtering sometimes fail +stations (e.g. by country, providers, etc), categorical filtering sometimes fails to capture stations of lower-level administrative groupings, such as city or district. To address that, the `.list()` method also contains 2 sets of geospatial features you can use to query for locations spatially: @@ -24,7 +24,7 @@ To query for locations within the radius of a point, you will need the coordinates in WGS84 format (EPSG:4326) of the center point and the radius (in meters) within which you want to search. The query below is an example of how you can query locations that are within 10,000 meters from Accra's city center. -The API only support query radius up to 25,0000 meters (25 km.). +The API only supports query radius up to 25,0000 meters (25 km.). 1000'`. If no filtering can be done to narrow down the results, the code below can paginate -through the entire results set until there is no more records found. The code +through the entire results set until there are no more records found. The code can also handle the case above where an exact count of records is available. ```py diff --git a/docs/src/content/docs/introduction/about.mdx b/docs/src/content/docs/introduction/about.mdx index 862f624b..b34cf28b 100644 --- a/docs/src/content/docs/introduction/about.mdx +++ b/docs/src/content/docs/introduction/about.mdx @@ -4,9 +4,9 @@ title: About The OpenAQ Python SDK is the official Python client for interacting with OpenAQ API. -The OpenAQ Python SDK is compatible with Python versions >=3.10. We encourage -the use of our SDK over other Python tools to interact with OpenAQ API as it is -designed with best practices built-in our API while +The SDK is compatible with Python versions >=3.10. We encourage +the use of it over other Python tools to interact with OpenAQ API as it is +designed with best practices built-in while offering many built-in features to easily query for data, such as: - **Comprehensive type annotations** - type hinting with inline documentation and autocomplete. - **Deserialized response classes** - Python object for attribute access, with options for json and dictionary representations. diff --git a/docs/src/content/docs/resources/locations.mdx b/docs/src/content/docs/resources/locations.mdx index 02694701..23a04f5d 100644 --- a/docs/src/content/docs/resources/locations.mdx +++ b/docs/src/content/docs/resources/locations.mdx @@ -88,7 +88,7 @@ list( | bbox | `tuple[float, float, float, float] \| None` The rectangular area within which locations are searched for and returned | Must be in WGS84 (EPSG:4326) and (minX, minY, maxX, maxY) format with maximum 4 decimals precision. Cannot be used at the same time as `coordinates` or `radius` | | providers_id | `int \| list[int] \| None` Filter by the ID of the data provider | Must be OpenAQ unique ID for the provider that facilitates data sharing | | countries_id | `int \| list[int] \| None` Filter by the country or territory where the location operates | Must be OpenAQ unique ID for the country or territory. Cannot be used at the same time as `iso` | -| parameters_id | `int \| list[int] \| None` Filter by a pollutant or meteorological parameter | Must be OpenAQ unique ID for the pollutant or meteorlogical parameter | +| parameters_id | `int \| list[int] \| None` Filter by a pollutant or meteorological parameter | Must be OpenAQ unique ID for the pollutant or meteorological parameter | | licenses_id | `int \| list[int] \| None` Filter by the license that governs the usage and sharing of data at the location | Must be OpenAQ unique ID for the license | | instruments_id | `int \| list[int] \| None` Filter by the instrument or equipment that gathers data at the location | Must be OpenAQ unique ID for the instrument | | manufacturers_id | `int \| list[int] \| None` Filter by the company or organization that produces the air quality monitoring instruments at the location | Must be OpenAQ unique ID for the manufacturer | diff --git a/docs/src/content/docs/resources/manufacturers.mdx b/docs/src/content/docs/resources/manufacturers.mdx index 388dbf9e..919867d0 100644 --- a/docs/src/content/docs/resources/manufacturers.mdx +++ b/docs/src/content/docs/resources/manufacturers.mdx @@ -9,7 +9,7 @@ organizations that produce the air quality monitoring instruments. You can use it to learn about their different instruments or equipments that output pollutant concentrations and meteorological readings. -In the cases this information is not availale from the data providers, `OpenAQ +In the cases this information is not available from the data providers, `OpenAQ admin` with ID 1 will be used as a placeholder. ## Methods diff --git a/docs/src/content/docs/resources/measurements.mdx b/docs/src/content/docs/resources/measurements.mdx index 50900553..d40c46b0 100644 --- a/docs/src/content/docs/resources/measurements.mdx +++ b/docs/src/content/docs/resources/measurements.mdx @@ -4,10 +4,10 @@ title: Measurements import { Tabs, TabItem } from '@astrojs/starlight/components'; -The Measurements resources provide measurements data from sensors. OpenAQ -ingests raw measurements at the hourly interval at the very least, but also -hosts data at a much higher frequency (e.g. 5 minutes interval). In addition to -providing raw measurement values as reported by providers, we also provides +The Measurements resources provide measurements data from sensors. OpenAQ +attempts to ingest raw measurements at least hourly, but also +hosts data at a much higher frequency (e.g. five minute interval). In addition to +providing raw measurement values as reported by providers, we also provide options for accessing the data at different levels of aggregation. ## Methods @@ -48,8 +48,8 @@ list( | sensors_id | `int` OpenAQ's unique ID for the sensor from which measurements should be retrieved. | Required | | data | `str` The base measurement unit to query. | Required, must be one of: `measurements`, `hours`, `days`, `years` | | rollup | `str \| None` The period by which to roll up the base measurement data. | Must be one of: `hourly`, `daily`, `monthly`, `yearly`, `hourofday`, `dayofweek`, `monthofyear` | -| datetime_from | `datetime.datetime \| str \| None` Starting datetime to retrieve measurements. Defaults to local time unless timezone information is included. | If not a datetime object then must be a ISO-8601 formatted datetime string i.e. `YYYY-MM-DDTHH:mm:ss`. Can only be used when `data` is either `measurements` or `hours`. Cannot be used with `date_form` or `date_to` | -| datetime_to | `datetime.datetime \| str \| None` Ending datetime to retrieve measurements. Defaults to local time unless timezone information is included. | If not a datetime object then must be a ISO-8601 formatted datetime string i.e. `YYYY-MM-DDTHH:mm:ss`. Can only be used when `data` is either `measurements` or `hours`. Cannot be used with `date_form` or `date_to` | +| datetime_from | `datetime.datetime \| str \| None` Starting datetime to retrieve measurements. Defaults to local time unless timezone information is included. | If not a datetime object then must be a ISO-8601 formatted datetime string i.e. `YYYY-MM-DDTHH:mm:ss`. Can only be used when `data` is either `measurements` or `hours`. Cannot be used with `date_from` or `date_to` | +| datetime_to | `datetime.datetime \| str \| None` Ending datetime to retrieve measurements. Defaults to local time unless timezone information is included. | If not a datetime object then must be a ISO-8601 formatted datetime string i.e. `YYYY-MM-DDTHH:mm:ss`. Can only be used when `data` is either `measurements` or `hours`. Cannot be used with `date_from` or `date_to` | | date_from | `datetime.date \| str \| None` Starting date to retrieve measurements. Defaults to local time unless timezone information is included. | If not a datetime object then must be a ISO-8601 formatted date string i.e. `YYYY-MM-DD`. Can only be used when `data` is either `days` or `years`. Cannot be used with `datetime_from` or `datetime_to` | | date_to | `datetime.date \| str \| None` Ending date to retrieve measurements. Defaults to local time unless timezone information is included. | If not a datetime object then must be a ISO-8601 formatted date string i.e. `YYYY-MM-DD`. Can only be used when `data` is either `days` or `years`. Cannot be used with `datetime_from` or `datetime_to` | | page | `int` The page number to retrieve, defaults to 1 | Must be greater than zero | @@ -71,8 +71,8 @@ with OpenAQ() as client: ### Data and Rollup -Understanding data and rollups concepts is the key to using the Measurements -resource effectively. While `data` gives you the benefits of speed as it fetches +Understanding data and rollup concepts is the key to using the Measurements +resource effectively. While `data` gives you the benefit of speed as it fetches pre-computed measurements data, it is limited in the level of aggregation (covering only `measurements`, `hours`, `days`, and `years` data) and the base measurement from which data is aggregated (i.e. the hourly average values). @@ -83,7 +83,7 @@ in `data`. However, because rollups are computed on the fly, it will be slower and more resources-consuming than simply using `data`, especially when rolling up from `data`="measurements". As such, prioritize `data` where you can and if you need to use `rollup` for a customized aggregation: -- double check to see if it's a query that could be done with just using `data` +- double check to see if it's a query that could be done just using `data` - limit your queries to smaller time periods #### Possible combinations From 4c3ce298b675ec4ee965e48495c9dc5e029a0c28 Mon Sep 17 00:00:00 2001 From: Jacob Fenton Date: Fri, 5 Jun 2026 11:50:43 -0700 Subject: [PATCH 2/2] radii --- docs/src/content/docs/guides/geospatial-queries.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/content/docs/guides/geospatial-queries.mdx b/docs/src/content/docs/guides/geospatial-queries.mdx index 7c3fd912..068bbcf4 100644 --- a/docs/src/content/docs/guides/geospatial-queries.mdx +++ b/docs/src/content/docs/guides/geospatial-queries.mdx @@ -24,7 +24,7 @@ To query for locations within the radius of a point, you will need the coordinates in WGS84 format (EPSG:4326) of the center point and the radius (in meters) within which you want to search. The query below is an example of how you can query locations that are within 10,000 meters from Accra's city center. -The API only supports query radius up to 25,0000 meters (25 km.). +The API only supports query radii up to 25,0000 meters (25 km.).