Created
December 10, 2021 16:45
-
-
Save markusritschel/0e3d940485b42f72dcbed786654faae2 to your computer and use it in GitHub Desktop.
Generates a dictionary with the official CMIP6 model colors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
url = "https://github.com/IPCC-WG1/colormaps/blob/master/CMIP6_color.xlsx?raw=true" | |
df = pd.read_excel(url, index_col=[0]) | |
cmip6_colors = {i:k.values for (i,k) in df.iterrows()} | |
# or as one-liner | |
# cmip6_colors = {i:k.values for (i,k) in pd.read_excel("https://github.com/IPCC-WG1/colormaps/blob/master/CMIP6_color.xlsx?raw=true", index_col=[0]).iterrows()} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment