Skip to main content

A Python package to scrape agricultural data from Karnataka's market website.

Project description

kmvahini

Typing SVG

Download Market Data from Krishi Marata Vahini!


Important Legal Disclaimer

Krishi Marata Vahini is the registered trademark of the Karnataka State Agricultural Marketing Board (KSAMB) and the Department of Agricultural Marketing, Govt. of Karnataka.

kmvahini is not affiliated, endorsed, or vetted by KSAMB or the Government of Karnataka. It is an open-source tool designed for research and educational purposes using publicly available data from KSAMB.

The data is intended for personal and research use only. Refer to KSAMB's Terms of Use for more details.


About kmvahini

kmvahini is a Python library that enables users to scrape and analyze market data for agricultural commodities available on Krishi Marata Vahini.

Key Features

  • Scrape market data for over 264 commodities from 164 markets across Karnataka.
  • Retrieve data from 2002 onwards.
  • Filter by month, year, commodity, and market.
  • Multithreading support for faster data retrieval.
  • Outputs clean and structured data for research and analysis.

Installation

To install the latest version of kmvahini:

pip install kmvahini

Upgrade to the latest version:

pip install --upgrade kmvahini

Quick Start

Example Usage

import kmvahini.scraper as scraper

# Define parameters for scraping
months = ['JANUARY', 'FEBRUARY', 'MARCH']  # Specify months
years = ["2010"]  # Specify year(s)
commodities = ["BENGALGRAM"]  # Choose a commodity
markets = ["AllMarkets"]  # Select all or specific markets

# Scrape the data
df = scraper.scrape_website(months, years, commodities, markets)

# Preview the data
print(df.head())

Output

The resulting DataFrame contains structured columns, such as:

  • Date
  • Market
  • Commodity
  • Price Details (Min, Max, Modal)

Requirements

This package depends on:

  • Python 3.7+
  • selenium
  • pandas
  • tqdm
  • lxml

For full details, check:


Legal Notes

kmvahini is licensed under the MIT License. See the LICENSE file for more details.


Feedback & Contributions

We welcome your feedback and contributions! Here's how you can contribute:

  • Raise an Issue: Report bugs or suggest new features via the Issues section of the GitHub repository.
  • Contribute: Fork the repository, make your changes, and submit a pull request.
  • Contact: For direct feedback or queries, email patil.manojkumar@hotmail.com.

P.S.

Thank you for using kmvahini! Your feedback is invaluable in making it better. 😊


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

kmvahini-1.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

kmvahini-1.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file kmvahini-1.1.0.tar.gz.

File metadata

  • Download URL: kmvahini-1.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for kmvahini-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ee6b0b25f3bbde3fb797220ca8389a2692cad1f8f9665cdd9ab8911e1028d50b
MD5 21df4f6764bee7bbb8e1250d819a49e0
BLAKE2b-256 da1defad974e6d97d69140823e2038e6b16ed91d70d1545a556767f13517d280

See more details on using hashes here.

File details

Details for the file kmvahini-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: kmvahini-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for kmvahini-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41550cf436510247dad03b2dc2d9563d7a63508b785e7c0a4cbd42c27d1465ba
MD5 778ec8a86c3fe9e6ca15e7e66a39496a
BLAKE2b-256 ea4a40a11b26902e0df3c4a9e53a866bba93daa46639738e7b6c76b953964542

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