Skip to content

Instantly share code, notes, and snippets.

View DileePerera's full-sized avatar
🎯
Focusing

Dileesha Perera DileePerera

🎯
Focusing
View GitHub Profile
import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestRegressor
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error
import requests
# Function to fetch climate data from World Bank API (unchanged)
def get_climate_data(iso, variable):
base_url = "https://cckpapi.worldbank.org/cckp/v1/cmip6-x0.25_climatology_{}_climatology_annual_1995-2014_median_historical_ensemble_all_mean/{}_format=json"