This repository was archived by the owner on Sep 22, 2025. It is now read-only.
Releases: StratoDem/strato-query
Releases · StratoDem/strato-query
Release list
v3.6.1
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
v3.5.0
v3.4.0
v3.3.0
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
WalktimeFilterwhich supports the following types:'walktime''walktime_unweighted''walktime_destination''walktime_destination_unweighted'
- Adds
detailed_typeas a new optional argument toOverlapsDrivetimeFilterwhich allows:'overlaps_drivetime''overlaps_drivetime_destination'
- Adds
detailed_typeas a new optional argument toOverlapsWalktimeFilterwhich allows:'overlaps_walktime''overlaps_walktime_destination'
Related issues
v3.2.0
v3.1.0
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
v3.0.1
v3.0.0
Changes
- Breaking Renames filters to full words in Python package. E.g.,
EqFilter-->EqualToFilter - Arguments no longer must be
tuples, but can also belists 🎉 data_filtersargument forAPIQueryParamsmay be an iterable ofBaseFilterobjects, instead of onlydictsBaseAggregationandSumAggregationadded to handle aggregations instead of relying on arbitrarydictsaggregationsargument forAPIQueryParamsmay be an iterable ofBaseAggregationobjects, instead of onlydicts- Renames
BaseAPIQuery-->SDAPIQuery - New authentication method to support environment variable at
STRATODEM_API_TOKENorauthenticate_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',)),
)
)
)