Tracking Crop Diseases with AI: My Journey from Code to Cloud
Visualizing crop disease spread in real-time—my AI-Powered Crop Disease Tracker is live!

Tracking Crop Diseases with AI: My Journey from Code to Cloud



What if farmers could see crop diseases spreading across their region in real-time and act before it’s too late? That’s the vision that drove me to build the AI-Powered Crop Disease Tracker—a tool that blends data analytics, visualization, and a sprinkle of AI potential to empower agriculture. After weeks of coding, debugging, and deploying, I’m excited to share this project with you—and invite you to take it for a spin!

The Why: A Problem Worth Solving

Agriculture is the backbone of our world, yet crop diseases can devastate yields in the blink of an eye. Traditional tools often give farmers hindsight—historical trends or yield forecasts—but what about right now? I wanted to create something proactive: a dashboard that maps disease outbreaks as they happen, tracks their severity, and (eventually) predicts where they’ll strike next. It’s data science meeting farming, with a dash of innovation.

The How: Building It Brick by Brick

This wasn’t an overnight hack—I built it from the ground up. Here’s the story:

  1. Laying the Foundation I started with SQL Server, designing a database (AgriDiseaseDB) with tables for farms, crops, disease reports, and weather data. Think 50 farms, each with crops like wheat or corn, linked to disease sightings—realistic enough to test the system.
  2. Faking It ‘Til I Made It No real farmer data yet? No problem. In a Jupyter Notebook (populate_data.ipynb), I generated over 18,000 synthetic rows—randomized farms with coordinates, diseases with severity scores, and weather patterns that mimic reality. It’s all there in populate_data.ipynb.
  3. Crafting the Dashboard Streamlit became my playground. With Python, Pandas, Folium, and Plotly, I coded: A map showing disease hotspots (red for severe, orange for mild). A trend chart tracks severity over time. A form for reporting outbreaks (disabled in the cloud demo—more on that later). I added a logo, a dark/light mode toggle, and responsive design—because farmers deserve a good UX too!
  4. Deploying to the Cloud After local testing, I pushed it to GitHub (OforiPrescott/Crop-Disease-Tracker) and deployed it on Streamlit Cloud. The catch? The SQL Server connection doesn’t work in the cloud (it’s local to my machine), so it falls back to mock data with a friendly warning: Database connection failed: ... Using mock data for demo.
  5. The AI Dream This is just the start. I’ve laid the groundwork for machine learning—think Random Forests to predict disease spread based on weather and history or generative AI to suggest fixes like “Apply fungicide X.” It’s coming soon!

The What: A Tool for Today and Tomorrow

Right now, the live demo lets you:

  • Explore a map of mock disease outbreaks.
  • Filter by disease or date range.
  • See severity trends over time. Reporting is disabled in the cloud since it needs a database, but run it locally with SQL Server, and it’s fully interactive. The goal? Empower farmers to spot trouble early, share insights, and—down the line—get AI-driven solutions.

Try It Yourself

I’ve poured hours into this—wrestling with SQL joins, tweaking Streamlit layouts, and figuring out cloud quirks. Now it’s live, and I’d love for you to check it out:

What’s Next?

This is version 1.0. I’m planning:

  • A cloud-hosted database (e.g., Azure SQL) for real data.
  • ML models for predictions.
  • A mobile-friendly version. But it’s not just my project—it’s for anyone passionate about agriculture, data, or tech. What would you add to make it better?

Let’s Connect

If you’re into agtech, data analytics, or just love a good Python project, let’s chat! Try the demo, fork the code, or drop a comment—I’m all ears. This is about building something useful together.

Built with: Python, SQL Server, Streamlit, Pandas, Plotly, and Folium

For: Farmers, data enthusiasts, and a sustainable future


#AgTech #DataScience #AI #Python #Streamlit #Innovation #Agriculture #GIKACE


Bernard Ato Brown

Agribusiness | Environmental Management Specialist || founder APB company Limited

1mo

wow wonderful job boss Now I guess we need a real disease data Please which kind of data are you looking for on a crop diseases? Lets not forget about the livestock diseases too....we need help too

Vivian Sarpong

Early childhood Facilitator||Trainer for Pageants||Social Media Content Creator||Public Speaker||The Wedding Wordsmith||Singer| Passionate Cook

2mo

Prescott Nyamekye boss in the AI Sector Kudos 👏

The ability of AI to detect subtle signs of disease that the human eye might miss is a game-changer for farmers.

desmond mclean-arthur(DBA)

Financial Services Advisor @ Macardes | Chartered Economist Ch.E

2mo

Interesting times ahead Good work comrade

Great Job 👍 boss

To view or add a comment, sign in

More articles by Prescott Nyamekye

Insights from the community

Others also viewed

Explore topics