timeki's picture
switch_vectorstore_to_azure_ai_search (#30)
ac49be7 verified
from climateqa.engine.talk_to_data.ui_config import PRECIPITATION_COLORSCALE, TEMPERATURE_COLORSCALE
from climateqa.engine.talk_to_data.config import IPCC_DATASET_URL
# IPCC_DATASET_URL = "hf://datasets/ekimetrics/ipcc-atlas"
IPCC_TABLES = [
"mean_temperature",
"total_precipitation",
"minimum_temperature",
"maximum_temperature"
]
IPCC_INDICATOR_COLUMNS_PER_TABLE = {
"mean_temperature": "mean_temperature",
"total_precipitation": "total_precipitation",
"minimum_temperature": "minimum_temperature",
"maximum_temperature": "maximum_temperature"
}
IPCC_INDICATOR_TO_UNIT = {
"mean_temperature": "°C",
"total_precipitation": "mm/day",
"minimum_temperature": "°C",
"maximum_temperature": "°C"
}
IPCC_SCENARIO = [
"historical",
"ssp126",
"ssp245",
"ssp370",
"ssp585",
]
IPCC_MODELS = []
IPCC_PLOT_PARAMETERS = [
'year',
'location',
'month'
]
MACRO_COUNTRIES = ['JP',
'IN',
'MH',
'PT',
'ID',
'SJ',
'MX',
'CN',
'GL',
'PN',
'AR',
'AQ',
'PF',
'BR',
'SH',
'GS',
'ZA',
'NZ',
'TF',
]
HUGE_MACRO_COUNTRIES = ['CL',
'CA',
'AU',
'US',
'RU'
]
IPCC_INDICATOR_TO_COLORSCALE = {
"mean_temperature": TEMPERATURE_COLORSCALE,
"total_precipitation": PRECIPITATION_COLORSCALE,
"minimum_temperature": TEMPERATURE_COLORSCALE,
"maximum_temperature": TEMPERATURE_COLORSCALE,
}
IPCC_UI_TEXT = """
Hi, I'm **Talk to IPCC**, designed to answer your questions using [**IPCC - ATLAS**](https://interactive-atlas.ipcc.ch/regional-information#eyJ0eXBlIjoiQVRMQVMiLCJjb21tb25zIjp7ImxhdCI6OTc3MiwibG5nIjo0MDA2OTIsInpvb20iOjQsInByb2oiOiJFUFNHOjU0MDMwIiwibW9kZSI6ImNvbXBsZXRlX2F0bGFzIn0sInByaW1hcnkiOnsic2NlbmFyaW8iOiJzc3A1ODUiLCJwZXJpb2QiOiIyIiwic2Vhc29uIjoieWVhciIsImRhdGFzZXQiOiJDTUlQNiIsInZhcmlhYmxlIjoidGFzIiwidmFsdWVUeXBlIjoiQU5PTUFMWSIsImhhdGNoaW5nIjoiU0lNUExFIiwicmVnaW9uU2V0IjoiYXI2IiwiYmFzZWxpbmUiOiJwcmVJbmR1c3RyaWFsIiwicmVnaW9uc1NlbGVjdGVkIjpbXX0sInBsb3QiOnsiYWN0aXZlVGFiIjoicGx1bWUiLCJtYXNrIjoibm9uZSIsInNjYXR0ZXJZTWFnIjpudWxsLCJzY2F0dGVyWVZhciI6bnVsbCwic2hvd2luZyI6ZmFsc2V9fQ==) data.
I'll answer by displaying a list of SQL queries, graphs and data most relevant to your question.
You can ask me anything about these climate indicators: **temperature** or **precipitation**.
You can specify **location** and/or **year**.
By default, we take the **mediane of each climate model**.
Current available charts :
- Yearly evolution of an indicator at a specific location (historical + SSP Projections)
- Yearly spatial distribution of an indicator in a specific country
- Yearly evolution of an indicator in a specific month at a specific location (historical + SSP Projections)
Current available indicators :
- Mean temperature
- Minimum temperature
- Maximum temperature
- Total precipitation
For example, you can ask:
- What will the temperature be like in Paris?
- What will be the total rainfall in the USA in 2030?
- How will the average temperature evolve in China ?
⚠️ **Limitations**:
- You can't ask anything that isn't related to **IPCC - ATLAS** data.
- You can not ask about **several locations at the same time**.
- If you specify a year **before 1850 or over 2100**, there will be **no data**.
- You **cannot compare two models**.
🛈 **Information**
Please note that we **log your questions for meta-analysis purposes**, so avoid sharing any sensitive or personal information.
"""