File size: 3,439 Bytes
711bc31
 
 
 
 
 
 
 
ac49be7
 
711bc31
 
 
 
ac49be7
 
 
711bc31
 
 
 
ac49be7
 
 
711bc31
 
 
 
 
 
 
 
 
 
 
 
 
 
ac49be7
 
711bc31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ac49be7
 
 
711bc31
 
 
 
 
 
 
 
 
 
 
 
 
ac49be7
711bc31
 
 
ac49be7
 
711bc31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
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.
"""