Spaces:
Sleeping
Sleeping
Commit
·
78dccad
1
Parent(s):
9abd4ea
bigquery
Browse files- bone.py +151 -0
- farm_analysis_data.csv +7 -0
- setup_remedies.py +79 -0
bone.py
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file will contain the logic for uploading data to BigQuery.
|
| 2 |
+
|
| 3 |
+
from google.cloud import bigquery
|
| 4 |
+
from google.cloud.exceptions import NotFound
|
| 5 |
+
import uuid
|
| 6 |
+
from datetime import datetime
|
| 7 |
+
|
| 8 |
+
# --- Configuration: Set your project, dataset, and table details here ---
|
| 9 |
+
PROJECT_ID = "gem-creation"
|
| 10 |
+
DATASET_ID = "aura_mind_glow_data"
|
| 11 |
+
TABLE_ID = "farm_analysis"
|
| 12 |
+
|
| 13 |
+
def get_bigquery_client():
|
| 14 |
+
"""Returns an authenticated BigQuery client."""
|
| 15 |
+
try:
|
| 16 |
+
client = bigquery.Client(project=PROJECT_ID)
|
| 17 |
+
print("✅ Successfully authenticated with BigQuery.")
|
| 18 |
+
return client
|
| 19 |
+
except Exception as e:
|
| 20 |
+
print(f"❌ Error authenticating with BigQuery: {e}")
|
| 21 |
+
return None
|
| 22 |
+
|
| 23 |
+
def create_dataset_if_not_exists(client):
|
| 24 |
+
"""Creates the BigQuery dataset if it doesn't exist."""
|
| 25 |
+
dataset_id = f"{PROJECT_ID}.{DATASET_ID}"
|
| 26 |
+
try:
|
| 27 |
+
client.get_dataset(dataset_id) # Make an API request.
|
| 28 |
+
print(f"ℹ️ Dataset {dataset_id} already exists.")
|
| 29 |
+
except NotFound:
|
| 30 |
+
print(f"🟡 Dataset {dataset_id} not found. Creating dataset...")
|
| 31 |
+
dataset = bigquery.Dataset(dataset_id)
|
| 32 |
+
dataset.location = "US" # You can change the location if needed
|
| 33 |
+
dataset = client.create_dataset(dataset, timeout=30) # Make an API request.
|
| 34 |
+
print(f"✅ Created dataset {client.project}.{dataset.dataset_id}")
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def create_table_if_not_exists(client):
|
| 38 |
+
"""Creates the BigQuery table if it doesn't exist."""
|
| 39 |
+
table_id = f"{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}"
|
| 40 |
+
try:
|
| 41 |
+
client.get_table(table_id) # Make an API request.
|
| 42 |
+
print(f"ℹ️ Table {table_id} already exists.")
|
| 43 |
+
except NotFound:
|
| 44 |
+
print(f"🟡 Table {table_id} not found. Creating table...")
|
| 45 |
+
schema = [
|
| 46 |
+
bigquery.SchemaField("analysis_id", "STRING", mode="REQUIRED"),
|
| 47 |
+
bigquery.SchemaField("timestamp", "TIMESTAMP", mode="REQUIRED"),
|
| 48 |
+
bigquery.SchemaField("farmer_id", "STRING", mode="NULLABLE"),
|
| 49 |
+
bigquery.SchemaField("gps_latitude", "FLOAT", mode="NULLABLE"),
|
| 50 |
+
bigquery.SchemaField("gps_longitude", "FLOAT", mode="NULLABLE"),
|
| 51 |
+
bigquery.SchemaField("crop_type", "STRING", mode="NULLABLE"),
|
| 52 |
+
bigquery.SchemaField("crop_variety", "STRING", mode="NULLABLE"),
|
| 53 |
+
bigquery.SchemaField("ai_diagnosis", "STRING", mode="NULLABLE"),
|
| 54 |
+
bigquery.SchemaField("confidence_score", "FLOAT", mode="NULLABLE"),
|
| 55 |
+
bigquery.SchemaField("recommended_action", "STRING", mode="NULLABLE"),
|
| 56 |
+
bigquery.SchemaField("farmer_feedback", "STRING", mode="NULLABLE"),
|
| 57 |
+
bigquery.SchemaField("treatment_applied", "STRING", mode="NULLABLE"),
|
| 58 |
+
bigquery.SchemaField("outcome_image_id", "STRING", mode="NULLABLE"),
|
| 59 |
+
]
|
| 60 |
+
table = bigquery.Table(table_id, schema=schema)
|
| 61 |
+
table = client.create_table(table) # Make an API request.
|
| 62 |
+
print(f"✅ Created table {table.project}.{table.dataset_id}.{table.table_id}")
|
| 63 |
+
|
| 64 |
+
def upload_diagnosis_to_bigquery(diagnosis_data: dict):
|
| 65 |
+
"""Uploads a single diagnosis record (from a dictionary) to BigQuery."""
|
| 66 |
+
client = get_bigquery_client()
|
| 67 |
+
if client is None:
|
| 68 |
+
print("❌ BigQuery client not available. Cannot upload diagnosis.")
|
| 69 |
+
return "BigQuery client not available."
|
| 70 |
+
|
| 71 |
+
# Ensure dataset and table are ready
|
| 72 |
+
create_dataset_if_not_exists(client)
|
| 73 |
+
create_table_if_not_exists(client)
|
| 74 |
+
|
| 75 |
+
table_id = f"{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}"
|
| 76 |
+
|
| 77 |
+
# Add required fields if not present
|
| 78 |
+
if "analysis_id" not in diagnosis_data:
|
| 79 |
+
diagnosis_data["analysis_id"] = str(uuid.uuid4())
|
| 80 |
+
if "timestamp" not in diagnosis_data:
|
| 81 |
+
diagnosis_data["timestamp"] = datetime.now().isoformat()
|
| 82 |
+
|
| 83 |
+
rows_to_insert = [diagnosis_data]
|
| 84 |
+
|
| 85 |
+
errors = client.insert_rows_json(table_id, rows_to_insert)
|
| 86 |
+
if not errors:
|
| 87 |
+
print(f"✅ Diagnosis record {diagnosis_data.get('analysis_id')} uploaded successfully.")
|
| 88 |
+
return "Diagnosis uploaded successfully."
|
| 89 |
+
else:
|
| 90 |
+
print(f"❌ Encountered errors while inserting diagnosis record: {errors}")
|
| 91 |
+
return f"Error uploading diagnosis: {errors}"
|
| 92 |
+
|
| 93 |
+
# ==============================================================================
|
| 94 |
+
# ✨ NEW FUNCTION TO UPLOAD A CSV FILE ✨
|
| 95 |
+
# ==============================================================================
|
| 96 |
+
def upload_csv_to_bigquery(csv_file_path: str):
|
| 97 |
+
"""
|
| 98 |
+
Uploads the contents of a CSV file to the specified BigQuery table.
|
| 99 |
+
|
| 100 |
+
Args:
|
| 101 |
+
csv_file_path (str): The local path to the CSV file.
|
| 102 |
+
"""
|
| 103 |
+
client = get_bigquery_client()
|
| 104 |
+
if client is None:
|
| 105 |
+
print("❌ BigQuery client not available. Cannot upload CSV.")
|
| 106 |
+
return
|
| 107 |
+
|
| 108 |
+
# Ensure the destination dataset and table exist before uploading
|
| 109 |
+
create_dataset_if_not_exists(client)
|
| 110 |
+
create_table_if_not_exists(client)
|
| 111 |
+
|
| 112 |
+
table_id = f"{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}"
|
| 113 |
+
|
| 114 |
+
# Configure the load job
|
| 115 |
+
job_config = bigquery.LoadJobConfig(
|
| 116 |
+
source_format=bigquery.SourceFormat.CSV,
|
| 117 |
+
skip_leading_rows=1, # Skip the header row
|
| 118 |
+
autodetect=True, # Let BigQuery automatically detect the schema from the table
|
| 119 |
+
write_disposition=bigquery.WriteDisposition.WRITE_APPEND, # Append data to the table
|
| 120 |
+
)
|
| 121 |
+
|
| 122 |
+
print(f"🚀 Starting CSV upload from '{csv_file_path}' to table '{table_id}'...")
|
| 123 |
+
|
| 124 |
+
try:
|
| 125 |
+
with open(csv_file_path, "rb") as source_file:
|
| 126 |
+
load_job = client.load_table_from_file(source_file, table_id, job_config=job_config)
|
| 127 |
+
|
| 128 |
+
load_job.result() # Wait for the job to complete
|
| 129 |
+
|
| 130 |
+
destination_table = client.get_table(table_id)
|
| 131 |
+
print(f"✅ Job finished. Loaded {destination_table.num_rows} rows into {table_id}.")
|
| 132 |
+
return "CSV upload successful."
|
| 133 |
+
except Exception as e:
|
| 134 |
+
print(f"❌ An error occurred during the CSV upload: {e}")
|
| 135 |
+
return f"Error during CSV upload: {e}"
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
# ==============================================================================
|
| 139 |
+
# --- Example Usage ---
|
| 140 |
+
# To run this file directly and test the new upload function:
|
| 141 |
+
# 1. Save the CSV data from the previous step into a file named 'farm_analysis_data.csv'.
|
| 142 |
+
# 2. Make sure that file is in the same directory as this script.
|
| 143 |
+
# 3. Run 'python your_script_name.py' in your terminal.
|
| 144 |
+
# ==============================================================================
|
| 145 |
+
if __name__ == "__main__":
|
| 146 |
+
# The name of the CSV file you created
|
| 147 |
+
csv_file_to_upload = "farm_analysis_data.csv"
|
| 148 |
+
|
| 149 |
+
print("--- Running BigQuery CSV Uploader Test ---")
|
| 150 |
+
upload_csv_to_bigquery(csv_file_to_upload)
|
| 151 |
+
print("--- Test complete ---")
|
farm_analysis_data.csv
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
analysis_id,timestamp,farmer_id,gps_latitude,gps_longitude,crop_type,crop_variety,ai_diagnosis,confidence_score,recommended_action,farmer_feedback,treatment_applied,outcome_image_id
|
| 2 |
+
"a1b2c3d4-e5f6-7890-1234-567890abcdef",2025-08-16T10:30:00,FARM_NG_001,9.0765,7.3986,"Maize","Oba-98","Phosphorus Deficiency",0.985,"How You Fit Solve Phosphorus Problem for Your Corn (Maize)\nIf your corn leaves de turn purple or dark green, especially when di plant still small, e fit be say phosphorus no reach am. Phosphorus be like power food for di plant root and for making seed.\nWetin You Go Do Sharp Sharp (Short-Term Solution)\nBone Meal: Go market, buy bone meal. Na ground-up animal bone and e full with phosphorus. Sprinkle small quantity around di base of your corn plant and mix am small with di soil. No let am touch di plant stem direct.\nFish Fertilizer (Fish Tea): If you fit get fish head or bones, soak dem inside water for some days. Di water go turn to strong fertilizer. Mix one cup of this fish tea with ten cups of plain water, and use am water your corn one time in a week.\nWetin You Go Do for Future Planting (Long-Term Solution)\nChicken Manure (Fowl Yansh): Before you plant next time, make sure you add well-decayed chicken manure to your soil. Fowl yansh get plenty phosphorus. No use fresh one, e dey too strong and e go burn your plant. Make sure e don dry well well.\nPlant Legumes: Plant beans (cowpea) or groundnut for di land before you plant corn again. Dis plants de help make di soil rich and e go help free up phosphorus for di next crop.\nCheck Your Soil pH: Sometimes, di phosphorus dey inside di soil but di soil too strong (acidic) for di plant to chop am. You fit add small wood ash to di soil before you plant. E go help balance di soil and make di phosphorus available for di corn.\nRemember, small small na im dem de take chop hot soup. Start with small quantity of fertilizer, watch your plant, and add more if you need am.","Helpful","Applied Bone Meal",img_followup_001
|
| 3 |
+
"b2c3d4e5-f6a7-8901-2345-67890abcdef1",2025-08-16T11:45:10,FARM_NG_002,7.3775,3.9470,"Maize","SAMMAZ 14","Healthy Maize",0.998,"So your farm don produce beta corn? Oya, make we see different ways you fit enjoy am with your family. Corn no be for roasting alone!\nBetter Ways to Enjoy Your Healthy Corn (Maize)\nAgbado (Roasted Corn) and Ube (Pear):Dis one na classic street food for Naija. Just roast your fresh corn over charcoal fire until e brown small. Eat am with soft pear wey you don roast small or boil inside hot water. Di sweetness of di corn and di creamy pear na match made in heaven!\nBoiled Corn: Simple and sweet. Just remove di husk (di green leaf), put di corn inside pot with water and small salt. Cook am until di corn soft. You fit chop am like dat or with coconut. E dey very sweet and filling.\nPap (Akamu or Ogi): For dis one, you go need dry corn. Soak di corn for water for like two or three days until e soft. Grind am well well into a paste. Use clean cloth or sieve to separate di smooth paste from di chaff (di rough part). Allow di smooth paste to siddon and ferment small for one day. To prepare am, just mix small of di paste with cold water, then pour hot water on top and stir fast fast until e thick. Enjoy am with akara, moin moin, or milk and sugar.\nTuwo Masara:This na like swallow for northern people. You go grind dry corn into a fine powder (corn flour). Put water for pot and make e boil. Mix small of di corn flour with cold water to make a paste, then pour am inside di boiling water and de stir well. As e de thick, de add more of di dry flour small small and de turn am with turning stick until e strong like semo or eba. Serve am with any soup like Miyan Kuka or Miyan Taushe.\nEgusi and Corn Soup:You fit add fresh corn to your egusi soup! When you don fry your egusi finish and add your meat and fish, just cut fresh corn from di cob and pour am inside di soup. Allow am to cook for like 10-15 minutes. Di sweetness of di corn go make your egusi soup taste different and special.","Helpful","Harvested and Boiled",
|
| 4 |
+
"c3d4e5f6-a7b8-9012-3456-7890abcdef12",2025-08-17T09:12:30,FARM_NG_003,11.9964,8.5167,"Maize","Oba-98","Northern Corn Leaf Blight",0.920,"Ah, this one be like when small pikin get fever. E weak but e go survive! We de find the best local medicine for this exact wahala. Check back soon!",,,""
|
| 5 |
+
"d4e5f6a7-b8c9-0123-4567-890abcdef123",2025-08-17T14:05:00,FARM_NG_001,9.0801,7.4002,"Maize","Oba-98","Healthy Maize",0.999,"So your farm don produce beta corn? Oya, make we see different ways you fit enjoy am with your family. Corn no be for roasting alone!\nBetter Ways to Enjoy Your Healthy Corn (Maize)\nAgbado (Roasted Corn) and Ube (Pear):Dis one na classic street food for Naija. Just roast your fresh corn over charcoal fire until e brown small. Eat am with soft pear wey you don roast small or boil inside hot water. Di sweetness of di corn and di creamy pear na match made in heaven!\nBoiled Corn: Simple and sweet. Just remove di husk (di green leaf), put di corn inside pot with water and small salt. Cook am until di corn soft. You fit chop am like dat or with coconut. E dey very sweet and filling.\nPap (Akamu or Ogi): For dis one, you go need dry corn. Soak di corn for water for like two or three days until e soft. Grind am well well into a paste. Use clean cloth or sieve to separate di smooth paste from di chaff (di rough part). Allow di smooth paste to siddon and ferment small for one day. To prepare am, just mix small of di paste with cold water, then pour hot water on top and stir fast fast until e thick. Enjoy am with akara, moin moin, or milk and sugar.\nTuwo Masara:This na like swallow for northern people. You go grind dry corn into a fine powder (corn flour). Put water for pot and make e boil. Mix small of di corn flour with cold water to make a paste, then pour am inside di boiling water and de stir well. As e de thick, de add more of di dry flour small small and de turn am with turning stick until e strong like semo or eba. Serve am with any soup like Miyan Kuka or Miyan Taushe.\nEgusi and Corn Soup:You fit add fresh corn to your egusi soup! When you don fry your egusi finish and add your meat and fish, just cut fresh corn from di cob and pour am inside di soup. Allow am to cook for like 10-15 minutes. Di sweetness of di corn go make your egusi soup taste different and special.","Helpful","Prepared for Market",
|
| 6 |
+
"e5f6a7b8-c9d0-1234-5678-90abcdef1234",2025-08-18T08:55:45,FARM_NG_004,6.5244,3.3792,"Maize","White Dent","Maize Streak Virus",0.890,"Omo, this sickness stubborn small. But no worry, we sabi the cure. Give us small time, we de package the solution for you now now.","Not Helpful",,
|
| 7 |
+
"f6a7b8c9-d0e1-2345-6789-0abcdef12345",2025-08-18T16:20:00,FARM_NG_002,7.3811,3.9515,"Maize","SAMMAZ 14","Phosphorus Deficiency",0.960,"How You Fit Solve Phosphorus Problem for Your Corn (Maize)\nIf your corn leaves de turn purple or dark green, especially when di plant still small, e fit be say phosphorus no reach am. Phosphorus be like power food for di plant root and for making seed.\nWetin You Go Do Sharp Sharp (Short-Term Solution)\nBone Meal: Go market, buy bone meal. Na ground-up animal bone and e full with phosphorus. Sprinkle small quantity around di base of your corn plant and mix am small with di soil. No let am touch di plant stem direct.\nFish Fertilizer (Fish Tea): If you fit get fish head or bones, soak dem inside water for some days. Di water go turn to strong fertilizer. Mix one cup of this fish tea with ten cups of plain water, and use am water your corn one time in a week.\nWetin You Go Do for Future Planting (Long-Term Solution)\nChicken Manure (Fowl Yansh): Before you plant next time, make sure you add well-decayed chicken manure to your soil. Fowl yansh get plenty phosphorus. No use fresh one, e dey too strong and e go burn your plant. Make sure e don dry well well.\nPlant Legumes: Plant beans (cowpea) or groundnut for di land before you plant corn again. Dis plants de help make di soil rich and e go help free up phosphorus for di next crop.\nCheck Your Soil pH: Sometimes, di phosphorus dey inside di soil but di soil too strong (acidic) for di plant to chop am. You fit add small wood ash to di soil before you plant. E go help balance di soil and make di phosphorus available for di corn.\nRemember, small small na im dem de take chop hot soup. Start with small quantity of fertilizer, watch your plant, and add more if you need am.","Helpful","Used Fish Tea",img_followup_002
|
setup_remedies.py
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from google.cloud import bigquery
|
| 2 |
+
|
| 3 |
+
# Construct a BigQuery client object.
|
| 4 |
+
client = bigquery.Client(project="gem-creation")
|
| 5 |
+
|
| 6 |
+
# Set dataset_id to the ID of the dataset to create.
|
| 7 |
+
dataset_id = "gem-creation.maize_remedies"
|
| 8 |
+
|
| 9 |
+
# Construct a full Dataset object to send to the API.
|
| 10 |
+
dataset = bigquery.Dataset(dataset_id)
|
| 11 |
+
|
| 12 |
+
# TODO(developer): Specify the geographic location where the dataset should reside.
|
| 13 |
+
dataset.location = "US"
|
| 14 |
+
|
| 15 |
+
# Send the dataset to the API for creation, with an explicit timeout.
|
| 16 |
+
# Raises google.api_core.exceptions.Conflict if the dataset already
|
| 17 |
+
# exists within the project.
|
| 18 |
+
try:
|
| 19 |
+
dataset = client.create_dataset(dataset, timeout=30) # Make an API request.
|
| 20 |
+
print("Created dataset {}.{}".format(client.project, dataset.dataset_id))
|
| 21 |
+
except Exception as e:
|
| 22 |
+
print(e)
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
table_id = "gem-creation.maize_remedies.remedies"
|
| 26 |
+
|
| 27 |
+
schema = [
|
| 28 |
+
bigquery.SchemaField("remedy_name", "STRING", mode="REQUIRED"),
|
| 29 |
+
bigquery.SchemaField("remedy_description", "STRING", mode="REQUIRED"),
|
| 30 |
+
]
|
| 31 |
+
|
| 32 |
+
table = bigquery.Table(table_id, schema=schema)
|
| 33 |
+
try:
|
| 34 |
+
table = client.create_table(table) # Make an API request.
|
| 35 |
+
print(
|
| 36 |
+
"Created table {}.{}.{}".format(table.project, table.dataset_id, table.table_id)
|
| 37 |
+
)
|
| 38 |
+
except Exception as e:
|
| 39 |
+
print(e)
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
rows_to_insert = [
|
| 43 |
+
{
|
| 44 |
+
"remedy_name": "comic-relief",
|
| 45 |
+
"remedy_description": '''"Wetin My Eye See So?"
|
| 46 |
+
"Ah! Oga/Madam farmer, this one pass my power o. I don look this picture soteh my eye dey turn. E be like say this thing no be corn at all o, or maybe na some new style of corn wey dem just invent for another planet. Abeg, you fit try another picture? Make my brain no go knock before you come back. No vex!"'''
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"remedy_name": "healthy-maize",
|
| 50 |
+
"remedy_description": '''"So your farm don produce beta corn? Oya, make we see different ways you fit enjoy am with your family. Corn no be for roasting alone!"
|
| 51 |
+
"Better Ways to Enjoy Your Healthy Corn (Maize)"
|
| 52 |
+
"Agbado (Roasted Corn) and Ube (Pear):Dis one na classic street food for Naija. Just roast your fresh corn over charcoal fire until e brown small. Eat am with soft pear wey you don roast small or boil inside hot water. Di sweetness of di corn and di creamy pear na match made in heaven!"
|
| 53 |
+
"Boiled Corn: Simple and sweet. Just remove di husk (di green leaf), put di corn inside pot with water and small salt. Cook am until di corn soft. You fit chop am like dat or with coconut. E dey very sweet and filling."
|
| 54 |
+
"Pap (Akamu or Ogi): For dis one, you go need dry corn. Soak di corn for water for like two or three days until e soft. Grind am well well into a paste. Use clean cloth or sieve to separate di smooth paste from di chaff (di rough part). Allow di smooth paste to siddon and ferment small for one day. To prepare am, just mix small of di paste with cold water, then pour hot water on top and stir fast fast until e thick. Enjoy am with akara, moin moin, or milk and sugar."
|
| 55 |
+
"Tuwo Masara:This na like swallow for northern people. You go grind dry corn into a fine powder (corn flour). Put water for pot and make e boil. Mix small of di corn flour with cold water to make a paste, then pour am inside di boiling water and stir well. As e de thick, de add more of di dry flour small small and de turn am with turning stick until e strong like semo or eba. Serve am with any soup like Miyan Kuka or Miyan Taushe."
|
| 56 |
+
"Egusi and Corn Soup:You fit add fresh corn to your egusi soup! When you don fry your egusi finish and add your meat and fish, just cut fresh corn from di cob and pour am inside di soup. Allow am to cook for like 10-15 minutes. Di sweetness of di corn go make your egusi soup taste different and special."'''
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"remedy_name": "maize-phosphorus",
|
| 60 |
+
"remedy_description": '''"How You Fit Solve Phosphorus Problem for Your Corn (Maize)"
|
| 61 |
+
"If your corn leaves de turn purple or dark green, especially when di plant still small, e fit be say phosphorus no reach am. Phosphorus be like power food for di plant root and for making seed."
|
| 62 |
+
"Wetin You Go Do Sharp Sharp (Short-Term Solution)"
|
| 63 |
+
"Bone Meal: Go market, buy bone meal. Na ground-up animal bone and e full with phosphorus. Sprinkle small quantity around di base of your corn plant and mix am small with di soil. No let am touch di plant stem direct."
|
| 64 |
+
"Fish Fertilizer (Fish Tea): If you fit get fish head or bones, soak dem inside water for some days. Di water go turn to strong fertilizer. Mix one cup of this fish tea with ten cups of plain water, and use am water your corn one time in a week."
|
| 65 |
+
"Wetin You Go Do for Future Planting (Long-Term Solution)"
|
| 66 |
+
"Chicken Manure (Fowl Yansh): Before you plant next time, make sure you add well-decayed chicken manure to your soil. Fowl yansh get plenty phosphorus. No use fresh one, e dey too strong and e go burn your plant. Make sure e don dry well well."
|
| 67 |
+
"Plant Legumes: Plant beans (cowpea) or groundnut for di land before you plant corn again. Dis plants de help make di soil rich and e go help free up phosphorus for di next crop."
|
| 68 |
+
"Check Your Soil pH: Sometimes, di phosphorus dey inside di soil but di soil too strong (acidic) for di plant to chop am. You fit add small wood ash to di soil before you plant. E go help balance di soil and make di phosphorus available for di corn."
|
| 69 |
+
"Remember, small small na im dem de take chop hot soup. Start with small quantity of fertilizer, watch your plant, and add more if you need am."'''
|
| 70 |
+
}
|
| 71 |
+
]
|
| 72 |
+
|
| 73 |
+
errors = client.insert_rows_json(
|
| 74 |
+
table_id, rows_to_insert
|
| 75 |
+
) # Make an API request.
|
| 76 |
+
if errors == []:
|
| 77 |
+
print("New rows have been added.")
|
| 78 |
+
else:
|
| 79 |
+
print("Encountered errors while inserting rows: {}".format(errors))
|