Skip to content
This repository was archived by the owner on Sep 22, 2025. It is now read-only.

Releases: StratoDem/strato-query

v3.6.1

Choose a tag to compare

@coralvanda coralvanda released this 06 May 17:21
3851940

Changes

  • Changes the error raised when the max number of query retries has been exceeded so it more clearly alerts API users that a timeout has occurred.

Related issues

v3.6.0

Choose a tag to compare

@mjclawar mjclawar released this 07 Feb 15:24
5a5fb44

Changes

  • SDAPIQuery.query_api_multiple now chunks queries into 500-size batches by default, configurable with chunksize

v3.5.0

Choose a tag to compare

@mjclawar mjclawar released this 18 Nov 21:39
2c29a08

Changes

  • Updates the pretty print behavior to account for new buffer filters
  • Updates the R filters for new filter types

Related issues

PR: #89

v3.4.0

Choose a tag to compare

@mjclawar mjclawar released this 06 Nov 16:45
d487020

Adds

  • Adds new detailed_type option to IntersectsFilter. It now supports:
    • 'intersects' (simple intersection filtering)
    • 'intersects_weighted' (ability to create weighted polygon results)

Related issues

PR: #86

v3.3.0

Choose a tag to compare

@mjclawar mjclawar released this 25 Oct 19:36
5c9c2d1

Adds

  • Adds new buffer types to the DrivetimeFilter. It now supports:
    • 'drivetime'
    • 'drivetime_simple'
    • 'drivetime_unweighted'
    • 'drivetime_destination'
    • 'drivetime_destination_simple'
    • 'drivetime_destination_unweighted'
  • Adds a WalktimeFilter which supports the following types:
    • 'walktime'
    • 'walktime_unweighted'
    • 'walktime_destination'
    • 'walktime_destination_unweighted'
  • Adds detailed_type as a new optional argument to OverlapsDrivetimeFilter which allows:
    • 'overlaps_drivetime'
    • 'overlaps_drivetime_destination'
  • Adds detailed_type as a new optional argument to OverlapsWalktimeFilter which allows:
    • 'overlaps_walktime'
    • 'overlaps_walktime_destination'

Related issues

v3.2.0

Choose a tag to compare

@mjclawar mjclawar released this 16 Sep 13:08
095a16e

Adds

  • Adds new query param classes
    • APIPureShapeQueryParams
    • APIPureShapeUnionQueryParams
  • Adds examples of new query params classes

Related issues

v3.1.0

Choose a tag to compare

@mjclawar mjclawar released this 10 Sep 21:24
2960ccc

Adds

  • Adds new filter type for overlap filter

    The filter must be given a geometry and, optionally, a mile buffer. The mile buffer defaults to 0 so that a polygon geometry is used exactly, rather than adding an additional buffer on top of it. The mile value should be set explicitly when using a latitude/longitude point.

Related issues

v3.0.2

Choose a tag to compare

@mjclawar mjclawar released this 05 Sep 19:15
3db5e40

Fixes

  • Fixes broken links to examples in documentation. Now links to new docs site at code.stratodem.com

PR: #67

v3.0.1

Choose a tag to compare

@mjclawar mjclawar released this 27 Aug 13:31
d02fc4d

Changes

  • Failed API queries no longer include API token value in the error message (replaced by **********)

v3.0.0

Choose a tag to compare

@mjclawar mjclawar released this 23 Aug 20:40
f299c7b

Changes

  • Breaking Renames filters to full words in Python package. E.g., EqFilter --> EqualToFilter
  • Arguments no longer must be tuples, but can also be lists 🎉
  • data_filters argument for APIQueryParams may be an iterable of BaseFilter objects, instead of only dicts
  • BaseAggregation and SumAggregation added to handle aggregations instead of relying on arbitrary dicts
  • aggregations argument for APIQueryParams may be an iterable of BaseAggregation objects, instead of only dicts
  • Renames BaseAPIQuery --> SDAPIQuery
  • New authentication method to support environment variable at STRATODEM_API_TOKEN or authenticate_to_api('my-api-token')
  • New documentation site with Python, R, Shell, and VBA examples 🎉
from strato_query import SDAPIQuery, APIQueryParams, EqualToFilter, LessThanFilter
from strato_query.authentication import authenticate_to_api

authenticate_to_api('my-api-token')

df = SDAPIQuery.query_api_df(
    query_params=APIQueryParams(
        query_type='COUNT',
        table='populationforecast_metro_annual_population',
        data_fields=('year', 'cbsa', {'population': 'population'}),
        data_filters=(
            LessThanFilter(var='year', val=2015),
            EqualToFilter(var='cbsa', val=14454),
        ),
        aggregations=(dict(aggregation_func='sum', variable_name='population'),),
        groupby=('cbsa', 'year'),
        order=('year',),
        join=APIQueryParams(
            query_type='AREA',
            table='geocookbook_metro_na_shapes_full',
            data_fields=('cbsa', 'area', 'name'),
            data_filters=(EqualToFilter(var='cbsa', val=14454),),
            groupby=('cbsa', 'name'),
            aggregations=(),
            on=dict(left=('cbsa',), right=('cbsa',)),
        )
    )
)