This project provides crop recommendations based on soil, weather, and location data using APIs such as Tomorrow.io for weather and Google Earth Engine for soil data.
- Reverse geocoding with OpenStreetMap (Nominatim)
- Real-time weather data from Tomorrow.io
- Soil properties using Google Earth Engine (EE)
- Crop recommendation logic
git clone https://github.com/Atharv1patil/Crop-data-api.git
cd crop-recommendation-system
python -m venv venv
venv\Scripts\activate # On Windows
source venv/bin/activate # On Linux/Mac
Create a .env
file in the root directory and add your API keys:
I have already gave it to (env file)
TOMORROW_API_KEY=your_tomorrow_io_api_key
GOOGLE_APPLICATION_CREDENTIALS=path_to_your_service_account.json
Run the following once to authenticate:
import ee
ee.Authenticate() # only this
ee.Initialize() # before this line not this one
python aa.py
- Make sure you have access to Google Earth Engine and have enabled necessary APIs in your Google Cloud project.
- First-time users must run
ee.Authenticate()
to link their Google account.
This project is licensed under the MIT License.