Script and data for: Alruiz JM, Peralta-Maraver I, Bozinovic F, Santos M, Rezende EL. (2022), Temperature adaptation and its impact on the shape of performance curves in Drosophila populations - Proc. Royal Soc. B . Contains 5 files: (1) code.r - R script to replicates analyses and the figures in the paper and Supplementary Material: 1.1. Figure 1: Map with studied populations of Drosophila simulans in Chile, and graphical representation of the thermal hypotheses. 1.2. PCA analyses and Figure 2: Principal component analyses (PCA) including Q10, maximum performance, thermal optimum, thermal breadth and critical thermal maxima, and the relationship between principal component 1 from each PCA with the monthly averaged maximum temperature and the monthly averaged thermal range. 1.3. Figure 3: Fitted TPCs for metabolic rate and egg-to-adult viability, and the relationship between thermal optimum and maximum performance and between thermal breadth and maximum performance for both traits. 1.4. Figure 4: Coadaptation between metabolism and egg-to-adult viability. 1.5. Code to reproduce supplementary tables and supplementary figures. (2) Datasets (4 in total) 2.1. Dataset all_TPC.xlsx: Comprises thermal performance curve descriptors for metabolic rate and egg-to-adult viability after applying mechanistic model from Rezende and Bozinovic (2019). Dataset also includes ambient temperature metrics and color code for plotting purposes. Columns: q10 - temperature coefficient Q10. cte - Coeficiente of thermal expansion thr - threshold temperature (Celsius degree) decay - decay value ctmax - maximum critical temperature (Celsius degree) max.pf - maximum performance ta.opt - optimum temperature (Celsius degree) breadth.50 - thermal breadth at 50% survival (Celsius degree) breadth.80 - thermal breadth at 80% survival (Celsius degree) r.square - coefficient of determination from TPCs model fitting n.samples - number of samples pop - sampled populations col - color code for plotting purposes tmean - monthly averaged mean temperature (Celsius degree) tmin - monthly averaged minimum temperature (Celsius degree) tmax - monthly averaged maximum temperature (Celsius degree) tvar - thermal variance (tmax-tmin) Lat - latitude of the sampled population Level - traits (vco: metabolic rate; viab: viability) 2.2. Dataset metabolism.xlsx: Raw data data of metabolic rates measured experimentally. Columns: pop - sampled population tt - temperature trial (Celsius degree) sex - sex of individuals (m = males, f= females). mass - body mass of individual in mg VCO2 - mean value of measured metabolic rate in uL CO2/h stdCO2 - standard deviation value of measured metabolic rate in uL CO2/h 2.3. Dataset viability.xlsx: Raw data data of egg-to-adult viability measured experimentally. Columns: pop - sampled population ttrial- temperature trial (Celsius degree) vial - vial number pdate/edate - initial and final sampled dates days - duration of trial in days ne - number of eclosions 2.4. Dataset Temp_2018_2020.csv: Database with time series of temperature for each of the 8 sampling locations at a one-hour resolution for the period between 2018 and 2020 (3) Analyses_thermal_functions.r: r code with functions to fit TPCs using mechanistic models from Rezende and Bozinovic (2019). References: 1. Rezende EL, Bozinovic F. (2019). Thermal performance across levels of biological organization. Philosophical Transactions of the Royal Society B, 374, 20180549.