Releases: gro-intelligence/api-client
Releases · gro-intelligence/api-client
v1.107.2
v1.101.0
v1.100.0
v1.98.0
v1.83
New features
- general
get_descendant()
convenience function to traverse entity graph for items and metrics (in addition to previously supportedget_descendant_regions()
)
Improvements
- move
GroClient
fromapi/client
to top levelgroclient
module (backward compatible) - avoid duplicates in
rank_series_by_source
v1.82
v1.77.1
v1.77.0
v1.76.0
New Features
- GroClient.lookup() can now accept lists of ids in a single request. This can speed up retrieving details about many entities at once.
- New GroClient.get_top() method allows you to get the items or regions with the greatest values for the given selections. Great for questions like "what countries produce the most corn?" or "what are India's major exports?"
Improvements
- Now, you can use
df.index.names
withGroClient.get_df()
to identify the indices. For example:>>> client.add_single_data_series({'metric_id': 8671080, 'item_id': 274, 'region_id': 1215, 'partner_region_id': 0, 'source_id': 63, 'frequency_id': 9}) >>> df = client.get_df() >>> dict(zip(df.index.names, df.iloc[0].name)) {'metric_id': 8671080, 'item_id': 274, 'region_id': 1215, 'partner_region_id': 0, 'frequency_id': 9, 'source_id': 63}
- Performance improvements to GroClient.get_descendant_regions(), GroClient.search_and_lookup(), and GroClient.lookup_belongs()
v1.71.0
New Features
- optional
result_filter
inGroClient.find_data_series()
gives users deeper control of ambiguous search results - optional
weighting_func
inCropModel.compute_crop_weighted_series()
allows user to specify custom weighting function index_by_series
option inGroClient.get_df()
gives dataframe access indexed by data series.
Improvements
- improved search in
GroClient.find_data_series()
(andCropModel.compute_crop_weighted
) , now using frequency and source ranking by coverage - optimized data retrieval in
GroClient.get_df()
for repeated use