Skip to main content

The module implements functions for working with the API of the Cropwise Operations digital management platform.

Project description

cropwiseworker

Description

The Cropwise Worker module is designed to work with the Cropwise Operations digital agricultural enterprise management platform API. The module allows you to interact with various platform data, facilitating the integration and automation of tasks.

Installing

Install module using pip:

pip install cropwiseworker

Module functions

Mass download of data from the Cropwise Operations account

data_downloader(endpoint, token, params=None, data_format=None, version=None)
  • endpoint (required) – entry your endpoint from Cropwise Operations API documentation (https://cropwiseoperations.docs.apiary.io/)
  • token (required) – entry your TOKEN from Cropwise Operations account
  • params – entry your endpoint parameters using array format (default None)
  • data_format – entry suggested data format (default pd.DataFrame(), also supported 'json')
  • version – entry your Cropwise Operations API version using str data type (default 'v3')

Create a massive dataset with soil test, crop rotation, agro operation and yield data for analysis named Agrimatrix

agrimatrix_dataset(enterprise, token, season)
  • enterprise (required) – entry a name of your enterprise
  • token (required) – entry your TOKEN from Cropwise Operations account
  • season (required) – entry an interested value of season using int data type

Create a kml-file with several orchard rows inside of quarter kml-file

create_orchard_rows(file_path, quarter_name, number_of_rows, direction, crop, download_directory)
  • file_path – entry a directory of your quarter kml-file using str data type
  • quarter_name – entry a name of quarter
  • number_of_rows – entry the relevant number of orchard rows to create using int data type
  • direction – choose one of the two variables of orchard rows direction: 'west_east' (horizontal), 'south_north' (vertical)
  • crop – entry a name of crop which grows in your quarter using str data type
  • download_directory – entry a directory to download result file using str data type

Workflow examples

import cropwiseworker as cw

token = 'YOUR_TOKEN'

params = {'created_at_gt_eq':'2023-01-01'}

fields = cw.data_downloader('fields', token=token, params=params)
print(fields)

my_2023_analysis = cw.agrimatrix_dataset('YOUR_ENTERPRISE_NAME', token=token, season=2023)
print(my_2023_analysis)

cw.create_orchard_rows('path/to/your/file.kml', 'QuarterName', 50, direction='south_north', 'Apple', 'path/to/download/directory')

License

This package is distributed under the Apache License 2.0.

cropwiseworker

changelog

All noticeable changes to this project will be documented in this file.

The format is based on [Keep a Changelog] (https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning] (https://semver.org/spec/v2.0.0.html).

[0.0.5] – 2024-07-08

Added

  • Added a new function for data processing.

[0.0.2] - 2024-04-12

Added

  • The project was created.
  • Added the function of mass loading of data on the Cropwise Operations API.
  • Added the function of creating an Agrimatrix report.
  • Integration with the external Cropwise Operations API.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cropwiseworker-0.0.5.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cropwiseworker-0.0.5-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file cropwiseworker-0.0.5.tar.gz.

File metadata

  • Download URL: cropwiseworker-0.0.5.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for cropwiseworker-0.0.5.tar.gz
Algorithm Hash digest
SHA256 8442a1aa0774f9eb19749ffaf37e4bbfafe24978b7f87f456ed1275b0e3ba35b
MD5 32824cb922584f47004b852fe6c67ab0
BLAKE2b-256 6ca9534a4528476e7bdf80835fdae4ea79b5e8f809a316ad24902ac627ee576d

See more details on using hashes here.

File details

Details for the file cropwiseworker-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: cropwiseworker-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.7

File hashes

Hashes for cropwiseworker-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5acf40d9ea02f77f99c1040a05c2f67b71c88f27b7957d0badbdf80faa4e8a4b
MD5 ffd780b45336edf8cc709c8f1d53d849
BLAKE2b-256 5afa10badc0511a5dd6a5a5e15cc207cdf9a0109bd1ad90eff7b8b0e0e7ab3a2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page