{"id": "agriculture_02", "question": "An agricultural policy research institution is assessing the degree of match between the optimal wheat cultivation conditions in high-income countries and the actual market outcomes, in order to provide reference data for trade strategies. Identify all soil-climate feature combinations labeled as \"wheat\", which must meet agricultural standards: pH value between 5.5 and 7.0, nitrogen (N) content greater than 0.2, and summer precipitation (PRECTOTCORR-Su) exceeding winter precipitation (PRECTOTCORR-W). From these favorable feature combinations, calculate the median values of nitrogen, phosphorus, and potassium, as well as the annual temperature difference (defined as the maximum value of T2M_MAX in all seasons minus the minimum value of T2M_MIN in all seasons). Additionally, extract the wheat yield records and combine them with the national income classification, retaining only high-income countries (achieved through fuzzy matching of country names with a similarity threshold of 80). Then, merge this data with the price data of goods labeled as \"wheat\" (case-insensitive) and summarize the average prices by country-year. Finally, generate a unified data frame containing country, year, wheat_yield_hg_per_ha, avg_wheat_price, median_n, median_p, median_k, and median_temp_range (where wheat_yield_hg_per_ha is wheat yield in grams per hectare, avg_wheat_price is the average wheat price in local currency, median_n/median_p/median_k are the median values of nitrogen/phosphorus/potassium, and median_temp_range is the median annual temperature difference), and save it as the \"output.csv\" file.", "data_sources": ["Crop Recommendation using Soil Properties and Weather Prediction.csv", "globalfoodprices_wfp.csv", "ne_50m_admin_0_countries/ne_50m_admin_0_countries.dbf", "Crop Yield Prediction Dataset/yield.csv"], "skills": ["Row-wise and Column-wise Logical Evaluation", "Boolean Logic and Masking", "Indexing and Selection", "Logical Operators for Combining Conditions", "In-place vs Copy Operations", "Dependency Management and Setup", "Row-wise Operations and Aggregation", "Column/Row-wise Computations", "Statistical Calculations and Quantiles", "Mathematical and Statistical Computations", "Joining and Lookup Operations", "Data Loading with Pandas", "Parsing and Reading Data Files", "Data Conversion and Post-Loading Processing", "Element-wise Dataframe Operations", "Entity Mapping and Matching", "Data Structure and Dictionary Operations", "Data Structure Handling (Dictionaries, Lists)", "Mapping and Lookup", "Data Filtering and Matching", "Binary Data Handling", "Filtering and Criteria-Based Selection", "Function Application and Vectorization", "Index Alignment and Manipulation", "Data Aggregation and Grouping", "Column-wise Transformations and Aggregation", "Preprocessing and File Structure Adjustments", "Join Operations and Merging", "Data Integration and Merging", "Data Transformation and Column Manipulation", "Column Selection and Consistency Checks", "Data Export and Output Processing", "Data Serialization & File Handling"], "domain": "agriculture", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['country', 'year', 'wheat_yield_hg_per_ha', 'avg_wheat_price', 'median_n', 'median_p', 'median_k', 'median_temp_range'])"]} {"id": "agriculture_03", "question": "An international agricultural policy research institution wants to assess whether countries whose highest-yielding crops do not match soil-climate recommendations tend to use more pesticides. Using the provided datasets for the period 1990–2013, perform the following analysis. From the crop recommendation dataset, standardize crop names by converting to lowercase, removing parenthetical content, and stripping the trailing letter 's', then determine the top 3 most frequently occurring crop types as the soil-climate suitability reference set. For each country-year pair in the yield dataset, identify the crop with the highest yield value. Classify each country-year as 'aligned' if its top-yielding crop is among the top 3 recommended crops, or 'misaligned' otherwise. For country matching, use deterministic exact keys: normalize names (lowercase, remove parenthetical content and punctuation) and reconcile each country in the yield and pesticide data to its corresponding Natural Earth NAME entry. Exclude historical or aggregate country entities. In particular, when a country is split into multiple sub-entities, map each sub-entity to its own Natural Earth NAME entry as a separate entity. Merge yield and pesticide data on the resulting country key and year, and retrieve income only from a one-to-one Natural Earth NAME match. For each country-year, compute pesticide usage intensity as the sum of all pesticide amounts for that country-year divided by the top-yielding crop's yield value. Retrieve each country's World Bank income classification from the INCOME_GRP field in the Natural Earth dataset. Drop records with missing pesticide intensity or income classification. Calculate the Pearson correlation coefficient between the binary mismatch indicator (1 for 'misaligned', 0 for 'aligned') and pesticide usage intensity across all retained observations. Group the data by income classification and alignment status, count the observations in each group, and attach the global correlation value to every row. Save the results to output.csv with columns: income_group (World Bank income classification), alignment_status ('aligned' or 'misaligned'), count (number of country-year observations per group), and correlation (the single global Pearson correlation coefficient, repeated for all rows).", "data_sources": ["Crop Recommendation using Soil Properties and Weather Prediction.csv", "globalfoodprices_wfp.csv", "ne_50m_admin_0_countries/ne_50m_admin_0_countries.dbf", "Crop Yield Prediction Dataset/pesticides.csv", "Crop Yield Prediction Dataset/yield.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Time-based Filtering and Matching", "Filtering and Criteria-Based Selection", "Data Exploration and Comparison", "Dependency Management and Setup", "Preprocessing and File Structure Adjustments", "Element-wise Dataframe Operations", "Mapping and Lookup", "Index-based Alignment and Set Operations", "Set and Membership Analysis", "Function Application and Vectorization", "Row-wise Operations and Aggregation", "Ranking and Top N Logic", "Data Filtering and Matching", "Joining and Lookup Operations", "In-place vs Copy Operations", "Entity Mapping and Matching", "Data Aggregation and Grouping", "Weighted Aggregation and Summation", "Column-wise Transformations and Aggregation", "Data Integration and Merging", "Join Operations and Merging", "Validation and Verification of Merge Results", "Statistical Correlation Analysis", "Statistical Analysis and Metrics", "Formatting and Output Organization", "Data Export and Output Processing", "CSV Processing"], "domain": "agriculture", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['income_group', 'alignment_status', 'count', 'correlation'], thresholds={3: 0.02})"]} {"id": "agriculture_04", "question": "A global agricultural policy research institution aims to explore whether the soil and climate characteristics that have statistical significance in predicting crop recommendations can also distinguish between crops that have a direct impact on food market prices and those that do not. Firstly, by using a multi-class logistic regression model (multi_class='multinomial', solver='lbfgs', max_iter=1000, random_state=42) with the following 27 features: ['Ph', 'K', 'P', 'N', 'Zn', 'S', 'QV2M-W', 'QV2M-Sp', 'QV2M-Su', 'QV2M-Au', 'T2M_MAX-W', 'T2M_MAX-Sp', 'T2M_MAX-Su', 'T2M_MAX-Au', 'T2M_MIN-W', 'T2M_MIN-Sp', 'T2M_MIN-Su', 'T2M_MIN-Au', 'PRECTOTCORR-W', 'PRECTOTCORR-Sp', 'PRECTOTCORR-Su', 'PRECTOTCORR-Au', 'WD10M', 'GWETTOP', 'CLOUD_AMT', 'WS2M_RANGE', 'PS'] and applying the backward elimination method (only retaining features with Wald p-values < 0.05), the most predictive soil and climate variables are determined. Additionally, a time series causal analysis is conducted, and it is determined which crop yield changes will causally affect their corresponding food prices. Then, for each feature selected from the backward elimination step, the Kruskal-Wallis H test (α = 0.05) is used to test whether the distribution of each selected feature has a significant difference between crops that are identified as having a causal relationship with price changes and those that do not. Save the results to output.csv containing feature, h_statistic, p_value, and is_significant (where feature is the soil or climate variable name, h_statistic is the Kruskal-Wallis H test statistic, p_value is the p-value from the test, and is_significant indicates whether the result is statistically significant at α = 0.05).", "data_sources": ["Crop Recommendation using Soil Properties and Weather Prediction.csv", "globalfoodprices_wfp.csv", "Crop Yield Prediction Dataset/yield.csv", "Crop Yield Prediction Dataset/pesticides.csv", "Crop Yield Prediction Dataset/rainfall.csv", "Crop Yield Prediction Dataset/temp.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Numerical Data Handling", "Column-specific or Feature-wise Processing", "Data Preparation and Formatting", "Preprocessing and Scaling", "Data Preprocessing & Encoding", "Model Configuration and Import", "Multi-Task/Multi-Class Handling", "Feature Selection and Dimensionality Reduction", "Statistical Testing for Feature-Target Evaluation", "Model Training & Evaluation", "In-place vs Copy Operations", "Array and Matrix Manipulation", "Stochasticity and Reproducibility", "Time Series Specific Methods", "Time Series Handling and Preprocessing", "Data Integration and Merging", "Data Alignment & Merging", "Data Aggregation and Grouping", "Time Series Analysis and Causality", "Stationarity Testing and Differencing", "Filtering and Sorting Correlation Data", "Set and Membership Analysis", "Data Exploration and Comparison", "Function Application and Vectorization", "Data Transformation and Column Manipulation", "Time Formatting and String Manipulation", "Statistical Analysis and Testing", "Handling Missing or Edge Cases"], "domain": "agriculture", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['feature', 'h_statistic', 'p_value', 'is_significant'], thresholds={1: 0.02, 2: 0.02})"]} {"id": "agriculture_06", "question": "A global agricultural policy research institution is developing a comprehensive agricultural suitability index (ASI) to guide sustainable agricultural investment for various countries and crops. Only samples with complete measurements of soil attributes (pH, phosphorus, nitrogen, potassium, zinc, sulfur) will be retained, and the records will be limited to the overlapping time window from 1990 to 2021. The crop names will be standardized (lowercase processing, removal of parentheses descriptions, and elimination of plural forms), and each standardized crop will be assigned to a topic category. Annual climate indicators (e.g., annual temperature range = maximum - minimum) will be calculated using seasonal weather variables. The filtered soil-weather data will be trained using Gaussian Naive Bayes classifier with var_smoothing = 0.3, and 20% of the data will be reserved for testing (random state = 42), and the calibrated class probabilities will be used as a component of the ASI. Finally, preserve the filtered soil-weather sample records and calculate the ASI for each individual retained record using a weighted average with the following weights: 0.4 for soil fertility score (predicted probability), 0.4 for climate suitability (standardized climate metrics), and 0.2 for pesticide score (inverse of pesticide usage), with a final score range of 0 to 1. Set Area to 'Global' and Year to 2020 for all records. Save the results to output.csv with one row per retained soil-weather sample, containing columns \"Area\", \"Year\", \"Item\", \"crop_topic\", and \"ASI\", where Item is the record's original crop label and crop_topic is the topic category for that record's standardized crop.", "data_sources": ["Crop Recommendation using Soil Properties and Weather Prediction.csv", "Crop Yield Prediction Dataset/pesticides.csv"], "skills": ["File Handling and Operations", "Data Loading with Pandas", "Parsing and Reading Data Files", "Dimensionality and Shape Management", "Filtering and Criteria-Based Selection", "Time-based Filtering and Matching", "Data Normalization and Standardization", "String and Content Processing", "Data Categorization & Mapping", "In-place vs Copy Operations", "Function Application and Vectorization", "Arithmetic and Cumulative Calculations", "Array and Matrix Manipulation", "Data Exploration and Comparison", "Model Configuration and Import", "Data Preparation and Formatting", "Data Splitting and Sampling", "Numerical Stability and Naive Bayes Tuning", "Model Training and Customization", "Model Evaluation & Validation", "Model Prediction and Output Handling", "Stochasticity and Reproducibility", "Preprocessing and Scaling", "Arithmetic Transformations and Normalization", "Data Normalization and Preprocessing", "Normalization and Percentile Calculations", "Normalization and Weighted Aggregation", "Data Structure Creation and Manipulation", "Formatting and Output Organization", "Data Export and Output Processing", "CSV Processing", "Data Inspection and Summarization"], "domain": "agriculture", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['Area', 'Year', 'Item', 'crop_topic', 'ASI'])"]} {"id": "agriculture_07", "question": "A global agricultural policy research institution is conducting an assessment of the data quality of its comprehensive agricultural dataset to ensure the reliability of the models for crop suitability and yield prediction. Through a comprehensive verification process, including: (1) checking for unreasonable values, such as pH values not within the range of [0, 14], negative nutrient levels (potassium, phosphorus, nitrogen, zinc, sulfur), and any seasonal temperature inconsistencies where T2M_MAX is less than T2M_MIN in any season; (2) verifying that crop yields and pesticide usage amounts are non-negative; (3) marking situations where the annual average temperature exceeds the biologically reasonable range ([-50°C, 60°C]). Generate a single pandas data frame containing all verification checks, with columns including \"file\" (the source file name), \"column\" (the column being checked), \"check_type\" (the type of validation performed, e.g., range_validity, non_negative, temp_consistency, temp_range), \"anomaly_count\" (the number of anomalous records found), and \"description\" (a brief explanation of the check criteria), and save the results to output.csv.", "data_sources": ["Crop Recommendation using Soil Properties and Weather Prediction.csv", "Crop Yield Prediction Dataset/yield.csv", "Crop Yield Prediction Dataset/pesticides.csv", "Crop Yield Prediction Dataset/temp.csv"], "skills": ["File Handling and Operations", "Data Loading with Pandas", "Parsing and Reading Data Files", "Data Exploration and Comparison", "Data Inspection and Validation", "Data Pattern Analysis & Diagnostics", "Outlier Detection and Filtering", "Temporal Validation and Comparison", "Data Manipulation and Validation", "Pandas-Specific Operations", "Data Structure Creation and Manipulation", "Data Serialization & File Handling", "Data Export and Output Processing", "Validation and Output Formatting"], "domain": "agriculture", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['file', 'column', 'anomaly_count'])"]} {"id": "agriculture_09", "question": "An international agricultural policy research institution is studying whether countries with significant climate deviations from optimal crop-growing conditions face systemic food system pressure, evidenced by higher pesticide usage and elevated food prices. Using datasets covering crop-soil-weather recommendations, global food prices, and crop yield prediction data (including pesticides, temperature, and rainfall), perform the following analysis: From the crop recommendation dataset, compute each crop's optimal climate profile — the seasonal maximum temperature (max of T2M_MAX across seasons W, Sp, Su, Au) and total seasonal precipitation (sum of PRECTOTCORR across all seasons), aggregated by crop using the median. Only include samples with soil pH between 4.5 and 8.5, positive nutrient levels (N, P, K), and non-empty crop labels. Then combine yield, pesticide, actual temperature, and rainfall data by country and year, linking with the optimal climate profiles by crop. Integrate retail food prices (filtered to per-kilogram units); if multiple retail per-kilogram price records exist for the same country-year-crop combination, use their mean price before merging. For each country-year-crop record, calculate the absolute deviation of actual annual average temperature from the optimal seasonal peak temperature, and similarly for rainfall versus optimal total precipitation. Identify stress patterns: using the 75th percentile as the threshold for temperature and rainfall deviations, and the median as the threshold for pesticide usage and food price — a record is a stress event (1) if at least 2 of these 4 indicators exceed their respective thresholds, otherwise 0. Save the results to output.csv with columns: country, Year, crop, pesticide_value, yield_value, mp_price, temp_deviation, rainfall_deviation, stress_pattern.", "data_sources": ["Crop Recommendation using Soil Properties and Weather Prediction.csv", "globalfoodprices_wfp.csv", "Crop Yield Prediction Dataset/pesticides.csv", "Crop Yield Prediction Dataset/temp.csv", "Crop Yield Prediction Dataset/yield.csv", "Crop Yield Prediction Dataset/rainfall.csv"], "skills": ["Data Import and Library Setup", "Data Loading with Pandas", "Parsing and Reading Data Files", "Data Inspection and Exploration", "Data Normalization and Standardization", "String and Content Processing", "Preprocessing and File Structure Adjustments", "Column Selection and Consistency Checks", "Function Application and Vectorization", "Filtering and Criteria-Based Selection", "In-place vs Copy Operations", "Row-wise Operations and Aggregation", "Arithmetic and Cumulative Calculations", "Statistical Calculations and Quantiles", "Data Aggregation and Grouping", "Column-wise Transformations and Aggregation", "Numerical Operations and Type Conversion", "Data Cleaning and Transformation", "Join Operations and Merging", "Data Integration and Merging", "Difference and Trend Computation", "Incremental and Comparative Calculations", "Outlier Detection and Filtering", "Pattern Identification & Extraction", "Handling Missing Data", "Header and Metadata Processing", "Data Export and Output Processing", "CSV Processing", "Data Inspection and Summarization", "Statistical Analysis and Metrics", "Formatting and Output Organization", "Data Exploration and Comparison", "Array and Matrix Manipulation"], "domain": "agriculture", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['country', 'Year', 'crop', 'pesticide_value', 'yield_value', 'mp_price', 'temp_deviation', 'rainfall_deviation', 'stress_pattern'])"]} {"id": "agriculture_10", "question": "An international agricultural research institution aims to assess the compatibility between soil climate suitability and the actual farming practices of major crops. For each different crop in the soil climate recommendation data, calculate the following: (1) the number of soil-climate samples recommended for the crop, (2) the annual temperature range (defined as the maximum of all seasonal maximum temperatures minus the minimum of all seasonal minimum temperatures), and (3) the annual total precipitation (sum of seasonal precipitation). For indicators (2) and (3), use median aggregation when summarizing by crop. Then, by matching standardized crop names, find the countries where each crop is actually planted and integrate the data for these countries and years. Finally, generate a DataFrame with each crop on a separate row, including: the original crop label, the three indicators based on the recommendations, the number of countries where the crop is planted, and the median values of pesticide usage, actual yield, national average temperature, and national average rainfall from all related country-year observation data. Save the results to output.csv.", "data_sources": ["Crop Recommendation using Soil Properties and Weather Prediction.csv", "Crop Yield Prediction Dataset/pesticides.csv", "Crop Yield Prediction Dataset/rainfall.csv", "Crop Yield Prediction Dataset/temp.csv", "Crop Yield Prediction Dataset/yield.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Column Iteration and Processing", "Arithmetic and Cumulative Calculations", "Summation Techniques", "Cumulative and Row-wise Operations", "Data Transformation and Column Manipulation", "Column Manipulation / Creation", "Vectorization and Performance Optimization", "Data Normalization and Standardization", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Data Structure Handling (Dictionaries, Lists)", "Mapping and Lookup", "Filtering and Criteria-Based Selection", "Conditional Logic and Row-wise Operations", "Data Preprocessing and Centering", "Column Name and Schema Management", "Statistical Calculations and Quantiles", "Mathematical and Statistical Computations", "Column-wise Transformations and Aggregation", "Data Integration and Merging", "Join Operations and Merging", "Column Selection and Consistency Checks", "Data Export and Output Processing", "Data Serialization & File Handling", "Index Handling and Conversion", "Output and Logging", "Formatting and Output Organization", "In-place vs Copy Operations", "Array and Matrix Manipulation", "Function Application and Vectorization"], "domain": "agriculture", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['label', 'n_samples', 'median_temp_range', 'median_precip', 'n_countries', 'median_pesticide', 'median_actual_yield', 'median_country_temp', 'median_country_rain'])"], "post_process_func": [null]} {"id": "agriculture_12", "question": "An international agricultural research institution is assessing how soil characteristics and seasonal climate patterns affect crop yields, in order to provide a basis for policy recommendations. A unified dataset is being constructed, which links national-level crop yields with corresponding soil nutrient characteristics (nitrogen, phosphorus, potassium, zinc, sulfur, and pH) as well as derived annual climate indicators (annual temperature range calculated as the maximum of T2M_MAX in each season minus the minimum of T2M_MIN in each season, and total annual precipitation calculated as the sum of PRECTOTCORR in all four seasons). The crop names are standardized in each dataset. Then, using the standardized soil nutrients (pH, K, P, N, Zn, S) and derived climate features (annual temperature range and total annual precipitation) as independent variables, a linear regression prediction is made for crop yields (in hectograms per hectare), and a pandas data frame with two columns is returned: one column \"features\" lists each predictor variable (including an \"intercept\" row), and the other column \"coefficients\" shows the estimated regression coefficients for each variable. The results should be saved to output.csv with two columns: 'feature' and 'coefficient'.", "data_sources": ["Crop Yield Prediction Dataset/yield.csv", "Crop Recommendation using Soil Properties and Weather Prediction.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Text Processing and Cleaning", "Data Normalization and Standardization", "Arithmetic and Cumulative Calculations", "Data Normalization and Preprocessing", "Function Application and Vectorization", "Data Cleaning and Transformation", "Join Operations and Merging", "Data Integration and Merging", "Data Aggregation and Grouping", "Mathematical and Statistical Computations", "Data Alignment & Merging", "Column Selection and Consistency Checks", "Preprocessing and Scaling", "Model Training & Evaluation", "Regression Modeling and Interpretation", "Data Manipulation and Summarization", "Data Export and Output Processing", "CSV Processing", "Dynamic Data Transformation and Insertion", "In-place vs Copy Operations"], "domain": "agriculture", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv('output.csv', 'result.csv', ignore_order=True, specified_columns=['coefficient'], thresholds={1: 0.02})"]} {"id": "agriculture_14", "question": "A global agricultural policy research institution aims to explore the relationship between climate conditions and agricultural intensity for major crops during the period from 1990 to 2013. Using the Crop Recommendation dataset to identify the 12 core crops, construct a feature matrix from yield data, climate data (temperature and rainfall), and pesticide usage data. Calculate a standardized comprehensive climate index (combining temperature and rainfall) and a standardized agricultural intensity index (combining pesticide usage and crop yield) using MinMaxScaler normalization. Generate a static scatter plot using matplotlib where the x-axis represents the climate index, the y-axis represents the agricultural intensity index, the size of the points reflects the crop yield value, and the color indicates the country's income group. The plot should have the title 'Agricultural Trends 1990-2013: Climate vs Agricultural Intensity', x-axis label 'Normalized Climate Index (Temperature + Rainfall)', and y-axis label 'Normalized Agricultural Intensity Index (Pesticides + Yield)'. Save the visualization to output.png. Additionally, calculate and report the maximum crop yield value (unit: hectograms/hectare) across all data points, saving this result to output.csv with columns ['metric', 'value'].", "data_sources": ["Crop Yield Prediction Dataset/yield.csv", "Crop Recommendation using Soil Properties and Weather Prediction.csv", "Crop Yield Prediction Dataset/pesticides.csv", "Crop Yield Prediction Dataset/temp.csv", "Crop Yield Prediction Dataset/rainfall.csv"], "skills": ["Data Import and Library Setup", "Data Loading with Pandas", "Data Handling & Preparation", "Preprocessing and File Structure Adjustments", "Column/Row-wise Computations", "Data Normalization and Standardization", "Data Aggregation and Grouping", "Column-wise Transformations and Aggregation", "In-place vs Copy Operations", "Function Application and Vectorization", "Preprocessing and Scaling", "Arithmetic Transformations and Normalization", "Data Integration and Merging", "Join Operations and Merging", "Validation and Verification of Merge Results", "Color and Palette Usage", "Data Categorization & Mapping", "Plot Creation and Configuration", "Multiple Series/Traces Visualization", "Plot Customization and Layout", "Image Handling and Exporting", "Visualization and Output Generation", "Row-wise Operations and Aggregation", "Data Export and Output Processing", "Data Serialization & File Handling", "Array and Matrix Manipulation"], "domain": "agriculture", "output_file_name": ["output.png", "output.csv"], "gold_file_name": ["result.png", "result.csv"], "eval_func": ["compare_image('output.png', 'result.png', calculate_columns=['type', 'graph_title', 'x_label', 'y_label'])", "compare_csv('output.csv', 'result.csv', ignore_order=True, specified_columns=['value'])"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result.png')"]} {"id": "agriculture_15", "question": "A global agricultural policy research institution aims to assess whether the crops grown in various countries or reporting areas are suitable for their soil and climate conditions. A random forest classifier with 100 trees is constructed, with the random state set to 42 and the category weights set to \"balanced\". Based on soil characteristics (nitrogen, phosphorus, potassium, zinc, sulfur, and pH) and derived annual weather characteristics (annual average temperature and annual precipitation), the optimal crops are predicted. For area matching, normalize reporting area labels to deterministic keys (lowercase, with parenthetical content and punctuation removed), reconcile national weather labels to the corresponding yield-data area labels where needed, and exclude historical or aggregate entities. Then, the actual main crops of each country or reporting area are determined based on the average annual yield, and combined with representative soil profiles (average nutrient levels of each crop in the recommended dataset) and annual weather summaries at the national level (missing national weather values are filled with the global median), to generate predicted results for each country-year record from 1990 to 2013. The results are saved to output.csv with columns: 'country' (the normalized reporting area key), 'year', 'actual_top_crop', 'predicted_crop', 'prediction_probability', showing the differences between the crops recommended by the model and those actually planted, as well as the confidence score of the prediction.", "data_sources": ["Crop Yield Prediction Dataset/yield.csv", "Crop Recommendation using Soil Properties and Weather Prediction.csv", "Crop Yield Prediction Dataset/temp.csv", "Crop Yield Prediction Dataset/rainfall.csv"], "skills": ["Data Ingestion and Processing", "Data Loading with Pandas", "Parsing and Reading Data Files", "Geospatial Data Handling and Mapping", "Time-based Filtering and Matching", "Filtering and Criteria-Based Selection", "Data Normalization and Standardization", "Data Normalization and Preprocessing", "Mapping and Lookup", "Data Structure Handling (Dictionaries, Lists)", "In-place vs Copy Operations", "Function Application and Vectorization", "Data Transformation and Feature Engineering", "Data Transformation and Column Manipulation", "Arithmetic and Cumulative Calculations", "Feature Engineering and Embeddings", "Time Series & Temporal Grouping", "Data Integration and Merging", "Join Operations and Merging", "Data Cleaning and Transformation", "Row-wise Operations and Aggregation", "Column-wise Transformations and Aggregation", "Column Name and Schema Management", "DataFrame Column Management", "Model Configuration and Import", "Model Training and Inference", "Classification and Prediction Modeling", "Imputation Methods", "Statistical and Mathematical Modeling", "Column-specific or Feature-wise Processing", "Data Preprocessing and Column Management", "Model Prediction and Output Handling", "Stochasticity and Reproducibility", "Data Export and Output Processing", "Formatting and Output Organization", "Output and Logging"], "domain": "agriculture", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_model('output.csv', 'result.csv', matched_columns=['country', 'year'], calculate_columns=['predicted_crop'], metric='accuracy', lower_bound=0.0, upper_bound=1.0)"]} {"id": "agriculture_16", "question": "A global agricultural policy research institution aims to quantify how soil suitability, national climate conditions, pesticide usage, and economic development jointly affect the crop yields of different countries. Construct a unified country-crop-year feature set by combining median crop-level PCA soil suitability profiles from the crop recommendation data, retaining 95% explained variance, with country-year climate, pesticide, GDP, and income-group indicators; use standardized predictors for the Ridge model so coefficient magnitudes are comparable. A ridge regression model with alpha = 1.0 is used to predict crop yields (in units: hectograms per hectare), retaining 20% of the data for testing (random state set to 42), and reporting the R² score on the test set as well as the data frame of feature coefficients sorted by absolute value size. The results are saved to output.csv with columns 'metric' and 'value', where the first row contains the R² score and subsequent rows contain feature names and their corresponding coefficients.", "data_sources": ["Crop Yield Prediction Dataset/yield.csv", "Crop Recommendation using Soil Properties and Weather Prediction.csv", "Crop Yield Prediction Dataset/pesticides.csv", "Crop Yield Prediction Dataset/temp.csv", "Crop Yield Prediction Dataset/rainfall.csv", "ne_50m_admin_0_countries/ne_50m_admin_0_countries.dbf"], "skills": ["Data Loading with Pandas", "Geospatial Data Handling and Mapping", "Data Normalization and Standardization", "In-place vs Copy Operations", "Binary Data Handling", "Function Application and Vectorization", "Data Transformation and Feature Engineering", "Arithmetic and Cumulative Calculations", "Data Preparation and Aggregation", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Preprocessing and Scaling", "Feature Selection and Dimensionality Reduction", "Dimensionality Reduction and Feature Engineering", "Stochasticity and Reproducibility", "Data Cleaning and Transformation", "Join Operations and Merging", "Data Integration and Merging", "Data Alignment & Merging", "Categorical Data Preprocessing and Simplification", "Handling Missing Data", "Data Preprocessing and Column Management", "Array and Matrix Manipulation", "Model Training & Evaluation", "Data Splitting and Sampling", "Machine Learning Pipeline & Execution", "Model Evaluation & Validation", "Data Manipulation and Summarization", "Formatting and Output Organization", "Data Export and Output Processing", "CSV Processing", "Model Behavior and Interpretation", "Dynamic Data Transformation and Insertion"], "domain": "agriculture", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv('output.csv', 'result.csv', ignore_order=True, specified_columns=['value'], thresholds={1: 0.02})"]} {"id": "agriculture_18", "question": "A global agricultural research institution aims to assess the robustness of a crop recommendation system. A random forest classifier with 100 trees (random state set to 42) is used for crop recommendations. When simulating any random components, please set the random seed to 42 to ensure the reproducibility of the results. Prepare a comprehensive evaluation report, which includes: (1) classification reports for each category, including precision, recall, F1 score, and support; (2) a standardized confusion matrix showing the misclassification patterns of crop types; (3) overall accuracy, macro F1 score, and micro F1 score. Save the classification report to output1.csv with columns for each metric (precision, recall, f1-score, support) and rows for each crop class plus overall metrics (accuracy, macro avg, micro avg). Save the confusion matrix data to output2.csv with rows and columns representing actual and predicted crop classes. Save the confusion matrix visualization to output.png with title 'Normalized Confusion Matrix - Crop Recommendation', xlabel 'Predicted', and ylabel 'Actual'.", "data_sources": ["Crop Recommendation using Soil Properties and Weather Prediction.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Arithmetic and Cumulative Calculations", "Data Transformation and Column Manipulation", "Data Preparation and Formatting", "Feature Selection and Dimensionality Reduction", "Preprocessing and Scaling", "Data Normalization and Standardization", "Data Splitting and Sampling", "Class Distribution Management", "In-place vs Copy Operations", "Stochasticity and Reproducibility", "Array and Matrix Manipulation", "Library Usage (Scikit-Learn)", "Model Training & Evaluation", "Classification and Prediction Modeling", "Model Evaluation Metrics", "Data Structure Creation and Manipulation", "Pandas-Specific Operations", "Row and Index Handling", "Data Export and Output Processing", "Data Serialization & File Handling", "Dynamic Data Transformation and Insertion", "Probability and Normalization", "Normalization and Percentile Calculations", "Plot Customization (Aesthetics)", "Grid-Based Predictions and Visualization", "Color and Palette Usage", "Plot Customization and Annotation", "Display and Styling", "Plot Customization and Layout", "Subplot and Layout Management", "Image Handling and Exporting", "Visualization and Output Generation"], "domain": "agriculture", "output_file_name": ["output1.csv", "output2.csv", "output.png"], "gold_file_name": ["result1.csv", "result2.csv", "result.png"], "eval_func": ["compare_csv('output1.csv', 'result1.csv', ignore_order=True)", "compare_csv('output2.csv', 'result2.csv', ignore_order=True)", "compare_image('output.png', 'result.png', calculate_columns=['type', 'graph_title', 'x_label', 'y_label'])"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result.png')"]} {"id": "agriculture_20", "question": "A global food safety research team aims to explore factors affecting short-term food price instability. Using historical food price data and agricultural production data, a multiple linear regression model is calculated, where the dependent variable is the three-year rolling standard deviation of annual food prices (in US dollars per kilogram), and the independent variables include: (1) the three-year moving average of crop yields, and (2) the pesticide use intensity defined as the total pesticide usage (tons) divided by crop yield moving average. The regression model is fitted only when all variable data are fully observed. The final output is a pandas DataFrame listing predictors with their coefficient estimates, standard errors, t-statistics, p-values, and 95% confidence intervals. Save the significant results (p-value < 0.05) to output1.csv with columns 'predictor', 'coefficient', 'std_error', 't_statistic', 'p_value', 'ci_lower', 'ci_upper'. Save all results to output2.csv with the same column schema.", "data_sources": ["globalfoodprices_wfp.csv", "Crop Yield Prediction Dataset/yield.csv", "Crop Yield Prediction Dataset/pesticides.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Statistical Calculations and Quantiles", "Arithmetic and Cumulative Calculations", "Data Cleaning and Transformation", "Data Aggregation and Grouping", "Data Preparation and Aggregation", "In-place vs Copy Operations", "Data Integration and Merging", "Join Operations and Merging", "Function Application and Vectorization", "Statistical Analysis and Metrics", "Regression Modeling and Interpretation", "Model Training & Evaluation", "Statistical Modeling and Uncertainty", "Array and Matrix Manipulation", "Data Export and Output Processing", "Data Manipulation and Summarization"], "domain": "agriculture", "output_file_name": ["output1.csv", "output2.csv"], "gold_file_name": ["result1.csv", "result2.csv"], "eval_func": ["compare_csv('output1.csv', 'result1.csv', ignore_order=True, specified_columns=['predictor', 'coefficient', 'std_error', 't_statistic', 'p_value', 'ci_lower', 'ci_upper'], thresholds={1: 0.02, 2: 0.02, 3: 0.02, 4: 0.02, 5: 0.02, 6: 0.02})", "compare_csv('output2.csv', 'result2.csv', ignore_order=True, specified_columns=['predictor', 'coefficient', 'std_error', 't_statistic', 'p_value', 'ci_lower', 'ci_upper'], thresholds={1: 0.02, 2: 0.02, 3: 0.02, 4: 0.02, 5: 0.02, 6: 0.02})"]} {"id": "agriculture_21", "question": "A global agricultural policy research institution is assessing whether countries that grow crops based on their own soil and climate conditions can achieve higher yields. Using the provided crop yield, temperature, rainfall, and crop recommendation datasets, first standardize crop names to match those in the recommendation system. Then calculate the climate suitability ranges (minimum and maximum annual average temperature and total annual precipitation) for each crop based on the soil and weather data; note that the seasonal PRECTOTCORR fields represent average daily precipitation for each season, measured in mm/day. Next, identify the highest-yielding crop for each country-year combination, and check whether its growing conditions fall within the climate suitability range for that crop. Generate a histogram showing the distribution of average annual temperatures for these top-yielding crops with 30 bins, black edges, and 70% transparency. The histogram should have title 'Temperature Distribution for Top-Yield Crops', xlabel 'Average Annual Temperature (°C)', and ylabel 'Frequency'. Save the histogram as output.png. Finally, identify the temperature bin with the highest frequency and save the bin boundaries, frequency count, and total matched records to output1.csv with columns 'bin_lower_bound', 'bin_upper_bound', 'frequency', 'total_matched_records', and save the detailed matched records to output2.csv with columns 'Area', 'Year', 'Item_clean', 'Value', 'avg_temp', 'average_rain_fall_mm_per_year'.", "data_sources": ["Crop Recommendation using Soil Properties and Weather Prediction.csv", "Crop Yield Prediction Dataset/temp.csv", "Crop Yield Prediction Dataset/yield.csv", "Crop Yield Prediction Dataset/rainfall.csv"], "skills": ["Data Loading with Pandas", "Data Normalization and Standardization", "Data Normalization and Preprocessing", "Unique Value Extraction", "Dictionary Manipulation and Construction", "Data Structure Handling (Dictionaries, Lists)", "Statistical Analysis and Metrics", "Arithmetic and Cumulative Calculations", "Row-wise Operations and Aggregation", "Statistical Calculations and Quantiles", "Data Cleaning and Transformation", "Column Selection and Consistency Checks", "Data Filtering and Matching", "Filtering and Criteria-Based Selection", "Time Formatting and String Manipulation", "Join Operations and Merging", "Data Integration and Merging", "Numerical Data Handling", "Numerical Operations and Type Conversion", "In-place vs Copy Operations", "Function Application and Vectorization", "Ranking and Top N Logic", "Data Export and Output Processing", "Histogram Creation and Manipulation", "Plot Customization (Aesthetics)", "Image Handling and Exporting", "Visualization and Output Generation", "Array and Matrix Manipulation", "Data Binning and Grid Creation", "Formatting and Output Organization", "Data Serialization & File Handling"], "domain": "agriculture", "output_file_name": ["output1.csv", "output2.csv", "output.png"], "gold_file_name": ["result1.csv", "result2.csv", "result.png"], "eval_func": ["compare_csv('output1.csv', 'result1.csv', ignore_order=False, specified_columns=['bin_lower_bound', 'bin_upper_bound', 'frequency', 'total_matched_records'], thresholds={'bin_lower_bound': 0.05, 'bin_upper_bound': 0.05})", "compare_csv('output2.csv', 'result2.csv', ignore_order=True)", "compare_image('output.png', 'result.png', calculate_columns=['type', 'graph_title', 'x_label', 'y_label'])"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result.png')"]} {"id": "agriculture_22", "question": "An international agricultural research institution aims to develop a crop recommendation system based on soil and climate suitability. Using the provided crop recommendation dataset containing soil properties and seasonal weather features, first calculate derived features including the annual temperature range (difference between maximum and minimum temperatures across all seasons) and total annual precipitation (sum of precipitation across all seasons). Encode categorical features such as soil color using label encoding. Then train a multi-class random forest classifier using 5-fold stratified cross-validation to predict the best crop type. Calculate the F1 score for each crop category and output a pandas data frame containing two columns: 'crop_class' (listing the crop labels) and 'f1_score' (the F1 score of each category from cross-validation). Save the results to output.csv.", "data_sources": ["Crop Recommendation using Soil Properties and Weather Prediction.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Inspection and Summarization", "Column Iteration and Processing", "Row-wise Operations and Aggregation", "Summation Techniques", "Cumulative and Row-wise Operations", "Column Manipulation / Creation", "Data Preparation and Formatting", "Data Preprocessing & Encoding", "Encoding and Vector Representation", "In-place vs Copy Operations", "Array and Matrix Manipulation", "Library Usage (Scikit-Learn)", "Data Splitting and Sampling", "Model Prediction and Output Handling", "Multi-Task/Multi-Class Handling", "Indexing and Row-Level Operations", "Stochasticity and Reproducibility", "Data Storage and Structuring", "Data Structure Creation and Manipulation", "Formatting and Output Organization", "CSV Processing", "Data Export and Output Processing"], "domain": "agriculture", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv('output.csv', 'result.csv', ignore_order=True)"]} {"id": "agriculture_24", "question": "An international agricultural policy research institution aims to identify country-year cases where crop yields are poorly aligned with climate suitability, especially in low-income economies with high pesticide usage. Treat the four seasonal temperature and precipitation columns in the crop recommendation dataset as 4-point time series and use Fourier-based feature extraction to compute the mean, range, and dominant frequency for each crop's climate profile. For precipitation, treat PRECTOTCORR as a daily rate and compare it with rainfall.csv's average_rain_fall_mm_per_year on the same annual scale. For each country-year combination, identify the crop with the highest yield, and select records satisfying at least two of the following three conditions: (1) the highest-yield crop is not among crops whose temperature and annual-scale precipitation mean ± one standard deviation cover the country's observed annual average temperature and annual rainfall; (2) pesticide usage exceeds the 75th percentile of all combined records; (3) the country's GDP from the Natural Earth country table is below the global median. Save the results to 'output.csv' with schema: country_clean, Year, top_crop, climate_plausible_crops (comma-separated list of climate-plausible crops), pesticide_value, gdp_md.", "data_sources": ["Crop Recommendation using Soil Properties and Weather Prediction.csv", "yield.csv", "pesticides.csv", "rainfall.csv", "temp.csv", "ne_50m_admin_0_countries.dbf"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Import and Library Setup", "Feature Extraction and Vectorization", "Data Structure Creation and Manipulation", "Statistical Analysis and Metrics", "Data Cleaning and Transformation", "Pandas-Specific Operations", "Join Operations and Merging", "Numerical Operations and Type Conversion", "Statistical Calculations and Quantiles", "Arithmetic and Cumulative Calculations", "Row-wise and Column-wise Logical Evaluation", "Logical Operators for Combining Conditions", "Conditional Data Processing", "Filtering and Criteria-Based Selection", "Numerical Data Handling", "Function Application and Vectorization", "DataFrame Column Management", "Formatting and Output Organization", "String-Based Aggregation and Operations", "Data Export and Output Processing"], "domain": "agriculture", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"]} {"id": "agriculture_25", "question": "A global agricultural policy research institution aims to assess how national economic development affects the relationship between pesticide use and crop yields under different climatic conditions. Apply an ARIMAX(1,1,1) model to each country-crop combination, using pesticide use, rainfall, and temperature as exogenous regressors to predict crop yields for the next three years. The model requires at least 5 historical data points and variation in all exogenous variables. Use the last observed values of the exogenous variables for forecasting. Only include country-crop combinations that meet the data requirements and successfully produce forecasts in the final output. Save both historical records and forecasted values to 'output.csv' with the following schema: country (string), Year (integer), crop_item (string), yield_value (float), pesticide_value (float), rainfall (float), avg_temp (float), is_forecast (boolean), GDP_MD (float), INCOME_GRP (string).", "data_sources": ["yield.csv", "pesticides.csv", "rainfall.csv", "temp.csv", "ne_50m_admin_0_countries.dbf"], "skills": ["Data Import and Library Setup", "Parsing and Reading Data Files", "Data Loading with Pandas", "Type Casting and Data Compatibility", "Handling Missing Data", "Column Name and Schema Management", "File Handling and Operations", "Join Operations and Merging", "Data Transformation and Column Manipulation", "Data Ingestion and Processing", "ARIMA Model Fitting", "Exogenous Variable Handling", "Filtering and Criteria-Based Selection", "Data Structure Creation and Manipulation", "Pandas-Specific Operations", "Data Integration and Merging", "Sorting, Limiting, and Ranking", "Data Serialization & File Handling", "CSV Processing", "Data Export and Output Processing"], "domain": "agriculture", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_model(output_file_name='output.csv', gold_file_name='result.csv', matched_columns=['country', 'crop_item', 'Year'], calculate_columns=['yield_value'], metric='mse', lower_bound=0, upper_bound=10000000)"]} {"id": "agriculture_28", "question": "A global food security working group is identifying those high-risk corn-producing countries that are simultaneously facing climate pressure, extensive use of chemicals, and market instability - this might indicate systemic vulnerabilities in the food supply chain. Using the dataset, find all country-year combinations that meet all of the following conditions: (1) the crop is corn, (2) the average annual temperature exceeds 20°C, (3) the pesticide usage is higher than the global median for all countries, (4) the 12-month rolling standard deviation of monthly corn prices is higher than the global median volatility of corn, (5) the year-on-year corn production change is negative, (6) the corn price of that country-year is within the top quarter of all corn prices worldwide. Save the results to \"output.csv\" with the following columns: ['Country', 'Year', 'Corn Production', 'Average Temperature', 'Pesticide Usage', 'Corn Price (USD)', 'Price Volatility', 'Year-on-Year Production Change'].", "data_sources": ["globalfoodprices_wfp.csv", "pesticides.csv", "temp.csv", "yield.csv"], "skills": ["Data Loading with Pandas", "Data Import and Library Setup", "File Handling and Operations", "Filtering and Criteria-Based Selection", "Data Filtering and Matching", "Numerical Data Handling", "Data Ingestion and Processing", "Data Alignment & Merging", "Data Integration and Merging", "Join Operations and Merging", "Column/Row-wise Computations", "Rolling Window Operations", "Lagged Variables and Rolling Features", "Statistical Calculations and Quantiles", "Mathematical and Statistical Computations", "Incremental and Comparative Calculations", "Arithmetic and Cumulative Calculations", "Data Aggregation and Grouping", "Ranking and Top N Logic", "Data Export and Output Processing", "Formatting and Output Organization", "Column Selection and Consistency Checks", "Data Serialization & File Handling", "Data Inspection and Summarization"], "domain": "agriculture", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"]} {"id": "agriculture_29", "question": "An international agricultural policy research institution is investigating situations where countries extensively use pesticides to maintain crop yields, but these practices may conflict with local soil and climate conditions. Using the provided datasets, determine the most commonly recommended crop globally among soil samples with pH values between 5.0 and 8.5 and without missing N, P, or K values. Then, identify the crop with the highest yield value for each country and year. Mark cases where a country's highest-yielding crop differs from the globally recommended crop. Apply the following additional restrictions: pesticide usage must exceed the 75th percentile of all pesticide values, and the average seasonal temperature range for the produced crop (summer maximum temperature minus winter minimum temperature) must exceed 15°C. Derive each produced crop's seasonal temperature range from its broader temperature profile in the crop recommendation data. For each country, count the annual occurrences of such mismatch events and apply an ARIMA(1,1,1) model to predict the count over the next 3 years. Save only the historical mismatch records (not predictions) to \"output1.csv\" with columns: country (string), year (integer), recommended_crop (string), produced_crop (string), pesticide_value (float), temp_range (float). Save the forecast results to \"output2.csv\" with columns: Area (string), Year (integer), forecasted_mismatch_count (float), is_forecast (boolean).", "data_sources": ["Crop Recommendation using Soil Properties and Weather Prediction.csv", "pesticides.csv", "yield.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Filtering and Criteria-Based Selection", "Row-wise Operations and Aggregation", "Numerical Data Handling", "Numerical Operations and Type Conversion", "Column/Row-wise Computations", "Arithmetic and Cumulative Calculations", "Data Transformation and Column Manipulation", "Pandas-Specific Operations", "Statistical Calculations and Quantiles", "Join Operations and Merging", "Data Integration and Merging", "Data Alignment & Merging", "Data Filtering and Matching", "Column Selection and Consistency Checks", "Custom Programming and Functions", "Custom Functions for Missing Value Handling", "Numerical Comparison and Proximity Checks", "Function Application and Vectorization", "ARIMA Model Fitting", "Model Prediction Troubleshooting", "Formatting and Output Organization", "Data Export and Output Processing"], "domain": "agriculture", "output_file_name": ["output1.csv", "output2.csv"], "gold_file_name": ["result1.csv", "result2.csv"], "eval_func": ["compare_csv(output_file_name='output1.csv', gold_file_name='result1.csv', ignore_order=True)", "compare_csv(output_file_name='output2.csv', gold_file_name='result2.csv', ignore_order=True)"]} {"id": "agriculture_30", "question": "An international agricultural research institute aims to assess how well environmental and economic factors explain historical crop yields globally. Using the provided agricultural datasets, build a degree-2 polynomial regression model (sklearn LinearRegression with PolynomialFeatures) to predict crop yield based on average temperature, annual rainfall, and pesticide usage. Compute the R² score on the fitted data, rounded to four decimal places. Save the predictions to \"output.csv\" with columns: country, year, crop_item, actual_yield, predicted_yield, pesticide_value, rainfall, avg_temp. Save the R² score to \"output.txt\" in the format: 'Polynomial Regression R2 Score: {value}'.", "data_sources": ["pesticides.csv", "rainfall.csv", "yield.csv", "temp.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Import and Library Setup", "File Handling and Operations", "Numerical Data Handling", "Data Cleaning and Transformation", "Preprocessing and File Structure Adjustments", "Pandas-Specific Operations", "Data Ingestion and Processing", "Data Integration and Merging", "Join Operations and Merging", "Model Specification and Construction", "Handling Missing or Edge Cases", "Handling Missing Data", "Feature Engineering and Embeddings", "Model Training & Evaluation", "Regression Modeling and Interpretation", "Data Export and Output Processing", "Formatting and Output Organization", "Output and Logging", "File I/O and Modes", "Validation and Output Formatting"], "domain": "agriculture", "output_file_name": ["output.csv", "output.txt"], "gold_file_name": ["result.csv", "result.txt"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, thresholds={'predicted_yield': None})", "compare_text(output_file_name='output.txt', gold_file_name='result.txt')"]} {"id": "agriculture_31", "question": "An agricultural research team is analyzing the relationship between soil characteristics, weather patterns, and crop yields to determine the key factors affecting agricultural productivity. Conduct principal component analysis (PCA) on the soil nutrient features and seasonal maximum-temperature features from the crop recommendation dataset to identify the top 5 features with the highest absolute loadings on the first principal component. Merge the national yield and pesticide datasets after aggregating each dataset by country using mean values across years, and calculate the correlation between country-level average yield and country-level average pesticide use. Save the top 5 features and their PC1 loadings to \"output.csv\" with columns: feature (string), pc1_loading (float). Save the variance analysis results and correlation to \"output.txt\" containing: 'Explained variance ratio by PC1: {value}', 'Explained variance ratio by PC2: {value}', 'Cumulative explained variance (first 5 PCs): {value}', 'Yield-Pesticide Correlation: {value}'.", "data_sources": ["Crop Recommendation using Soil Properties and Weather Prediction.csv", "pesticides.csv", "yield.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Feature Selection and Dimensionality Reduction", "Column-specific or Feature-wise Processing", "Column Selection and Consistency Checks", "Data Preprocessing & Encoding", "Data Preparation and Aggregation", "Pandas-Specific Operations", "Data Aggregation and Grouping", "Column-wise Transformations and Aggregation", "Data Integration and Merging", "Join Operations and Merging", "Statistical Correlation Analysis", "Preprocessing and Scaling", "Data Preprocessing and Centering", "Arithmetic Transformations and Normalization", "Sorting, Limiting, and Ranking", "Ranking and Top N Logic", "Output and Logging", "Percentage and Variation Calculations", "Statistical and Mathematical Modeling", "Data Export and Output Processing"], "domain": "agriculture", "output_file_name": ["output.csv", "output.txt"], "gold_file_name": ["result.csv", "result.txt"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['pc1_loading'])", "compare_text(output_file_name='output.txt', gold_file_name='result.txt')"]} {"id": "agriculture_32", "question": "An international agricultural policy research institution aims to identify those countries where the actual crop yield does not match the climate suitability, and which may be inefficient (especially in low-income economies and regions with high pesticide usage). Using the dataset, each row's seasonal temperature and precipitation measurements are regarded as discrete 4-point time series, and a feature extraction method based on Fourier transformation is applied to calculate the average, range, and dominant frequency of each indicator. Then, the crop with the highest yield for each country-year combination is determined. This data is combined with other files to associate each country-year with the country's pesticide usage, annual average rainfall, and average temperature. Finally, records of the following situations are selected: (1) The crop with the highest yield is not among those whose extracted climate characteristics distribution covers the country's observed annual average temperature and total rainfall within one standard deviation range; (2) The pesticide usage exceeds the 75th percentile of all pesticide usage records. Save the priority cases to \"output1.csv\" with columns: country_clean (string), Year (integer), top_crop (string), climate_plausible_crops (string), pesticide_value (float). Save the Fourier transformation features to \"output2.csv\" containing: label (string), temp_mean (float), temp_range (float), temp_dominant_freq (float), precip_mean (float), precip_range (float), precip_dominant_freq (float).", "data_sources": ["Crop Recommendation using Soil Properties and Weather Prediction.csv", "pesticides.csv", "rainfall.csv", "temp.csv", "yield.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Signal Processing and Analysis", "Feature Extraction and Vectorization", "Column-specific or Feature-wise Processing", "Column Selection and Consistency Checks", "Data Cleaning and Transformation", "Row-wise Operations and Aggregation", "Ranking and Top N Logic", "Data Integration and Merging", "Join Operations and Merging", "Preprocessing and File Structure Adjustments", "Statistical Analysis and Metrics", "Mathematical and Statistical Computations", "Numerical Comparison and Proximity Checks", "Statistical Assumptions and Limitations", "Normalization and Percentile Calculations", "Statistical Calculations and Quantiles", "Conditional Data Processing", "Filtering and Criteria-Based Selection", "Data Filtering and Matching", "Validation and Verification of Merge Results", "Function Application and Vectorization", "Formatting and Output Organization", "Column Management and Reordering", "Data Export and Output Processing", "CSV Processing", "Output and Logging"], "domain": "agriculture", "output_file_name": ["output1.csv", "output2.csv"], "gold_file_name": ["result1.csv", "result2.csv"], "eval_func": ["compare_csv(output_file_name='output1.csv', gold_file_name='result1.csv', ignore_order=True)", "compare_csv(output_file_name='output2.csv', gold_file_name='result2.csv', ignore_order=True)"]} {"id": "ecommerce_01", "question": "An e-commerce analytics company needs to determine which platform (Amazon or Olist Brazilian marketplace) has the strongest statistically significant positive correlation between product prices and customer satisfaction in electronics categories. For Amazon, include products with main_cat \"Cell Phones & Accessories\" or \"Electronics\". For Olist, include products in English categories: telephony, computers_accessories, electronics, consoles_games. Analyze Amazon at the product level using averaged product ratings; keep Olist at the order-item/review record level, convert Olist prices to USD with a fixed 0.2 multiplier, and apply a 1.5 IQR price-outlier filter separately within each platform before calculating statistics. Calculate Pearson correlation, Spearman correlation, linear regression (predicting rating from price), and 95% confidence interval of Pearson correlation. Save to output.csv with columns: platform, pearson_r, pearson_p, spearman_r, spearman_p, lr_coef, lr_intercept, ci_lower, ci_upper, n_samples, best_platform. Platform values should be 'amazon' or 'olist'. best_platform should be the platform with statistical significance (p < 0.05 and positive correlation); if multiple qualify, select highest pearson_r; if none qualifies, use \"None (No significant relationship found)\". Save without index.", "data_sources": ["Cell_Phones_and_Accessories.json", "meta_Cell_Phones_and_Accessories.json", "Brazilian E-Commerce/olist_order_items_dataset.csv", "Brazilian E-Commerce/olist_order_reviews_dataset.csv", "Brazilian E-Commerce/olist_products_dataset.csv", "Brazilian E-Commerce/product_category_name_translation.csv"], "skills": ["Parsing and Reading Data Files", "Pandas-Specific Operations", "Data Structure Creation and Manipulation", "Filtering and Criteria-Based Selection", "Data Categorization & Mapping", "Data Loading with Pandas", "Join Operations and Merging", "Data Integration and Merging", "String and Categorical Data Handling", "Numerical Operations and Type Conversion", "Handling Missing Data", "Data Cleaning and Transformation", "Column Selection and Consistency Checks", "Preprocessing and File Structure Adjustments", "In-place vs Copy Operations", "Element-wise Dataframe Operations", "Outlier Detection and Filtering", "Statistical Calculations and Quantiles", "Statistical Correlation Analysis", "Statistical Analysis and Metrics", "Filtering and Sorting Correlation Data", "Array and Matrix Manipulation"], "domain": "ecommerce", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['platform', 'pearson_r', 'pearson_p', 'spearman_r', 'spearman_p', 'lr_coef', 'lr_intercept', 'ci_lower', 'ci_upper', 'n_samples', 'best_platform'], thresholds={1: 0.02, 2: 0.02, 3: 0.02, 4: 0.02, 5: 0.02, 6: 0.02, 7: 0.02, 8: 0.02})"]} {"id": "ecommerce_03", "question": "An e-commerce intelligence company is building a cross-platform brand performance dashboard that integrates delivery reliability data from the Brazilian market (Olist) with global pricing and product metadata from Amazon and eBay. Requirements: (1) Amazon: Filter 'Cell Phones & Accessories' category products, calculate median price per brand. (2) eBay: Filter products of type containing 'Notebook/Laptop', extract the first numerical value from price ranges (e.g., \"$399.99 to $634.99\" → 399.99), calculate median price per brand. (3) Olist: For delivered orders, calculate delivery delay (actual delivery date - estimated delivery date, in days) and average review score for categories: telephony, computers_accessories, electronics, consoles_games. Brand standardization: Convert to lowercase, remove special characters. Brand-to-category matching (iterate through [telephony, computers_accessories, electronics, consoles_games] in order, use first match): samsung/apple/lg/motorola/sony match if category is telephony or electronics; asus/acer/lenovo/hp/dell/toshiba/msi match if category is computers_accessories. Output one row for each unique standardized brand found in the filtered Amazon or filtered eBay data. Output CSV (output.csv) with columns: brand, amazon_median_price, ebay_median_price, avg_delivery_delay_days, avg_review_score, total_listing_count (sum of amazon and ebay listings, treat NaN as 0), olist_product_count (unique products from matched Olist category). Fill missing avg_delivery_delay_days with 0, avg_review_score with median value. Save without index.", "data_sources": ["EbayPcLaptopsAndNetbooksUnclean.csv", "meta_Cell_Phones_and_Accessories.json", "Brazilian E-Commerce/olist_order_items_dataset.csv", "Brazilian E-Commerce/olist_order_reviews_dataset.csv", "Brazilian E-Commerce/olist_orders_dataset.csv", "Brazilian E-Commerce/olist_products_dataset.csv", "Brazilian E-Commerce/product_category_name_translation.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Conversion and Post-Loading Processing", "Data Cleaning and Transformation", "Preprocessing and File Structure Adjustments", "Pandas-Specific Operations", "Labeling and Renaming", "Array and Matrix Manipulation", "Function Application and Vectorization", "Join Operations and Merging", "Data Integration and Merging", "Date and Time Conversion", "Data Type and Format Conversion", "Filtering and Criteria-Based Selection", "Conditional Logic and Row-wise Operations", "Time Difference and Gradient Calculation", "Data Transformation and Calculation", "String and Categorical Data Handling", "In-place vs Copy Operations", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Handling Missing Data", "Imputation Methods", "Summation Techniques", "Cumulative and Row-wise Operations", "Data Structure Creation and Manipulation", "Dataframe Construction and Optimization", "Data Export and Output Processing", "Data Serialization & File Handling"], "domain": "ecommerce", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['brand', 'amazon_median_price', 'ebay_median_price', 'avg_delivery_delay_days', 'avg_review_score', 'total_listing_count', 'olist_product_count'])"]} {"id": "ecommerce_06", "question": "An e-commerce intelligence company is conducting a cross-platform analysis of customer satisfaction and pricing strategies across Amazon, eBay, and the Brazilian Olist marketplace to guide market positioning for electronics brands. The analysis focuses on Amazon products in the 'Cell Phones & Accessories' category, eBay PC laptop listings, and Olist orders for electronic product categories ('telephony', 'computers_accessories', 'electronics', 'consoles_games'). For eBay laptops, define a composite hardware score from four specifications: processor grade (i7/Ryzen 7 = 5, i5/Ryzen 5 = 4, i3/Ryzen 3 = 3, Celeron/Pentium = 2, others or missing = 1), GPU grade (NVIDIA/GeForce/RTX/GTX = 5, AMD/Radeon = 4, Intel = 3, others = 2, missing = 1), RAM in GB, and SSD capacity in GB; fill missing values with column medians, Min-Max normalize all four features, and weight them as RAM × 0.25 + SSD × 0.25 + Processor × 0.30 + GPU × 0.20. For Amazon, assign 'Budget', 'Mid', and 'Premium' brand tiers using 3-quantile price binning. For Olist, delivery delay is defined as the days from estimated delivery to actual delivery. Generate a matplotlib chart that meets publication standards, using a 3×2 GridSpec layout, including: (1) a scatter plot titled 'eBay: Price vs Hardware Score' with x-axis labeled 'Hardware Score' and y-axis labeled 'Price (USD)', as well as an embedded marginal histogram of hardware ratings; (2) a scatter plot titled 'Amazon: Price vs Rating by Brand Tier' with x-axis labeled 'Price (USD)' and y-axis labeled 'Rating'; (3) a histogram titled 'Olist: Review Score Distribution (Top 5 Categories)' with x-axis labeled 'Review Score' and y-axis labeled 'Frequency', showing the distribution of ratings in the top 5 electronic categories; (4) a scatter plot titled 'Cross-Platform: Price vs Rating' with x-axis labeled 'Price (USD)' and y-axis labeled 'Rating', overlaying Amazon product ratings and eBay seller ratings; (5) a scatter plot titled 'Olist: Freight vs Distance (colored by Delivery Delay)' with x-axis labeled '|Customer-Seller Zip Diff|' and y-axis labeled 'Freight Value (BRL)', colored by delivery delay; and (6) a scatter plot titled 'Olist: Delivery Delay vs Review Score' with x-axis labeled 'Delivery Delay (Days)' and y-axis labeled 'Review Score'. The chart must provide a shared color bar for subgraph (5), achieve precise spacing through GridSpec, and directly report the median delivery delay (in days) of ratings of 1 in Olist electronic orders from subgraph (6), retaining one decimal place. Save the visualization to output.png and the key metrics to output.csv with columns: metric_name (name of the metric), metric_value (numerical value), platform (e-commerce platform: eBay, Amazon, or Olist). The metrics must include: ebay_hardware_score_mean, ebay_price_mean, amazon_rating_mean, amazon_price_mean, olist_review_score_mean, olist_delivery_delay_median, and olist_median_delay_score_1 (median delivery delay in days for orders with review score of 1, rounded to 1 decimal place).", "data_sources": ["Brazilian E-Commerce/olist_customers_dataset.csv", "Brazilian E-Commerce/olist_order_items_dataset.csv", "Brazilian E-Commerce/olist_order_reviews_dataset.csv", "Brazilian E-Commerce/olist_orders_dataset.csv", "Brazilian E-Commerce/olist_products_dataset.csv", "Brazilian E-Commerce/olist_sellers_dataset.csv", "Brazilian E-Commerce/product_category_name_translation.csv", "Cell_Phones_and_Accessories.json", "EbayPcLaptopsAndNetbooksUnclean.csv", "meta_Cell_Phones_and_Accessories.json"], "skills": ["Data Loading with Pandas", "Data Integration and Merging", "Data Alignment & Merging", "Data Exploration and Comparison", "Filtering and Criteria-Based Selection", "Conditional Logic and Row-wise Operations", "Array and Matrix Manipulation", "Function Application and Vectorization", "Parsing and Reading Data Files", "Pandas-Specific Operations", "Data Structure Understanding and Initialization", "Data Transformation and Column Manipulation", "Column Manipulation / Creation", "Join Operations and Merging", "Time Difference and Gradient Calculation", "Numerical Comparison and Proximity Checks", "Percentage and Variation Calculations", "Batch Processing and Performance Optimization", "Data Transformation and Feature Engineering", "Imputation Methods", "Data Normalization and Standardization", "Preprocessing and Scaling", "Data Normalization and Preprocessing", "Normalization and Weighted Aggregation", "Arithmetic and Cumulative Calculations", "In-place vs Copy Operations", "Data Categorization & Mapping", "Data Analysis and Visualization", "Subplot and Layout Management", "Layout and Multi-Panel Visualizations", "Multiple Series/Traces Visualization", "Plot Customization (Aesthetics)", "Histogram Creation and Manipulation", "Visualization and Interpretation", "Plot Customization and Annotation", "Color and Palette Usage", "Image Handling and Exporting", "Statistical Analysis and Metrics", "Mathematical and Statistical Computations", "Data Serialization & File Handling", "Data Export and Output Processing", "Stochasticity and Reproducibility"], "domain": "ecommerce", "output_file_name": ["output.png", "output.csv"], "gold_file_name": ["result.png", "result.csv"], "eval_func": ["compare_image('output.png', 'result.png', calculate_columns=['type'])", "compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result.png')"]} {"id": "ecommerce_07", "question": "An e-commerce analytics company is conducting a benchmark test on the drivers of customer satisfaction across various global platforms to provide suppliers with recommendations on pricing strategies. The correlation between product prices and customer ratings is calculated for Amazon (in the mobile and accessories category) and Olister (in the Brazilian electronics category, including mobile phones, computer accessories, electronics, and game consoles and games). For each platform, the following analyses are performed: (1) Load and clean the data, filter by the specified category, and remove price outliers using the interquartile range method; (2) Convert Olister's prices from Brazilian reais to US dollars using a 1:0.20 exchange rate; (3) Calculate the Pearson and Spearman correlation coefficients between prices and ratings (using Amazon's \"overall\" and Olister's \"review score\"); (4) Conduct a linear regression analysis to establish a model for the relationship between prices and ratings; (5) Calculate the 95% confidence interval for the Pearson correlation coefficient; (6) Determine statistical significance at a p < 0.05 level; (7) Determine the platform with the strongest significant correlation. The statistical analysis results are saved as a file named \"output.csv\", which contains the following columns: platform (platform name: Amazon or Olister), Pearson correlation coefficient, Pearson p-value, Spearman correlation coefficient, Spearman p-value, linear regression coefficient, linear regression intercept, lower limit of 95% confidence interval, upper limit of 95% confidence interval, significance (whether statistically significant: True or False). The name of the platform corresponding to the strongest significant correlation is saved to the \"best_platform.txt\" file (e.g., \"Amazon\", \"Olister\", or \"None (no significant relationship found)", "data_sources": ["Brazilian E-Commerce/olist_order_items_dataset.csv", "Brazilian E-Commerce/olist_order_reviews_dataset.csv", "Brazilian E-Commerce/olist_orders_dataset.csv", "Brazilian E-Commerce/olist_products_dataset.csv", "Brazilian E-Commerce/product_category_name_translation.csv", "Cell_Phones_and_Accessories.json", "meta_Cell_Phones_and_Accessories.json"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Cleaning and Transformation", "Column Manipulation / Creation", "Data Integration and Merging", "Join Operations and Merging", "Filtering and Criteria-Based Selection", "Handling Missing Data", "Array and Matrix Manipulation", "Function Application and Vectorization", "Element-wise Dataframe Operations", "Arithmetic and Cumulative Calculations", "Statistical Analysis and Metrics", "Outlier Detection and Filtering", "Statistical Calculations and Quantiles", "Statistical Correlation Analysis", "Regression Modeling and Interpretation", "Statistical Modeling and Uncertainty", "Interpreting and Communicating Statistical Results", "Data Pattern Analysis & Diagnostics", "Filtering and Sorting Correlation Data", "Data Storage and Structuring", "Data Structure Creation and Manipulation", "Data Export and Output Processing", "Data Serialization & File Handling", "File I/O and Modes", "Output and Logging"], "domain": "ecommerce", "output_file_name": ["output.csv", "best_platform.txt"], "gold_file_name": ["result.csv", "best_platform_gold.txt"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['platform', 'pearson_r', 'pearson_p', 'spearman_r', 'spearman_p', 'linear_reg_coef', 'linear_reg_intercept', 'ci_lower', 'ci_upper', 'significant'])", "compare_text(output_file_name='best_platform.txt', gold_file_name='best_platform_gold.txt')"]} {"id": "ecommerce_10", "question": "An e-commerce intelligence company is building a cross-platform product benchmark evaluation system to compare the hardware specifications, prices, and customer reviews of electronic products on Amazon, eBay, and the Brazilian Olist market. Create a unified dataset that only includes products related to laptops or mobile phones with available rating scores. For all sources, clean the numerical fields (price, RAM, SSD), convert the brand names to lowercase, convert the price to US dollars, and normalize the review scores to a scale of 1 to 5. Additionally, perform word tokenization on the comment text and comment messages, calculate TF-IDF scores, and identify the top 10 most frequently occurring words related to negative emotions (review score ≤ 2); use these words to label products with higher negative sentiment content. Only include products with available rating scores in the final output. Fill missing hardware specifications with the median values of each platform. Save the unified DataFrame to 'output.csv', ordered by source platform, product ID, and brand. Save the top 10 negative sentiment terms to 'negative_terms.txt' with one term per line.", "data_sources": ["Brazilian E-Commerce/olist_order_items_dataset.csv", "Brazilian E-Commerce/olist_order_reviews_dataset.csv", "Brazilian E-Commerce/olist_orders_dataset.csv", "Brazilian E-Commerce/olist_products_dataset.csv", "Brazilian E-Commerce/product_category_name_translation.csv", "Cell_Phones_and_Accessories.json", "EbayPcLaptopsAndNetbooksUnclean.csv", "meta_Cell_Phones_and_Accessories.json"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Cleaning and Transformation", "Data Normalization and Standardization", "Pandas-Specific Operations", "Data Integration and Merging", "Join Operations and Merging", "Filtering and Criteria-Based Selection", "Array and Matrix Manipulation", "Function Application and Vectorization", "Header and Metadata Processing", "Column Manipulation / Creation", "Numerical Operations and Type Conversion", "Element-wise Dataframe Operations", "Arithmetic and Cumulative Calculations", "Categorical Data Preprocessing and Simplification", "Data Categorization & Mapping", "Handling Missing Data", "Batch Processing and Performance Optimization", "Feature Extraction and Vectorization", "Text Processing and Cleaning", "Text & String Manipulation", "Sentiment and Aspect Analysis", "Data Filtering and Matching", "N-Gram and Phrase Analysis", "Data Structure Creation and Manipulation", "Vertical Stacking and Binding", "Dynamic Data Transformation and Insertion", "Column/Row-wise Computations", "Imputation Methods", "Custom Functions for Missing Value Handling", "Data Export and Output Processing", "Index Handling and Conversion", "Output and Logging", "File I/O and Modes"], "domain": "ecommerce", "output_file_name": ["output.csv", "negative_terms.txt"], "gold_file_name": ["result.csv", "negative_terms_gold.txt"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['product_id_unified', 'brand_clean', 'category_clean', 'price_usd', 'review_score_normalized', 'ram_gb', 'ssd_gb'])", "compare_text(output_file_name='negative_terms.txt', gold_file_name='negative_terms_gold.txt')"]} {"id": "ecommerce_13", "question": "A global e-commerce intelligence company is conducting an assessment of customer satisfaction on various platforms to assist brands in formulating market entry strategies. Extract the grade ratings of products clearly classified as the 'mobile and accessories' category from the metadata. Separate the comment scores related to electronic device orders (categories: phones, computer accessories, electronic devices, game consoles, and laptops). Clean the price field by removing the '$' symbol and handling the range (using the lower limit), and then generate a synthetic 1 to 5 rating based on the quintiles of prices (1 = lowest 20%, 5 = highest 20%). When processing the Amazon data files, read only the first 50,000 records from each file to ensure computational efficiency. Generate a single standardized histogram covering these three distributions (Amazon, Olist, eBay agent), with the intervals centered on 1 to 5, and report the pattern of the Amazon distribution (the most frequently occurring interval). Save the histogram to output.png with title 'Cross-Platform Customer Satisfaction Distribution', xlabel 'Rating Score', and ylabel 'Normalized Frequency'. Save the mode rating results to output.csv with columns 'platform', 'mode_rating', and 'mode_frequency'.", "data_sources": ["Cell_Phones_and_Accessories.json", "meta_Cell_Phones_and_Accessories.json", "EbayPcLaptopsAndNetbooksUnclean.csv", "Brazilian E-Commerce/olist_order_reviews_dataset.csv", "Brazilian E-Commerce/olist_order_items_dataset.csv", "Brazilian E-Commerce/olist_products_dataset.csv", "Brazilian E-Commerce/product_category_name_translation.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Structure Creation and Manipulation", "Pandas-Specific Operations", "Downsampling and Resampling", "File Handling and Operations", "Join Operations and Merging", "Series Handling and Manipulation", "Data Ingestion and Processing", "Filtering and Criteria-Based Selection", "String and Categorical Data Handling", "Data Cleaning and Transformation", "Handling Missing or Edge Cases", "Data Categorization & Mapping", "Array and Matrix Manipulation", "Function Application and Vectorization", "Histogram Creation and Manipulation", "Data Binning and Grid Creation", "Vectorization and Performance Optimization", "Multiple Series/Traces Visualization", "Plot Customization and Layout", "Image Handling and Exporting", "Statistical Calculations and Quantiles", "Data Export and Output Processing", "CSV Processing"], "domain": "ecommerce", "output_file_name": ["output.png", "output.csv"], "gold_file_name": ["result.png", "result.csv"], "eval_func": ["compare_image('output.png', 'result.png', calculate_columns=['type', 'graph_title', 'x_label', 'y_label'])", "compare_csv('output.csv', 'result.csv', ignore_order=True)"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result.png')"]} {"id": "ecommerce_14", "question": "An e-commerce analysis team is building a cross-platform model to predict whether product reviews will be regarded as helpful by future customers, that is, the 'helpful vote ratio' (the number of helpful votes / total number of votes) is at least 0.5. Using Amazon reviews and their related product metadata, brand and price information are added to each review. Additionally, the 'price' column of the laptop list is cleaned and converted into a numerical value in US dollars, the 'brand' column is lowercase. When processing the Amazon data files, read only the first 10,000 records from each file to ensure computational efficiency. By combining the features of these two platforms (including brand names and price grades), a random forest classifier is trained to predict the binary usefulness label. The test accuracy of this classifier on the retained dataset is reported, rounded to four decimal places. Save the test accuracy to output.csv with columns 'metric' and 'value'.", "data_sources": ["Cell_Phones_and_Accessories.json", "EbayPcLaptopsAndNetbooksUnclean.csv", "meta_Cell_Phones_and_Accessories.json"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Downsampling and Resampling", "Column Manipulation / Creation", "Data Transformation and Column Manipulation", "Handling Missing or Edge Cases", "Data Labeling and Structured Data Handling", "Boolean and Logical Operations", "Array and Matrix Manipulation", "Function Application and Vectorization", "Data Cleaning and Transformation", "Numerical Operations and Type Conversion", "Column Selection and Consistency Checks", "Join Operations and Merging", "Data Integration and Merging", "In-place vs Copy Operations", "Labeling and Renaming", "Column-wise Transformations and Aggregation", "Mathematical and Statistical Computations", "Data Preparation and Formatting", "Preprocessing and File Structure Adjustments", "Data Normalization and Preprocessing", "Arithmetic Transformations and Normalization", "Feature Extraction and Vectorization", "Data Splitting and Sampling", "Class Distribution Management", "Model Configuration and Import", "Library Usage (Scikit-Learn)", "Model Training & Evaluation", "Classification and Prediction Modeling", "Data Storage and Structuring", "Data Export and Output Processing", "Parallel and Concurrent Execution", "Stochasticity and Reproducibility"], "domain": "ecommerce", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv('output.csv', 'result.csv', ignore_order=True, specified_columns=['value'], thresholds={1: 0.02})"]} {"id": "ecommerce_15", "question": "An e-commerce intelligence company is conducting a benchmark test on the drivers of customer satisfaction across various global platforms to provide strategic recommendations for electronic brands targeting specific markets. When processing the Amazon data files , read only the first 10,000 records from each file to ensure computational efficiency. Calculate the Pearson correlation between the price (in US dollars) of Amazon's mobile accessory products and the review ratings. Extract the numerical values of memory size (in GB) and solid-state drive capacity (in GB), and then calculate the Pearson correlation between these hardware specifications and the cleaned prices (in US dollars). For the Brazilian market, calculate the Pearson correlation between the product prices (in Brazilian reais), delivery delay days, and review ratings. Save the correlation coefficients for each platform to output.csv with columns 'platform', 'correlation_pair', and 'coefficient'.", "data_sources": ["Cell_Phones_and_Accessories.json", "EbayPcLaptopsAndNetbooksUnclean.csv", "meta_Cell_Phones_and_Accessories.json", "Brazilian E-Commerce/olist_orders_dataset.csv", "Brazilian E-Commerce/olist_order_items_dataset.csv", "Brazilian E-Commerce/olist_order_reviews_dataset.csv", "Brazilian E-Commerce/olist_order_payments_dataset.csv"], "skills": ["Data Loading with Pandas", "String Manipulation and Conversion", "Handling Missing Data", "Data Integration and Merging", "Statistical Correlation Analysis", "Downsampling and Resampling", "Array and Matrix Manipulation", "Function Application and Vectorization", "Data Conversion and Post-Loading Processing", "Text Processing and Matching", "Data Extraction and Manipulation", "Filtering and Criteria-Based Selection", "Data Transformation and Calculation", "Join Operations and Merging", "Element-wise Dataframe Operations", "Data Export and Output Processing", "CSV Processing"], "domain": "ecommerce", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv('output.csv', 'result.csv', ignore_order=True, specified_columns=['coefficient'])"]} {"id": "ecommerce_16", "question": "An e-commerce analysis team is conducting a comparative analysis of customer satisfaction levels across various global platforms as a basis for cross-market product positioning. When processing the Amazon data files , read only the first 10,000 records from each file to ensure computational efficiency. They need to visualize the distribution of product evaluation scores for Amazon (in the US) and Olister (in Brazil), with the visualization stratified by price tiers and contextualized by hardware specifications from the eBay listings. They extract product evaluations and their price information from Amazon, and select items primarily categorized as \"Mobile Phones and Accessories\", \"All Electronics\", or \"Computers\". By connecting order IDs, product IDs, and product category names, they construct an Olister evaluation score dataset covering electronic categories (specifically \"Telephones\", \"Computer Accessories\", \"Electronics\", and \"Game Consoles and Games\"). They convert all price fields into numerical form (Amazon/Ebay in US dollars, and Olister by quartile calculation for equivalent treatment in Brazilian reais). They merge the cleaned price data from the two platforms and calculate the four global price quartiles (Q1 - Q4). Additionally, they preprocess the files to standardize memory specifications (e.g., converting \"8GB\" or \"8GBDDR4\" to \"8GB\"), and clean their \"Price\" column. For each of the four global price quartiles, they determine the most common (mode) memory size in eBay laptop listings within that quartile. Finally, they use matplotlib to generate a 2×2 overlapping histogram grid to display the rating density distribution (1 - 5 points) of Amazon and Olister within each price quartile (1 - 4). The title of each subplot should include the dominant memory size from eBay (format: 'Price Quartile QX (RAM: YGB)'). The xlabel should be 'Review Score' and the ylabel should be 'Density'. The dominant memory size shown in the subplots of the third price quartile (Q3) is reported. Save the Q3 dominant RAM size to output.csv with columns 'metric' and 'value', and save the histogram to output.png.", "data_sources": ["Cell_Phones_and_Accessories.json", "meta_Cell_Phones_and_Accessories.json", "EbayPcLaptopsAndNetbooksUnclean.csv", "Brazilian E-Commerce/olist_order_items_dataset.csv", "Brazilian E-Commerce/olist_order_reviews_dataset.csv", "Brazilian E-Commerce/olist_products_dataset.csv", "Brazilian E-Commerce/product_category_name_translation.csv"], "skills": ["Data Loading with Pandas", "String Manipulation and Conversion", "Numerical Operations and Type Conversion", "Data Integration and Merging", "Data Alignment & Merging", "Filtering and Criteria-Based Selection", "Conditional Aggregation and Filtering", "Output and Logging", "Downsampling and Resampling", "Array and Matrix Manipulation", "Function Application and Vectorization", "Parsing and Reading Data Files", "Join Operations and Merging", "Data Cleaning and Transformation", "Pandas-Specific Operations", "Text Processing and Matching", "String Manipulation and Parsing", "Column/Row-wise Computations", "Column Manipulation / Creation", "Statistical Calculations and Quantiles", "Mathematical and Statistical Computations", "Normalization and Percentile Calculations", "Row-wise Operations and Aggregation", "Indexing and Row-Level Operations", "Histogram Creation and Manipulation", "Multiple Series/Traces Visualization", "Subplot and Layout Management", "Plot Customization and Layout", "Functional Data Handling and Iterative Plotting", "Data Serialization & File Handling", "Data Export and Output Processing"], "domain": "ecommerce", "output_file_name": ["output.csv", "output.png"], "gold_file_name": ["result.csv", "result.png"], "eval_func": ["compare_csv('output.csv', 'result.csv', specified_columns=['value'], ignore_order=True)", "compare_image('output.png', 'result.png', calculate_columns=['type', 'graph_title', 'x_label', 'y_label'])"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result.png')"]} {"id": "ecommerce_21", "question": "A global e-commerce intelligence company is conducting benchmark tests on consumer satisfaction and pricing strategies in major online markets, providing platform-specific entry-market strategies for electronic brands. When processing the Amazon data files, read all available records to ensure comprehensive analysis coverage. When processing the eBay data file, read all available records. When processing the Olist data files, read all available records. Filter review scores between 1-5, and remove price outliers (p99). A statistical visualization chart with three panels is generated: (1) shows the filled kernel density estimates (use filled KDE with fill=True) of logarithmically transformed product prices by platform (Amazon's mobile phones and accessories, eBay's laptops and netbooks, Olist's Brazilian electronics), with title 'Log-Scaled Price Distribution by Platform', xlabel 'Log Price', ylabel 'Density'; (2) displays box plots of review scores (on a 1 to 5 scale) arranged by platform, with title 'Review Score Distribution by Platform', xlabel 'Platform', ylabel 'Review Score (1-5)'; (3) plots the relationship between price and review score, with regression trends specific to each platform, with title 'Price vs Review Score with Regression', xlabel 'Price (USD)', ylabel 'Review Score'. From the generated chart, report the median review score observed in Olist's electronics orders. Save the visualization to output.png and the median review score to output.csv with columns 'platform' and 'median_review_score'.", "data_sources": ["Cell_Phones_and_Accessories.json", "meta_Cell_Phones_and_Accessories.json", "EbayPcLaptopsAndNetbooksUnclean.csv", "Brazilian E-Commerce/olist_order_items_dataset.csv", "Brazilian E-Commerce/olist_order_reviews_dataset.csv", "Brazilian E-Commerce/olist_products_dataset.csv", "Brazilian E-Commerce/product_category_name_translation.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "String Manipulation and Conversion", "Numerical Data Handling", "Data Filtering and Matching", "Data Cleaning and Transformation", "Filtering and Criteria-Based Selection", "Data Integration and Merging", "Join Operations and Merging", "Column Manipulation / Creation", "Array and Matrix Manipulation", "Function Application and Vectorization", "Vertical Stacking and Binding", "Outlier Detection and Filtering", "Arithmetic Transformations and Normalization", "Dynamic Data Transformation and Insertion", "In-place vs Copy Operations", "Data Analysis and Visualization", "Subplot and Layout Management", "Statistical Plotting and Density Estimation", "Using Seaborn for Statistical Plots", "Regression Modeling and Interpretation", "Multiple Series/Traces Visualization", "Plot Customization and Layout", "Statistical Calculations and Quantiles", "CSV Processing", "Data Export and Output Processing", "Output and Logging"], "domain": "ecommerce", "output_file_name": ["output.csv", "output.png"], "gold_file_name": ["result.csv", "result.png"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['platform', 'median_review_score'])", "compare_image(output_file_name='output.png', gold_file_name='result.png', calculate_columns=['type', 'graph_title', 'x_label', 'y_label'])"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result.png')"]} {"id": "ecommerce_26", "question": "An international electronic market research company aims to identify renowned brands that perform exceptionally globally, consistently maintaining high customer satisfaction and market influence. These brands are evaluated across two e-commerce ecosystems with brand data: Amazon (for mobile devices) and eBay (for laptops). Calculate the average product rating for each brand and the total number of Amazon review/comment records for that brand, calculate the median selling price and average seller rating for each laptop brand on eBay by using the numeric star value in the rating text, and convert the brand names into title format. Use known global brands (Apple, Samsung, Dell, Hp, Lenovo, Asus, Acer, Microsoft, Sony, Lg, Motorola, Xiaomi, Panasonic, Philips, Nintendo, Huawei) as the target brand list. For Olist (Brazilian comprehensive electronics), since brand data is not available in the dataset, determine the average evaluation score and order volume at the product category level for electronics categories (telephones, computer accessories, electronics, game consoles, and games); this category-level analysis is reported separately and is not included in the brand ranking. Calculate a comprehensive cross-platform brand performance score, defined as: (average score on Amazon × logarithm(1 + number of Amazon review/comment records)) + (average score on eBay × logarithm(1 + number of listings on eBay)). Fill missing average ratings with 0. Generate a histogram of delivery delays in days from the Olist data (actual delivery time minus estimated delivery time), filter delays to the range [-30, 30] days to remove outliers, and report the most frequent interval (in whole days); this value must be used to validate timestamp processing for verification purposes before the final ranking. Return a data frame of the top 5 brands ranked by the overall comprehensive score. Save the results to output.csv with columns: 'brand', 'amazon_composite', 'ebay_composite', 'total_composite_score'.", "data_sources": ["Cell_Phones_and_Accessories.json", "meta_Cell_Phones_and_Accessories.json", "EbayPcLaptopsAndNetbooksUnclean.csv", "Brazilian E-Commerce/olist_order_items_dataset.csv", "Brazilian E-Commerce/olist_order_reviews_dataset.csv", "Brazilian E-Commerce/olist_orders_dataset.csv", "Brazilian E-Commerce/olist_products_dataset.csv", "Brazilian E-Commerce/product_category_name_translation.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Batch Processing and Performance Optimization", "Labeling and Renaming", "Text Processing and Cleaning", "Numerical Operations and Type Conversion", "Data Filtering and Matching", "Filtering and Criteria-Based Selection", "Time Difference and Gradient Calculation", "Categorical Data Preprocessing and Simplification", "Pandas-Specific Operations", "Array and Matrix Manipulation", "Function Application and Vectorization", "Statistical Analysis and Metrics", "Data Aggregation and Grouping", "Column-wise Transformations and Aggregation", "Data Normalization and Standardization", "Normalization and Weighted Aggregation", "Arithmetic and Cumulative Calculations", "Ranking and Top N Logic", "Outlier Detection and Filtering", "Histogram Creation and Manipulation", "Array and Series Generation for Time", "Data Storage and Structuring"], "domain": "ecommerce", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['brand', 'amazon_composite', 'ebay_composite', 'total_composite_score'])"]} {"id": "ecommerce_30", "question": "An e-commerce intelligence company is conducting a benchmark analysis of brand performance across eBay and Olist platforms to provide manufacturers with market entry strategy suggestions. Using the provided datasets, perform the following analyses: (1) For each eBay brand, calculate the average selling price (in USD) and determine the most common RAM size and SSD capacity. (2) For Olist orders under the categories of telephony, computer accessories, and electronics, calculate the average review score, average price (in BRL), and average shipping distance between sellers and customers (in degrees) per category. (3) Compute delivery delays for all Olist orders (actual delivery date minus estimated delivery date) and determine the most frequent delay interval (in whole days). (4) Classify the sentiment of every non-empty review comment with a fixed keyword rule: lowercase the text and count substring occurrences of the positive keywords ['good', 'great', 'excellent', 'amazing', 'love', 'perfect', 'best', 'happy', 'satisfied'] and the negative keywords ['bad', 'terrible', 'awful', 'hate', 'worst', 'disappointed', 'poor', 'horrible'], then label it 'positive' if positives exceed negatives, 'negative' if negatives exceed positives, and 'neutral' otherwise. Using review scores as proxy ground-truth labels (≥ 4 positive, ≤ 2 negative, 3 neutral), compute the macro F1 score (scikit-learn f1_score, average='macro'). Create a cross-platform summary comparing both platforms' average review scores and average prices (using electronics-category data for Olist), along with the Olist-specific sentiment F1 score and most frequent delay bin. Save results to \"output1.csv\" with columns: platform (string), avg_review_score (float), avg_price (float), macro_f1_sentiment (float), max_delay_bin (integer). Save Olist category statistics to \"output2.csv\" with columns: category (string), avg_review_score (float), avg_price_brl (float), avg_shipping_distance (float). Save eBay brand statistics to \"output3.csv\" with columns: brand (string), avg_price_usd (float), most_common_ram (string), most_common_ssd (string). Also save \"output.json\" containing: macro_f1_score (float), max_frequency_delay_bin (integer), total_olist_electronics_orders (integer), total_ebay_listings (integer).", "data_sources": ["EbayPcLaptopsAndNetbooksUnclean.csv", "olist_customers_dataset.csv", "olist_geolocation_dataset.csv", "olist_order_items_dataset.csv", "olist_order_reviews_dataset.csv", "olist_orders_dataset.csv", "olist_products_dataset.csv", "olist_sellers_dataset.csv", "product_category_name_translation.csv"], "skills": ["Data Loading with Pandas", "Data Import and Library Setup", "String Manipulation and File Content Handling", "Numerical Operations and Type Conversion", "Pandas-Specific Operations", "Time Formatting and String Manipulation", "Data Extraction and Manipulation", "XML/HTML Parsing and XPath Navigation", "Text Processing and Matching", "Handling Missing Data", "Custom Functions for Missing Value Handling", "Function Application and Vectorization", "Join Operations and Merging", "Data Integration and Merging", "Geospatial Data Handling and Mapping", "Geospatial Data Processing", "Geospatial Distance Handling", "Numerical Comparison and Proximity Checks", "Data Filtering and Grouping", "Filtering and Criteria-Based Selection", "Statistical Analysis and Metrics", "Data Aggregation and Grouping", "Mathematical and Statistical Computations", "Time Difference and Gradient Calculation", "Array and Series Generation for Time", "Sentiment and Aspect Analysis", "Data Categorization & Mapping", "Library Usage (Scikit-Learn)", "Data Export and Output Processing", "Data Serialization & File Handling", "Formatting and Output Organization"], "domain": "ecommerce", "output_file_name": ["output1.csv", "output2.csv", "output3.csv", "output.json"], "gold_file_name": ["result1.csv", "result2.csv", "result3.csv", "result.json"], "eval_func": ["compare_csv(output_file_name='output1.csv', gold_file_name='result1.csv', ignore_order=True)", "compare_csv(output_file_name='output2.csv', gold_file_name='result2.csv', ignore_order=True)", "compare_csv(output_file_name='output3.csv', gold_file_name='result3.csv', ignore_order=True)", "compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'macro_f1_score': None})"]} {"id": "ecommerce_32", "question": "An e-commerce strategy team aims to identify electronic product brands that consistently maintain high customer satisfaction across multiple global markets. Using the Amazon (USA) and eBay platform data, find all brands that appear on at least two of these platforms using case-sensitive exact matching. For each qualifying brand, compute its satisfaction score on each platform as the median of the numerical rating values, then calculate the comprehensive satisfaction score as the average of these median scores across platforms. Also compute the total product count for each brand summed across all platforms where it appears. Additionally, perform a separate category-level satisfaction analysis on the Olist dataset, calculating the median review score per English product category. Save results to a SQLite database \"output.db\" with the following tables: \"cross_platform_brands\" containing qualifying brands with columns named exactly 'brand', 'amazon_satisfaction', 'ebay_satisfaction', 'composite_satisfaction', 'total_products', sorted by composite_satisfaction in descending order; \"amazon_satisfaction\" with columns 'brand' and 'amazon_satisfaction'; \"ebay_satisfaction\" with columns 'brand' and 'ebay_satisfaction'; \"olist_satisfaction\" with columns 'category' and 'olist_satisfaction'. Also save \"output.json\" with analysis statistics including total brands analyzed, number of brands appearing on at least two platforms, Amazon brand count, eBay brand count, and Olist category count.", "data_sources": ["Cell_Phones_and_Accessories.json", "EbayPcLaptopsAndNetbooksUnclean.csv", "meta_Cell_Phones_and_Accessories.json", "olist_order_items_dataset.csv", "olist_order_reviews_dataset.csv", "olist_products_dataset.csv", "product_category_name_translation.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Conversion and Post-Loading Processing", "Header and Metadata Processing", "Database Interaction and SQL", "SQLite-Specific Operations", "In-Memory File Operations", "Table Creation and SQL Formatting", "ETL and Data Integration", "ORM and SQL Usage", "Join Operations and Merging", "Data Integration and Merging", "Pandas-Specific Operations", "Numerical Data Handling", "Data Aggregation and Grouping", "Column-wise Transformations and Aggregation", "Set and Membership Analysis", "Conditional Aggregation and Filtering", "Statistical Analysis and Metrics", "Data Structure Creation and Manipulation", "Data Export and Output Processing", "Data Serialization & File Handling", "Formatting and Output Organization"], "domain": "ecommerce", "output_file_name": ["output.db", "output.json"], "gold_file_name": ["result.db", "result.json"], "eval_func": ["compare_sqlite(output_file_name='output.db', gold_file_name='result.db', specified_schema={'cross_platform_brands': ['brand', 'amazon_satisfaction', 'ebay_satisfaction', 'composite_satisfaction', 'total_products'], 'amazon_satisfaction': ['brand', 'amazon_satisfaction'], 'ebay_satisfaction': ['brand', 'ebay_satisfaction'], 'olist_satisfaction': ['category', 'olist_satisfaction']}, ignore_order=False)", "compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'total_brands_analyzed': None, 'brands_in_at_least_two_platforms': None, 'amazon_brands': None, 'ebay_brands': None, 'olist_categories': None})"]} {"id": "ecommerce_35", "question": "An e-commerce platform in Brazil wants to analyze how transportation performance between states changes over time and its impact on customer satisfaction. Calculate the following metrics grouped by seller state, customer state, and purchase month (format: YYYY-MM): average delivery delay days (the difference between the actual delivery date and the estimated delivery date), average review score, total number of orders, average freight value, and average Haversine distance (in kilometers) between seller and customer locations. For Haversine distance, average the latitude and longitude per zip code prefix to eliminate duplicate coordinates. Filter to only include orders for products in the following categories (English names): \"telephony\", \"computers_accessories\", \"electronics\", \"consoles_games\". Apply an ARIMA(1,1,1) model to forecast the average monthly delivery delay for each state pair for the next 12 months, only for pairs with at least 6 monthly data points; if ARIMA fitting fails, use the historical mean and standard deviation as fallback. Save the results to a SQLite database \"output.db\" with the following tables: \"spatiotemporal_summary\" containing the historical spatiotemporal summary with columns: seller_state, customer_state, purchase_month, avg_delivery_delay_days, avg_review_score, total_orders, avg_freight_value, avg_haversine_distance_km, sorted by seller_state, customer_state, purchase_month; \"arima_forecast\" containing the ARIMA forecast results with columns: seller_state, customer_state, forecast_mean, forecast_std, sorted by seller_state, customer_state; \"state_pair_stats\" containing the state pair aggregated statistics with columns: seller_state, customer_state, avg_delivery_delay_days, avg_review_score, total_orders, avg_haversine_distance_km, sorted by seller_state, customer_state. Also save the overall analysis statistics to \"output.json\" containing: total_state_pairs, total_months, avg_delivery_delay_overall, avg_review_score_overall, total_orders_overall, avg_haversine_distance_overall.", "data_sources": ["olist_orders_dataset.csv", "olist_customers_dataset.csv", "olist_sellers_dataset.csv", "olist_order_items_dataset.csv", "olist_order_reviews_dataset.csv", "olist_geolocation_dataset.csv", "olist_products_dataset.csv", "product_category_name_translation.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Import and Library Setup", "Join Operations and Merging", "Data Integration and Merging", "Data Filtering and Matching", "Filtering and Criteria-Based Selection", "Date and Time Conversion", "Timestamp Conversion and Time Manipulation", "Time Difference and Gradient Calculation", "Geospatial Data Processing", "Data Aggregation and Grouping", "Geospatial Distance Handling", "Custom Functions for Missing Value Handling", "Function Application and Vectorization", "Data Transformation and Column Manipulation", "Time Formatting and String Manipulation", "Statistical Analysis and Metrics", "Mathematical and Statistical Computations", "Column-wise Transformations and Aggregation", "Formatting and Output Organization", "ARIMA Model Fitting", "Time Series Analysis and Forecasting", "Statistical and Mathematical Modeling", "Data Export and Output Processing", "Data Serialization & File Handling", "Data Storage and Structuring", "Table Creation and SQL Formatting", "ETL and Data Integration"], "domain": "ecommerce", "output_file_name": ["output.db", "output.json"], "gold_file_name": ["result.db", "result.json"], "eval_func": ["compare_sqlite(output_file_name='output.db', gold_file_name='result.db', specified_schema={'spatiotemporal_summary': None, 'arima_forecast': None, 'state_pair_stats': None}, ignore_order=False)", "compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds=None)"]} {"id": "energy_01", "question": "Create a 2×2 matplotlib chart to evaluate the progress of the US energy transition, save as output.png. Specific requirements:\n(1) Line chart: Title='U.S. Renewable Electricity Share (2001-2022)', X-axis label='Year', Y-axis label='Renewable Share (%)', showing annual percentage of renewable energy generation from 2001 to 2022 with percentage values marked on data points;\n(2) Horizontal bar chart: Title='Top 10 States by Solar Carbon Offset Potential', X-axis label='Carbon Offset (metric tons)', Y-axis showing state names, displaying top 10 states by carbon_offset_metric_tons in descending order;\n(3) Scatter plot: Title='Electricity Access vs CO₂ Emissions (2015+)', X-axis label='Access to Electricity (% of population)', Y-axis label='CO₂ per Capita (tonnes)', showing relationship between electricity access rate and per capita CO2 emissions for all countries from 2015 onwards, with country names annotated for those with CO2 per capita > 10 tonnes;\n(4) Bar chart: Title='Steel Industry Load Type Distribution (2018)', X-axis showing Load_Type categories, Y-axis label='Count', showing count of each load type in steel industry data for 2018, with an inset text box in top-right corner displaying 'Top 10 Cities\\nCarbon Offset:\\n{X}M metric tons' where X is the total carbon_offset_metric_tons of top 10 cities divided by 1e6, rounded to 2 decimal places.", "data_sources": ["US_Energy_Generation_2001-2022.csv", "Google Project Sunroof/project-sunroof-state-09082017.csv", "Google Project Sunroof/project-sunroof-city-09082017.csv", "global-data-on-sustainable-energy.csv", "owid-co2-data.csv", "Steel_industry_data.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Inspection and Exploration", "Data Inspection and Validation", "Filtering and Criteria-Based Selection", "Data Aggregation and Grouping", "Data Integration and Merging", "Join Operations and Merging", "Sorting, Limiting, and Ranking", "Ranking and Top N Logic", "Cross/Merge Products and Filtering by Time Windows", "Time-based Filtering and Matching", "Data Conversion and Post-Loading Processing", "In-place vs Copy Operations", "Plot Customization (Aesthetics)", "Subplot and Layout Management", "Plot Customization and Layout", "Bar Chart Creation and Layout", "Plot Customization and Annotation", "Array and Matrix Manipulation", "Line Collection Customization", "Data Mapping and Encoding in Visualizations", "Output and Logging", "Data Export and Output Processing"], "domain": "energy", "output_file_name": ["output.png"], "gold_file_name": ["result.png"], "eval_func": ["compare_image('output.png', 'result.png', calculate_columns=['type'] )"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result.png')"]} {"id": "energy_03", "question": "As a national energy policy advisor, assess the correlations among solar energy potential, renewable energy deployment, electricity prices, and carbon intensity in each state of the United States to determine the priority of federal incentives in 2017. Use the provided dataset to generate a 2×3 subplot grid and save it as 'output.png', including the following six subplots with specified titles, x-labels, and y-labels: (1) PCA scatter plot with title 'U.S. States: PCA Analysis of Energy Indicators (colored by electricity price)', xlabel 'Principal Component 1', ylabel 'Principal Component 2', colorbar label 'Residential Electricity Price (cents/kWh)'; (2) Bubble chart with title 'Global: CO2 Per Capita vs Renewable Energy Share (bubble=population)', xlabel 'Renewable Energy Share (%)', ylabel 'CO2 Per Capita (tons)', xlim [0, 100], ylim [0, 30]; (3) Pie chart with title 'Steel Industry: Load Type Distribution (2018)'; (4) Bar chart with title 'Solar Potential Comparison by Geographic Granularity', xlabel showing granularity levels (State, County, City, Postal Code), ylabel 'Total Solar Potential (kW)'; (5) Horizontal bar chart with title 'Top 10 U.S. States: Fossil Fuel Generation (2017)', xlabel 'Fossil Fuel Generation (MWh)'; (6) Time series line chart with title 'Steel Industry: Energy Usage Patterns (sampled)', xlabel 'Time (sampled points)', ylabel 'Energy Usage (kWh)'. The overall figure should have suptitle 'Comprehensive Energy Analysis: Multi-dimensional Perspective'. Finally, report the name of the generated visualization file.", "data_sources": ["Steel_industry_data.csv", "U.S._Electricity_Prices.csv", "US_Energy_Generation_2001-2022.csv", "global-data-on-sustainable-energy.csv", "owid-co2-data.csv", "Google Project Sunroof/project-sunroof-state-09082017.csv", "Google Project Sunroof/project-sunroof-county-09082017.csv", "Google Project Sunroof/project-sunroof-city-09082017.csv", "Google Project Sunroof/project-sunroof-postal_code-09082017.csv"], "skills": ["Data Import and Library Setup", "Data Loading with Pandas", "Dataset Creation and Management", "Data Structure Handling (Dictionaries, Lists)", "Interval and Range Operations", "Data Aggregation and Grouping", "Statistical Calculations and Quantiles", "Join Operations and Merging", "Data Alignment & Merging", "Cross/Merge Products and Filtering by Time Windows", "Data Filtering and Grouping", "Time Series Resampling and Aggregation", "Data Integration and Merging", "In-place vs Copy Operations", "Numerical Data Handling", "Column-specific or Feature-wise Processing", "Preprocessing and Scaling", "Feature Selection and Statistical Computation", "Dimensionality Reduction and Visualization", "Dimensionality Reduction and Feature Engineering", "Subplot and Layout Management", "Plot Customization and Layout", "Plot Creation and Configuration", "Plot Customization (Aesthetics)", "Plot Customization and Annotation", "Outlier Detection and Filtering", "Multiple Series/Traces Visualization", "Bar Chart Creation and Layout", "Time Series and Timeline Visualization", "Visualization and Output Generation", "Indexing and Row-Level Operations", "Line Collection Customization", "Output and Logging"], "domain": "energy", "output_file_name": ["output.png"], "gold_file_name": ["result.png"], "eval_func": ["compare_image(output_file_name='output.png', gold_file_name='result.png', calculate_columns=['type'])"], "post_process_func": ["image_post_process(output_file_name='output.png')", "image_post_process(output_file_name='result.png')"]} {"id": "energy_09", "question": "Calculate the fossil fuel dependency index for each US state (including Washington, D.C.) in 2017. The formula is: (Total fossil fuel electricity generation MWh) / (Roof solar theoretical potential MWh) × (Industrial electricity price cents/kWh). Fossil fuels include coal, natural gas, and petroleum. Roof solar theoretical potential is total sunlight electricity. Save the results to output.csv with the following columns (in order): state_name (string, full state name), fossil_generation_MWh_2017 (float, total fossil fuel electricity generation in MWh), solar_potential_MWh_2017 (float, roof solar theoretical potential in MWh), industrial_price_cents_per_kWh_2017 (float, industrial electricity price in cents per kWh), fossil_dependency_index (float, fossil fuel dependency index calculated by the formula)", "data_sources": ["US_Energy_Generation_2001-2022.csv", "Google Project Sunroof/project-sunroof-state-09082017.csv", "U.S._Electricity_Prices.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Filtering and Criteria-Based Selection", "Time-based Filtering and Matching", "Data Aggregation and Grouping", "Data Cleaning and Transformation", "In-place vs Copy Operations", "Data Structure Handling (Dictionaries, Lists)", "Dictionary Manipulation and Construction", "Mapping and Lookup", "Join Operations and Merging", "Data Integration and Merging", "Column Selection and Consistency Checks", "Data Export and Output Processing", "Data Serialization & File Handling"], "domain": "energy", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv('output.csv', 'result.csv', ignore_order=True)"]} {"id": "energy_10", "question": "Estimate the accuracy of a prediction model for the carbon reduction potential from rooftop solar deployment across U.S. states. Using 2017 data, fit a RandomForestRegressor model (n_estimators=100, random_state=42) to predict the carbon offset. The model features include: 1. Residential electricity price, 2. Fossil fuel generation share, 3. National level indicators including GDP per capita and renewable energy share, 4. Total CO2 emissions. Calculate the R² score, Mean Absolute Error (MAE), Mean Squared Error (MSE), and Root Mean Squared Error (RMSE) for the model predictions, and identify the 5 U.S. states with the largest absolute prediction errors. Save the model evaluation metrics to output1.csv with columns metric_name and metric_value. Save the states with largest prediction errors to output2.csv with columns state_name, actual_carbon_offset_metric_tons, predicted_carbon_offset_metric_tons, absolute_error_metric_tons.", "data_sources": ["U.S._Electricity_Prices.csv", "US_Energy_Generation_2001-2022.csv", "global-data-on-sustainable-energy.csv", "owid-co2-data.csv", "Google Project Sunroof/project-sunroof-state-09082017.csv"], "skills": ["Data Cleaning and Transformation", "Data Loading with Pandas", "Data Filtering and Matching", "In-place vs Copy Operations", "Feature Selection and Dimensionality Reduction", "Statistical Calculations and Quantiles", "Percentage and Variation Calculations", "Mapping and Lookup", "Data Structure Handling (Dictionaries, Lists)", "Data Integration and Merging", "Join Operations and Merging", "Handling Missing Data", "Data Preparation and Formatting", "Model Development and Interpretation", "Model Configuration and Import", "Library Usage (Scikit-Learn)", "Model Training & Evaluation", "Model Prediction and Output Handling", "Stochasticity and Reproducibility", "Model Evaluation & Validation", "Model Evaluation Metrics", "Error Function Design and Implementation", "Formatting and Output Organization", "Data Export and Output Processing", "CSV Processing", "Output and Logging", "Array and Matrix Manipulation"], "domain": "energy", "output_file_name": ["output1.csv", "output2.csv"], "gold_file_name": ["result1.csv", "result2.csv"], "eval_func": ["compare_csv('output1.csv', 'result1.csv', ignore_order=True, specified_columns=['metric_value'])", "compare_csv('output2.csv', 'result2.csv', ignore_order=True)"]} {"id": "entertainment_02", "question": "For each record across all provided entertainment data files, generate a standardized identifier by normalizing its title — convert to lowercase, remove all non-alphabetic characters (retaining spaces), and collapse consecutive spaces into one. Prepend a source-specific prefix: M_ (movies), N_ (Netflix), S_ (Spotify), T17_ (2017 music), T18_ (2018 music), T20_ (2020 music), V_ (video games). For missing or empty titles, the identifier consists of the prefix only. Output all identifiers to output.csv with a single column harmonized_title_id.", "data_sources": ["The Movies Dataset/movies_metadata.csv", "netflix_titles.csv", "spotify_tracks.csv", "top2017.csv", "top2018.csv", "top50_2020.csv", "vgsales.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Text & String Manipulation", "Custom Functions for Missing Value Handling", "Text Processing and Cleaning", "Column Selection and Consistency Checks", "Unique Identifier and Entity Management", "In-place vs Copy Operations", "Function Application and Vectorization", "Data Export and Output Processing", "Data Integration and Merging", "Data Serialization & File Handling", "Dynamic Data Transformation and Insertion"], "domain": "entertainment", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": "compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['harmonized_title_id'])"} {"id": "entertainment_03", "question": "Using entertainment media datasets (books, movies, streaming, games, and music) covering 2017–2020, perform text-based clustering and topic analysis across all sources. Apply TF-IDF vectorization (max_features=5000, stop_words='english'), K-Means clustering (n_clusters=10, random_state=42), and LDA topic modeling (n_components=10, random_state=42). For each cluster, determine the dominant LDA topic with the top 5 keywords, compute coherence_score as the mean cosine similarity between cluster members and the K-Means centroid (when a cluster exceeds 500 members, randomly sample 500 with np.random.seed(42)), and select up to 5 representative items. Output to output.csv with schema: cluster_id (int, 0–9), dominant_topic (int), top_topic_words (comma-separated), coherence_score (float, rounded to 4 decimal places), representative_items (pipe ' | ' separated, format 'source: title'). 10 rows, one per cluster.", "data_sources": ["books.csv", "netflix_titles.csv", "spotify_tracks.csv", "top2017.csv", "top2018.csv", "top50_2020.csv", "vgsales.csv", "The Movies Dataset/movies_metadata.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Integration and Merging", "Text Processing and Cleaning", "Feature Extraction and Vectorization", "Document Similarity and Embedding", "Vectorization and Performance Optimization", "Array and Matrix Manipulation", "Clustering and Hierarchical Methods", "Clustering and Topic Modeling", "Topic Modeling and Evaluation", "Cluster Label Assignment", "Similarity Computation (Cosine/Jaccard/etc.)", "Data Storage and Structuring", "Data Export and Output Processing", "Stochasticity and Reproducibility"], "domain": "entertainment", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True,specified_columns=['top_topic_words','coherence_score','representative_items'])"]} {"id": "entertainment_04", "question": "Analyze the multi-dimensional trends of the entertainment industry in 2017, 2018 and 2020, calculate the mean and standard deviation of the three audio features (danceability, energy, and valence) of popular songs in these three years, and conduct a one-way analysis of variance (ANOVA) for these three features; calculate the Herfindahl-Hirschman Index (HHI) of the game market; calculate the mean and median of book and movie ratings. Output the result to output.json with the following top-level keys: \"music_features\" (object, keys named as {feature}_{year}_mean and {feature}_{year}_std, e.g. \"danceability_2017_mean\", 18 float fields total), \"anova\" (object, keys named as {feature}_f_statistic and {feature}_p_value, 6 float fields total), \"game_market_hhi\" (float), \"ratings\" (object with keys: books_mean, books_median, movies_mean, movies_median, all float).", "data_sources": ["books.csv", "top2017.csv", "top2018.csv", "top50_2020.csv", "vgsales.csv", "The Movies Dataset/movies_metadata.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Transformation and Column Manipulation", "Column Manipulation / Creation", "Numerical Operations and Type Conversion", "Type Casting and Data Compatibility", "Dynamic Data Transformation and Insertion", "Statistical Analysis and Metrics", "Feature Selection and Statistical Computation", "Mathematical and Statistical Computations", "Statistical Analysis and Testing", "Percentage and Variation Calculations", "Arithmetic and Cumulative Calculations", "Numerical Data Handling", "Data Storage and Structuring", "Dictionary Manipulation and Construction", "Data Structure and Dictionary Operations", "Data Serialization & File Handling", "Output and Logging"], "domain": "entertainment", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'music_features': {'danceability_2017_mean': None, 'danceability_2017_std': None, 'danceability_2018_mean': None, 'danceability_2018_std': None, 'danceability_2020_mean': None, 'danceability_2020_std': None, 'energy_2017_mean': None, 'energy_2017_std': None, 'energy_2018_mean': None, 'energy_2018_std': None, 'energy_2020_mean': None, 'energy_2020_std': None, 'valence_2017_mean': None, 'valence_2017_std': None, 'valence_2018_mean': None, 'valence_2018_std': None, 'valence_2020_mean': None, 'valence_2020_std': None}, 'anova': {'danceability_f_statistic': None, 'danceability_p_value': None, 'energy_f_statistic': None, 'energy_p_value': None, 'valence_f_statistic': None, 'valence_p_value': None}, 'game_market_hhi': None, 'ratings': {'books_mean': None, 'books_median': None, 'movies_mean': None, 'movies_median': None}})"]} {"id": "entertainment_07", "question": "Detect audio feature outliers in popular song charts from 2017, 2018, and 2020 using z-scores (|z| > 2) computed against the full Spotify track library's baseline statistics for danceability, energy, loudness, and valence. Also apply the same outlier detection to movie ratings, game sales, and book ratings. Output the results to output.csv with the following schema: dataset (string), outlier_count (integer). The CSV should contain one row per dataset (top2017, top2018, top50_2020, movies_metadata, vgsales, books) plus a total row.", "data_sources": ["entertainment/spotify_tracks.csv", "entertainment/top2017.csv", "entertainment/top2018.csv", "entertainment/top50_2020.csv", "entertainment/The Movies Dataset/movies_metadata.csv", "entertainment/vgsales.csv", "entertainment/books.csv"], "skills": ["Stochasticity and Reproducibility", "Array and Matrix Manipulation", "Statistical Calculations and Descriptive Statistics", "Statistical Analysis and Metrics", "Mathematical and Statistical Computations", "Pandas-Specific Operations", "Data Loading with Pandas", "Parsing and Reading Data Files", "Outlier Detection and Filtering", "Z-Score Calculations", "Statistical Calculations and Quantiles", "Conditional Aggregation and Filtering", "Data Export and Output Processing", "Formatting and Output Organization", "CSV Processing"], "domain": "entertainment", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"]} {"id": "entertainment_08", "question": "Build a cross-media popularity analysis system using the entertainment dataset (movies, Netflix, music, games).\n\nCluster Spotify music data using K-Means (select best k by silhouette score; random_state=42, n_init=10).\n\nCalculate cross_media_popularity_score for each entity with three weighted components:\n- Normalized popularity per media type, scaled to [0,1] (weight: 0.5; use 0.5 for missing values)\n- Genre compatibility: fraction of other media types that share at least one genre with the entity after genre normalization (weight: 0.3)\n- Temporal proximity: count of entities released within ±2 years of the entity's release year, normalized by max value (weight: 0.2)\n\nValidate features using RandomForestRegressor (n_estimators=10, random_state=42).\n\nOutput to output.csv with columns: entity_id, title, type, release_year, cross_media_popularity_score, normalized_popularity, temporal_proximity, genre_compatibility.", "data_sources": ["netflix_titles.csv", "spotify_tracks.csv", "vgsales.csv", "The Movies Dataset/credits.csv", "The Movies Dataset/keywords.csv", "The Movies Dataset/movies_metadata.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Encoding and Format Identification", "Data Parsing and Structuring", "Data Extraction from JSON", "Column Iteration and Processing", "Function Application and Vectorization", "Text Processing and Cleaning", "Preprocessing and Scaling", "Feature Selection and Dimensionality Reduction", "Clustering and Hierarchical Methods", "Cluster Label Assignment", "Stochasticity and Reproducibility", "Data Integration and Merging", "Column Selection and Consistency Checks", "ETL and Data Integration", "Dynamic Data Transformation and Insertion", "Array and Matrix Manipulation", "Data Normalization and Preprocessing", "Numerical Comparison and Proximity Checks", "Date and Time Arithmetic", "Data Categorization & Mapping", "Data Structure and Dictionary Operations", "Element-wise Dataframe Operations", "Normalization and Weighted Aggregation", "Ranking and Scoring Mechanisms", "Statistical Testing for Feature-Target Evaluation", "Library Usage (Scikit-Learn)", "Data Serialization & File Handling", "CSV Processing"], "domain": "entertainment", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', specified_columns=['entity_id', 'title', 'type', 'release_year', 'cross_media_popularity_score', 'normalized_popularity', 'temporal_proximity', 'genre_compatibility'])"]} {"id": "financial_163", "question": "Based on the pub_fund.sqlite database, find fund managers with total assets under management exceeding 10 billion, and their top 3 most frequently held stocks with the holding count. Refer to the dataset_pub_fund.md document for database details. Save the final result as output.csv with the following columns: invest_advisor_name, sec_name, holding_count.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Database Management and Querying", "CTEs and Subqueries", "Query Construction and Logical Operators", "Subqueries and Complex Query Structures", "Filtering and Criteria-Based Selection", "Data Filtering and Matching", "Data Aggregation and Grouping", "Grouping and Index Assignment", "Data Aggregation and Window Functions", "Sorting, Limiting, and Ranking", "Ranking and Top N Logic", "Query Construction and Execution", "Query Execution and Validation", "Data Export and Output Processing", "CSV Processing", "Data Storage and Structuring"]} {"id": "financial_167", "question": "Based on the pub_fund.sqlite database, find the names of funds that rank in the top 10% of their fund type for both one-year return and three-year return. Refer to the dataset_pub_fund.md document for database details. Save the final result as output.csv with the following columns: fund_name.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Database Management and Querying", "CTEs and Subqueries", "Conditional Aggregation and Filtering", "Query Construction and Logical Operators", "Ranking and Top N Logic", "Sorting, Limiting, and Ranking", "Ranking and Normalization", "Data Aggregation and Window Functions", "Ranking and Scoring Mechanisms", "Data Filtering and Matching", "Conditional Logic and Row-wise Operations", "Filtering and Criteria-Based Selection", "Query Construction and Execution", "Data Export and Output Processing", "Data Serialization & File Handling", "Data Storage and Structuring"]} {"id": "financial_234", "question": "Based on the pub_fin_data.sqlite database, find 农业银行's revenue for fiscal year 2024 and its revenue share in its industry. Refer to the dataset_pub_fin_data.md document for database details. Save the final result as output.csv with the following columns: 营收, 营收占比. For numeric results, keep 营收占比 to 2 decimal places.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Query Construction and Execution", "Conditional Logic and Row-wise Operations", "Data Filtering and Matching", "SQL Set Operations and Query Combination", "Lookup and Data Transformation Techniques", "Conditional Aggregation and Filtering", "Data Aggregation and Conditional Logic", "Percentage and Variation Calculations", "Mathematical and Statistical Computations", "Data Export and Output Processing", "Formatting and Output Organization"]} {"id": "financial_236", "question": "Based on the pub_fin_data.sqlite database, for fiscal year 2024 annual consolidated financial statements, find the overall industry ROE and ROA for the industry where 金山办公 belongs. Refer to the dataset_pub_fin_data.md document for database details. Save the final result as output.csv with the following columns: 行业总体ROE, 行业总体ROA. For numeric results, keep 行业总体ROE to 2 decimal places and 行业总体ROA to 1 decimal place.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Database Management and Querying", "Query Construction and Execution", "Query Construction and Search Logic", "Data Filtering and Matching", "Data Joining and Relationship Management", "Joining and Lookup Operations", "Join Operations and Merging", "Joining and Alignment Logic", "Filtering and Criteria-Based Selection", "Conditional Logic and Row-wise Operations", "Time-based Filtering and Matching", "Date Adjustment and Alignment", "Conditional Aggregation and Filtering", "Statistical Analysis and Metrics", "Data Aggregation and Conditional Logic", "Data Aggregation and Grouping", "Mathematical and Statistical Computations", "Percentage and Variation Calculations", "Arithmetic and Cumulative Calculations", "Data Storage and Structuring", "Data Export and Output Processing", "Formatting and Output Organization"]} {"id": "financial_270", "question": "Based on the pub_fin_data.sqlite database, find the gross profit of companies established in the same year as 燕京啤酒 based on fiscal year 2024 consolidated financial statements. Refer to the dataset_pub_fin_data.md document for database details. Save the final result as output.csv with the following columns: 公司名称, 毛利润. For numeric results, keep 毛利润 to 2 decimal places.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Query Construction and Execution", "Query Construction and Logical Operators", "Query Construction and Search Logic", "Temporal Validation and Comparison", "Data Filtering and Matching", "Data Joining and Relationship Management", "Arithmetic and Cumulative Calculations", "Data Transformation and Calculation", "Data Export and Output Processing", "Labeling and Renaming"]} {"id": "financial_276", "question": "Based on the pub_fin_data.sqlite database, find the top 10 companies with the fastest year-over-year growth in operating profit for H1 2025 and their growth rates. Refer to the dataset_pub_fin_data.md document for database details. Save the final result as output.csv with the following columns: 公司名称, 营业利润同比增长率. For numeric results, keep 营业利润同比增长率 to 2 decimal places.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Interval and Range Operations", "Joining and Lookup Operations", "Join Operations and Merging", "Data Filtering and Matching", "Percentage and Variation Calculations", "Incremental and Comparative Calculations", "Difference and Trend Computation", "Labeling and Renaming", "Formatting and Output Organization", "Sorting, Limiting, and Ranking", "Ranking and Top N Logic", "Data Export and Output Processing", "Data Serialization & File Handling", "CSV Processing"]} {"id": "financial_290", "question": "Based on the pub_fin_data.sqlite database, for H1 2024 and H1 2025, which listed sector has the fastest growth in gross profit margin? List the sector and its gross profit margin growth value. Refer to the dataset_pub_fin_data.md document for database details. Save the final result as output.csv with the following columns: listed_sector, 毛利率增长值. For numeric results, keep 毛利率增长值 to 2 decimal places.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Data Aggregation and Grouping", "Percentage and Variation Calculations", "Arithmetic and Cumulative Calculations", "Sorting, Limiting, and Ranking", "Ranking and Top N Logic", "Data Export and Output Processing", "Data Serialization & File Handling"]} {"id": "financial_293", "question": "Based on the pub_fin_data.sqlite database, comparing H1 2025 to H1 2024, find the names of the top three companies with the largest increase in operating costs as a proportion of total assets, and the specific increase values. Refer to the dataset_pub_fin_data.md document for database details. Save the final result as output.csv with the following columns: company_name, increase_value. For numeric results, keep increase_value to 2 decimal places.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Percentage and Variation Calculations", "Incremental and Comparative Calculations", "Difference and Trend Computation", "Data Transformation and Calculation", "Data Filtering and Matching", "Conditional Logic and Row-wise Operations", "Sorting, Limiting, and Ranking", "Ranking and Top N Logic", "Data Export and Output Processing", "Data Serialization & File Handling"]} {"id": "financial_297", "question": "Based on the pub_fin_data.sqlite database, find the stock abbreviations of the top 5 companies with the largest increase in selling expense ratio from Q3 2024 to Q3 2025. Refer to the dataset_pub_fin_data.md document for database details. Save the final result as output.csv with the following columns: stock_name.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "SQLite-Specific Operations", "Database Interaction and SQL", "Database Management and Querying", "Filtering and Criteria-Based Selection", "Data Filtering and Matching", "Time-based Filtering and Matching", "Query Construction and Execution", "Percentage and Variation Calculations", "Arithmetic and Cumulative Calculations", "Arithmetic Transformations and Normalization", "Conditional Logic and Row-wise Operations", "Conditional Aggregation and Filtering", "Data Aggregation and Conditional Logic", "Data Joining and Relationship Management", "Sorting, Limiting, and Ranking", "Difference and Trend Computation", "Ranking and Top N Logic", "Data Export and Output Processing", "Data Serialization & File Handling", "CSV Processing", "File Handling and Operations"]} {"id": "financial_310", "question": "Based on the pub_fin_data.sqlite database, calculated by consolidated financial statements, for H1 2024 and H1 2025, which industry has the largest year-over-year decline in net profit margin? Refer to the dataset_pub_fin_data.md document for database details. Save the final result as output.csv with the following columns: industry_name.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Data Import and Library Setup", "SQLite-Specific Operations", "Database Interaction and SQL", "CTEs and Subqueries", "SQL Optimization and Advanced Usage", "Subqueries and Complex Query Structures", "Data Joining and Relationship Management", "Data Storage and Structuring", "Data Export and Output Processing"]} {"id": "financial_311", "question": "Based on the pub_fin_data.sqlite database, calculated by consolidated financial statements, among all listed sectors, comparing Q3 2024 and Q3 2025, which sector has the fastest year-over-year growth in return on equity (ROE)? Refer to the dataset_pub_fin_data.md document for database details. Save the final result as output.csv with the following columns: listed_sector.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Joining and Lookup Operations", "Join Operations and Merging", "Data Filtering and Matching", "Cross/Merge Products and Filtering by Time Windows", "Conditional Aggregation and Filtering", "Data Aggregation and Conditional Logic", "Data Aggregation and Grouping", "Percentage and Variation Calculations", "Conditional Logic and Row-wise Operations", "Mathematical and Statistical Computations", "Sorting, Limiting, and Ranking", "Ranking and Top N Logic", "Formatting and Output Organization"]} {"id": "financial_317", "question": "Based on the pub_fin_data.sqlite database, for fiscal year 2024, find the names, stock abbreviations, and current ratios of companies in 医药制造业 with current ratios below the industry average. Refer to the dataset_pub_fin_data.md document for database details. Save the final result as output.csv with the following columns: company_name, stock_name, 流动比率. For numeric results, keep 流动比率 to 2 decimal places.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Query Construction and Execution", "Subqueries and Complex Query Structures", "Data Ingestion and Processing", "Data Export and Output Processing", "Formatting and Output Organization", "Data Serialization & File Handling"]} {"id": "financial_318", "question": "Based on the pub_fin_data.sqlite database, for the 2024 consolidated annual report, find the stock abbreviations and current ratios of companies with the highest current ratios in each industry. Refer to the dataset_pub_fin_data.md document for database details. Save the final result as output.csv with the following columns: 行业名称, 公司名称, 流动比率. For numeric results, keep 流动比率 to 2 decimal places.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Data Joining and Relationship Management", "Join Operations and Merging", "Filtering and Criteria-Based Selection", "Data Filtering and Matching", "Time-based Filtering and Matching", "Ranking and Top N Logic", "Sorting, Limiting, and Ranking", "Conditional Logic and Row-wise Operations", "Data Export and Output Processing", "CSV Processing"]} {"id": "financial_325", "question": "Based on the pub_fin_data.sqlite database, for Q3 2025 consolidated financial statements, find the top 3 industries with year-over-year growth in net profit attributable to shareholders > 20% and the highest R&D expense to revenue ratio. Refer to the dataset_pub_fin_data.md document for database details. Save the final result as output.csv with the following columns: industry_name.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "SQLite-Specific Operations", "Database Interaction and SQL", "ORM and SQL Usage", "Query Construction and Execution", "Query Construction and Logical Operators", "Data Filtering and Matching", "Filtering and Criteria-Based Selection", "Conditional Logic and Row-wise Operations", "Percentage and Variation Calculations", "Row-wise Operations and Aggregation", "Ranking and Top N Logic", "Sorting, Limiting, and Ranking", "Data Export and Output Processing"]} {"id": "financial_364", "question": "Based on the pub_fin_data.sqlite database, for fiscal year 2024, among companies listed on 主板, 创业板, and 科创板, find the company with the highest return on assets (ROA), and list its stock abbreviation, listing sector, and ROA value. Refer to the dataset_pub_fin_data.md document for database details. Save the final result as output.csv with the following columns: stock_name, listed_sector, ROA. For numeric results, keep ROA to 2 decimal places.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "SQLite-Specific Operations", "Database Interaction and SQL", "CTEs and Subqueries", "Data Joining and Relationship Management", "Filtering and Criteria-Based Selection", "Data Filtering and Matching", "Percentage and Variation Calculations", "Arithmetic and Cumulative Calculations", "Ranking and Top N Logic", "Data Aggregation and Window Functions", "Conditional Logic and Row-wise Operations", "Data Export and Output Processing"]} {"id": "financial_365", "question": "Based on the pub_fin_data.sqlite database, for fiscal year 2024 consolidated financial statements, among the three listing sectors of 主板, 创业板, and 科创板, find the top 3 companies by return on assets (ROA). List the stock abbreviations, listing sectors, ROA, and their return on equity (ROE). Refer to the dataset_pub_fin_data.md document for database details. Save the final result as output.csv with the following columns: stock_name, listed_sector, ROA, ROE. For numeric results, keep ROA and ROE to 2 decimal places.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "CTEs and Subqueries", "Data Aggregation and Conditional Logic", "Filtering and Criteria-Based Selection", "Time-based Filtering and Matching", "Percentage and Variation Calculations", "Mathematical and Statistical Computations", "Ranking and Top N Logic", "Data Aggregation and Window Functions", "Query Construction and Execution", "Data Export and Output Processing"]} {"id": "financial_425", "question": "Based on the insurance_business.sqlite database, find how much higher the claim approval rate is for policies with multiple claims compared to policies with only one claim. Refer to the dataset_insurance_business.md document for database details. Save the final result as output.csv with the following columns: 通过率差异(百分点). For numeric results, keep 通过率差异(百分点) to 2 decimal places.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "ORM and SQL Usage", "Conditional Aggregation and Filtering", "Unique Identifier and Entity Management", "Unique Value Extraction", "Difference and Trend Computation", "Percentage and Variation Calculations", "Arithmetic and Cumulative Calculations", "Data Export and Output Processing", "Data Storage and Structuring", "Data Serialization & File Handling"]} {"id": "financial_44", "question": "Based on the pub_fund.sqlite database, find the full names of equity funds where 贵州茅台 is one of the top three holdings and the one-year return is lower than the two-year annualized return. Refer to the dataset_pub_fund.md document for database details. Save the final result as output.csv with the following columns: fund_name.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Data Aggregation and Grouping", "Conditional Aggregation and Filtering", "Query Construction and Execution", "Data Filtering and Matching", "Data Aggregation and Window Functions", "Window Functions and Partitioning", "Sorting, Limiting, and Ranking", "Ranking and Top N Logic", "Conditional Logic and Row-wise Operations", "Joining and Lookup Operations", "Filtering and Criteria-Based Selection", "Temporal Validation and Comparison", "Data Export and Output Processing", "Data Serialization & File Handling", "Column Iteration and Processing"]} {"id": "financial_52", "question": "Based on the pub_fund.sqlite database, find the abbreviated names of non-FOF funds where the fund manager has fewer than 50 funds in total, the combined market value of the top three holdings accounts for less than 15% of the net asset value, and the year-to-date return is positive. Refer to the dataset_pub_fund.md document for database details. Save the final result as output.csv with the following columns: fund_abbr_name.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Data Aggregation and Grouping", "Conditional Aggregation and Filtering", "Ranking and Normalization", "Sorting, Limiting, and Ranking", "Ranking and Top N Logic", "Data Filtering and Matching", "Filtering and Criteria-Based Selection", "Data Joining and Relationship Management", "Joining and Lookup Operations", "Query Construction and Execution", "Conditional Logic and Row-wise Operations", "Indexing and Selection", "Data Export and Output Processing", "Data Storage and Structuring"]} {"id": "financial_536", "question": "Based on the insurance_business.sqlite database, find how many days the average settlement cycle for each product type of 和泰保险 increased in 2024 compared to 2023. Refer to the dataset_insurance_business.md document for database details. Save the final result as output.csv with the following columns: 产品类型, 平均理赔时长增加天数. For numeric results, keep 平均理赔时长增加天数 to 2 decimal places.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Data Import and Library Setup", "SQLite-Specific Operations", "CTE and View Construction in SQL", "CTEs and Subqueries", "Data Joining and Relationship Management", "Joining and Alignment Logic", "Data Filtering and Matching", "Filtering and Criteria-Based Selection", "Time-based Filtering and Matching", "Date and Time Arithmetic", "Conditional Aggregation and Filtering", "Time Difference and Gradient Calculation", "Difference and Trend Computation", "Arithmetic and Cumulative Calculations", "Data Export and Output Processing", "Query Construction and Execution"]} {"id": "financial_71", "question": "Based on the pub_fund.sqlite database, find the abbreviated fund names, the names of the largest holdings, and their proportion of net asset value for funds where the largest holding exceeds 15% of net asset value. Refer to the dataset_pub_fund.md document for database details. Save the final result as output.csv with the following columns: fund_abbr_name, sec_name, ratio_nv. For numeric results, keep ratio_nv to 4 decimal places.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Data Aggregation and Grouping", "Conditional Aggregation and Filtering", "Data Aggregation and Window Functions", "Ranking and Top N Logic", "Threshold-Based Categorization or Filtering", "Joining and Lookup Operations", "Data Export and Output Processing", "Column Selection and Consistency Checks"]} {"id": "financial_83", "question": "Based on the pub_fund.sqlite database, find the abbreviated names of hybrid funds where 寒武纪 is one of the top ten holdings. Refer to the dataset_pub_fund.md document for database details. Save the final result as output.csv with the following columns: 基金简称.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "ORM and SQL Usage", "Data Filtering and Grouping", "Data Aggregation and Grouping", "Data Aggregation and Window Functions", "Window Functions and Partitioning", "Ranking and Top N Logic", "Data Filtering and Matching", "Filtering and Sorting Correlation Data", "Unique Value Extraction", "Sorting, Limiting, and Ranking", "Data Export and Output Processing", "CSV Processing"]} {"id": "financial_84", "question": "Based on the pub_fund.sqlite database, find the average year-to-date return and average three-year annualized return for two types of equity funds: high concentration (largest holding > 8% of net asset value) and medium-low concentration (<= 8%). Refer to the dataset_pub_fund.md document for database details. Save the final result as output.csv with the following columns: concentration_category, AVG(T2.rr_since_this_year), AVG(T2.annualized_rr_in_three_year). For numeric results, keep AVG(T2.rr_since_this_year) and AVG(T2.annualized_rr_in_three_year) to 15 decimal places.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Ranking and Top N Logic", "Data Filtering and Matching", "Row-wise Operations and Aggregation", "Data Aggregation and Grouping", "Mathematical and Statistical Computations", "Formatting and Output Organization", "Database Querying and Custom Aggregation"]} {"id": "financial_95", "question": "Based on the pub_fund.sqlite database, find the top three concentrated industries for fund managers in the top 10% and bottom 10% by total assets under management. Refer to the dataset_pub_fund.md document for database details. Save the final result as output.csv with the following columns: 基金管理人分组, 重仓行业名称.", "domain": "financial", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['重仓行业名称'])"], "skills": ["Metadata and Documentation Review", "Database Interaction and SQL", "SQLite-Specific Operations", "Sorting, Limiting, and Ranking", "Ranking and Normalization", "Data Aggregation and Window Functions", "Data Filtering and Matching", "Conditional Logic and Row-wise Operations", "Data Joining and Relationship Management", "Data Aggregation and Grouping", "Ranking and Top N Logic", "Formatting and Output Organization", "Data Export and Output Processing"]} {"id": "healthcare_01", "question": "Based on the multi-source medical health dataset (including lifestyle, metabolic indicators, gene expression, and disease outcome data), generate a comprehensive visual report in a 2×2 layout (saved as output.png) covering the following 4 analysis dimensions: (a) Heatmap: Use `sns.heatmap()` to show the average BMI distribution across age groups (10-year intervals) and genders. Map BMI categories to midpoint values (Normal = 22.5, Overweight = 27.5, Obese = 35.0). The x-axis represents gender, the y-axis represents age groups, using the YlOrRd color scheme with annotated values. (b) Scatter plot: Perform PCA dimensionality reduction on TCGA-PANCAN gene expression data and display the first two principal components, colored by cancer type. (c) Horizontal bar chart: Tokenize the occupation and smoking status text fields across datasets, merge word frequencies, and display the top 10 most frequent words. (d) Radar chart: Compare average risk characteristics (BMI, Glucose, Systolic BP, Age) across four disease cohorts (diabetes, stroke, heart disease, sleep disorder). Normalize each feature to 0-1 range (BMI/50, Glucose/200, Systolic BP/200, Age/100), with missing values defaulting to 0.5.", "data_sources": ["Healthcare-Diabetes.csv", "Sleep_health_and_lifestyle_dataset.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "TCGA-PANCAN-HiSeq-801x20531/data.csv", "TCGA-PANCAN-HiSeq-801x20531/labels.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Filtering and Matching", "Set and Membership Analysis", "Preprocessing and Scaling", "Data Preprocessing and Centering", "Dimensionality Reduction Techniques", "Dimensionality Reduction and Feature Engineering", "Pandas-Specific Operations", "Data Preparation and Aggregation", "Feature Extraction and Vectorization", "Text Processing and Cleaning", "Text & String Manipulation", "Text and Sequence Processing", "Function Application and Vectorization", "Data Handling & Preparation", "Preprocessing and File Structure Adjustments", "Data Categorization & Mapping", "Categorical Data Preprocessing and Simplification", "String Manipulation and Parsing", "Array and Matrix Manipulation", "ETL and Data Integration", "Using Seaborn for Statistical Plots", "Color and Palette Usage", "Multiple Series/Traces Visualization", "Plot Customization (Aesthetics)", "Bar Chart Creation and Layout", "Plot Customization and Annotation", "Arithmetic Transformations and Normalization", "Normalization and Percentile Calculations", "Functional Data Handling and Iterative Plotting", "Subplot and Layout Management", "Layout and Multi-Panel Visualizations", "Visualization and Interpretation", "Line Collection Customization", "SQL Pivot and Crosstab Techniques"], "domain": "healthcare", "output_file_name": ["output.png"], "gold_file_name": ["result.png"], "eval_func": ["compare_image(output_file_name='output.png', gold_file_name='result.png', calculate_columns=['type'])"], "post_process_func": ["image_post_process(output_file_name='output.png')", "image_post_process(output_file_name='result.png')"]} {"id": "healthcare_02", "question": "Please build multiple prediction models for various chronic diseases based on the multi-source dataset of medical health (including diabetes, sleep disorders, stroke, heart disease, insurance costs, chronic kidney disease, and cancer gene expression data), and evaluate their performance. Load all relevant data files including structured health records, clinical datasets, and cancer gene expression data with corresponding labels. Treat sleep disorder, heart disease, insurance cost, and kidney disease as binary tasks (any disorder/disease vs none, above-median charges for insurance, and CKD vs not CKD). Use PCA to reduce the high-dimensional cancer gene expression data to 50 principal components. Train prediction models for diabetes, stroke, heart disease, sleep disorders, kidney disease, and cancer using RandomForestClassifier(n_estimators=100, random_state=42); train the insurance cost prediction model using LogisticRegression(penalty='l1', solver='liblinear', random_state=42, max_iter=1000). Divide the data into a stratified 80% training set and a 20% test set with random_state=42. Calculate accuracy, precision, recall, F1 score, and AUC-ROC. For multi-class cancer prediction, use macro averaging. Save the results to output.csv with columns task, accuracy, precision, recall, f1, auc, avg_score, and determine the best-performing task by avg_score.", "data_sources": ["Healthcare-Diabetes.csv", "Sleep_health_and_lifestyle_dataset.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv", "TCGA-PANCAN-HiSeq-801x20531/data.csv", "TCGA-PANCAN-HiSeq-801x20531/labels.csv", "Chronic_Kidney_Disease/chronic_kidney_disease_full.arff"], "skills": ["Directory and File I/O", "Parsing and Reading Data Files", "Data Loading with Pandas", "Array and Matrix Manipulation", "Data Preprocessing & Encoding", "Data Preprocessing and Column Management", "Data Conversion and Post-Loading Processing", "In-place vs Copy Operations", "Feature Selection and Dimensionality Reduction", "Preprocessing and Scaling", "Data Preprocessing and Centering", "Stochasticity and Reproducibility", "Model Training & Evaluation", "Model Configuration and Import", "Library Usage (Scikit-Learn)", "Data Splitting and Sampling", "Model Evaluation Metrics", "Model Evaluation & Validation", "Data Storage and Structuring", "Data Serialization & File Handling", "Performance Benchmarking and Evaluation"], "domain": "healthcare", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', specified_columns=['accuracy','precision','recall','f1','auc','avg_score'], thresholds={1: 0.02, 2: 0.02, 3: 0.02, 4: 0.02, 5: 0.02, 6: 0.02})"]} {"id": "healthcare_03", "question": "A health research institution wants to analyze metabolic indicator differences between high-risk and low-risk patient groups across chronic disease datasets using Cohen's d effect size.\n\nHigh-risk group definitions:\n- Diabetes, Stroke, Insurance: Top 10% by metabolic risk score within each age decile (10 quantile-based groups)\n - Diabetes score: mean of (Glucose, BMI, BloodPressure) percentile ranks × (1 + 0.1 for each condition met: Glucose>140, BMI>30, BloodPressure>80)\n - Stroke score: mean of (avg_glucose_level, bmi) percentile ranks × (1 + 0.2 if hypertension=1 AND heart_disease=1)\n - Insurance score: bmi percentile rank × (1 + 0.1 × risk_tier), where risk_tier = min(smoker_binary + high_bmi_indicator, 2), high_bmi threshold: bmi>=30\n- Heart Disease: num >= 1\n- Kidney Disease: class = 'ckd'\n- Sleep Health: Quality of Sleep <= 5\n\nBiomarkers to analyze:\n- Diabetes: Glucose, BMI, BloodPressure\n- Stroke: avg_glucose_level, bmi\n- Insurance: bmi\n- Heart Disease: trestbps, chol\n- Kidney Disease: bgr, bu, sc\n- Sleep Health: systolic_bp (parsed from Blood Pressure field), bmi_numeric (mapped from BMI Category: Normal=22.5, Overweight=27.5, Obese=32.5)\n\nCohen's d interpretation: small (|d|<0.5), medium (0.5<=|d|<0.8), large (|d|>=0.8)\n\nOutput:\n1. output.csv with columns: dataset, biomarker, high_risk_mean, low_risk_mean, cohens_d, interpretation\n2. Return the dataset-biomarker combination with largest |Cohen's d| (alphabetical by dataset name for ties)", "data_sources": ["Healthcare-Diabetes.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv", "Chronic_Kidney_Disease/chronic_kidney_disease_full.arff", "Sleep_health_and_lifestyle_dataset.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Directory and File I/O", "Dataset Creation and Management", "Array and Matrix Manipulation", "Command-Line and Shell Operations", "Handling Missing Data", "Numerical Data Handling", "String Manipulation and Parsing", "Column Manipulation / Creation", "Data Parsing and Delimiter Handling", "Column Name and Schema Management", "Data Filtering and Transformation", "Pattern Identification & Extraction", "Arithmetic and Cumulative Calculations", "Conditional Aggregation and Filtering", "Data Pattern Analysis & Diagnostics", "Data Aggregation and Window Functions", "Statistical Calculations and Quantiles", "Normalization and Percentile Calculations", "Mathematical and Statistical Computations", "Ranking and Top N Logic", "Outlier Detection and Filtering", "Statistical Analysis and Metrics", "Feature Selection and Statistical Computation", "Interpreting and Communicating Statistical Results", "Incremental and Comparative Calculations", "Difference and Trend Computation", "Data Categorization & Mapping", "Data Storage and Structuring", "Data Serialization & File Handling", "CSV Processing", "Filtering and Sorting Correlation Data", "Numerical Comparison and Proximity Checks", "Output and Logging"], "domain": "healthcare", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', specified_columns=['high_risk_mean','low_risk_mean','cohens_d'], ignore_order=True, thresholds={4: 0.02})"]} {"id": "healthcare_04", "question": "Analyze biomarker differences between disease and non-disease groups across five chronic disease datasets (Diabetes, Stroke, Heart Disease, Kidney Disease, Sleep Health). From each dataset, extract and standardize four biomarkers where available: glucose, bmi, systolic_bp, and diastolic_bp. Stratify patients into age groups: 18-40, 40-60, and 60+. For each disease cohort, biomarker, and age group combination, calculate Cohen's d effect size (disease group minus non-disease group). Use bootstrap resampling (1000 iterations) to compute 95% confidence intervals. Exclude combinations where total samples < 10 or either group is empty. Save results to output.csv with columns: disease_cohort, biomarker, age_bin, cohen_d, ci_lower, ci_upper, n_cases, n_controls. Use disease cohort labels: Diabetes, Stroke, HeartDisease, CKD, Sleep.", "data_sources": ["Healthcare-Diabetes.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "Chronic_Kidney_Disease/chronic_kidney_disease_full.arff", "Sleep_health_and_lifestyle_dataset.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Directory and File I/O", "Data Structure Creation and Manipulation", "Pandas-Specific Operations", "Dimensionality and Shape Management", "Handling Missing Data", "Special Data Handling and Padding", "Error Handling and Malformed Data", "Data Conversion and Post-Loading Processing", "Array and Matrix Manipulation", "Numerical Data Handling", "Time Formatting and String Manipulation", "Numerical Operations and Type Conversion", "Data Integration and Merging", "Data Structure Handling (Dictionaries, Lists)", "Mapping and Transformation", "Handling Null or Unmatched Values", "Data Categorization & Mapping", "DataFrame Operations and Manipulation", "Vectorization and Performance Optimization", "Statistical Analysis and Metrics", "Difference and Trend Computation", "Data Transformation and Calculation", "Parameter Estimation and Bootstrap Methods", "Statistical Modeling and Uncertainty", "Data Generation and Simulation", "Data Storage and Structuring", "Data Export and Output Processing", "Filtering and Sorting Correlation Data", "Row-wise Operations and Aggregation", "Numerical Comparison and Proximity Checks", "Output and Logging", "Interpreting and Communicating Statistical Results", "Data Inspection and Summarization", "In-place vs Copy Operations", "Stochasticity and Reproducibility"], "domain": "healthcare", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_model(output_file_name='output.csv', gold_file_name='result.csv', matched_columns=['disease_cohort', 'biomarker', 'age_bin'], calculate_columns=['cohen_d', 'ci_lower', 'ci_upper'], metric='mae')"]} {"id": "healthcare_05", "question": "Based on three medical health datasets (diabetes, stroke, and chronic kidney disease), analyze the differences in blood glucose levels among patient groups. Filter for patients aged 30-70 and exclude records where glucose is 0 or missing. Unify the glucose columns across datasets and label each record's source as Diabetes, Stroke, or CKD.\n\nPerform a Kruskal-Wallis H test on the blood glucose distributions of the three groups. If the result is significant (p < 0.05), conduct Dunn's post-hoc test with Bonferroni correction. Save results to output.csv with columns: test, comparison, statistic, p_value, significant (use True/False for the significant column). In the test column, use \"Kruskal-Wallis\" for the overall test and \"Dunn post-hoc\" for pairwise comparisons. In the comparison column, use \"all\" for the overall test, and format pairwise comparisons as \"{Group1} vs {Group2}\" (e.g., \"Diabetes vs Stroke\", \"Diabetes vs CKD\", \"Stroke vs CKD\").\n\nCreate an overlaid density histogram of the three groups' blood glucose distributions (bins=50, alpha=0.6; Diabetes in red, Stroke in blue, CKD in green). Annotate the Kruskal-Wallis p-value on the figure. Save as output.png.", "data_sources": ["Healthcare-Diabetes.csv", "healthcare-dataset-stroke-data.csv", "Chronic_Kidney_Disease/chronic_kidney_disease_full.arff"], "skills": ["Data Import and Library Setup", "Directory and File I/O", "Data Loading with Pandas", "Parsing and Reading Data Files", "Data Conversion and Post-Loading Processing", "Data Structure Understanding and Initialization", "Column Name and Schema Management", "Pandas-Specific Operations", "Special Data Handling and Padding", "Error Handling and Malformed Data", "Data Inspection and Exploration", "Array and Matrix Manipulation", "Filtering and Criteria-Based Selection", "Data Filtering and Matching", "Handling Missing Data", "Numerical Data Handling", "Data Integration and Merging", "Vertical Stacking and Binding", "Dynamic Data Transformation and Insertion", "In-place vs Copy Operations", "Statistical Analysis and Testing", "Multiple Comparisons and Hypothesis Testing", "Data Storage and Structuring", "Data Serialization & File Handling", "Plot Customization and Layout", "Histogram Creation and Manipulation", "Multiple Series/Traces Visualization", "Plot Customization and Annotation", "Data Export and Output Processing"], "domain": "healthcare", "output_file_name": ["output.png", "output.csv"], "gold_file_name": ["result.png", "result.csv"], "eval_func": ["compare_image(output_file_name='output.png', gold_file_name='result.png', calculate_columns=['type'])", "compare_model(output_file_name='output.csv', gold_file_name='result.csv', matched_columns=['test', 'comparison'], calculate_columns=['statistic', 'p_value', 'significant'], metric='mae')"], "post_process_func": ["image_post_process(output_file_name='output.png')", "image_post_process(output_file_name='result.png')"]} {"id": "healthcare_06", "question": "Based on multi-source medical health datasets, evaluate the clinical efficacy of six disease prediction models and generate a comprehensive analysis report (output.png and output1.json).\n\nSix prediction tasks:\n1. Diabetes prediction\n2. Stroke prediction\n3. Heart disease prediction (binary: presence vs. absence of disease)\n4. Sleep disorder prediction (binary: no disorder vs. has disorder)\n5. Cancer type classification (multi-class, gene expression data preprocessed with StandardScaler and PCA reduction to 50 components, random_state=42)\n6. Insurance high-cost prediction (binary: above vs. below median charges)\n\nHandle missing values in numerical columns with median imputation.\n\nModels:\n- Tasks 1–5: RandomForestClassifier(n_estimators=100, random_state=42)\n- Task 6: LogisticRegression(penalty='l1', solver='liblinear', random_state=42, max_iter=1000)\n- Train/test split: 80/20 (random_state=42, stratify=y)\n\nEvaluation metrics:\n- Binary models: AUC-ROC and Brier score\n- Multi-class cancer model: Macro F1 (as AUC substitute) and average per-class Brier score\n- Clinical utility score = 0.7 × AUC + 0.3 × (1 - Brier)\n\nOutput:\n- output1.json: mapping from model name (diabetes, stroke, heart_disease, sleep_disorder, cancer, insurance) to clinical_utility score, rounded to 4 decimal places\n- output.png: bar chart comparing clinical utility scores of all six models. Use distinct bar colors (red, blue, green, purple, orange, yellow) for the six models respectively. Set the title to 'Comparison of Clinical Utility Scores of Six Disease Prediction Models', add axis labels, display numerical labels on each bar, and annotate the best-performing model information on the chart", "data_sources": ["Healthcare-Diabetes.csv", "Sleep_health_and_lifestyle_dataset.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv", "TCGA-PANCAN-HiSeq-801x20531/data.csv", "TCGA-PANCAN-HiSeq-801x20531/labels.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Inspection and Exploration", "Numerical Data Handling", "Handling Missing Data", "Data Preprocessing & Encoding", "Preprocessing and Scaling", "Data Normalization and Preprocessing", "Feature Selection and Dimensionality Reduction", "Stochasticity and Reproducibility", "Model Training & Evaluation", "Model Configuration and Import", "Model Training and Customization", "Data Splitting and Sampling", "Model Evaluation Metrics", "Arithmetic and Cumulative Calculations", "Data Storage and Structuring", "Data Serialization & File Handling", "Visualization and Interpretation", "Bar Chart Creation and Layout", "Plot Customization and Annotation", "Plot Customization and Layout", "Color and Palette Usage"], "domain": "healthcare", "output_file_name": ["output.png", "output1.json"], "gold_file_name": ["result.png", "result1.json"], "eval_func": ["compare_image(output_file_name='output.png', gold_file_name='result.png', calculate_columns=['type'])", "compare_json(output_file_name='output1.json', gold_file_name='result1.json',thresholds={'diabetes': 0.09,'stroke': 0.09,'heart_disease': 0.09,'sleep_disorder': 0.09,'cancer': 0.09,'insurance': 0.09})"], "post_process_func": ["image_post_process(output_file_name='output.png')", "image_post_process(output_file_name='result.png')"]} {"id": "healthcare_08", "question": "Based on a multi-source medical health dataset covering diabetes, sleep_health, stroke, heart_disease, insurance, and chronic_kidney_disease (5 CSV files and 1 ARFF file), evaluate the reliability of chronic disease prediction models and generate a comprehensive analysis report (output.json and output.csv).\n\nLoad all 6 datasets into an SQLite in-memory database. Perform feature engineering for each dataset:\n- Diabetes: metabolic_risk_score = (Glucose/200) * 0.4 + (BMI/40) * 0.3 + (Age/80) * 0.3\n- Sleep: Parse Blood Pressure into systolic/diastolic; sleep_quality_score = Sleep Duration * Quality of Sleep / 10; binary target: whether Sleep Disorder exists\n- Stroke: Create hypertension * heart_disease interaction; metabolic_risk_score = (avg_glucose_level/200) * 0.5 + (bmi/40) * 0.5\n- Heart disease: cardiac_stress_index = trestbps * oldpeak / 100; binary target from num > 0\n- Insurance: Create smoker * BMI interaction; health_risk_score = (bmi/40) * 0.4 + (age/70) * 0.3 + smoker_encoded * 0.3; binary target: charges > median\n- Kidney disease: kidney_function_score = (hemo/20) * 0.4 + (1 - sc/10) * 0.3 + (1 - bu/100) * 0.3\n\nHandle missing values using median for numeric columns and mode for categorical columns. Use scikit-learn Pipeline with StandardScaler and RandomForestClassifier (n_estimators=100, random_state=42). Train-test split: 80/20 with random_state=42, stratified. Evaluate each model using ROC-AUC, Brier score, accuracy, and calibrated_auc = roc_auc * (1 - brier_score / 2), rounded to 4 decimal places.\n\nSave output.csv with columns (dataset, roc_auc, brier_score, accuracy, calibrated_auc) and output.json with the following structure: dataset_performance is a dict keyed by dataset name, each value is a dict with keys roc_auc, brier_score, accuracy, calibrated_auc (all floats); best_dataset is a string indicating the dataset with the highest calibrated_auc; best_calibrated_auc is a float of that highest value.", "data_sources": ["Healthcare-Diabetes.csv", "Sleep_health_and_lifestyle_dataset.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv", "Chronic_Kidney_Disease/chronic_kidney_disease_full.arff"], "skills": ["Data Loading with Pandas", "SQLite-Specific Operations", "Parsing and Reading Data Files", "Data Parsing and Delimiter Handling", "Column/Row-wise Computations", "Special Data Handling and Padding", "Database Interaction and SQL", "ETL and Data Integration", "Data Transformation and Feature Engineering", "Arithmetic and Cumulative Calculations", "Arithmetic Transformations and Normalization", "Time Formatting and String Manipulation", "Pandas-Specific Operations", "Categorical and Multi-Label Handling", "Conditional Data Processing", "Data Preprocessing & Encoding", "Encoding and Vector Representation", "Numerical Operations and Type Conversion", "Handling Missing Data", "Imputation Methods", "Numerical Data Handling", "Custom Functions for Missing Value Handling", "Model Training & Evaluation", "Model Configuration and Import", "Machine Learning Pipeline & Execution", "Data Splitting and Sampling", "Data Splitting and Leakage Prevention", "Stochasticity and Reproducibility", "Model Evaluation Metrics", "Model Prediction and Output Handling", "Probability Modeling and Conversion", "Performance Metrics and Optimization", "Performance Benchmarking and Evaluation", "Row-wise Operations and Aggregation", "Data Storage and Structuring", "Data Serialization & File Handling", "Data Export and Output Processing", "Output and Logging"], "domain": "healthcare", "output_file_name": ["output.json", "output.csv"], "gold_file_name": ["result.json", "result.csv"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={\"best_dataset\": None, \"best_calibrated_auc\": None})", "compare_model(output_file_name='output.csv', gold_file_name='result.csv', matched_columns=['dataset'], calculate_columns=['roc_auc', 'brier_score', 'accuracy', 'calibrated_auc'], metric='mae')"]} {"id": "healthcare_11", "question": "A national health research institute is investigating whether chronic disease comorbidities consistently precede inflammatory and coagulation laboratory abnormalities in thrombosis-risk patients. The study involves integrating comorbidity indicators from multiple chronic disease datasets to construct unified patient-level profiles. The workflow requires loading all relevant datasets into a SQLite database for efficient querying and management. Subsequently, apply a rolling window pattern detection methodology to identify temporal sequences where specific combinations of comorbidities occur within a 90-day window preceding laboratory anomaly clusters. These anomalies are defined as clusters where at least three biomarkers exceed two standard deviations from the cohort baseline. The final deliverable should report the most frequently observed alignment pattern as a structured result containing a unique pattern identifier, the specific combination of active comorbidities, the median number of days between comorbidity onset and anomaly detection, the median duration of the anomaly cluster, and the count of patients exhibiting this precise temporal alignment.", "data_sources": ["healthcare/Healthcare-Diabetes.csv", "healthcare/healthcare-dataset-stroke-data.csv", "healthcare/heart_disease_uci.csv", "healthcare/Chronic_Kidney_Disease/chronic_kidney_disease_full.arff", "healthcare/insurance.csv", "healthcare/thrombosis_prediction/thrombosis_prediction.sqlite"], "skills": ["Data Loading with Pandas", "Path Construction and Manipulation", "Directory and File I/O", "Parsing and Reading Data Files", "SQLite-Specific Operations", "Database Interaction and SQL", "Data Conversion and Post-Loading Processing", "ETL and Data Integration", "Command-Line and Shell Operations", "Data Cleaning and Transformation", "Column Manipulation / Creation", "Join Operations and Merging", "Data Integration and Merging", "Column Selection and Consistency Checks", "Data Structure Creation and Manipulation", "Data Type and Format Conversion", "Statistical Analysis and Testing", "Outlier Detection and Filtering", "Data Pattern Analysis & Diagnostics", "Time Series Analysis and Forecasting", "Time Difference and Gradient Calculation", "Data Grouping & Clustering", "Pattern Identification & Extraction", "Time Series and Window Analysis", "Statistical Analysis and Metrics", "Sorting and Aggregation", "Data Export and Output Processing", "CSV Processing", "Event Pairing and Transition Logic"], "domain": "healthcare", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', specified_columns=['days_before_anomaly', 'anomaly_duration_days', 'support_count'])"]} {"id": "healthcare_12", "question": "The National Institute of Health is building a unified patient risk profile for predicting susceptibility to multiple system diseases. It needs to integrate metabolic, cardiovascular, lifestyle, and insurance data. Based on multiple datasets including data related to diabetes, sleep health, stroke, heart disease, and insurance, a single coordinated dataset is constructed. Each row represents a pseudo-patient and contains standardized features: (1) Parse the blood pressure data into columns of systolic and diastolic pressure values; (2) Map the smoking status to a unified category ('current-smoker', 'ex-smoker', 'non-smoker'); (3) Align BMI as a continuous variable and convert BMI Category to ordinal levels; (4) Ensure all age and gender fields are formatted consistently for cross-dataset matching. The final output must be a wide-format pandas DataFrame stored in an SQLite database, with all categorical variables factored, and missing cross-source matches retained as NaN.", "data_sources": ["Healthcare-Diabetes.csv", "Sleep_health_and_lifestyle_dataset.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Directory Traversal and File Listing", "Path Construction and Manipulation", "Validation and Verification of Merge Results", "Data Exploration and Comparison", "SQLite-Specific Operations", "ETL and Data Integration", "Command-Line and Shell Operations", "Data Parsing and Delimiter Handling", "String Manipulation and Parsing", "Data Categorization & Mapping", "Data Structure Handling (Dictionaries, Lists)", "Categorical Data Preprocessing and Simplification", "Function Application and Vectorization", "Data Integration and Merging", "Numerical Operations and Type Conversion", "Column Selection and Consistency Checks", "Data Structure Creation and Manipulation", "Pandas-Specific Operations", "Data Preprocessing & Encoding", "Categorical Variable Handling", "Data Export and Output Processing", "Data Serialization & File Handling", "Formatting and Output Organization", "Data Inspection and Summarization"], "domain": "healthcare", "output_file_name": ["output.db"], "gold_file_name": ["result.db"], "eval_func": ["compare_sqlite(output_file_name='output.db', gold_file_name='result.db', specified_schema={'unified_patient_data': None}, ignore_order=False)"]} {"id": "healthcare_13", "question": "The Multi-Institutional Oncology Research Consortium aims to develop a cancer type classification model using genomic profiles from the Cancer Genome Atlas (TCGA). Using gene expression data and cancer type labels from TCGA, train a machine learning model to classify five major types of cancer (BRCA, KIRC, LUAD, PRAD, COAD). Integrate population-level metabolic health indicators computed as aggregate statistics from non-cancer medical datasets as additional features. Use the first 500 gene expression features combined with these clinical aggregate features. Use a RandomForestClassifier (n_estimators=100, random_state=42) with 5-fold cross-validation (KFold, shuffle=True, random_state=42) to evaluate model performance. Use cross_val_predict to compute per-cancer-type accuracy and produce a bar chart of classification accuracy for each cancer type. The output should include output.csv with columns for cancer type and corresponding accuracy, and output.png containing the bar chart.", "data_sources": ["Healthcare-Diabetes.csv", "Sleep_health_and_lifestyle_dataset.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv", "TCGA-PANCAN-HiSeq-801x20531/data.csv", "TCGA-PANCAN-HiSeq-801x20531/labels.csv"], "skills": ["Data Loading with Pandas", "Directory and File I/O", "Data Conversion and Post-Loading Processing", "ETL and Data Integration", "Data Normalization and Standardization", "Time Formatting and String Manipulation", "Function Application and Vectorization", "Data Integration and Merging", "Join Operations and Merging", "Statistical Analysis and Metrics", "Column-wise Transformations and Aggregation", "Preprocessing and Scaling", "Column-specific or Feature-wise Processing", "Array and Matrix Manipulation", "Model Configuration and Import", "Library Usage (Scikit-Learn)", "Model Training & Evaluation", "Model Evaluation Metrics", "Parallel and Concurrent Execution", "Stochasticity and Reproducibility", "Bar Chart Creation and Layout", "Using Seaborn for Statistical Plots", "Visualization and Output Generation", "Data Serialization & File Handling", "CSV Processing", "Output and Logging", "Model Behavior and Interpretation", "Visualization and Interpretation", "Command-Line and Shell Operations"], "domain": "healthcare", "output_file_name": ["output.csv", "output.png"], "gold_file_name": ["result.csv", "result.png"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['cancer_type', 'accuracy'], thresholds={1: 0.02})", "compare_image(output_file_name='output.png', gold_file_name='result.png', calculate_columns=['type'])"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result.png')"]} {"id": "healthcare_14", "question": "The National Institute of Health is developing a unified cardiovascular disease risk prediction model, which requires integrating clinical characteristic data from different patient groups. Based on multiple datasets containing data related to diabetes, sleep health, stroke, heart disease, and insurance, a standardized unified dataset needs to be created. The requirements are as follows: (1) Normalize all shared numerical features (age, glucose, BMI, blood pressure components) in all datasets to the range of [0,1]; (2) Uniformly encode categorical variables such as gender, smoking status, and disease outcome; (3) Split blood pressure data into two numerical columns: systolic blood pressure and diastolic blood pressure; (4) Keep the one-hot encoded indicators of the source dataset in each row; (5) The final output should exactly contain 17 columns: age, age_bin_encoded, gender_encoded, glucose, bmi, bp_systolic, bp_diastolic, chol, htn_flag, smoker_flag, diabetes_flag, outcome_encoded, and 5 dataset source indicators. The output must include all original records, without any row filtering except for standardization.", "data_sources": ["Healthcare-Diabetes.csv", "Sleep_health_and_lifestyle_dataset.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Handling & Preparation", "Data Inspection and Exploration", "Numerical Operations and Type Conversion", "Pandas-Specific Operations", "Column Manipulation / Creation", "Preprocessing and File Structure Adjustments", "Data Preprocessing & Encoding", "Column-specific or Feature-wise Processing", "Data Transformation and Column Manipulation", "Data Integration and Merging", "Data Structure Creation and Manipulation", "Labeling and Renaming", "Column Name and Schema Management", "Conditional Data Processing", "Data Normalization and Preprocessing", "Preprocessing and Scaling", "Arithmetic Transformations and Normalization", "Handling Missing Data", "Data Categorization & Mapping", "Data Binning and Grid Creation", "Encoding and Vector Representation", "Join Operations and Merging", "Column Selection and Consistency Checks", "Special Data Handling and Padding", "Handling Missing or Edge Cases", "Data Export and Output Processing", "Data Serialization & File Handling", "Index Handling and Conversion"], "domain": "healthcare", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['age', 'age_bin_encoded', 'gender_encoded', 'glucose', 'bmi', 'bp_systolic', 'bp_diastolic', 'chol', 'htn_flag', 'smoker_flag', 'diabetes_flag', 'outcome_encoded'])"]} {"id": "healthcare_15", "question": "The public health research team is developing a multi-condition risk stratification system to identify demographic hotspots where multiple chronic diseases and adverse health indicators co-occur. Based on multiple datasets containing data on diabetes, sleep health, chronic kidney disease, stroke, heart disease, insurance, and thrombosis predictions, a composite risk score is calculated for each demographic bin (age rounded to the nearest integer, BMI rounded to the nearest 0.5 unit). First, all data is loaded into the database and relevant records are extracted. A high-risk case is defined as: diabetes (Outcome=1), stroke (stroke=1), heart disease (num≥1), chronic kidney disease (class='ckd'), high insurance cost (charges above the 90th percentile), poor sleep quality (Quality of Sleep≤3 and Sleep Disorder not empty), and high-risk thrombosis (Thrombosis=1 and autoimmune diagnosis such as 'SLE', 'APS', or 'MCTD'). For thrombosis patients, the age at the time of the examination is calculated using the arithmetic of the date and time between the date of birth and the examination date. Then, for each (age ± 1, BMI ± 0.5) bin, binary indicators are assigned to all 7 conditions (if there is at least one high-risk case of this condition in the bin, it is 1, otherwise it is 0). Finally, a RandomForestClassifier with random_state=42 is fitted to verify feature importance, but only the aggregated demographic risk table is reported: a DataFrame containing columns ['age_bin', 'bmi_bin', 'diabetes_cases', 'stroke_cases', 'heart_disease_cases', 'kidney_disease_cases', 'insurance_risk_cases', 'sleep_risk_cases', 'thrombosis_cases']. ", "data_sources": ["Healthcare-Diabetes.csv", "Sleep_health_and_lifestyle_dataset.csv", "chronic_kidney_disease_full.arff", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv", "thrombosis_prediction/thrombosis_prediction.sqlite"], "skills": ["Database Interaction and SQL", "Data Import and Library Setup", "Data Loading with Pandas", "Parsing and Reading Data Files", "Data Conversion and Post-Loading Processing", "SQLite-Specific Operations", "In-Memory File Operations", "ETL and Data Integration", "Pandas-Specific Operations", "Conditional Logic and Row-wise Operations", "Conditional Aggregation and Filtering", "Handling Missing or Edge Cases", "Statistical Calculations and Quantiles", "Data Filtering and Transformation", "Time Difference and Gradient Calculation", "Boolean Logic and Conditional Checks", "Statistical Analysis and Metrics", "Vertical Stacking and Binding", "Data Integration and Merging", "Numerical Comparison and Proximity Checks", "Data Aggregation and Grouping", "Data Binning and Grid Creation", "Machine Learning Pipeline & Execution", "Library Usage (Scikit-Learn)", "Model Training & Evaluation", "Data Preparation and Formatting", "Data Export and Output Processing", "Data Serialization & File Handling", "Parallel and Concurrent Execution", "Stochasticity and Reproducibility"], "domain": "healthcare", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['age_bin', 'bmi_bin', 'diabetes_cases', 'stroke_cases', 'heart_disease_cases', 'kidney_disease_cases', 'insurance_risk_cases', 'sleep_risk_cases', 'thrombosis_cases'])"]} {"id": "healthcare_16", "question": "A national health research institute is developing a multi-morbidity risk stratification system to identify high-risk patients who exhibit clinical evidence of at least two of the following conditions: metabolic syndrome, cardiovascular disease, renal dysfunction, or thrombosis. Construct a unified patient-level dataset by assigning sequential patient identifiers (format: PAT-NNNNNN) across all data sources and joining them. Apply evidence-based clinical thresholds (Glucose ≥ 100 mg/dL for metabolic risk, serum creatinine ≥ 1.3 mg/dL for renal dysfunction, Thrombosis = 1 with aCL IgG ≥ 2.0 for thrombosis risk, and hypertension or heart disease for cardiovascular risk), and validate that each identified high-risk patient has supporting data from at least three independent clinical sources. The final output must be a DataFrame containing only patients who meet validated multi-system risk criteria, with columns indicating which risk categories were satisfied and a validation status flag.", "data_sources": ["Healthcare-Diabetes.csv", "Sleep_health_and_lifestyle_dataset.csv", "chronic_kidney_disease_full.arff", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv", "labels.csv", "thrombosis_prediction/thrombosis_prediction.sqlite"], "skills": ["Data Loading with Pandas", "Data Handling & Preparation", "ETL and Data Integration", "Unique Identifier and Entity Management", "Indexing and ID Assignment", "Threshold-Based Categorization or Filtering", "Conditional Aggregation and Filtering", "Conditional Data Processing", "Column-specific or Conditional Logic", "Column Manipulation / Creation", "Data Transformation and Column Manipulation", "Boolean and Logical Operations", "Database Interaction and SQL", "SQLite-Specific Operations", "In-Memory File Operations", "Join Operations and Merging", "Statistical Analysis and Inference", "Cumulative and Row-wise Operations", "Arithmetic and Cumulative Calculations", "Filtering and Criteria-Based Selection", "Validation and Verification of Merge Results", "Data Preprocessing & Encoding", "Column Selection and Consistency Checks", "Data Export and Output Processing", "Data Serialization & File Handling", "Data Inspection and Summarization", "Statistical Analysis and Metrics"], "domain": "healthcare", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['patient_id', 'metabolic_risk', 'renal_risk', 'cardiovascular_risk', 'thrombosis_risk', 'sleep_risk', 'heart_risk', 'smoker_risk', 'risk_count', 'source_count', 'validation_status'])"]} {"id": "healthcare_17", "question": "The medical data quality assessment team is developing a system for cross-dataset feature consistency analysis to evaluate the data quality and consistency among multiple medical data sources. Based on multiple datasets containing data on diabetes, sleep health, chronic kidney disease, stroke, heart disease, insurance, and thrombosis prediction, the following analyses are performed: (1) Calculate the descriptive statistics (mean, standard deviation, minimum value, maximum value, missing rate) for shared features (age, BMI, glucose) in each dataset; (2) Identify and report outliers in each dataset (using the IQR method: Q1 - 1.5*IQR and Q3 + 1.5*IQR as boundaries); (3) For datasets with overlapping features, calculate the Pearson correlation coefficient matrix between each pair of datasets (cross-dataset comparison, e.g., diabetes age vs stroke age); (4) Evaluate data integrity: Calculate the proportion of complete records (the percentage of rows without missing values) in each dataset; (5) Generate a data quality score: Calculate the comprehensive quality score for each dataset based on the missing rate (weight 0.4), outlier rate (weight 0.3), and feature consistency (weight 0.3). The output is a DataFrame containing columns ['dataset_name', 'n_records', 'n_features', 'completeness', 'outlier_rate', 'feature_consistency', 'quality_score'], sorted by quality score in descending order.", "data_sources": ["Healthcare-Diabetes.csv", "Sleep_health_and_lifestyle_dataset.csv", "chronic_kidney_disease_full.arff", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv", "thrombosis_prediction/thrombosis_prediction.sqlite"], "skills": ["Data Loading with Pandas", "Data Conversion and Post-Loading Processing", "Dataset Creation and Management", "Data Exploration and Comparison", "ETL and Data Integration", "Mapping and Transformation", "Column-specific or Feature-wise Processing", "Numerical Data Handling", "Handling Missing Data", "Feature Selection and Statistical Computation", "Data Preprocessing & Encoding", "Outlier Detection and Filtering", "Statistical Correlation Analysis", "Data Comparison and Validation", "Normalization and Weighted Aggregation", "Arithmetic and Cumulative Calculations", "Data Pattern Analysis & Diagnostics", "Pandas-Specific Operations", "Sorting, Limiting, and Ranking", "Data Export and Output Processing", "Data Serialization & File Handling", "Statistical Analysis and Metrics"], "domain": "healthcare", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['n_records', 'n_features', 'completeness', 'outlier_rate', 'feature_consistency', 'quality_score'])"]} {"id": "healthcare_18", "question": "Medical institutions are developing an early warning system for chronic diseases based on time series trend analysis. This system monitors the dynamic changes in patients' physiological indicators to identify high-risk patients. Based on multiple datasets including diabetes, sleep health, chronic kidney disease, stroke, heart disease, insurance, thrombosis prediction data, as well as related examinations and laboratory data, the following analyses are performed: (1) Generate a unique identifier for each patient (format: DATASET_ index); (2) For longitudinal datasets with repeated measurements (Examination and Laboratory data), sort by patient ID and timestamp, calculate the 7-day rolling average and standard deviation of each physiological indicator (glucose, BMI, blood pressure, etc.); (3) Calculate the trend slope: Use linear regression to fit the time series of each patient's recent 3 measurements, extract the slope as the trend indicator; (4) Define deterioration indicators: If the rolling average increases by more than 10% compared to the baseline (first measurement value) and the trend slope is positive, mark as deterioration (1), otherwise as stable (0); (5) For cross-sectional datasets where each patient has only one record, set trend_slope=0, rolling_mean=current_value, rolling_std=0; (6) Calculate risk score using weights: deterioration_flag * 0.4 + abs(trend_slope) * 0.3 + baseline_deviation_from_normal_range * 0.3; (7) Identify high-risk patients: Patients with a risk score exceeding the 75th percentile. The output is a DataFrame containing columns ['patient_id', 'dataset', 'baseline_value', 'current_value', 'trend_slope', 'rolling_mean', 'rolling_std', 'deterioration_flag', 'risk_score', 'high_risk_flag'], sorted by risk score in descending order.", "data_sources": ["Healthcare-Diabetes.csv", "Sleep_health_and_lifestyle_dataset.csv", "chronic_kidney_disease_full.arff", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv", "thrombosis_prediction/thrombosis_prediction.sqlite", "thrombosis_prediction/Examination.csv", "thrombosis_prediction/Laboratory.csv"], "skills": ["Data Loading with Pandas", "Data Handling & Preparation", "Indexing and ID Assignment", "Unique Identifier and Entity Management", "ETL and Data Integration", "Time Series Handling and Preprocessing", "Data Integration and Merging", "Join Operations and Merging", "Lagged Variables and Rolling Features", "Rolling Window Operations", "Difference and Trend Computation", "Time Difference and Gradient Calculation", "Arithmetic and Cumulative Calculations", "Monotonicity and Trend Analysis", "Normalization and Percentile Calculations", "Incremental and Comparative Calculations", "Outlier Detection and Filtering", "Threshold-Based Categorization or Filtering", "Statistical Calculations and Quantiles", "Function Application and Vectorization", "Data Transformation and Column Manipulation", "Data Serialization & File Handling", "Sorting, Limiting, and Ranking", "Data Export and Output Processing", "Formatting and Output Organization"], "domain": "healthcare", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['patient_id', 'dataset', 'baseline_value', 'current_value', 'trend_slope', 'rolling_mean', 'rolling_std', 'deterioration_flag', 'risk_score', 'high_risk_flag'])"]} {"id": "healthcare_19", "question": "The medical artificial intelligence research team is developing a multi-task learning framework to predict multiple health outcomes simultaneously. Based on multiple medical datasets including diabetes, sleep health, chronic kidney disease, stroke, heart disease, and insurance data, a multi-task machine learning model is constructed to predict the following health outcomes: (1) diabetes outcome; (2) stroke outcome; (3) heart disease outcome (binary coded as ≥1 is 1); (4) chronic kidney disease outcome (ckd is 1); (5) sleep quality outcome (<7 is marked as low quality and is 1); (6) insurance cost outcome (higher than the 75th percentile is marked as 1). For each dataset, shared features are extracted: age, BMI, glucose, and gender (encoded as 0/1). If the feature is missing, the median of that column is used to fill in. All datasets are merged into a unified DataFrame and a dataset source indicator column (one-hot encoding) is added. Then, RandomForestClassifier (n_estimators=100, random_state=42) is trained for each task separately with the shared features and dataset indicators as input and the corresponding health outcome as output. The average AUC-ROC score of each task is evaluated using 5-fold cross-validation. The output is a DataFrame containing columns ['task_name', 'auc_roc_score', 'feature_importances'], where feature_importances is a dictionary containing feature names and importance values.", "data_sources": ["Healthcare-Diabetes.csv", "Sleep_health_and_lifestyle_dataset.csv", "chronic_kidney_disease_full.arff", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Dataset Creation and Management", "Data Inspection and Exploration", "Data Inspection and Summarization", "Data Structure Handling (Dictionaries, Lists)", "Mapping and Transformation", "Dictionary Manipulation and Construction", "Data Preprocessing & Encoding", "Column-specific or Feature-wise Processing", "Data Transformation and Column Manipulation", "Data Integration and Merging", "Data Alignment & Merging", "Handling Missing Data", "Column Selection and Consistency Checks", "Array and Matrix Manipulation", "Preprocessing and Scaling", "Data Normalization and Preprocessing", "Library Usage (Scikit-Learn)", "Model Configuration and Import", "Multi-Task/Multi-Class Handling", "Stochasticity and Reproducibility", "Data Storage and Structuring", "Data Structure Creation and Manipulation", "Model Evaluation Metrics", "Data Export and Output Processing", "CSV Processing"], "domain": "healthcare", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['task_name', 'auc_roc_score'], thresholds={1: 0.02})"]} {"id": "healthcare_20", "question": "The public health research team is conducting a cross-cohort analysis to quantify the global impact of metabolic risk factors on various disease outcomes. Based on multiple datasets containing data on diabetes, sleep health, chronic kidney disease, stroke, heart disease, insurance, and other related medical data, the following analyses are performed: (1) Fit a Bayesian hierarchical logistic regression model to estimate the logarithmic odds ratio changes in the binary probabilities of six diseases for each standardized risk factor (age, BMI, blood pressure, glucose) when each standard deviation increases; (2) Use weak information priors and consider the specific intercepts of the data set; (3) Use RandomForestClassifier (n_estimators=50, max_depth=5, min_samples_split=10, min_samples_leaf=5, class_weight='balanced', random_state=42) and LogisticRegression (C=0.1, penalty='l2', max_iter=1000, class_weight='balanced') to validate the calibration of the stroke prediction model. The output is a DataFrame containing columns ['risk_factor', 'posterior_mean', 'ci_lower_2.5%', 'ci_upper_97.5%'], including posterior estimates of four global coefficients.", "data_sources": ["Healthcare-Diabetes.csv", "chronic_kidney_disease_full.arff", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv"], "skills": ["Data Loading with Pandas", "Dataset Creation and Management", "SQLite-Specific Operations", "Data Structure Creation and Manipulation", "ETL and Data Integration", "Data Cleaning and Transformation", "Data Manipulation and Validation", "Data Normalization and Standardization", "Preprocessing and Scaling", "Statistical Analysis and Metrics", "Data Preparation and Formatting", "Data Handling & Preparation", "Data Integration and Merging", "Special Data Handling and Padding", "Machine Learning Pipeline & Execution", "Model Specification and Construction", "Model Configuration and Import", "Statistical Modeling and Uncertainty", "Statistical Calculations and Quantiles", "Model Training & Evaluation", "Library Usage (Scikit-Learn)", "Model Evaluation & Validation", "Probability Modeling and Conversion", "Data Storage and Structuring", "Data Export and Output Processing", "CSV Processing", "Stochasticity and Reproducibility"], "domain": "healthcare", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['posterior_mean', 'ci_lower_2.5%', 'ci_upper_97.5%'], thresholds={1: 0.02, 2: 0.02, 3: 0.02})"]} {"id": "healthcare_23", "question": "Create a 3x3 visualization dashboard using the provided medical health data and save it as 'healthcare_dashboard.png'.\n\n**Task Requirements:**\nExtract key indicators from the health data and create 9 subplots to display: disease prevalence distribution, medical cost analysis, gene expression patterns, lifestyle and health status correlation, risk factors and medical cost relationship.\n\n**Technical Requirements:**\n- Image size 18x15 inches, DPI = 150\n\n**Output Requirements:**\n- Generate healthcare_dashboard.png file\n- Arrange the 9 subplots in a 3x3 grid, each subplot containing a title (bold), axis labels, and legend (if applicable)\n- Subplot 1 (bar chart of diabetes prevalence by age group): Use age groups 20-29, 30-39, 40-49, 50-59, and 60+. Display percentage values (xx.x%) above the bars\n- Subplot 2 (box plot of insurance charges by smoking status): Use scientific notation format on the Y-axis (1e+04)\n- Subplot 3 (heat map of gene expression patterns by cancer type): Use seaborn.heatmap to draw and include a color bar\n- Subplot 4 (scatter plot of sleep quality vs physical activity by BMI category): Use different colors for each BMI category\n- Subplot 5 (violin plot of blood pressure distribution): Compare diabetes and heart-disease blood pressure measurements\n- Subplot 6 (heat map of hypertension, heart disease, and stroke co-occurrence): Use seaborn.heatmap to draw. Include color bar, and display correlation coefficient (x.xx) in each cell\n- Subplot 7 (scatter plot of age vs insurance charges): Use scientific notation format on the Y-axis (1e+04)\n- Subplot 8 (scatter plot of glucose vs BMI by diabetes status): Include trend line and linear equation annotation (y=ax+b)\n- Subplot 9 (scatter plot of metabolic risk vs insurance charges): Use scientific notation format on the Y-axis (1e+04)\n- Add grid lines to all subplots (alpha = 0.3)", "data_sources": ["Healthcare-Diabetes.csv", "Sleep_health_and_lifestyle_dataset.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv", "TCGA-PANCAN-HiSeq-801x20531/data.csv", "TCGA-PANCAN-HiSeq-801x20531/labels.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Directory and File Management", "Data Cleaning and Transformation", "Numerical Data Handling", "Handling Missing Data", "Data Preprocessing & Encoding", "Encoding and Vector Representation", "Data Preparation and Aggregation", "Percentage and Variation Calculations", "Statistical Calculations and Quantiles", "Correlation Matrix Generation", "Statistical Correlation Analysis", "Array and Matrix Manipulation", "Subplot and Layout Management", "Plot Customization and Layout", "Data Analysis and Visualization", "Bar Chart Creation and Layout", "Plot Customization (Aesthetics)", "Color and Palette Usage", "Multiple Series/Traces Visualization", "Plot Customization and Annotation", "Regression Modeling and Interpretation", "Line Collection Customization", "Plot Creation and Configuration"], "domain": "healthcare", "output_file_name": ["healthcare_dashboard.png"], "gold_file_name": ["result.png"], "eval_func": ["compare_image('healthcare_dashboard.png', 'result.png', calculate_columns=['type'])"], "post_process_func": ["image_post_process('healthcare_dashboard.png')", "image_post_process('result.png')"]} {"id": "healthcare_24", "question": "Conduct a comprehensive meta-analysis to evaluate the associations between key metabolic biomarkers (glucose levels, BMI, and blood pressure) and major chronic diseases across multiple healthcare datasets.\n**Analysis Objectives:**\n1. Calculate effect sizes (Cohen's d) for each biomarker-disease pair within individual datasets\n2. Perform inverse-variance weighted meta-analysis to combine effect sizes across datasets; for single-study cases, compute the p-value from the z-score using a two-tailed normal distribution test\n3. Apply False Discovery Rate (FDR) correction (Benjamini-Hochberg method) to account for multiple comparisons\n4. Rank associations by clinical significance score: score = |meta_effect_size| × (-log10(fdr_corrected_p + 1e-10)), sorted descending\n5. Classify confidence levels for each association using the following criteria:\n - high: fdr_corrected_p < 0.01 AND |meta_effect_size| > 0.5\n - medium: fdr_corrected_p < 0.05 AND |meta_effect_size| > 0.3\n - low: otherwise\n\nOnly include biomarker-disease pairs with direct continuous biomarker measurements; do not use binary indicators as substitutes.\n\n**Input Data:**\nMultiple healthcare datasets containing physiological measurements (glucose, BMI, blood pressure) and disease outcomes (diabetes, stroke, heart disease)\n\n**Output Requirements:**\nGenerate a comprehensive results file 'meta_analysis_results.csv' containing the following columns:\n- condition: The chronic disease condition analyzed\n- biomarker: The physiological biomarker (Glucose, BMI, BloodPressure)\n- meta_effect_size: The combined effect size from meta-analysis, rounded to 4 decimal places\n- meta_p_value: The statistical significance of the association, rounded to 6 decimal places\n- fdr_corrected_p: FDR-adjusted p-value for multiple comparisons, rounded to 6 decimal places\n- confidence_level: Classification of confidence (high/medium/low) based on the criteria above\n- clinical_significance_rank: Ranking from 1 (most significant) to N based on clinical significance score\n\n**Expected Deliverables:**\n- meta_analysis_results.csv: Complete meta-analysis results table\n- Summary statistics showing total associations analyzed and confidence level distribution", "data_sources": ["Healthcare-Diabetes.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Project Organization and Structure", "Data Cleaning and Transformation", "Handling Missing Data", "Numerical Data Handling", "Data Transformation and Column Manipulation", "Statistical Analysis and Inference", "Feature Selection and Statistical Computation", "Data Transformation and Calculation", "Difference and Trend Computation", "Incremental and Comparative Calculations", "Data Preparation and Aggregation", "Data Structure Creation and Manipulation", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Statistical Analysis and Testing", "Multiple Comparisons and Hypothesis Testing", "Interpreting and Communicating Statistical Results", "Sorting, Limiting, and Ranking", "P-Value Calculation and Interpretation", "Data Preparation and Formatting", "Formatting and Output Organization", "Data Export and Output Processing", "Data Serialization & File Handling", "Function Application and Vectorization"], "domain": "healthcare", "output_file_name": ["meta_analysis_results.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_model(output_file_name='meta_analysis_results.csv', gold_file_name='result.csv', calculate_columns=['meta_effect_size', 'meta_p_value', 'fdr_corrected_p', 'clinical_significance_rank'], metric='mse', lower_bound=0, upper_bound=1)"]} {"id": "healthcare_25", "question": "Investigate multimorbidity patterns across diverse patient populations by analyzing the co-occurrence of chronic diseases and their relationships with lifestyle factors and healthcare expenditures. This study integrates multiple healthcare datasets to map disease prevalence across demographic strata and identify high-risk population segments.\n\n**Analysis Workflow:**\n1. Load and harmonize data from multiple chronic disease datasets (diabetes, heart disease, stroke, sleep disorders)\n2. Standardize demographic variables (age, gender) and create consistent age decade groupings (30s-80s)\n3. Calculate disease prevalence rates stratified by age decade and gender\n4. Integrate lifestyle metrics (sleep duration, sleep quality) and healthcare cost data\n5. Generate comprehensive multi-panel visualization showing disease burden and associated factors\n\n**Visualization Requirements:**\n- Upper panel: Heatmap (use `sns.heatmap()`) displaying prevalence percentages (with one decimal precision) for each condition across age-gender strata, using viridis color scale with colorbar annotation. The y-axis should be organized as grouped rows in the format “Condition–AgeDecade”\n- Lower panel: Also use `sns.heatmap()` to display healthcare cost distribution (median charges) and sleep metrics (average sleep duration) by demographic groups. The y-axis row labels should follow \"Metric-Sex\" format\n- All panels must include proper axis labels, titles (bold font), and grid lines for readability\n\n**Specific Deliverables:**\n- multimorbidity_analysis.png: Multi-panel heatmap visualization (14x10 inches, DPI 150)\n- multimorbidity_analysis.csv: Complete aggregated data table with prevalence rates, costs, and sleep metrics\n- stroke_prevalence_result.txt: Text file reporting the exact prevalence percentage (to one decimal place) of stroke in females aged 60-69\n\n**Key Metric to Report:**\nThe precise prevalence percentage of stroke among females in their 60s, calculated from the aggregated stroke dataset and formatted as 'X.X%'", "data_sources": ["Healthcare-Diabetes.csv", "Sleep_health_and_lifestyle_dataset.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Directory and File Management", "Data Import and Library Setup", "Data Cleaning and Transformation", "Handling Missing Data", "Numerical Data Handling", "String Manipulation and Parsing", "Data Transformation and Column Manipulation", "Boolean and Logical Operations", "Data Preprocessing & Encoding", "Grouping and Index Assignment", "Pandas-Specific Operations", "Function Application and Vectorization", "Data Preparation and Aggregation", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Data Analysis and Visualization", "Color and Palette Usage", "Plot Customization and Annotation", "Layout and Multi-Panel Visualizations", "Subplot and Layout Management", "Using Seaborn for Statistical Plots", "Data Integration and Merging", "Data Preparation and Reshaping", "Vertical Stacking and Binding", "SQL Pivot and Crosstab Techniques", "Data Preparation and Formatting", "Percentage and Variation Calculations", "Data Serialization & File Handling", "Data Export and Output Processing", "Data Inspection and Summarization"], "domain": "healthcare", "output_file_name": ["multimorbidity_analysis.png", "multimorbidity_analysis.csv", "stroke_prevalence_result.txt"], "gold_file_name": ["result.png", "result.csv", "result.txt"], "eval_func": ["compare_image('multimorbidity_analysis.png', 'result.png', calculate_columns=['type'])", "compare_csv(output_file_name='multimorbidity_analysis.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['gender','Stroke','HeartDisease','SleepDisorder','AvgSleepDuration','AvgSleepQuality','MedianCharges','Diabetes'])", "compare_text(output_file_name='stroke_prevalence_result.txt', gold_file_name='result.txt')"], "post_process_func": ["image_post_process('multimorbidity_analysis.png')", "image_post_process('result.png')"]} {"id": "healthcare_26", "question": "Develop a hierarchical mixed-effects regression model to quantify how standardized metabolic risk factors (glucose, BMI, blood pressure) jointly influence the probability of major clinical outcomes across diverse patient populations. The model should account for baseline differences using shared metabolic coefficients and dataset-specific intercepts.\n\n**Analysis Objectives:**\n1. Integrate multiple healthcare datasets with harmonized metabolic variables\n2. Apply appropriate data preprocessing: handle missing values, normalize features, align variables across sources\n3. Fit a hierarchical model with shared fixed effects for metabolic variables and random intercepts per dataset\n4. Estimate shared metabolic effect sizes and dataset-specific baseline risks\n5. Generate predictive probabilities and model comparison metrics\n\n**Input Data:**\nHealthcare datasets containing physiological measurements (glucose, BMI, blood pressure) and binary disease outcomes from diverse patient populations\n\n**Model Structure:**\n- Shared metabolic coefficients (fixed effects) across all datasets\n- Dataset-specific intercepts (random effects) to account for baseline differences\n\n**Output Requirements:**\nGenerate a comprehensive results dictionary saved as 'bayesian_analysis_results.json' with the following exact structure:\n1. posterior_effects: A dict mapping each metabolic variable name to its shared coefficient value (a single float). Keys must be 'glucose', 'bmi', 'bp'. Example: {\"glucose\": 0.07, \"bmi\": 0.05, \"bp\": 0.08}\n2. dataset_intercepts: A dict mapping each dataset name to its random intercept value (a single float). Keys must be 'Diabetes', 'Stroke', 'Heart Disease'. Example: {\"Diabetes\": 0.19, \"Stroke\": -0.23, \"Heart Disease\": 0.04}\n3. posterior_predictions: A dict mapping each dataset name to its mean predicted probability (a single float)\n4. model_comparison: A dict with keys 'waic' and 'aic', each containing the corresponding model comparison metric value (float)\n5. odds_ratios: A list of dicts, each containing keys 'biomarker', 'coefficient', 'odds_ratio', 'ci_lower', 'ci_upper', 'p_value'\n\n**Additional Deliverables:**\n- bayesian_summary.csv: Human-readable summary table of key findings\n- bayesian_analysis_plot.png: A figure with 2 subplots side by side (1 row, 2 columns, figsize=(14, 5)):\n - Left subplot: Forest plot of odds ratios for each metabolic variable (glucose, bmi, bp). Plot the odds ratio as a point with 95% CI as horizontal error bars. Add a vertical reference line at odds_ratio=1. X-axis label: 'Odds Ratio', y-axis tick labels: variable names.\n - Right subplot: Bar chart of dataset-specific random intercepts. Each bar represents one dataset (Diabetes, Heart Disease, Stroke). Y-axis label: 'Random Intercept'.", "data_sources": ["Healthcare-Diabetes.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv"], "skills": ["Data Loading with Pandas", "Handling Missing Data", "Numerical Data Handling", "Categorical vs Numerical Type Identification", "Data Cleaning and Transformation", "Data Alignment & Merging", "Column Selection and Consistency Checks", "Preprocessing and Scaling", "Data Normalization and Standardization", "Model Specification and Construction", "Statistical Assumptions and Limitations", "Model Training & Evaluation", "Statistical Analysis and Metrics", "Probability Modeling and Conversion", "Statistical Modeling and Uncertainty", "Model Development and Interpretation", "Statistical Analysis and Inference", "Command-Line and Shell Operations", "Data Storage and Structuring", "Data Manipulation and Summarization", "Data Serialization & File Handling", "Data Export and Output Processing", "Data Preparation and Formatting"], "domain": "healthcare", "output_file_name": ["bayesian_analysis_results.json", "bayesian_summary.csv", "bayesian_analysis_plot.png"], "gold_file_name": ["bayesian_analysis_results_gold.json", "result.csv", "result.png"], "eval_func": ["compare_json('bayesian_analysis_results.json', 'bayesian_analysis_results_gold.json', thresholds={'posterior_effects': {'glucose': None, 'bmi': None, 'bp': None}, 'dataset_intercepts': {'Diabetes': None, 'Stroke': None, 'Heart Disease': None}, 'model_comparison': {'waic': None, 'aic': None}})", "compare_csv('bayesian_summary.csv', 'result.csv', ignore_order=True, specified_columns=['coefficient','odds_ratio','ci_lower','ci_upper','p_value'])", "compare_image('bayesian_analysis_plot.png', 'result.png', calculate_columns=['type'])"], "post_process_func": ["image_post_process('bayesian_analysis_plot.png')", "image_post_process('result.png')"]} {"id": "healthcare_27", "question": "Investigate accelerating metabolic deterioration patterns across chronic disease cohorts to identify high-risk age windows for early intervention. This analysis tracks how key metabolic indicators change with age and detects periods of rapid deterioration that may warrant clinical attention.\n\n**Analysis Workflow:**\n1. Load and integrate physiological data from multiple chronic disease datasets and a general population cohort\n2. Harmonize metabolic measurements (glucose, BMI, systolic blood pressure) across sources\n3. Aggregate into 5-year age intervals and calculate first-order and second-order differences\n4. Identify age windows with significant acceleration exceeding clinical thresholds\n5. Generate visualization comparing metabolic trajectories across cohorts\n- Second-order difference analysis to detect acceleration in metabolic deterioration\n- Threshold criteria: absolute value of second-order difference exceeding glucose >5 mg/dL, BMI >1 kg/m², blood pressure >5 mmHg\n- Compare disease cohorts against general population trends\n\n**Output Requirements:**\nGenerate 'acceleration_analysis.csv' containing only accelerating age windows (is_accelerating=True) with columns:\n- dataset_source: Cohort identifier (Diabetes, Stroke, Heart Disease, General Population)\n- biomarker_type: Metabolic indicator (glucose, bmi, systolic_bp)\n- age_bin_start, age_bin_end: 5-year age interval\n- first_diff: Rate of change between consecutive age bins\n- second_diff: Acceleration (change in rate of change)\n- is_accelerating: Significant acceleration flag based on abs(second_diff) > threshold (True for all rows)\n\n**Additional Deliverables:**\n- metabolic_trends.png: A 3-panel (3 rows × 1 column) line chart visualization with figsize=(14, 12). Panel 1: Glucose Levels (mg/dL) showing Diabetes and Stroke cohorts. Panel 2: BMI (kg/m²) showing Diabetes, Stroke, and General Population cohorts. Panel 3: Systolic Blood Pressure (mmHg) showing Diabetes, Stroke, and Heart Disease cohorts. Each panel overlays the relevant cohort trend lines using different colors.\n- Summary statistics: Total accelerating windows, breakdown by cohort and biomarker", "data_sources": ["Healthcare-Diabetes.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "insurance.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Project Organization and Structure", "Directory and File I/O", "Data Cleaning and Transformation", "Handling Missing Data", "Numerical Data Handling", "Data Transformation and Column Manipulation", "Conditional Data Processing", "Data Binning and Grid Creation", "Interval and Range Operations", "Function Application and Vectorization", "Data Preparation and Aggregation", "Data Aggregation and Grouping", "Column-wise Transformations and Aggregation", "Statistical Analysis and Metrics", "Arithmetic and Cumulative Calculations", "Difference and Trend Computation", "Data Transformation and Calculation", "Threshold-Based Categorization or Filtering", "Thresholding and Validation", "Data Analysis and Visualization", "Layout and Multi-Panel Visualizations", "Subplot and Layout Management", "Multiple Series/Traces Visualization", "Plot Customization and Annotation", "Line Collection Customization", "Time Formatting and String Manipulation", "Pandas-Specific Operations", "Labeling and Renaming", "Filtering and Criteria-Based Selection", "Conditional Logic and Row-wise Operations", "Data Export and Output Processing", "Data Storage and Structuring"], "domain": "healthcare", "output_file_name": ["acceleration_analysis.csv", "metabolic_trends.png"], "gold_file_name": ["result.csv", "result.png"], "eval_func": ["compare_model(output_file_name='acceleration_analysis.csv', gold_file_name='result.csv', calculate_columns=['first_diff', 'second_diff'], matched_columns=['dataset_source', 'biomarker_type', 'age_bin_start'], metric='mse', lower_bound=0, upper_bound=1)", "compare_image('metabolic_trends.png', 'result.png', calculate_columns=['type'])"], "post_process_func": ["image_post_process('metabolic_trends.png')", "image_post_process('result.png')"]} {"id": "healthcare_31", "question": "Identify the strongest clinical and lifestyle predictors of chronic disease burden across multiple patient populations through the following structured workflow: 1) Load and harmonize data from four clinical datasets covering diabetes, stroke, heart disease, and sleep disorders. For diabetes records, treat zero values in Glucose, BMI, and BloodPressure as missing before harmonization; 2) Create a unified analytical dataset by standardizing key biomarkers into common columns named 'age', 'glucose', 'bmi', and 'bp' (for the stroke dataset, use the 'hypertension' column as the 'bp' proxy), while defining a binary chronic condition indicator for each patient. After harmonization, drop records missing any of the four base biomarker columns before combining sources. Sample the stroke dataset after this filtering to at most 1000 records (random_state=42) to balance dataset sizes; 3) Engineer the following additional predictive features from the base biomarkers: 'glucose_bmi_ratio' computed as glucose/(bmi+1), 'age_glucose_interaction' computed as age*glucose/1000, and 'bp_bmi_ratio' computed as bp/(bmi+1). Also encode the data source as a numeric feature 'source_encoded' using label encoding. Fill any remaining missing values in the modeling feature matrix with column medians; 4) Apply recursive feature elimination with a random forest classifier (n_estimators=100, random_state=42, max_depth=10) to select the top 5 most predictive clinical features from the expanded feature set; 5) Perform principal component analysis (random_state=42) to reduce the dimensionality of the feature space and create 3 latent components named 'pca_component_1', 'pca_component_2', 'pca_component_3' that capture the majority of variance in the data; 6) Combine the selected features with principal components to create a hybrid feature representation; 7) Train a logistic regression model (max_iter=1000, random_state=42, C=1.0) on the standardized (using StandardScaler) hybrid features to predict chronic condition status; and 8) Extract and rank the coefficients of the final hybrid feature set by absolute magnitude, where the final feature set consists of the 5 RFE-selected features plus 3 PCA components; save the coefficient table to 'feature_coefficients.csv', save the selected feature list to 'selected_features.csv', create `feature_analysis.png` as a 1x2 figure showing the hybrid feature coefficients and PCA explained variance, and report the coefficient of the most important predictor as the final answer in 'top_coefficient.txt'.", "data_sources": ["Healthcare-Diabetes.csv", "healthcare-dataset-stroke-data.csv", "heart_disease_uci.csv", "Sleep_health_and_lifestyle_dataset.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Filtering and Transformation", "Column Selection and Consistency Checks", "Data Cleaning and Transformation", "Data Integration and Merging", "Data Preprocessing & Encoding", "Data Categorization & Mapping", "Data Structure Handling (Dictionaries, Lists)", "String Manipulation and Parsing", "Data Splitting and Sampling", "Handling Missing Data", "Array and Matrix Manipulation", "Data Transformation and Feature Engineering", "Feature Engineering and Embeddings", "Encoding and Vector Representation", "Feature Selection and Dimensionality Reduction", "Library Usage (Scikit-Learn)", "Dimensionality Reduction Techniques", "Stochasticity and Reproducibility", "Statistical Modeling and Uncertainty", "Model Training & Evaluation", "Preprocessing and Scaling", "Data Normalization and Preprocessing", "Data Preparation and Formatting", "Data Analysis and Visualization", "Data Manipulation and Summarization", "Sorting, Limiting, and Ranking", "Output and Logging", "Filtering and Sorting Correlation Data", "Data Export and Output Processing", "CSV Processing", "Data Storage and Structuring", "Visualization and Interpretation", "Visualization and Output Generation", "Image Handling and Exporting", "Formatting and Output Organization"], "domain": "healthcare", "output_file_name": ["feature_coefficients.csv", "selected_features.csv", "feature_analysis.png", "top_coefficient.txt"], "gold_file_name": ["result_coefficients.csv", "result_selected.csv", "result_plot.png", "result.txt"], "eval_func": ["compare_csv('feature_coefficients.csv', 'result_coefficients.csv', ignore_order=True, thresholds={1: 0.02})", "compare_csv('selected_features.csv', 'result_selected.csv', ignore_order=True)", "compare_image('feature_analysis.png', 'result_plot.png', calculate_columns=['type', 'ytick_labels', 'xtick_labels'])", "compare_text(output_file_name='top_coefficient.txt', gold_file_name='result.txt')"], "post_process_func": ["image_post_process('feature_analysis.png')", "image_post_process('result_plot.png')"]} {"id": "healthcare_33", "question": "A cancer research alliance is preparing a paper on the reliability of progression-free survival (PFI) as the survival endpoint for the TCGA cohort. Generate a 3×2 multi-panel chart that demonstrates how violation of the proportional hazards (PH) assumption affects Kaplan-Meier estimates and whether the competing risk model yields substantially different conclusions: (1) The top row shows, for 2 cancer types (excluding PanCancer) with PH test p-value < 0.05, a comparison of standard PFI Kaplan-Meier curves and competing risk PFI curves; (2) The middle row shows the same comparison for 2 cancer types (excluding PanCancer) with PH test FDR-corrected p-value ≥ 0.05; (3) The bottom-left panel is mapped to the source site through patient identifiers, comparing the institutional survival differences of breast cancer patients (using only institutions with ≥20 contributing cases), and the bottom-right panel shows the standard PFI vs competing risk PFI comparison for breast cancer patients. Each comparison panel in the top and middle rows should superimpose both curves with 95% confidence bands and include an embedded table showing PH test statistics. Also report the difference in median PFI time between the standard and competing risk models for the cancer type in the top-left panel, rounded to the nearest integer day. Save the chart as pfi_reliability_figure.png. Save the median difference result to output.txt in the format: 'Median PFI.time difference for {cancer_type}: {value} days'.", "data_sources": ["healthcare/TCGA-CDR-SupplementalTableS1.xlsx", "healthcare/labels.csv", "healthcare/Sleep_health_and_lifestyle_dataset.csv", "healthcare/healthcare-dataset-stroke-data.csv"], "skills": ["Data Import and Library Setup", "Directory and File Management", "File I/O and Multiline Record Handling", "File Existence and Access Verification", "Data Loading with Pandas", "Excel File Handling and Automation", "Pandas-Specific Operations", "Header and Metadata Processing", "Command-Line and Shell Operations", "Numerical Operations and Type Conversion", "Handling Missing Data", "Data Pattern Analysis & Diagnostics", "Data Type and Format Conversion", "Data Integration and Merging", "Join Operations and Merging", "Joining and Lookup Operations", "Statistical Analysis and Testing", "Categorical vs Numerical Type Identification", "Filtering and Criteria-Based Selection", "Conditional Aggregation and Filtering", "Data Inspection and Summarization", "Subplot and Layout Management", "Layout and Multi-Panel Visualizations", "Multiple Series/Traces Visualization", "Plot Customization and Annotation", "Error Bars and Statistical Summaries", "Data Preparation and Reshaping", "Time Difference and Gradient Calculation", "Incremental and Comparative Calculations", "Output and Logging", "Data Export and Output Processing"], "domain": "healthcare", "output_file_name": ["pfi_reliability_figure.png", "output.txt"], "gold_file_name": ["result_pfi_figure.png", "result.txt"], "eval_func": ["compare_image(output_file_name='pfi_reliability_figure.png', gold_file_name='result_pfi_figure.png', calculate_columns=['type'])", "compare_text(output_file_name='output.txt', gold_file_name='result.txt')"], "post_process_func": ["image_post_process(output_file_name='pfi_reliability_figure.png')", "image_post_process(output_file_name='result_pfi_figure.png')"]} {"id": "loan_model_13", "question": "Based on all log files in the log directory, find the model configuration (hyperparameters + scene info) with the highest test_auc across all training experiments. Output to output.json with format:\n{\"best_log_dir\": \"\", \"best_scene_id\": , \"best_test_auc\": , \"best_params\": {\"num_leaves\": , \"max_depth\": , \"learning_rate\": , \"num_iterations\": , \"feature_fraction\": }}", "skills": ["Path Construction and Manipulation", "File Existence and Access Verification", "Command-Line and Shell Operations", "File and Log Data Handling", "Data Storage and Structuring", "Directory Traversal and File Listing", "Indexing and ID Assignment", "Experiment Tracking & Version Control", "Model Evaluation & Tuning", "Model Evaluation & Generalization", "Hyperparameter Tuning Strategies", "Output and Logging", "Validation and Output Formatting", "Data Serialization & File Handling", "Model Saving & Versioning"], "domain": "loan_model", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"best_test_auc\": [0.5, 1.0]})"]} {"id": "loan_model_14", "question": "Analyze the relationship between hyperparameters and model performance across all trials. Group trials by learning_rate buckets (<0.02, 0.02-0.05, 0.05-0.1, >=0.1) and max_depth groups (3-4, 5-6, 7-8). Calculate the average test_auc for each combination. Output to output.json with format:\n{\"total_trials\": , \"sensitivity_matrix\": {\"lr_<0.02\": {\"depth_3-4\": , \"depth_5-6\": , \"depth_7-8\": }, \"lr_0.02-0.05\": {\"depth_3-4\": , \"depth_5-6\": , \"depth_7-8\": }, \"lr_0.05-0.1\": {\"depth_3-4\": , \"depth_5-6\": , \"depth_7-8\": }, \"lr_>=0.1\": {\"depth_3-4\": , \"depth_5-6\": , \"depth_7-8\": }}, \"best_combination\": {\"learning_rate_bucket\": \"\", \"max_depth_group\": \"\", \"avg_test_auc\": }}", "skills": ["Directory Traversal and File Listing", "Directory and File I/O", "Command-Line and Shell Operations", "File and Log Data Handling", "File Iteration and Traversal", "Experiment Tracking & Version Control", "Parsing and Reading Data Files", "Data Structure Understanding and Initialization", "Data Storage and Structuring", "Data Categorization & Mapping", "Data Grouping & Clustering", "Grouping and Index Assignment", "Statistical Analysis and Metrics", "Conditional Aggregation and Filtering", "Hyperparameter Tuning Strategies", "Array and Matrix Manipulation", "Data Serialization & File Handling", "Data Export and Output Processing", "Output and Logging", "Model Saving & Versioning"], "domain": "loan_model", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"total_trials\": [944, 944], \"best_combination\": {\"avg_test_auc\": [0.5, 1.0]}})"]} {"id": "loan_model_18", "question": "Analyze the return value structure differences across methods in the ModelEvaluator class. Output to output.json with format:\n{\"all_methods\": [\"\", \"\", ...], \"dataframe_methods\": [\"\", ...], \"dataframe_columns\": {\"\": [\"\", \"\", ...], ...}, \"common_columns\": [\"\", ...], \"dict_methods\": [\"\", ...]}", "skills": ["XML/HTML Parsing and XPath Navigation", "Parsing and Reading Data Files", "Data Inspection and Understanding", "Data Analysis and Pattern Extraction", "Data Structure Handling (Dictionaries, Lists)", "Data Structure Creation and Manipulation", "Set and Membership Analysis", "Formatting and Output Organization", "Data Storage and Structuring", "Data Serialization & File Handling"], "domain": "loan_model", "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={\"all_methods\": None, \"dataframe_methods\": None, \"dataframe_columns\": None, \"common_columns\": None, \"dict_methods\": None})"]} {"id": "loan_model_2", "question": "Using features.csv and label.csv, compute the correlation matrix for all features and remove highly correlated features (correlation coefficient > 0.8), keeping only one feature from each correlated group. Train an XGBoost model on the remaining features. Split data by time field (first 70% train, remaining 30% test). Output to output.json with format: {\"remaining_feature_count\": , \"train_auc\": , \"test_auc\": }", "skills": ["Data Loading with Pandas", "Data Integration and Merging", "Parsing and Reading Data Files", "Column-specific or Feature-wise Processing", "Column Iteration and Processing", "DataFrame Column Management", "Correlation Matrix Generation", "Statistical Correlation Analysis", "Correlation and Relationship Analysis", "Array and Matrix Manipulation", "Filtering and Sorting Correlation Data", "Feature Selection and Dimensionality Reduction", "Data Splitting and Sampling", "Time Series & Temporal Grouping", "Data Splitting and Leakage Prevention", "Indexing and Row-Level Operations", "Data Preparation and Formatting", "Data Preprocessing & Encoding", "Data Handling & Preparation", "Model Training & Optimization", "Model Configuration and Import", "Model Training & Evaluation", "Model Evaluation Metrics", "Library Usage (Scikit-Learn)", "Model Training and Inference", "Data Serialization & File Handling", "Data Export and Output Processing", "Data Storage and Structuring"], "domain": "loan_model", "data_sources": ["features.csv", "label.csv"], "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"train_auc\": [0.5, 1.0], \"test_auc\": [0.5, 1.0]})"], "post_process_func": []} {"id": "loan_model_20", "question": "Compare and analyze the design differences between two enhancement classes in the carisk.enhance module. Output to output.json with format:\n{\"class_names\": [\"\", \"\"], \"enhancer_params\": [\"\", ...], \"finetune_enhancer_params\": [\"\", ...], \"shared_params\": [\"\", ...], \"enhancer_only_params\": [\"\", ...], \"finetune_only_params\": [\"\", ...], \"data_required_for_enhancer\": [\"\", ...], \"data_required_for_finetune\": [\"\", ...], \"strategy_recommendation\": {\"has_pretrained_model\": \"\", \"no_pretrained_model\": \"\"}}", "skills": ["XML/HTML Parsing and XPath Navigation", "Parsing and Reading Data Files", "Data Inspection and Understanding", "Data Analysis and Pattern Extraction", "Data Comparison and Validation", "Data Structure Handling (Dictionaries, Lists)", "Data Structure Creation and Manipulation", "Set and Membership Analysis", "Combinatorics and Set Operations", "Formatting and Output Organization", "Data Storage and Structuring", "Data Serialization & File Handling"], "domain": "loan_model", "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={\"class_names\": None, \"enhancer_params\": None, \"finetune_enhancer_params\": None, \"shared_params\": None, \"enhancer_only_params\": None, \"finetune_only_params\": None, \"data_required_for_enhancer\": None, \"data_required_for_finetune\": None, \"strategy_recommendation\": {\"has_pretrained_model\": None, \"no_pretrained_model\": None}})"]} {"id": "loan_model_3", "question": "Using features.csv and label.csv, apply equal-frequency binning with exactly 10 bins to all features starting with 'f', then calculate Weight of Evidence (WOE) for each bin. Train a Logistic Regression model using the WOE-encoded features. Split data by time field (first 70% train, remaining 30% test). Output to output.json with format: {\"bin_count\": , \"train_auc\": , \"test_auc\": , \"train_ks\": , \"test_ks\": }", "skills": ["Data Loading with Pandas", "Data Integration and Merging", "Parsing and Reading Data Files", "Column-specific or Feature-wise Processing", "Data Filtering and Matching", "Pattern Identification & Extraction", "Data Splitting and Sampling", "Time Series & Temporal Grouping", "Indexing and Row-Level Operations", "Data Binning and Grid Creation", "Data Categorization & Mapping", "Vectorization and Performance Optimization", "Data Structure Handling (Dictionaries, Lists)", "Array and Matrix Manipulation", "Data Preprocessing & Encoding", "Encoding and Vector Representation", "In-place vs Copy Operations", "Data Collection and Preparation", "Data Preparation and Formatting", "Model Training & Optimization", "Model Training and Customization", "Model Configuration and Import", "Stochasticity and Reproducibility", "Model Evaluation Metrics", "Model Evaluation & Validation", "Library Usage (Scikit-Learn)", "Data Serialization & File Handling", "Data Storage and Structuring", "Data Export and Output Processing"], "domain": "loan_model", "data_sources": ["features.csv", "label.csv"], "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"bin_count\": [10, 10], \"train_auc\": [0.5, 1.0], \"test_auc\": [0.5, 1.0], \"train_ks\": [0.1, 1.0], \"test_ks\": [0.1, 1.0]})"], "post_process_func": []} {"id": "loan_model_5", "question": "Using features.csv and label.csv, first train an XGBoost model with all features, then identify the top 15 most important features. Retrain a new LGBM model using exactly these 15 features. Split data by time field (first 70% train, remaining 30% test). Compare the test AUC between the full model and the simplified model. Output to output.json with format: {\"full_model_test_auc\": , \"simplified_model_test_auc\": , \"selected_feature_count\": }", "skills": ["Data Loading with Pandas", "Data Integration and Merging", "Column-specific or Feature-wise Processing", "DataFrame Column Management", "Data Splitting and Sampling", "Time-based Transformations", "Indexing and Row-Level Operations", "Data Preparation and Formatting", "Data Preprocessing & Encoding", "Model Configuration and Import", "Model Training & Evaluation", "Feature Selection and Dimensionality Reduction", "Filtering and Sorting Correlation Data", "Model Evaluation & Validation", "Library Usage (Scikit-Learn)", "Data Preprocessing and Column Management", "Stochasticity and Reproducibility", "Model Evaluation Metrics", "Data Serialization & File Handling", "Data Export and Output Processing"], "domain": "loan_model", "data_sources": ["features.csv", "label.csv"], "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"full_model_test_auc\": [0.5, 1.0], \"simplified_model_test_auc\": [0.5, 1.0], \"selected_feature_count\": [15, 15]})"], "post_process_func": []} {"id": "loan_model_8", "question": "Using features.csv and label.csv, train an XGBoost model and compute SHAP values for all features. Select exactly the top 20 features with highest mean absolute SHAP values. Retrain a new model using only these 20 features and compare performance. Split data by time field (first 70% train, remaining 30% test). Output to output.json with format: {\"selected_feature_count\": , \"original_test_auc\": , \"refined_test_auc\": }", "skills": ["Data Loading with Pandas", "Data Integration and Merging", "Join Operations and Merging", "Parsing and Reading Data Files", "Column-specific or Feature-wise Processing", "Column Iteration and Processing", "Column Selection and Consistency Checks", "Data Filtering and Matching", "Data Splitting and Sampling", "Temporal Validation and Comparison", "Time Series & Temporal Grouping", "Time-based Filtering and Matching", "Indexing and Row-Level Operations", "Data Preparation and Formatting", "Data Preprocessing & Encoding", "Model Configuration and Import", "Model Training & Evaluation", "Model Training & Optimization", "Model Training and Customization", "Model Evaluation & Validation", "Model Evaluation Metrics", "Model Prediction and Output Handling", "Visualization and Interpretation", "Model Development and Interpretation", "Feature Selection and Statistical Computation", "Sorting, Limiting, and Ranking", "Feature Selection and Dimensionality Reduction", "Array and Matrix Manipulation", "Preprocessing and Scaling", "Data Preprocessing and Column Management", "Model Evaluation & Tuning", "Data Serialization & File Handling", "Data Export and Output Processing", "Formatting and Output Organization"], "domain": "loan_model", "data_sources": ["features.csv", "label.csv"], "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"selected_feature_count\": [20, 20], \"original_test_auc\": [0.5, 1.0], \"refined_test_auc\": [0.5, 1.0]})"], "post_process_func": []} {"id": "loan_model_9", "question": "Using features.csv and label.csv, first analyze the missing rate of each feature and remove features with missing rate above 30%. For remaining features, fill missing values with median. Apply SMOTE oversampling on the training set to balance the classes to approximately 50% positive ratio, then train an LGBM model. Split data by time field (first 70% train, remaining 30% test). Output to output.json with format: {\"train_positive_ratio_after_smote\": , \"test_ks\": }", "skills": ["Data Loading with Pandas", "Data Integration and Merging", "Column-specific or Feature-wise Processing", "Column Selection and Consistency Checks", "DataFrame Column Management", "Handling Missing Data", "Data Pattern Analysis & Diagnostics", "Data Splitting and Sampling", "Time Series & Temporal Grouping", "Data Splitting and Leakage Prevention", "Indexing and Row-Level Operations", "Imputation Methods", "Statistical and Mathematical Modeling", "Handling Class Imbalance and Resampling", "Class Distribution Management", "Sampling Techniques", "Stochasticity and Reproducibility", "Model Training & Evaluation", "Model Training and Customization", "Model Configuration and Import", "Statistical Analysis and Testing", "Library Usage (Scikit-Learn)", "Data Serialization & File Handling", "Data Export and Output Processing", "Data Storage and Structuring"], "domain": "loan_model", "data_sources": ["features.csv", "label.csv"], "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"train_positive_ratio_after_smote\": [0.5, 0.5], \"test_ks\": [0.0, 1.0]})"], "post_process_func": []} {"id": "loan_risk_1", "question": "Given a risk control dataset containing model scores to be evaluated and true labels (including fields: `apply_date` in date format, `scene_code` as scene identifier, `score` as the model score to be evaluated, `label` as the true label 0 or 1). Please use Python to calculate and output a performance summary report, saved as 'output.csv'. The report should include the following two parts:\n\n1. Overall performance by scene: Calculate the overall AUC and KS metrics for each `scene_code` (at this time, the `month` field should be filled with 'All').\n2. Monthly performance by scene: Extract the month from `apply_date` (format YYYY-MM), and calculate the monthly AUC and KS metrics for each `scene_code`.\n\nThe output table schema must strictly contain the following 4 columns: `scene_code`, `month`, `auc`, `ks`. Please round the `auc` and `ks` values to 4 decimal places.", "skills": ["Arithmetic and Cumulative Calculations", "Difference and Trend Computation", "Array and Matrix Manipulation", "Statistical Analysis and Metrics", "Mathematical and Statistical Computations", "Helper Functions and Reusable Code", "Data Loading with Pandas", "Parsing and Reading Data Files", "Batch Processing and Performance Optimization", "Date and Time Conversion", "Time Formatting and String Manipulation", "Ranking and Scoring Mechanisms", "Column/Row-wise Computations", "Indexing and Row-Level Operations", "Data Export and Output Processing", "Data Serialization & File Handling"], "domain": "loan_risk/loan_risk_1", "output_file_name": ["output_1.csv", "output_2.csv"], "gold_file_name": ["result_1.csv", "result_2.csv"], "eval_func": ["compare_csv(output_file_name='output_1.csv', gold_file_name='result_1.csv', ignore_order=True, specified_columns=['scene_code', 'month', 'auc', 'ks'], thresholds={3: 0.02, 4: 0.02})", "compare_csv(output_file_name='output_2.csv', gold_file_name='result_2.csv', ignore_order=True, specified_columns=['scene_code', 'month', 'auc', 'ks'], thresholds={3: 0.02, 4: 0.02})"]} {"id": "loan_risk_10", "question": "Given `input.csv` with `column_1`, `column_2`, and `label`, create a crossed feature `column_1_2_mix` using deterministic monotonic aggregation binning. Treat missing values in either feature as an explicit categorical value `MISSING`. Build crossed cells from `(column_1, column_2)`, compute each cell's positive sample rate, sort cells by positive sample rate ascending, and break ties by stringified `column_1` then stringified `column_2`. Greedily merge adjacent cells so each closed bin contains at least 5% of all rows; if the final remaining bin is below 5%, merge it into the previous bin. Merge adjacent bins as needed so the final bin positive rates are strictly increasing and the number of bins is between 2 and 10. Assign integer bin IDs from 0 upward in increasing positive-rate order. Save `output.csv` with `column_1`, `column_2`, `column_1_2_mix`, `label`, preserving the original input row order.", "skills": ["Data Loading with Pandas", "CSV Processing", "Parsing and Reading Data Files", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Column-wise Transformations and Aggregation", "Sorting, Limiting, and Ranking", "Monotonicity and Trend Analysis", "Data Structure Handling (Dictionaries, Lists)", "Data Binning and Grid Creation", "Threshold-Based Categorization or Filtering", "Handling Missing or Edge Cases", "Custom Functions for Missing Value Handling", "Custom Value Replacement and Correction", "Array and Matrix Manipulation", "Column Manipulation / Creation", "Data Transformation and Column Manipulation", "Function Application and Vectorization", "Data Export and Output Processing", "Column Selection and Consistency Checks"], "domain": "loan_risk/loan_risk_10", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_model(output_file_name='output.csv', gold_file_name='result.csv', calculate_columns=['column_1_2_mix'], metric='mae', lower_bound=0, upper_bound=1e-6)", "compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['column_1', 'column_2', 'column_1_2_mix', 'label'])"], "post_process_func": []} {"id": "loan_risk_11", "question": "Given a CSV file containing two columns of data (a feature column and a label column). Please use the feature column to perform binning and feature mining with the following specific requirements:\n\n1. Find low-risk customer segments: Look for a low-risk rule segment in the feature (such as `feature value <= some threshold` or an interval).\n2. Constraints: The risk lift of this customer segment must be strictly below 0.6, and its coverage rate (i.e., number of samples in this segment / total number of samples) must be greater than 2%. If there are multiple segments meeting the conditions, please select the one with the largest coverage rate.\n3. Output data: Tag the original data based on the found segment, generate a new column `column_1_pos` (if meeting this low-risk rule, group into one bin/mark as 1, otherwise mark as 0). Finally save the data as `output.csv`, the schema must strictly and only contain three columns: `column_1`, `column_1_pos`, `label`.", "skills": ["Data Loading with Pandas", "CSV Processing", "Mathematical and Statistical Computations", "Column/Row-wise Computations", "Handling Missing Data", "Handling Missing or Edge Cases", "In-place vs Copy Operations", "Percentage and Variation Calculations", "Thresholding and Validation", "Statistical Analysis and Metrics", "Conditional Logic and Row-wise Operations", "Column-specific or Conditional Logic", "Array and Matrix Manipulation", "Conditional Data Processing", "Data Filtering and Transformation", "Handling Null or Unmatched Values", "Data Export and Output Processing", "Column Selection and Consistency Checks"], "domain": "loan_risk/loan_risk_11", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['column_1', 'column_1_pos', 'label'])"], "post_process_func": []} {"id": "loan_risk_13", "question": "Given a detailed dataset of customer customized model invocation records. Calculate the top 2 tenants by daily invocation count and save a wide summary table to `output.csv` with columns: `apply_date`, `tenant_top1`, `tenant_top1_cnt`, `tenant_top1_match_rate`, `tenant_top2`, `tenant_top2_cnt`, `tenant_top2_match_rate`.\n\nUse the date part of `gmt_occur` as `apply_date` in `YYYY-MM-DD` format. For each day, `match_rate = tenant_cnt / total_invocations_that_day`, rounded to 4 decimal places. Rank tenants by invocation count descending and break ties by tenant name ascending. Sort output rows by `apply_date` ascending.", "skills": ["Date and Time Conversion", "Data Loading with Pandas", "Data Aggregation and Grouping", "Time Series & Temporal Grouping", "Statistical Analysis and Metrics", "Percentage and Variation Calculations", "Data Filtering and Matching", "Ranking and Top N Logic", "Sorting, Limiting, and Ranking", "Formatting and Output Organization", "Indexing and Row-Level Operations", "Data Export and Output Processing", "Data Storage and Structuring"], "domain": "loan_risk/loan_risk_13", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['apply_date', 'tenant_top1', 'tenant_top1_cnt', 'tenant_top1_match_rate', 'tenant_top2', 'tenant_top2_cnt', 'tenant_top2_match_rate'])"]} {"id": "loan_risk_14", "question": "Given a desensitized customer customized model invocation record dataset (including: invocation time, desensitized phone number identifier, product name, tenant name, model score). To reduce server pressure, the system adopts a caching strategy for the same phone number: when a phone number makes an invocation, if no cache is available or the cache has expired, actual calculation is triggered and a new cache is generated (record this time as the cache start time); if an invocation occurs within the valid time window of that cache, it is considered a cache hit (and the start time of this cache is not updated).\n\nPlease simulate the above caching logic, traverse the records in chronological order, and calculate the cache usage rate when the cache validity period is set to 1 hour, 3 hours, and 6 hours respectively.\n\nPlease save the calculation results of the three scenarios as `output.csv`. The output CSV file should have only one valid row of data, the schema must strictly contain and only contain three columns: `cache_1h_rate`, `cache_3h_rate`, `cache_6h_rate`. All ratio values should be rounded to 4 decimal places.", "skills": ["Timestamp Conversion and Time Manipulation", "Data Loading with Pandas", "Temporal Validation and Comparison", "Conditional Aggregation and Filtering", "Custom Function Development for Time Logic", "Percentage and Variation Calculations", "Cumulative and Row-wise Operations", "Incremental and Comparative Calculations", "Data Export and Output Processing", "Data Storage and Structuring"], "domain": "loan_risk/loan_risk_14", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['cache_1h_rate', 'cache_3h_rate', 'cache_6h_rate'])"]} {"id": "loan_risk_15", "question": "Given a risk control modeling dataset (including date column, feature columns, and label column). Please use Python and LightGBM to build a risk control model with the following specific requirements:\n\n1. Sample split: Use data from '20250501' to '20250731' as the training set, and data from '20250801' to '20250831' as the test set.\n2. Features and label: Use feature variable sets `aft_v4_f0`~`aft_v4_f44` and `pac_v2_x0`~`pac_v2_x27` for training. The target label is `label_6pd_30`.\n3. Model configuration: Use LightGBM algorithm for modeling, requiring the maximum depth of decision trees (max_depth) to not exceed 5.\n4. Model performance and business constraints:\n - The KS value on the test set must not be lower than 0.1.\n - The customized score must maintain trend consistency with the feature `als_m1_id_nbank_orgnum` (multi-head count): perform 10 equal-frequency binning on the model scores of the test set, and the mean of `als_m1_id_nbank_orgnum` for the bins with higher scores (i.e., higher risk groups) should also show strict monotonically increasing trend.\n\nFinally, please use the trained model to score the test set, and save the test set scoring results to `output.csv`. The output CSV file must contain and only contain two columns: `example_id` (assuming this primary key exists in the dataset or keep the original index/ID column of the test set) and `score` (model prediction score).", "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Splitting and Sampling", "Data Splitting and Leakage Prevention", "In-place vs Copy Operations", "Data Preparation and Formatting", "Column-specific or Feature-wise Processing", "Model Configuration and Import", "Hyperparameter Tuning Strategies", "Stochasticity and Reproducibility", "Model Training & Evaluation", "Model Training and Customization", "Model Prediction and Output Handling", "Classification and Prediction Modeling", "Statistical Analysis and Testing", "Data Export and Output Processing", "Data Serialization & File Handling"], "domain": "loan_risk/loan_risk_15", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_model(output_file_name='output.csv', gold_file_name='result.csv', matched_columns=['example_id'], calculate_columns=['score'], metric='ks', lower_bound=0.1, upper_bound=1.0)"]} {"id": "loan_risk_2", "question": "Given a dataset containing a date column `apply_date` and a model score column `score_0`. Please aggregate the data by month (format YYYY-MM) and calculate the following two metrics: 1. Monthly PSI of score_0: Use the samples from the latest month in the dataset as the base to calculate the PSI for each of the other months. 2. Adjacent month PSI of score_0: Use the samples from the previous month as the base to calculate the PSI for the current month (the first month is not calculated or set to empty). Finally, please draw a line chart based on the calculated data and save it as `output.png`. Chart requirements: the x-axis is time (month), the y-axis is PSI value, plot two lines in the same chart to represent the above two PSI metrics, and include a legend for differentiation.", "skills": ["Data Loading with Pandas", "Data Conversion and Post-Loading Processing", "Date and Time Conversion", "Parsing and Reading Data Files", "Batch Processing and Performance Optimization", "Time Formatting and String Manipulation", "Sorting, Limiting, and Ranking", "Percentage and Variation Calculations", "Data Transformation and Calculation", "Difference and Trend Computation", "Arithmetic and Cumulative Calculations", "Array and Matrix Manipulation", "Temporal Validation and Comparison", "Incremental and Comparative Calculations", "Pandas-Specific Operations", "Formatting and Output Organization", "Plot Customization and Layout", "Plot Creation and Configuration", "Plot Customization (Aesthetics)", "Image Handling and Exporting", "Line Collection Customization"], "domain": "loan_risk/loan_risk_2", "output_file_name": ["output.png"], "gold_file_name": ["result.png"], "eval_func": ["compare_image(output_file_name='output.png', gold_file_name='result.png', calculate_columns=['type'])"], "post_process_func": ["image_post_process(output_file_name='output.png')", "image_post_process(output_file_name='result.png')"]} {"id": "loan_risk_20", "question": "Given a risk control dataset containing high-cardinality categorical features (fields include: high-cardinality categorical feature (province name), dataset split field, and true label). Please complete Chi-Merge binning and WOE encoding tasks with the following specific requirements:\n\n1. Binning and encoding training: Only on the training set, perform Chi-Merge binning operation on the high-cardinality categorical feature, and calculate the WOE value for each bin. The constraints are as follows:\n - The number of bins (including the missing value bin) must not exceed 5.\n - The proportion of samples in each bin relative to the total samples in the training set must not be less than 5%.\n - The WOE encoding values of each bin after forced binning must show strict monotonic ordering (monotonically increasing or decreasing is acceptable).\n2. Mapping application: Apply the WOE encoding rules obtained from the training set to the entire dataset containing all samples. Add a new column named `prov_name_woe` to the original table, saving the mapped WOE encoding values.\n\nFinally, please save the processed complete dataset as `output.csv`. The output schema must strictly contain and only contain the following four columns: `prov_name`, `flag`, `label`, `prov_name_woe`. The values of `prov_name_woe` should be rounded to 4 decimal places.", "skills": ["Parsing and Reading Data Files", "Data Loading with Pandas", "Directory and File I/O", "Command-Line and Shell Operations", "Data Binning and Grid Creation", "Column-wise Transformations and Aggregation", "In-place vs Copy Operations", "Array and Matrix Manipulation", "Data Structure Handling (Dictionaries, Lists)", "Data Categorization & Mapping", "Data Preprocessing & Encoding", "Handling Null or Unmatched Values", "Data Export and Output Processing", "Data Serialization & File Handling", "Formatting and Output Organization"], "domain": "loan_risk/loan_risk_20", "gold_file_name": ["result.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['prov_name', 'flag', 'label', 'prov_name_woe'], thresholds={4: 0.02})"]} {"id": "loan_risk_25", "question": "Input: Risk control modeling dataset `input.csv`, containing sample unique identifier `rowkey`, application date `apply_date`, scene identifier column `scene_code`, dataset split column `flag`, label column `label`, and modeling feature columns (`aft_v4_f0`~`aft_v4_f44` and `pac_v2_x0`~`pac_v2_x27`). Missing values in modeling features are filled with -1.\n\nOutput: Please process and output results according to the following flow:\n1. Data preparation: Generate `weight` weight column, balance good and bad samples under each `scene_code`.\n2. Model training: Use LGBM algorithm for modeling (require tree depth not to exceed 4), and use `AUC_mean` (scene average AUC) as the evaluation function `eval_metric` for model training with sample weights.\n3. Sample scoring: Generate full sample scoring details excluding modeling feature information, and save the results as `output_1.csv`. The table must contain the following 6 specific column names: `rowkey`, `split_flag` (i.e., the original dataset split column flag), `score` (model prediction score), `apply_date`, `scene_code`, `label`.\n4. Metric evaluation: Calculate model performance metrics under each dataset split, and save the evaluation results as `output_2.csv`. The table must contain the following 9 specific column names: `group` (dataset split identifier, e.g., 1.train), `period` (time span), `sample` (total sample size), `bad_sum` (bad sample count), `good_sum` (good sample count), `bad_rate` (bad sample proportion), `auc`, `ks`, `lift` (top 10% LIFT).", "skills": ["Parsing and Reading Data Files", "Data Loading with Pandas", "Directory and File I/O", "Command-Line and Shell Operations", "Handling Class Imbalance and Resampling", "Weighted Aggregation and Summation", "Class Distribution Management", "Array and Matrix Manipulation", "Model Training & Optimization", "Model Training and Customization", "Model Training & Evaluation", "In-place vs Copy Operations", "Ranking and Scoring Mechanisms", "Statistical Analysis and Metrics", "Model Evaluation Metrics", "Library Usage (Scikit-Learn)", "Mathematical and Statistical Computations", "Model Evaluation & Generalization", "Data Export and Output Processing", "Formatting and Output Organization", "Data Serialization & File Handling", "Data Storage and Structuring"], "domain": "loan_risk/loan_risk_25", "gold_file_name": ["result_1.csv", "result_2.csv"], "output_file_name": ["output_1.csv", "output_2.csv"], "eval_func": ["compare_csv(output_file_name='output_1.csv', gold_file_name='result_1.csv', ignore_order=True, thresholds={2: 0.02})", "compare_csv(output_file_name='output_2.csv', gold_file_name='result_2.csv', ignore_order=True, thresholds={6: 0.02, 7: 0.02, 8: 0.02})"]} {"id": "loan_risk_3", "question": "Given a tabular dataset containing model scores to be evaluated (including main fields: `apply_date` in date format, `scene_code` as scene identifier, and multiple score columns: `cro_general`, `cro_general_reg`, `cro_general_mle`, `cro_sceneid`). Please use Python to calculate and output stability metrics summary reports, saved in CSV format as 'output_1.csv' and 'output_2.csv'. Specific requirements are as follows:\n\n1. Group by `scene_code` (scene) and the month extracted from `apply_date` (format YYYYMM).\n2. For each score column, calculate the following stability metrics:\n - `psi`: Use the sample distribution of the latest month in each scene as the base, and calculate the PSI for each month using 2 buckets.\n - `missing_per`: Missing rate (number of missing values / total sample size, rounded to 4 decimal places).\n - `missing`: Number of missing values.\n - `unique`: Number of unique non-null values.\n - `bin_point_rate`: Distribution of values across buckets (10 buckets for output_1.csv, 2 buckets for output_2.csv).\n\n3. Generate two output files:\n - output_1.csv: Baseline statistics aggregating all data for each scene and score column, with dt_col=197001.\n - output_2.csv: Monthly statistics for each scene, score column, and month.\n\nThe output table schema must strictly contain the following 10 columns: `scene_col`, `monitor_col`, `count`, `missing`, `missing_per`, `special_per`, `unique`, `psi`, `bin_point_rate`, `dt_col`.", "skills": ["Percentage and Variation Calculations", "Mathematical and Statistical Computations", "Normalization and Percentile Calculations", "Conditional Aggregation and Filtering", "Data Binning and Grid Creation", "Parsing and Reading Data Files", "CSV Processing", "Data Conversion and Post-Loading Processing", "Batch Processing and Performance Optimization", "Numerical Data Handling", "Handling Missing Data", "Statistical Analysis and Metrics", "Incremental and Comparative Calculations", "Sorting, Limiting, and Ranking", "Data Export and Output Processing", "Data Serialization & File Handling", "Formatting and Output Organization"], "domain": "loan_risk/loan_risk_3", "output_file_name": ["output_1.csv", "output_2.csv"], "gold_file_name": ["result_1.csv", "result_2.csv"], "eval_func": ["compare_csv(output_file_name='output_1.csv', gold_file_name='result_1.csv', ignore_order=True, specified_columns=['scene_col', 'monitor_col', 'count', 'missing', 'missing_per', 'special_per', 'unique', 'psi', 'bin_point_rate', 'dt_col'], thresholds={7: 0.02})", "compare_csv(output_file_name='output_2.csv', gold_file_name='result_2.csv', ignore_order=True, specified_columns=['scene_col', 'monitor_col', 'count', 'missing', 'missing_per', 'special_per', 'unique', 'psi', 'bin_point_rate', 'dt_col'], thresholds={7: 0.02})"], "post_process_func": []} {"id": "loan_risk_31", "question": "Input: Dataset `input.csv` containing sample model prediction results and actual labels. The `'score'` column represents model prediction score (probability), `'raw_label_mob3'` column represents true good/bad label (0 or 1), and also contains `uniq_id` (primary key), `split_flag` (dataset split flag), `apply_date` (application date) and other fields.\n\nOutput: Please calculate the cross-entropy loss (i.e., logloss) for each sample to measure model prediction error. After calculation, save this error as a new column `sample_logloss`. Then, sort by `sample_logloss` in descending order, and filter out the **5%** of samples with the highest model prediction error (i.e., highest logloss). Output these filtered samples as a DataFrame and save as `output.csv`. The output table must contain the following 6 specific column names:\n- `uniq_id`: Sample primary key\n- `split_flag`: Dataset split flag (e.g., 1.train, 2.valid, 3.oot)\n- `score`: Model prediction score\n- `apply_date`: Application date\n- `raw_label_mob3`: True label\n- `sample_logloss`: Sample-level prediction error (logloss)", "skills": ["Parsing and Reading Data Files", "Header and Metadata Processing", "Data Filtering and Matching", "Data Loading with Pandas", "Entropy and Log Probability Calculations", "Conditional Logic and Row-wise Operations", "Data Transformation and Calculation", "Array and Matrix Manipulation", "Sorting, Limiting, and Ranking", "Ranking and Top N Logic", "Data Export and Output Processing", "Formatting and Output Organization", "Data Serialization & File Handling"], "domain": "loan_risk/loan_risk_31", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, thresholds={2: 0.02, 5: 0.02})"], "post_process_func": []} {"id": "loan_risk_33", "question": "Input: Table 1 `input_1.csv` is a table containing only primary key `id` and kv features `kv_features` (feature format like `{1:0.024591, 2:0.073246, 3:0.995855}`); Table 2 `input_2.csv` is a feature importance ranking table, containing fields `feature_name`, `gain`, `split_count`. Where `feature_name` has format `column_k` (`k` refers to the key corresponding to this feature in Table 1's `kv_features`, e.g., `column_6` corresponds to key 6). The input data guarantees that `kv_features` in Table 1 is a superset of features in Table 2.\n\nOutput: Please filter Table 1's `kv_features` based on the feature list in Table 2, only extract corresponding features that exist in Table 2, and combine the extracted results into a new kv feature field, named `filtered_kv_feature_str`. Save the final results as `output.csv`, the output table must contain the following 2 specific column names:\n- `id`: Primary key id\n- `filtered_kv_feature_str`: Filtered kv feature column", "skills": ["Parsing and Reading Data Files", "Column-specific or Feature-wise Processing", "CSV Processing", "Header and Metadata Processing", "Data Filtering and Matching", "Data Structure Handling (Dictionaries, Lists)", "Data Export and Output Processing"], "domain": "loan_risk/loan_risk_33", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "post_process_func": []} {"id": "loan_risk_35", "question": "Input: Table 1 `input_1.csv` is a table containing primary key `id` and KV features (feature format like `{1:0.024591, 2:0.073246}`); Table 2 `input_2.csv` is a feature mapping table, containing fields `feature_name` and `detail`. Where `feature_name` has format `column_k` (`k` refers to the key corresponding to this feature in Table 1's KV features, e.g., `column_6` corresponds to key 6 in Table 1), `detail` is the actual meaning name of the feature.\n\nOutput: Please replace all keys in Table 1's KV features with corresponding `detail` based on Table 2's mapping relationship, and save the results as `output.csv`. The output table must contain the following 2 specific column names:\n- `id`: Primary key id\n- `kv_features_with_names`: KV feature column after key replacement", "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Structure Handling (Dictionaries, Lists)", "Dictionary Manipulation and Construction", "Mapping and Lookup", "Text & String Manipulation", "Custom Value Replacement and Correction", "Document and Key-Value Transformations", "Data Serialization & File Handling", "Data Export and Output Processing"], "domain": "loan_risk/loan_risk_35", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"], "post_process_func": []} {"id": "loan_risk_36", "question": "Input: A modeling dataset named `input.csv`, containing primary key `uniq_id`, date field `apply_date`, label `label_6pd_30` (assume 1 is bad sample, 0 is good sample), and feature columns `aft_v5_f0`~`aft_v5_f79` and `pac_v5_x0`~`pac_v5_x30`.\n\nOutput: Please process the data according to the following steps, and save the statistical results as `output.csv`:\n1. Data split: Extract samples with `apply_date` in the period 20250501~20250731 for train and valid set split, require the train and valid sample ratio to be strictly controlled at 3:7, and use stratified sampling to ensure the proportion of `label_6pd_30`=1 in both datasets is as consistent as possible. Samples from other time periods are classified as oot set.\n2. Equal-frequency binning: For the three prepared datasets (train, valid, oot), perform equal-frequency binning (5 bins) on all specified features.\n3. Metric calculation and output schema: Calculate metrics for each feature in corresponding bins under each dataset, the output table must contain the following specific column names:\n - `data_type`: Dataset identifier (train, valid, oot)\n - `feature`: Feature name\n - `bins`: Bin range\n - `sample_size`: Total sample size in this bin\n - `good`: Good sample count in this bin\n - `bad`: Bad sample count in this bin\n - `bin_bad_rate`: Bad sample proportion in this bin\n - `total_bad_rate`: Overall bad sample proportion in dataset\n - `woe`: WOE value of this bin\n - `bin_iv`: IV value of this bin\n - `bin_ks`: KS value of this bin\n - `iv`: Total IV value of this feature in this dataset\n - `ksmax`: Maximum KS value of this feature in this dataset\n - `lift`: Lift value of this bin\n - `cum_lift`: Cumulative Lift value", "skills": ["Parsing and Reading Data Files", "Data Loading with Pandas", "Column-specific or Feature-wise Processing", "Column Iteration and Processing", "Batch Processing and Performance Optimization", "Data Splitting and Sampling", "Data Splitting and Leakage Prevention", "Temporal Validation and Comparison", "Class Distribution Management", "In-place vs Copy Operations", "Stochasticity and Reproducibility", "Mathematical and Statistical Computations", "Statistical Analysis and Metrics", "Data Binning and Grid Creation", "Statistical Calculations and Quantiles", "Conditional Aggregation and Filtering", "Data Export and Output Processing", "Formatting and Output Organization", "Data Storage and Structuring", "Data Serialization & File Handling"], "domain": "loan_risk/loan_risk_36", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, thresholds={8: 0.02, 9: 0.02, 10: 0.02, 11: 0.02, 12: 0.02, 13: 0.02, 14: 0.02})"]} {"id": "loan_risk_37", "question": "Please process the input sample information table `input.csv` (containing fields: rowkey, raw_bin, inc) with the following logic: First, discretize the original income (inc) field into bins according to interval boundaries `[0, 4000, 6000, 8000, 10000, 14000, 20000, 30000, np.inf]`, generate a new binning field `new_bin`; then compare the generated `new_bin` with the income binning result `raw_bin` from other sources in the original data, evaluate the consistency between the two. Finally, output and save the summary consistency metric results to the `output.csv` file. The output table must strictly contain the following 3 columns: `total` (total sample count), `consistent_count`, `consistent_rate`.", "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "CSV Processing", "Data Binning and Grid Creation", "Interval and Range Operations", "Array and Matrix Manipulation", "Conditional Aggregation and Filtering", "Data Comparison and Validation", "Row-wise and Column-wise Logical Evaluation", "Percentage and Variation Calculations", "Formatting and Output Organization", "Data Export and Output Processing"], "domain": "loan_risk/loan_risk_37", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"]} {"id": "loan_risk_4", "question": "Given two feature dataset files containing the same samples, `input_1.csv` and `input_2.csv`, align both files by `rowkey` ascending before comparing feature values. Compare every feature column except `rowkey`. Treat `-999` as missing (`NaN`). A sample has a deviation for a feature if exactly one side is missing, or if both values are present and `abs(val1 - val2) > 1e-6`. Exclude samples where both sides are missing from the denominator. For each feature, output `feature_name` and `diff_ratio`, rounded to 4 decimal places, to `output.csv`. Keep the original feature names, including the `_filled` suffix, and output rows in the same order as the input feature columns.", "skills": ["Data Loading with Pandas", "CSV Processing", "Sorting, Limiting, and Ranking", "Row and Index Handling", "Custom Value Replacement and Correction", "Handling Missing or Edge Cases", "Array and Matrix Manipulation", "Column-specific or Feature-wise Processing", "Column Selection and Consistency Checks", "Handling Missing Data", "Numerical Comparison and Proximity Checks", "Difference and Trend Computation", "Conditional Aggregation and Filtering", "Percentage and Variation Calculations", "Arithmetic and Cumulative Calculations", "Data Export and Output Processing"], "domain": "loan_risk/loan_risk_4", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['feature_name', 'diff_ratio'])"], "post_process_func": []} {"id": "loan_risk_41", "question": "Read two feature scoring data tables `input_1.csv` and `input_2.csv`, both containing `id`, `uniq_id`, `score`, and `feature_json`. Join the two tables on `id`, compute `gap_score = round(abs(score_1 - score_2), 6)`, and keep only rows where `gap_score > 0.0001`. For the retained rows, parse `feature_json` and output `uniq_id_1`, `id_1`, `uniq_id_2`, `id_2`, `score_1`, `score_2`, `gap_score`; parsed feature values for `aft_v4_f0`, `aft_v4_f1`, `aft_v4_f2`, `aft_v4_f3`, `aft_v4_f4`, `aft_v4_f5`, `aft_v4_f6`, `aft_v4_f7`, `aft_v4_f8`, `aft_v4_f13`, `aft_v4_f14`, `aft_v4_f15`, `aft_v4_f16`, `aft_v4_f17`, `aft_v4_f18`, `aft_v4_f19` with suffixes `_1` and `_2`; and absolute gap columns named `gap_`. Sort output by `gap_score` descending, then `id_1` ascending, and save to `output.csv`.", "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Command-Line and Shell Operations", "Joining and Lookup Operations", "Join Operations and Merging", "Data Filtering and Matching", "Indexing and Selection", "Difference and Trend Computation", "In-place vs Copy Operations", "Data Extraction from JSON", "Feature Extraction and Vectorization", "String Manipulation and Parsing", "Function Application and Vectorization", "Arithmetic and Cumulative Calculations", "Formatting and Output Organization", "Sorting, Limiting, and Ranking", "Data Export and Output Processing", "Data Serialization & File Handling"], "domain": "loan_risk/loan_risk_41", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, thresholds={'score_1': None, 'score_2': None, 'gap_score': None, 'aft_v4_f0_1': None, 'aft_v4_f1_1': None, 'aft_v4_f2_1': None, 'aft_v4_f3_1': None, 'aft_v4_f4_1': None, 'aft_v4_f5_1': None, 'aft_v4_f6_1': None, 'aft_v4_f7_1': None, 'aft_v4_f8_1': None, 'aft_v4_f13_1': None, 'aft_v4_f14_1': None, 'aft_v4_f15_1': None, 'aft_v4_f16_1': None, 'aft_v4_f17_1': None, 'aft_v4_f18_1': None, 'aft_v4_f19_1': None, 'aft_v4_f0_2': None, 'aft_v4_f1_2': None, 'aft_v4_f2_2': None, 'aft_v4_f3_2': None, 'aft_v4_f4_2': None, 'aft_v4_f5_2': None, 'aft_v4_f6_2': None, 'aft_v4_f7_2': None, 'aft_v4_f8_2': None, 'aft_v4_f13_2': None, 'aft_v4_f14_2': None, 'aft_v4_f15_2': None, 'aft_v4_f16_2': None, 'aft_v4_f17_2': None, 'aft_v4_f18_2': None, 'aft_v4_f19_2': None, 'gap_aft_v4_f0': None, 'gap_aft_v4_f1': None, 'gap_aft_v4_f2': None, 'gap_aft_v4_f3': None, 'gap_aft_v4_f4': None, 'gap_aft_v4_f5': None, 'gap_aft_v4_f6': None, 'gap_aft_v4_f7': None, 'gap_aft_v4_f8': None, 'gap_aft_v4_f13': None, 'gap_aft_v4_f14': None, 'gap_aft_v4_f15': None, 'gap_aft_v4_f16': None, 'gap_aft_v4_f17': None, 'gap_aft_v4_f18': None, 'gap_aft_v4_f19': None})"]} {"id": "loan_risk_42", "question": "Read sample table data `input.csv` containing features, labels and weight column hy_weight. Where label=1 represents good samples (positive samples), label=0 represents bad samples (negative samples). Please group by month, biz1_encode, biz2_encode, biz3_encode fields, calculate the following metrics: 1. Sample count sample_cnt, positive sample count pos_sample_cnt, negative sample count neg_sample_cnt, overdue rate (negative sample count / sample count) overdue_rate; 2. For records with non-empty features, calculate: found sample count found_count, found positive sample count pos_found_count, found negative sample count neg_found_count, found overdue rate found_overdue_rate; 3. Calculate found rate metrics: sample count found rate found_rate, positive sample count found rate pos_found_rate, negative sample count found rate neg_found_rate.\nPlease save the final statistical report as output.csv.", "skills": ["Data Loading with Pandas", "File Path Matching and Input Handling", "Directory and File I/O", "Command-Line and Shell Operations", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Column-wise Transformations and Aggregation", "Conditional Aggregation and Filtering", "In-place vs Copy Operations", "Join Operations and Merging", "Data Integration and Merging", "Mathematical and Statistical Computations", "Percentage and Variation Calculations", "Array and Matrix Manipulation", "Column Management and Reordering", "DataFrame Column Management", "Data Export and Output Processing", "CSV Processing"], "domain": "loan_risk/loan_risk_42", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True)"]} {"id": "loan_risk_43", "question": "Read `input.csv` containing monthly labels, `hy_weight`, and features `afd_v3_subscore1` through `afd_v3_subscore9`. Use `label=1` as good samples and `label=0` as bad samples. For each feature, calculate IV, KS, and PSI by actual month only: `202405` through `202501`. Use `hy_weight` as the sample weight. Use the first month (`202405`) to create 10 equal-frequency reference bins for each feature, with missing values as an independent bin, and reuse those bins for all months. Order bins as missing first, then the reference score bins. Use `epsilon=1e-6` to smooth weighted good/bad distributions for IV and KS and weighted total distributions for PSI; the first month PSI is 0. Save `output.csv` with feature rows ordered `afd_v3_subscore1` through `afd_v3_subscore9`, and metric columns named like `202405_iv`, `202405_ks`, and `202405_psi`; do not output columns for months after `202501`.", "skills": ["Data Loading with Pandas", "Directory and File I/O", "Parsing and Reading Data Files", "Command-Line and Shell Operations", "Data Preparation and Formatting", "Interval and Range Operations", "Feature Selection and Statistical Computation", "Statistical Testing for Feature-Target Evaluation", "Cumulative and Row-wise Operations", "Statistical Analysis and Metrics", "Array and Matrix Manipulation", "Function Application and Vectorization", "Incremental and Comparative Calculations", "Data Transformation and Calculation", "Percentage and Variation Calculations", "Column Management and Reordering", "DataFrame Column Management", "Data Storage and Structuring", "Data Export and Output Processing", "Data Serialization & File Handling"], "domain": "loan_risk/loan_risk_43", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, thresholds={'202405_iv': None, '202406_iv': None, '202407_iv': None, '202408_iv': None, '202409_iv': None, '202410_iv': None, '202411_iv': None, '202412_iv': None, '202501_iv': None, '202405_ks': None, '202406_ks': None, '202407_ks': None, '202408_ks': None, '202409_ks': None, '202410_ks': None, '202411_ks': None, '202412_ks': None, '202501_ks': None, '202405_psi': None, '202406_psi': None, '202407_psi': None, '202408_psi': None, '202409_psi': None, '202410_psi': None, '202411_psi': None, '202412_psi': None, '202501_psi': None})"]} {"id": "loan_risk_44", "question": "Read `input.csv` containing model scores, labels, restored weights, and business dimensions. The score column is `afd_v3_subscore1`, `label=1` represents positive/g samples, `label=0` represents negative/b samples, and restored weight is `hy_weight`. Generate a four-level hierarchical model quality report: Level 1 grouped by `month`, `biz1_encode`, `biz2_encode`, `biz3_encode`; Level 2 grouped by `month`, `biz1_encode`, `biz2_encode` with `biz3_encode='ALL'`; Level 3 grouped by `month`, `biz1_encode` with `biz2_encode='ALL'` and `biz3_encode='ALL'`; Level 4 grouped by `biz1_encode` only with `month='ALL'`, `biz2_encode='ALL'`, and `biz3_encode='ALL'`. Do not include `flag_col` and do not create month rollup cube rows beyond Level 4.\n\nFor each row, independently calculate sample counts, restored-weight counts using `hy_weight`, bad rates before and after restore, and KS before and after restore from the row's raw subset. Use `g_*` columns for `label=1` and `b_*` columns for `label=0`. Leave previous-version KS fields blank. Compute `Monthly_PSI` from unweighted score distributions relative to the earliest month for the same grouping; first-month PSI is 0, and Level 4 compares all-time data for the `biz1_encode` group against that group's earliest-month data. Save exactly these columns to `output.csv`: `biz1_encode`, `biz2_encode`, `biz3_encode`, `month`, `Summary_Level`, `Sample_Size`, `g_Sample_Size`, `b_Sample_Size`, `Sample_Size_Restored`, `g_Sample_Size_Restored`, `b_Sample_Size_Restored`, `Bad_Rate_Before_Restore`, `Bad_Rate_After_Restore`, `Ks_Before_Restore`, `Ks_After_Restore`, `Prev_Version_Ks_Before_Restore`, `Prev_Version_Ks_After_Restore`, `Monthly_PSI`. Sort by level order and then `month`, `biz1_encode`, `biz2_encode`, `biz3_encode`.", "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Directory and File I/O", "Command-Line and Shell Operations", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Mathematical and Statistical Computations", "Time Series & Temporal Grouping", "Data Transformation and Calculation", "Conditional Logic and Row-wise Operations", "Incremental and Comparative Calculations", "Column Management and Reordering", "Data Export and Output Processing", "Formatting and Output Organization"], "domain": "loan_risk/loan_risk_44", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, thresholds={'Bad_Rate_Before_Restore': None, 'Bad_Rate_After_Restore': None, 'Ks_Before_Restore': None, 'Ks_After_Restore': None, 'Monthly_PSI': None})"]} {"id": "loan_risk_5", "question": "Given a tabular dataset containing behavioral scores, including the following fields: `apply_date` (date, format YYYYMMDD), `score` (behavioral score, numeric) and `group_id` (group identifier). Please use Python to calculate and output a comprehensive score distribution statistical report. The report should include the calculation results of the following two parts:\n\n1. Overall distribution by group: Calculate overall statistics for each group_id.\n2. Monthly distribution by group: Extract month from apply_date (format YYYYMM), and calculate monthly statistics for each group_id.\n\nFor both overall and monthly distributions, the following 7 statistical metrics need to be calculated: count, max, min, mode (if there are multiple modes, take the minimum value), mean, median and standard deviation (std, use sample standard deviation, fill with 0 if sample size is insufficient to calculate standard deviation).\n\nOutput requirements:\n- Save overall distribution to `output_1.csv` with columns: `group_id`, `cnt`, `max_score`, `min_score`, `mode_score`, `mean_score`, `median_score`, `std_score`\n- Save monthly distribution to `output_2.csv` with columns: `group_id`, `apply_month`, `cnt`, `max_score`, `min_score`, `mode_score`, `mean_score`, `median_score`, `std_score`\n- For overall distribution, the month field should be marked as 'overall' internally but not included in the final output\n- Convert count column to float type", "skills": ["Mathematical and Statistical Computations", "Statistical Calculations and Quantiles", "Helper Functions and Reusable Code", "Statistical Analysis and Metrics", "Statistical Calculations and Descriptive Statistics", "Data Loading with Pandas", "Parsing and Reading Data Files", "Directory and File I/O", "File Handling and Operations", "Time Formatting and String Manipulation", "Date and Time Conversion", "Data Aggregation and Grouping", "Time Series & Temporal Grouping", "Sorting, Limiting, and Ranking", "Index Handling and Conversion", "Data Type and Format Conversion", "Pandas-Specific Operations", "Numerical Operations and Type Conversion", "Data Conversion and Transformation", "Formatting and Output Organization", "Data Export and Output Processing", "Column-wise Transformations and Aggregation", "Data Serialization & File Handling", "In-place vs Copy Operations"], "domain": "loan_risk/loan_risk_5", "output_file_name": ["output_1.csv", "output_2.csv"], "gold_file_name": ["result_1.csv", "result_2.csv"], "eval_func": ["compare_csv(output_file_name='output_1.csv', gold_file_name='result_1.csv', ignore_order=True, specified_columns=['group_id', 'cnt', 'max_score', 'min_score', 'mode_score', 'mean_score', 'median_score', 'std_score'], thresholds={'max_score': None, 'min_score': None, 'mode_score': None, 'mean_score': None, 'median_score': None, 'std_score': None})", "compare_csv(output_file_name='output_2.csv', gold_file_name='result_2.csv', ignore_order=True, specified_columns=['group_id', 'apply_month', 'cnt', 'max_score', 'min_score', 'mode_score', 'mean_score', 'median_score', 'std_score'], thresholds={'max_score': None, 'min_score': None, 'mode_score': None, 'mean_score': None, 'median_score': None, 'std_score': None})"], "post_process_func": []} {"id": "loan_risk_6", "question": "Given a dataset containing `id`, `apply_date` and 100 feature columns. Use Python to perform KV (Key-Value) packing and output two CSV files:\n\n1. `output_data.csv`: columns must be exactly `id`, `apply_date`, `kv_features`. Keep rows in the original input order. The `kv_features` value must be a Python dict string with braces, comma-space separators, and colon-space separators, for example `\"{1: value1, 2: value2, ..., 100: value100}\"`. Keys are natural-order integers where `1 -> feature_1`, `2 -> feature_2`, ..., `100 -> feature_100`. Format each value with Python's default float string representation after casting it to `float`.\n2. `output_mapping.csv`: columns must be `key`, `feature_name`, sorted by `key` ascending, recording `feature_1` through `feature_100` in natural numeric order.", "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Column-specific or Feature-wise Processing", "Column Selection and Consistency Checks", "Data Filtering and Matching", "Sorting, Limiting, and Ranking", "Index Handling and Conversion", "Data Structure Handling (Dictionaries, Lists)", "Dictionary Manipulation and Construction", "Mapping and Lookup", "Data Type and Format Conversion", "Text & String Manipulation", "Function Application and Vectorization", "Data Export and Output Processing", "Data Serialization & File Handling"], "domain": "loan_risk/loan_risk_6", "output_file_name": ["output_data.csv", "output_mapping.csv"], "gold_file_name": ["result_data.csv", "result_mapping.csv"], "eval_func": ["compare_csv(output_file_name='output_data.csv', gold_file_name='result_data.csv', ignore_order=False, specified_columns=['id', 'apply_date', 'kv_features'])", "compare_csv(output_file_name='output_mapping.csv', gold_file_name='result_mapping.csv', ignore_order=False, specified_columns=['key', 'feature_name'])"], "post_process_func": []} {"id": "loan_risk_7", "question": "Given an account monthly overdue status transition record table (including fields: `account_id` account ID, `month` month, `prev_status` previous overdue status, `curr_status` current overdue status, where status values are M0, M1, M2, M3, etc.). Please use Python to calculate the roll rate of bills and output two CSV files:\n\n1. Overall roll rate analysis: Calculate the overall conversion rates from M0 to M1, M1 to M2, M2 to M3. Save the results to `output_1.csv`, the schema must include `transition_type` (values are 'M0_to_M1', 'M1_to_M2', 'M2_to_M3') and `roll_rate` (conversion rate value, rounded to 4 decimal places).\n2. Monthly roll rate trend analysis: Calculate the roll conversion rates for the above three stages by month to identify deterioration or improvement periods. Save the results to `output_2.csv`, the schema must include `month` (month), `M0_to_M1_rate`, `M1_to_M2_rate`, `M2_to_M3_rate` (all conversion rate values rounded to 4 decimal places).", "skills": ["Data Loading with Pandas", "Directory and File I/O", "Parsing and Reading Data Files", "Command-Line and Shell Operations", "Event Pairing and Transition Logic", "Percentage and Variation Calculations", "Conditional Logic and Row-wise Operations", "Difference and Trend Computation", "Data Export and Output Processing", "CSV Processing"], "domain": "loan_risk/loan_risk_7", "output_file_name": ["output_1.csv", "output_2.csv"], "gold_file_name": ["result_1.csv", "result_2.csv"], "eval_func": ["compare_csv(output_file_name='output_1.csv', gold_file_name='result_1.csv', ignore_order=True, specified_columns=['transition_type', 'roll_rate'], thresholds={'roll_rate': None})", "compare_csv(output_file_name='output_2.csv', gold_file_name='result_2.csv', ignore_order=True, specified_columns=['month', 'M0_to_M1_rate', 'M1_to_M2_rate', 'M2_to_M3_rate'], thresholds={'M0_to_M1_rate': None, 'M1_to_M2_rate': None, 'M2_to_M3_rate': None})"], "post_process_func": []} {"id": "loan_risk_8", "question": "Given a detailed data table containing new and old version scores. Please calculate the score differences between new and old versions, and output a deviation statistics table `summary_output.csv`: separately calculate the sample proportions of two scores (new vs old versions) under different deviation thresholds. The thresholds are divided into four levels: greater than 1e-3, 1e-4, 1e-5, 1e-6. The schema must include: `score_type` (values 'score1', 'score2'), `gap_gt_1e3_ratio`, `gap_gt_1e4_ratio`, `gap_gt_1e5_ratio`, `gap_gt_1e6_ratio` (all proportion results rounded to 4 decimal places).", "skills": ["Data Loading with Pandas", "Difference and Trend Computation", "Array and Matrix Manipulation", "Thresholding and Validation", "Conditional Aggregation and Filtering", "Threshold-Based Categorization or Filtering", "Percentage and Variation Calculations", "Data Export and Output Processing", "Formatting and Output Organization"], "domain": "loan_risk/loan_risk_8", "output_file_name": ["summary_output.csv"], "gold_file_name": ["result_summary.csv"], "eval_func": ["compare_csv(output_file_name='summary_output.csv', gold_file_name='result_summary.csv', ignore_order=True, specified_columns=['score_type', 'gap_gt_1e3_ratio', 'gap_gt_1e4_ratio', 'gap_gt_1e5_ratio', 'gap_gt_1e6_ratio'], thresholds={'gap_gt_1e3_ratio': None, 'gap_gt_1e4_ratio': None, 'gap_gt_1e5_ratio': None, 'gap_gt_1e6_ratio': None})"], "post_process_func": []} {"id": "loan_risk_9", "question": "Given a CSV file containing two columns of data (a feature column named 'column_1' and a label column named 'label'). Please use Python to perform monotonic binning on the feature column using a merge-based algorithm, and satisfy the following strict constraints:\n1. The proportion of samples in each bin relative to the total sample size must not be less than 5%.\n2. The final number of bins (excluding the missing value bin) must be controlled within the range [2, 10].\n3. After binning, the positive sample rate (or default rate) of each bin must show monotonicity (monotonically increasing or monotonically decreasing).\n\nThe algorithm should work as follows:\n- Start with each unique feature value as a separate bin\n- Iteratively merge adjacent bins, prioritizing pairs with closest bad rates\n- Ensure minimum sample constraint is satisfied during merging\n- Perform final checks to ensure monotonicity and sample constraints\n- Reduce bins if exceeding maximum limit by merging closest bad rate pairs\n\nPlease apply the binning mapping results to the original data, and save the final result as an `output.csv` file. The output CSV file must contain and only contain three columns: `column_1` (original feature value), `column_1_pos` (the bin encoding/bin identifier it belongs to) and `label` (original label value). Missing values in the feature column should remain as null in the output.", "skills": ["Data Loading with Pandas", "CSV Processing", "Handling Missing Data", "Data Manipulation and Validation", "In-place vs Copy Operations", "Array and Matrix Manipulation", "Unique Value Extraction", "Statistical Analysis and Metrics", "Mathematical and Statistical Computations", "Data Binning and Grid Creation", "Join Operations and Merging", "Validation and Verification of Merge Results", "Monotonicity and Trend Analysis", "Thresholding and Validation", "Data Structure Handling (Dictionaries, Lists)", "Vectorized Column or Row Manipulation", "DataFrame Column Management", "Labeling and Renaming", "Data Export and Output Processing", "Data Serialization & File Handling"], "domain": "loan_risk/loan_risk_9", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['column_1', 'column_1_pos', 'label'])"]} {"id": "marketing_12", "question": "Train an Uplift model using data where usage='dev' and label=1 from the dataset to predict user response to coupons, evaluate on eval data, and output AUUC and Gini metrics for training and test sets. Output to output.json file in the format {\"train\": {\"AUUC\": ..., \"Gini\": ...}, \"eval\": {\"AUUC\": ..., \"Gini\": ...}}", "domain": "marketing", "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"train\": {\"AUUC\": [0.0, 1.0], \"Gini\": [0.0, 1.0]}, \"eval\": {\"AUUC\": [0.0, 1.0], \"Gini\": [0.0, 1.0]}})"], "skills": ["Model Configuration and Import", "Data Loading with Pandas", "Parsing and Reading Data Files", "Data Filtering and Matching", "Filtering and Criteria-Based Selection", "Conditional Logic and Row-wise Operations", "Data Preparation and Formatting", "Data Preprocessing and Segmentation", "Model Training & Evaluation", "Model Training and Customization", "Model Training and Inference", "Model Evaluation Metrics", "Model Development and Interpretation", "Visualization and Interpretation", "Conditional Aggregation and Filtering", "Validation and Output Formatting", "Data Storage and Structuring"]} {"id": "marketing_13", "question": "Train a model to predict label. Feel free to choose training mode and model architecture, and find the overall best performing model. Output to output.json file in the format {\"train\": {\"AUC\": ...}, \"eval\": {\"AUC\": ...}}", "domain": "marketing", "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"train\": {\"AUC\": [0.5, 1.0]}, \"eval\": {\"AUC\": [0.5, 1.0]}})"], "skills": ["Model Configuration and Import", "Library Usage (Scikit-Learn)", "Data Loading with Pandas", "Parsing and Reading Data Files", "Data Preparation and Formatting", "Column-specific or Feature-wise Processing", "Data Splitting and Sampling", "Data Splitting and Leakage Prevention", "Model Selection and Fitting", "Model Training & Evaluation", "Model Evaluation Metrics", "Model Prediction and Output Handling", "Data Serialization & File Handling", "Output and Logging", "Data Export and Output Processing"]} {"id": "marketing_14", "question": "The dataset contains data from multiple customers. Using an Uplift model for training, compare a benefit sensitivity model trained on a single customer's own data versus a model trained on all data combined. Which approach performs better? Output to output.json file in the format {\"single_customer\": {\"train\": {\"AUUC\": ..., \"Gini\": ...}, \"eval\": {\"AUUC\": ..., \"Gini\": ...}}, \"all_data\": {\"train\": {\"AUUC\": ..., \"Gini\": ...}, \"eval\": {\"AUUC\": ..., \"Gini\": ...}}}", "domain": "marketing", "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"single_customer\": {\"train\": {\"AUUC\": [0.0, 1.0], \"Gini\": [0.0, 1.0]}, \"eval\": {\"AUUC\": [0.0, 1.0], \"Gini\": [0.0, 1.0]}}, \"all_data\": {\"train\": {\"AUUC\": [0.0, 1.0], \"Gini\": [0.0, 1.0]}, \"eval\": {\"AUUC\": [0.0, 1.0], \"Gini\": [0.0, 1.0]}}})"], "skills": ["Model Configuration and Import", "Library Usage (Scikit-Learn)", "Data Loading with Pandas", "Column-specific or Feature-wise Processing", "Data Preprocessing and Column Management", "Variable and Data Initialization", "Data Splitting and Sampling", "Data Splitting and Leakage Prevention", "Data Storage and Structuring", "Model Training and Customization", "Model Training and Inference", "Model Evaluation Metrics", "Model Evaluation & Validation", "Performance Benchmarking and Evaluation", "Data Serialization & File Handling", "Data Export and Output Processing"]} {"id": "marketing_2", "question": "Train an optimal LGB model using data_split='train' and label_pay=1 data from the dataset to predict label_upgrade=1, with kv_feature as feature columns. Evaluate on eval data and output the CVR and AUC for both training and test sets. Output to output.json file in the format {\"train\": {\"CVR\": ..., \"AUC\": ...}, \"eval\": {\"CVR\": ..., \"AUC\": ...}}", "domain": "marketing", "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}})"], "skills": ["Model Configuration and Import", "Library Usage (Scikit-Learn)", "Data Loading with Pandas", "Parsing and Reading Data Files", "Text & String Manipulation", "String Manipulation and Parsing", "Data Parsing and Delimiter Handling", "Data Preparation and Formatting", "Indexing and Selection", "Model Training & Evaluation", "Model Training and Customization", "Classification and Prediction Modeling", "Probability Modeling and Conversion", "Model Prediction and Output Handling", "Model Evaluation Metrics", "Performance Metrics and Optimization", "Conditional Aggregation and Filtering", "Model Evaluation & Validation", "Data Storage and Structuring", "Validation and Output Formatting", "Data Serialization & File Handling"]} {"id": "marketing_3", "question": "Train an LGB model to predict whether label_pay is 1, with kv_feature as feature columns. The model needs to be updated daily: train using all data before day T, evaluate on day T's data, and continuously evaluate the latest 7 days. Output daily CVR and AUC for training and test sets. Output to output.json file in the format {\"day_1\": {\"train\": {\"CVR\": ..., \"AUC\": ...}, \"eval\": {...}}, \"day_2\": {...}, ...}", "domain": "marketing", "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"day_1\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_2\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_3\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_4\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_5\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_6\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_7\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}})"], "skills": ["Model Configuration and Import", "Library Usage (Scikit-Learn)", "Data Loading with Pandas", "Data Parsing and Delimiter Handling", "Text & String Manipulation", "Column-specific or Feature-wise Processing", "Temporal Validation and Comparison", "Interval and Range Operations", "Data Splitting and Sampling", "Data Storage and Structuring", "Date Increment and Loop Control", "Data Splitting and Leakage Prevention", "Time-based Filtering and Matching", "Data Preparation and Formatting", "Model Training & Evaluation", "Model Training and Customization", "Model Prediction and Output Handling", "Classification and Prediction Modeling", "Model Evaluation Metrics", "Conditional Aggregation and Filtering", "Validation and Output Formatting", "Data Serialization & File Handling", "Output and Logging"]} {"id": "marketing_4", "question": "Train a DeepFM model to predict whether label_pay is 1, with kv_feature as feature columns. The model needs to be updated daily: train using all data before day T, evaluate on day T's data, and continuously evaluate the latest 7 days. Output daily CVR and AUC for training and test sets. Evaluate using both full training and incremental training modes. Output to output.json file in the format {\"full_training\": {\"day_1\": {\"train\": {...}, \"eval\": {...}}, ...}, \"incremental_training\": {\"day_1\": {\"train\": {...}, \"eval\": {...}}, ...}}", "domain": "marketing", "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"full_training\": {\"day_1\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_2\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_3\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_4\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_5\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_6\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_7\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}}, \"incremental_training\": {\"day_1\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_2\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_3\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_4\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_5\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_6\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"day_7\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}}})"], "skills": ["Model Configuration and Import", "Library Usage (Scikit-Learn)", "Computational Frameworks and Libraries", "Data Parsing and Delimiter Handling", "Data Conversion and Post-Loading Processing", "Data Parsing and Structuring", "Preprocessing and Scaling", "Data Preprocessing & Encoding", "Feature Engineering and Embeddings", "Temporal Validation and Comparison", "Interval and Range Operations", "Time-based Filtering and Matching", "Online Learning and Incremental Training", "Model Training & Evaluation", "Model Training and Inference", "Statistical Analysis and Metrics", "Model Evaluation Metrics", "Percentage and Variation Calculations", "Validation and Output Formatting"]} {"id": "marketing_5", "question": "Train a multi-task model to predict label_pay and label_upgrade respectively, with kv_feature as feature columns. Feel free to choose training mode and model architecture, and find the overall best performing model. Output to output.json file in the format {\"label_pay\": {\"train\": {...}, \"eval\": {...}}, \"label_upgrade\": {\"train\": {...}, \"eval\": {...}}}", "domain": "marketing", "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"label_pay\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"label_upgrade\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}})"], "skills": ["Model Configuration and Import", "Library Usage (Scikit-Learn)", "Multi-Task/Multi-Class Handling", "Parsing and Reading Data Files", "Data Preprocessing & Encoding", "Data Conversion and Post-Loading Processing", "Data Splitting and Sampling", "Model Training & Evaluation", "Model Training and Customization", "Model Evaluation Metrics", "Model Prediction and Output Handling", "Data Storage and Structuring", "Formatting and Output Organization", "Data Serialization & File Handling"]} {"id": "marketing_6", "question": "The dataset contains data from multiple customers. Using LGB for training, compare a model trained on a single customer's own data to predict label_pay versus a model trained on all data combined. Which approach performs better? Output to output.json file in the format {\"single_customer\": {\"train\": {\"CVR\": ..., \"AUC\": ...}, \"eval\": {\"CVR\": ..., \"AUC\": ...}}, \"all_data\": {\"train\": {\"CVR\": ..., \"AUC\": ...}, \"eval\": {\"CVR\": ..., \"AUC\": ...}}}", "domain": "marketing", "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"single_customer\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}, \"all_data\": {\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}}})"], "skills": ["Model Configuration and Import", "Library Usage (Scikit-Learn)", "Data Loading with Pandas", "Parsing and Reading Data Files", "Data Preprocessing and Column Management", "Data Labeling and Structured Data Handling", "Column-specific or Feature-wise Processing", "Data Filtering and Matching", "Data Splitting and Sampling", "Model Training & Evaluation", "Model Evaluation Metrics", "Data Splitting and Leakage Prevention", "Data Preprocessing and Segmentation", "Model Evaluation & Generalization", "Performance Benchmarking and Evaluation", "Data Comparison and Validation", "Incremental and Comparative Calculations", "Percentage and Variation Calculations", "Difference and Trend Computation", "Data Storage and Structuring", "Formatting and Output Organization", "Data Serialization & File Handling"]} {"id": "marketing_9", "question": "Train a binary classification model using data_split='train' data from the dataset to predict whether label_pay is 1, and evaluate on the eval dataset. Output to output.json file in the format {\"train\": {\"CVR\": ..., \"AUC\": ...}, \"eval\": {\"CVR\": ..., \"AUC\": ...}}", "domain": "marketing", "gold_file_name": ["result.json"], "output_file_name": ["output.json"], "eval_func": ["compare_json_normalized(output_file_name='output.json', thresholds={\"train\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}, \"eval\": {\"CVR\": [0.0, 1.0], \"AUC\": [0.5, 1.0]}})"], "skills": ["Model Configuration and Import", "Library Usage (Scikit-Learn)", "Data Loading with Pandas", "Parsing and Reading Data Files", "Data Filtering and Matching", "Data Filtering and Grouping", "Indexing and Selection", "Column-specific or Feature-wise Processing", "Column Selection and Consistency Checks", "Data Preprocessing and Column Management", "Data Preparation and Formatting", "Model Training & Evaluation", "Model Training and Customization", "Classification and Prediction Modeling", "Model Prediction and Output Handling", "Model Training and Inference", "Model Evaluation Metrics", "Model Evaluation & Validation", "Filtering and Sorting Correlation Data", "Model Development and Interpretation", "Validation and Output Formatting"]} {"id": "real_estate_01", "question": "Based on a multi-source real estate dataset, analyze the impact of social and economic factors on housing price growth in each state of the United States.\n\nTask:\n1. Load the Zillow housing price dataset, education expenditure data, unemployment rate data by state, and county-level census data.\n2. Calculate the annual housing price growth rate using December data from 2010 to 2018.\n3. Calculate three social economic indicators for 2011-2018: per capita education expenditure (total revenue / enrollment), annual average unemployment rate, and state-level average per capita income (aggregated from county-level data).\n4. Use scipy.stats.pearsonr to calculate the Pearson correlation coefficient and p-value between the housing price growth rate and each of the three indicators.\n5. Find the indicator with the strongest correlation (largest absolute correlation coefficient).\n6. Output a CSV file containing: the strongest correlated indicator name, correlation coefficient (4 decimal places), and p-value (4 decimal places).\n\nSave the result as correlation_output.csv.", "data_sources": ["U.S. Education.csv", "Unemployment in America Per US State.csv", "US Census Demographic Data/acs2015_county_data.csv", "Zillow House Price Data/State_Zhvi_AllHomes.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Directory and File Management", "Pandas-Specific Operations", "Time Formatting and String Manipulation", "Arithmetic and Cumulative Calculations", "Incremental and Comparative Calculations", "DataFrame Transformation and Reshaping", "Data Aggregation and Grouping", "Percentage and Variation Calculations", "Array and Matrix Manipulation", "Join Operations and Merging", "Data Integration and Merging", "Handling Missing Data", "Statistical Correlation Analysis", "Filtering and Sorting Correlation Data", "Formatting and Output Organization", "Data Export and Output Processing", "Data Serialization & File Handling"], "domain": "real_estate", "output_file_name": ["correlation_output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='correlation_output.csv', gold_file_name='result.csv', ignore_order=True, thresholds={'correlation_coefficient': None, 'p_value': None})"]} {"id": "real_estate_03", "question": "Please calculate the Sharpe ratio for each city based on the multi-source real estate dataset and generate an analysis report (save as top50_sharpe_ratio_cities.csv).\n\nUsing 2017 monthly housing price data from three Zillow datasets (1-bedroom, 2-bedroom, 3-bedroom), compute monthly returns for each bedroom type per city. Then calculate:\n- Annualized return = mean of monthly returns × 12\n- Annualized volatility = sample standard deviation (ddof=1) of monthly returns × √12\nAverage the annualized return and volatility across all available bedroom types for each city. Sharpe ratio = annualized return / volatility (risk-free rate = 0).\n\nFrom the education dataset, calculate the average 8th-grade math score by state. From the census dataset, calculate the average per capita income by state. Merge these state-level indicators into the city data.\n\nSelect the top 50 cities with the highest Sharpe ratio. Output columns: City, State, Annualized_Return, Volatility, Sharpe_Ratio, Avg_Math_8_Score, Income_Per_Capita.", "data_sources": ["U.S. Education.csv", "US Census Demographic Data/acs2017_county_data.csv", "Zillow House Price Data/City_Zhvi_1bedroom.csv", "Zillow House Price Data/City_Zhvi_2bedroom.csv", "Zillow House Price Data/City_Zhvi_3bedroom.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Column Selection and Consistency Checks", "Column Name and Schema Management", "Join Operations and Merging", "Percentage and Variation Calculations", "Statistical Calculations and Quantiles", "Arithmetic and Cumulative Calculations", "Time Formatting and String Manipulation", "Column Iteration and Processing", "In-place vs Copy Operations", "Array and Matrix Manipulation", "Data Structure Handling (Dictionaries, Lists)", "Dictionary Manipulation and Construction", "Data Normalization and Preprocessing", "Data Preprocessing and Centering", "Data Integration and Merging", "Vectorization and Performance Optimization", "Filtering and Criteria-Based Selection", "Sorting, Limiting, and Ranking", "Function Application and Vectorization", "Formatting and Output Organization", "Data Export and Output Processing"], "domain": "real_estate", "output_file_name": ["top50_sharpe_ratio_cities.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='top50_sharpe_ratio_cities.csv', gold_file_name='result.csv', ignore_order=True, thresholds={'Annualized_Return': None, 'Volatility': None, 'Sharpe_Ratio': None, 'Avg_Math_8_Score': None, 'Income_Per_Capita': None})"]} {"id": "real_estate_04", "question": "Please calculate the annualized growth rate of different types of houses in each state based on the multi-source real estate dataset, and generate an analysis report (save as top5_cagr_disparity.csv). The report should include the following analysis dimensions:\n\nData loading: Load the house price data files of Zillow for the state levels. Determine the data columns for December 31, 2010 and December 31, 2019.\n\nGrowth rate calculation: For each data file, extract the house price data for December 31, 2010 and December 31, 2019, and calculate the growth rate (compound annual growth rate) = (end value / start value)^(1/9) - 1. Merge the results into a data frame, including three columns: state name (region name), house type (property type), and growth rate.\n\nStatistical analysis: Calculate the growth rate disparity for each state. For each state, calculate the difference between the highest and lowest growth rates among the 8 house types (growth rate difference = maximum growth rate - minimum growth rate). Then sort by the growth rate difference in descending order and select the top 5 states.\n\nResult output: Save the results of the top 5 states as top5_cagr_disparity.csv, including columns 'region name' and 'growth rate difference'.", "data_sources": ["Zillow House Price Data/State_Zhvi_AllHomes.csv", "Zillow House Price Data/State_Zhvi_1bedroom.csv", "Zillow House Price Data/State_Zhvi_2bedroom.csv", "Zillow House Price Data/State_Zhvi_3bedroom.csv", "Zillow House Price Data/State_Zhvi_4bedroom.csv", "Zillow House Price Data/State_Zhvi_5BedroomOrMore.csv", "Zillow House Price Data/State_Zhvi_Condominum.csv", "Zillow House Price Data/State_Zhvi_SingleFamilyResidence.csv"], "skills": ["Data Loading with Pandas", "Directory and File I/O", "Data Structure Handling (Dictionaries, Lists)", "Column-wise Transformations and Aggregation", "Data Transformation and Calculation", "Arithmetic and Cumulative Calculations", "Conditional Aggregation and Filtering", "Data Storage and Structuring", "Dynamic Data Transformation and Insertion", "In-place vs Copy Operations", "Array and Matrix Manipulation", "Data Aggregation and Grouping", "Incremental and Comparative Calculations", "Filtering and Criteria-Based Selection", "Sorting, Limiting, and Ranking", "CSV Processing", "Column Selection and Consistency Checks"], "domain": "real_estate", "output_file_name": ["top5_cagr_disparity.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='top5_cagr_disparity.csv', gold_file_name='result.csv', ignore_order=True, thresholds={'CAGR_Disparity': None})"]} {"id": "real_estate_06", "question": "A national housing policy research group is conducting a study on the correlation between educational investment and the dynamics of housing markets in various states of the United States, taking into account the macroeconomic and demographic background.\n\nTask Requirements:\n1. Using the dataset of median house prices in the United States, calculate the annual growth rate of median house prices for each state from 2010 to 2018.\n2. Using the dataset of education in the United States, calculate the education expenditure per student (total income / enrollment number) for each state.\n3. Using the dataset of unemployment rates in the United States, calculate the average annual unemployment rate for each state.\n4. Using the county-level economic data from the 2015 American Community Survey and the 2017 American Community Survey, aggregate the data to the state level and obtain the average income (IncomePerCap) and poverty rate (Poverty) for 2015 and 2017.\n5. Merge the above datasets by state name and year.\n6. Apply the ARIMA(1,1,1) model to the time series of each student's education expenditure to predict the next 12 months.\n7. Calculate the Pearson correlation coefficient between the housing price growth rate and educational investment.\n8. Return the top 5 states with the strongest correlation to the target variable, including the following information: correlation coefficient, p-value, 95% confidence interval, average annual growth rate, average amount of financial aid per student.\n\nOutput Requirements: Save the results as output.csv file, including the following columns: state, correlation, p-value, lower limit of confidence interval, upper limit of confidence interval, average annual growth rate, average amount of financial aid per student.", "data_sources": ["U.S. Education.csv", "Unemployment in America Per US State.csv", "US Census Demographic Data/acs2015_county_data.csv", "US Census Demographic Data/acs2017_county_data.csv", "Zillow House Price Data/State_Zhvi_AllHomes.csv"], "skills": ["Data Loading with Pandas", "Directory and File I/O", "Column/Row-wise Computations", "Arithmetic Transformations and Normalization", "Date Adjustment and Alignment", "Arithmetic and Cumulative Calculations", "Time Difference and Gradient Calculation", "Row and Index Handling", "In-place vs Copy Operations", "Array and Matrix Manipulation", "Data Aggregation and Grouping", "Percentage and Variation Calculations", "Time Formatting and String Manipulation", "Dynamic Data Transformation and Insertion", "Join Operations and Merging", "Data Integration and Merging", "Data Alignment & Merging", "Function Application and Vectorization", "ARIMA Model Fitting", "Time Series Analysis and Forecasting", "Statistical Correlation Analysis", "Filtering and Sorting Correlation Data", "Sorting, Limiting, and Ranking", "Formatting and Output Organization"], "domain": "real_estate", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, thresholds={'Correlation_Coefficient': None, 'P_Value': None, 'CI_Lower_95': None, 'CI_Upper_95': None, 'Avg_Housing_Growth_Rate': None, 'Avg_Revenue_Per_Student': None})"]} {"id": "real_estate_07", "question": "A national housing policy research group is studying the correlation between educational investment and housing market dynamics across U.S. states, taking into account macroeconomic and demographic factors.\n\nFor the period 2010-2018, analyze the relationship between each state's annual housing price growth rate and per-student education expenditure (total revenue / enrollment). Incorporate state-level unemployment rates and American Community Survey demographic data (2015 and 2017, aggregated to state level) by merging all datasets at the state-year level. Apply an ARIMA(1,1,1) model to each state's per-student education expenditure time series to forecast the next 12 periods. Compute the Pearson correlation coefficient between housing price growth rate and per-student education expenditure for each state, and identify the top 5 states with the strongest absolute correlation. For the 95% confidence interval, use the standard error of the correlation coefficient with t-distribution critical values.\n\nOutput Requirements: Save results as output.csv with columns: state, correlation, p_value, ci_lower, ci_upper, avg_annual_growth, avg_per_student_funding.", "data_sources": ["U.S. Education.csv", "Unemployment in America Per US State.csv", "Zillow House Price Data/State_Zhvi_AllHomes.csv", "US Census Demographic Data/acs2015_county_data.csv", "US Census Demographic Data/acs2017_county_data.csv"], "skills": ["Data Loading with Pandas", "Date and Time Conversion", "Incremental and Comparative Calculations", "Data Conversion and Post-Loading Processing", "Data Aggregation and Grouping", "Numerical Data Handling", "Dynamic Data Transformation and Insertion", "Data Integration and Merging", "Join Operations and Merging", "ARIMA Model Fitting", "Time Series Analysis and Forecasting", "Array and Matrix Manipulation", "Statistical Correlation Analysis", "Filtering and Sorting Correlation Data", "Data Storage and Structuring", "Data Export and Output Processing", "Data Inspection and Summarization"], "domain": "real_estate", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['state', 'correlation', 'p_value', 'ci_lower', 'ci_upper', 'avg_annual_growth', 'avg_per_student_funding'], thresholds={'correlation': None, 'p_value': None, 'ci_lower': None, 'ci_upper': None, 'avg_annual_growth': None, 'avg_per_student_funding': None})"]} {"id": "real_estate_08", "question": "Build a random forest regression model to predict city-level housing price index using multi-source real estate and socio-economic data. Use the Zillow Home Value Index (ZHVI) for all homes as of 2019-12-31 as the target variable. Derive housing features from the other Zillow ZHVI data (1-bedroom, 2-bedroom, 3-bedroom, condominium, single-family residence) as of the same date, and extract the rental price feature from the median rental price data as of December 2019. Integrate state-level socio-economic features: from census data, compute state-level average income, poverty rate, and unemployment rate; from unemployment data, compute the 2019 annual average state unemployment rate; from education data, use 2017 state-level total revenue as a feature; from crime data, compute state-level average violent crime and property crime rates. Merge all features at the city level, and use median imputation for missing values. Split data with test_size=0.2 and random_state=42. Train a RandomForestRegressor with n_estimators=100, max_depth=15, random_state=42, and n_jobs=-1. Evaluate with MAE, RMSE, and R2. Output: Save evaluation metrics to housing_prediction_metrics.csv with columns Metric and Value. Save actual values, predicted values, and residuals to prediction_results.csv.", "data_sources": ["Zillow House Price Data/City_Zhvi_AllHomes.csv", "Zillow House Price Data/City_Zhvi_1bedroom.csv", "Zillow House Price Data/City_Zhvi_2bedroom.csv", "Zillow House Price Data/City_Zhvi_3bedroom.csv", "Zillow House Price Data/City_Zhvi_Condominum.csv", "Zillow House Price Data/City_Zhvi_SingleFamilyResidence.csv", "Zillow House Price Data/City_MedianRentalPrice_AllHomes.csv", "US Census Demographic Data/acs2017_county_data.csv", "Unemployment in America Per US State.csv", "U.S. Education.csv", "United States Crime Rates By City Population/crime_40_60.csv", "United States Crime Rates By City Population/crime_60_100.csv", "United States Crime Rates By City Population/crime_100_250.csv", "United States Crime Rates By City Population/crime_250_plus.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Pandas-Specific Operations", "Batch Processing and Performance Optimization", "Data Integration and Merging", "Join Operations and Merging", "Time Formatting and String Manipulation", "Date Adjustment and Alignment", "Data Transformation and Column Manipulation", "Data Aggregation and Grouping", "Data Structure Handling (Dictionaries, Lists)", "Mapping and Lookup", "Data Transformation and Feature Engineering", "Dynamic Data Transformation and Insertion", "Model Configuration and Import", "Library Usage (Scikit-Learn)", "Feature Selection and Dimensionality Reduction", "Handling Missing Data", "Data Splitting and Sampling", "Model Training & Optimization", "Model Evaluation & Validation", "Model Evaluation Metrics", "Model Prediction and Output Handling", "Data Export and Output Processing", "Array and Matrix Manipulation", "Parallel and Concurrent Execution", "Stochasticity and Reproducibility"], "domain": "real_estate", "output_file_name": ["housing_prediction_metrics.csv", "prediction_results.csv"], "gold_file_name": ["result_metrics.csv", "result_predictions.csv"], "eval_func": ["compare_csv(output_file_name='housing_prediction_metrics.csv', gold_file_name='result_metrics.csv', specified_columns=['Value'], thresholds={'Value': None})", "compare_csv(output_file_name='prediction_results.csv', gold_file_name='result_predictions.csv')"]} {"id": "real_estate_09", "question": "Task: Build a housing price prediction model predicting 'ZHVI' (Zillow Home Value Index) and conduct stratified validation using locally available multi-source real estate and socioeconomic datasets.\n\nRequirements:\n1. Data Preparation:\n - Use city-level home value data (all home types) as the prediction target, extracting values as of December 31, 2019.\n - Extract features from 1-bedroom and 2-bedroom home value datasets, as well as rental datasets (all, 1-bedroom, 2-bedroom), using values as of December 31, 2019.\n - Integrate state-level demographic features (per capita income, poverty rate, population), city-level crime statistics, state-level unemployment rates (latest monthly), and education metrics (total expenditure, fourth-grade math scores - latest annual).\n - Standardize all state identifiers to two-letter abbreviations and merge data by state and city.\n\n2. Model Configuration:\n - Train a Random Forest Regressor with n_estimators=100, max_depth=15, random_state=42.\n - Use train-test split with test_size=0.2, random_state=42.\n\n3. Stratified Validation:\n - Crime stratification: Divide validation data into quartile groups based on violent crime rate.\n - Income stratification: Divide into high and low income groups using the median income as threshold.\n\n4. Output Requirements:\n - 'model_validation_metrics.csv': Contains overall metrics (R², MAE, RMSE) and R² scores for each crime quartile group and income group.\n - 'residuals_analysis.csv': Contains actual value, predicted value, residual, violent crime rate, income, crime quartile label, and income group label.", "data_sources": ["Zillow House Price Data/City_Zhvi_AllHomes.csv", "Zillow House Price Data/City_Zhvi_1bedroom.csv", "Zillow House Price Data/City_Zhvi_2bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_AllHomes.csv", "Zillow House Price Data/City_MedianRentalPrice_1Bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_2Bedroom.csv", "United States Crime Rates By City Population/crime_100_250.csv", "US Census Demographic Data/acs2017_county_data.csv", "U.S. Education.csv", "Unemployment in America Per US State.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Conversion and Post-Loading Processing", "Command-Line and Shell Operations", "Data Alignment & Merging", "Join Operations and Merging", "Data Integration and Merging", "Time Formatting and String Manipulation", "Date Adjustment and Alignment", "Column-wise Transformations and Aggregation", "Statistical Analysis and Metrics", "Data Transformation and Feature Engineering", "Column Selection and Consistency Checks", "Data Structure Understanding and Initialization", "In-place vs Copy Operations", "Model Training & Evaluation", "Model Configuration and Import", "Data Splitting and Sampling", "Model Evaluation & Validation", "Model Evaluation Metrics", "Data Preprocessing and Segmentation", "Data Filtering and Grouping", "Statistical Calculations and Quantiles", "Library Usage (Scikit-Learn)", "Data Storage and Structuring", "Data Serialization & File Handling", "Parallel and Concurrent Execution", "Stochasticity and Reproducibility", "Function Application and Vectorization"], "domain": "real_estate", "output_file_name": ["model_validation_metrics.csv", "residuals_analysis.csv"], "gold_file_name": ["result_metrics.csv", "result_residuals.csv"], "eval_func": ["compare_csv(output_file_name='model_validation_metrics.csv', gold_file_name='result_metrics.csv', specified_columns=['Value'], thresholds={'Value': None})", "compare_csv(output_file_name='residuals_analysis.csv', gold_file_name='result_residuals.csv', specified_columns=['residual', 'violent_crime', 'Income'], thresholds={'residual': None, 'violent_crime': None, 'Income': None})"]} {"id": "real_estate_11", "question": "A real estate investment company needs to evaluate the performance of the housing price prediction model. Using the provided multiple data sources (including city rental data, housing price index, education data, unemployment data, and crime data), build a regression model to predict the Zillow Housing Price Index (ZHVI) for December 2019. Specific requirements:\n1. Load all CSV data files into an SQLite database\n2. Calculate the housing price volatility for each city based on the historical ZHVI data from 2015 to 2018\n3. Use the reciprocal of the volatility as the sample weight (the lower the volatility of a city, the higher its weight)\n4. Train a LightGBM regression model using data from 2018 and earlier as features\n5. Use time series cross-validation to evaluate the model and report the weighted mean absolute error (Weighted MAE)\n\nOutput: Save the evaluation results to output.json, format: {\"weighted_mae\": }", "data_sources": ["Zillow House Price Data/City_MedianRentalPrice_1Bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_AllHomes.csv", "Zillow House Price Data/City_Zhvi_AllHomes.csv", "Zillow House Price Data/DaysOnZillow_City.csv", "U.S. Education.csv", "Unemployment in America Per US State.csv", "US Census Demographic Data/acs2017_county_data.csv", "United States Crime Rates By City Population/crime_100_250.csv", "United States Crime Rates By City Population/crime_250_plus.csv", "United States Crime Rates By City Population/crime_40_60.csv", "United States Crime Rates By City Population/crime_60_100.csv"], "skills": ["Data Loading with Pandas", "Directory and File Management", "Parsing and Reading Data Files", "Command-Line and Shell Operations", "Data Ingestion and Processing", "Date and Time Conversion", "Time Formatting and String Manipulation", "Arithmetic and Cumulative Calculations", "Date Adjustment and Alignment", "Column Selection and Consistency Checks", "Data Preparation and Formatting", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Numerical Data Handling", "Handling Missing Data", "In-place vs Copy Operations", "Array and Matrix Manipulation", "Output and Logging", "Model Evaluation Metrics", "Weighted Aggregation and Summation", "Epsilon Handling", "Normalization and Weighted Aggregation", "Data Manipulation and Summarization", "Time Series Analysis and Forecasting", "Data Splitting and Sampling", "Model Training & Optimization", "Model Evaluation & Validation", "Indexing and Row-Level Operations", "Data Storage and Structuring", "CSV Processing", "Data Export and Output Processing", "Data Serialization & File Handling"], "domain": "real_estate", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'weighted_mae': 0.05})"]} {"id": "real_estate_12", "question": "Analyze the growth patterns of the housing market in each state of the United States from 2010 to 2018. For each state-level housing indicator, calculate the compound annual growth rate (CAGR) using the first available monthly data point in 2010 as the initial value and the last available monthly data point in 2018 as the final value, over an 8-year period.\n\nDraw an overlapping histogram showing the CAGR distribution across all states for each indicator, and identify which indicator has the highest peak frequency in its CAGR distribution.\n\nOutput:\n- output.png: Overlapping histogram of the CAGR distribution for all indicators\n- output.csv: A CSV file with columns 'indicator' (indicator name) and 'value' (peak frequency count), listing all indicators that share the highest peak frequency", "data_sources": ["Zillow House Price Data/State_Zhvi_1bedroom.csv", "Zillow House Price Data/State_Zhvi_2bedroom.csv", "Zillow House Price Data/State_Zhvi_3bedroom.csv", "Zillow House Price Data/State_Zhvi_4bedroom.csv", "Zillow House Price Data/State_Zhvi_5BedroomOrMore.csv", "Zillow House Price Data/State_Zhvi_AllHomes.csv", "Zillow House Price Data/State_Zhvi_Condominum.csv", "Zillow House Price Data/State_Zhvi_SingleFamilyResidence.csv", "Zillow House Price Data/State_MedianRentalPrice_AllHomes.csv", "Zillow House Price Data/State_Zri_AllHomesPlusMultifamily.csv"], "skills": ["Data Loading with Pandas", "Data Import and Library Setup", "Path Construction and Manipulation", "Parsing and Reading Data Files", "File Existence and Access Verification", "Indexing and ID Assignment", "Command-Line and Shell Operations", "Data Ingestion and Processing", "Data Extraction and Manipulation", "Time Formatting and String Manipulation", "Data Integration and Merging", "Join Operations and Merging", "Arithmetic and Cumulative Calculations", "Time Difference and Gradient Calculation", "Data Manipulation and Summarization", "Mathematical and Statistical Computations", "Data Binning and Grid Creation", "Peak Detection & Identification", "Statistical Analysis and Metrics", "Statistical Calculations and Descriptive Statistics", "Data Storage and Structuring", "Output and Logging", "Plot Creation and Configuration", "Histogram Creation and Manipulation", "Multiple Series/Traces Visualization", "Using Seaborn for Statistical Plots", "Plot Customization and Annotation", "Plot Customization (Aesthetics)", "Plot Customization and Layout", "Image Handling and Exporting", "Data Serialization & File Handling", "Validation and Verification of Merge Results", "Data Export and Output Processing"], "domain": "real_estate", "output_file_name": ["output.csv", "output.png"], "gold_file_name": ["result.csv", "result.png"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['value'], thresholds={'value': None})", "compare_image(output_file_name=\"output.png\", gold_file_name=\"result.png\", calculate_columns=[\"type\"])"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result.png')"]} {"id": "real_estate_13", "question": "A real estate investment company needs to identify states with a high Price-to-Rent Ratio, while considering macroeconomic stability and public safety.\n\nUsing state-level housing price and rent data from December 2019, education funding data from 2016, unemployment rate data from December 2019, and crime rate data, calculate the Price-to-Rent Ratio for each state as: housing price index / (monthly rent × 12).\n\nFilter states that meet all of the following conditions:\n- Unemployment Rate < 5%\n- Average education funding > $12,000\n- Average violent crime rate < 400 per 100,000 residents\n\nSort the results by Price-to-Rent Ratio in ascending order.\n\nOutput: output.csv (contains filtered state-level data with Price-to-Rent Ratio, unemployment rate, education funding, and violent crime rate for each qualifying state)", "data_sources": ["Zillow House Price Data/State_Zhvi_AllHomes.csv", "Zillow House Price Data/State_MedianRentalPrice_AllHomes.csv", "Unemployment in America Per US State.csv", "U.S. Education.csv", "United States Crime Rates By City Population/crime_40_60.csv", "United States Crime Rates By City Population/crime_60_100.csv", "United States Crime Rates By City Population/crime_100_250.csv", "United States Crime Rates By City Population/crime_250_plus.csv"], "skills": ["Data Loading with Pandas", "Path Construction and Manipulation", "Command-Line and Shell Operations", "Data Conversion and Post-Loading Processing", "Column Selection and Consistency Checks", "Data Handling & Preparation", "Data Manipulation and Summarization", "Join Operations and Merging", "Data Integration and Merging", "Arithmetic and Cumulative Calculations", "Filtering and Criteria-Based Selection", "Conditional Logic and Row-wise Operations", "Sorting, Limiting, and Ranking", "Output and Logging", "Data Export and Output Processing", "Data Serialization & File Handling", "File Existence and Access Verification"], "domain": "real_estate", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['State', 'PriceToRentRatio', 'UnemploymentRate', 'EducationRevenuePerStudent', 'AvgViolentCrimeRate'], thresholds={'PriceToRentRatio': None, 'UnemploymentRate': None, 'EducationRevenuePerStudent': None, 'AvgViolentCrimeRate': None})"]} {"id": "real_estate_14", "question": "The Housing Policy Research Group needs to assess the reliability of housing market data for various cities in the United States, in order to prioritize the selection of cities with high data quality for long-term affordability studies.\n\nBased on the city-level housing market datasets, evaluate the data integrity of each city-state pair during the period from January 2010 to December 2019. For each city-state pair, compute total data points as the number of monthly cells in this period across the listed files where that city-state pair appears, and compute non-missing data points from those same cells. Select city-state pairs with a missing rate exceeding 40%, and sort by missing rate in descending order, breaking ties by state and then city name in ascending order.\n\nOutput: output.csv (contains the list of city-state pairs with a missing rate exceeding 40%, sorted as specified, including city name, state, total data points, non-missing data points, and missing rate)", "data_sources": ["Zillow House Price Data/City_Zhvi_AllHomes.csv", "Zillow House Price Data/City_MedianRentalPrice_AllHomes.csv", "Zillow House Price Data/City_Zhvi_SingleFamilyResidence.csv", "Zillow House Price Data/City_MedianRentalPrice_Sfr.csv", "Zillow House Price Data/DaysOnZillow_City.csv", "Zillow House Price Data/Sale_Prices_City.csv"], "skills": ["Data Loading with Pandas", "Data Import and Library Setup", "Path Construction and Manipulation", "Directory and File I/O", "Parsing and Reading Data Files", "Command-Line and Shell Operations", "DataFrame Transformation and Reshaping", "Date Adjustment and Alignment", "Preprocessing and File Structure Adjustments", "Handling Missing Data", "Numerical Data Handling", "Data Filtering and Transformation", "Sorting, Limiting, and Ranking", "Output and Logging", "Validation and Verification of Merge Results", "Data Export and Output Processing", "CSV Processing"], "domain": "real_estate", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['RegionName', 'State', 'non_missing', 'total', 'missing_rate'], thresholds={'non_missing': None, 'total': None, 'missing_rate': None})"]} {"id": "real_estate_15", "question": "Real estate investment companies need to analyze how macroeconomic, demographic, educational, and public safety factors jointly affect housing prices in various cities of the United States in 2019.\n\nConstruct an optimized regression model with:\n- Dependent variable: The natural logarithm of the 2019 all-homes city ZHVI, computed as the median of its 2019 monthly values\n- Independent variables:\n 1. Crime rates: City-level violent crime rate and property crime rate per 100,000 people (log-transformed)\n 2. Unemployment rate: The state-level average unemployment rate in 2019\n 3. Education quality: State-level average math (4th grade) and reading (8th grade) scores from 2017 to 2019\n 4. Economic factors: County-level median household income and poverty rate\n 5. Population: County-level total population\n\nUse only city records with complete matched target and feature values.\n\nTrain and compare Linear Regression, Random Forest (n_estimators=100), and Gradient Boosting (n_estimators=100) models. Use an 80/20 train-test split with random_state=42. Standardize all features before training. Select the best performing model based on test set R².\n\nOutput: output.csv (containing the best model's test set R² value, rounded to 4 decimal places)", "data_sources": ["Zillow House Price Data/City_Zhvi_1bedroom.csv", "Zillow House Price Data/City_Zhvi_2bedroom.csv", "Zillow House Price Data/City_Zhvi_3bedroom.csv", "Zillow House Price Data/City_Zhvi_4bedroom.csv", "Zillow House Price Data/City_Zhvi_5BedroomOrMore.csv", "Zillow House Price Data/City_Zhvi_AllHomes.csv", "Zillow House Price Data/City_MedianRentalPrice_1Bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_2Bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_AllHomes.csv", "Zillow House Price Data/DaysOnZillow_City.csv", "Zillow House Price Data/Sale_Prices_City.csv", "Unemployment in America Per US State.csv", "U.S. Education.csv", "United States Crime Rates By City Population/crime_40_60.csv", "United States Crime Rates By City Population/crime_60_100.csv", "United States Crime Rates By City Population/crime_100_250.csv", "United States Crime Rates By City Population/crime_250_plus.csv", "US Census Demographic Data/acs2017_county_data.csv"], "skills": ["Data Loading with Pandas", "Data Import and Library Setup", "Parsing and Reading Data Files", "Data Handling & Preparation", "Pandas-Specific Operations", "Command-Line and Shell Operations", "Data Ingestion and Processing", "Data Structure Handling (Dictionaries, Lists)", "Mapping and Lookup", "Date Adjustment and Alignment", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Mathematical and Statistical Computations", "Numerical Data Handling", "Preprocessing and File Structure Adjustments", "Feature Selection and Dimensionality Reduction", "Arithmetic and Cumulative Calculations", "Data Integration and Merging", "Join Operations and Merging", "Data Alignment & Merging", "Data Conversion and Post-Loading Processing", "Array and Matrix Manipulation", "Data Manipulation and Summarization", "Regression Modeling and Interpretation", "Model Training & Evaluation", "Arithmetic Transformations and Normalization", "Logarithmic Scaling and Axis Transformations", "Data Splitting and Sampling", "Data Splitting and Leakage Prevention", "Preprocessing and Scaling", "Data Normalization and Standardization", "Data Transformation and Feature Engineering", "Stochasticity and Reproducibility", "Model Evaluation & Validation", "Data Export and Output Processing", "Output and Logging", "File Existence and Access Verification"], "domain": "real_estate", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['value'], thresholds={'value': None})"]} {"id": "real_estate_16", "question": "The housing policy research institution needs to assess the housing market conditions in each state of the United States and the District of Columbia to support the allocation decisions of urban development grants.\n\nBased on city-level housing market, economic, educational, crime, and population data, conduct a comprehensive state-level analysis:\n- Housing market: Aggregate city-level housing price index and rent prices to state level using 2019 data\n- Economic: 2019 unemployment rate and median household income\n- Education: Education expenditure (2016)\n- Social: Poverty rate and crime rate\n\nCalculate the Price-to-Rent Ratio as: state-level housing price index / (state-level monthly rent × 12).\n\nCalculate a comprehensive socio-economic score using Min-Max normalized indicators with the following weights (note: for unemployment, poverty, and crime rate, lower values indicate better conditions and should be inverted before weighting):\n- Income: 0.25\n- Education Revenue: 0.20\n- Unemployment Rate: 0.20\n- Poverty Rate: 0.20\n- Crime Rate: 0.15\n\nUse available non-missing values when normalizing each indicator. Keep jurisdictions in the output even when some required indicators are unavailable, leaving affected output fields blank.\n\nCalculate a housing affordability indicator as: median household income / Price-to-Rent Ratio.\n\nSort by the comprehensive socio-economic score in descending order.\n\nOutput: output.csv (contains state name, comprehensive socio-economic score, housing affordability indicator, Price-to-Rent Ratio, income, and unemployment rate for each state and the District of Columbia)", "data_sources": ["Zillow House Price Data/City_Zhvi_AllHomes.csv", "Zillow House Price Data/City_MedianRentalPrice_AllHomes.csv", "U.S. Education.csv", "Unemployment in America Per US State.csv", "US Census Demographic Data/acs2017_county_data.csv", "United States Crime Rates By City Population/crime_40_60.csv", "United States Crime Rates By City Population/crime_60_100.csv", "United States Crime Rates By City Population/crime_100_250.csv", "United States Crime Rates By City Population/crime_250_plus.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Command-Line and Shell Operations", "Data Manipulation and Summarization", "Index Handling and Conversion", "Row-wise Operations and Aggregation", "Geospatial Data Handling and Mapping", "Dictionary Manipulation and Construction", "Data Filtering and Grouping", "Column/Row-wise Computations", "Time Formatting and String Manipulation", "Data Cleaning and Transformation", "Preprocessing and File Structure Adjustments", "Data Conversion and Post-Loading Processing", "Data Integration and Merging", "Arithmetic and Cumulative Calculations", "State Management Across Rows", "Statistical Analysis and Metrics", "Data Aggregation and Grouping", "Data Normalization and Standardization", "Normalization and Percentile Calculations", "Arithmetic Transformations and Normalization", "Ranking and Normalization", "Normalization and Weighted Aggregation", "Column Selection and Consistency Checks", "Incremental and Comparative Calculations", "Data Export and Output Processing", "Formatting and Output Organization", "Validation and Verification of Merge Results", "Output and Logging"], "domain": "real_estate", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['State', 'SocioeconomicScore', 'AffordabilityIndex', 'PriceToRentRatio'], thresholds={'SocioeconomicScore': None, 'AffordabilityIndex': None, 'PriceToRentRatio': None})"]} {"id": "real_estate_17", "question": "The Federal Housing Policy Working Group needs to identify the states where housing market behavior was abnormal during the period of 2011-2016.\n\nBased on city-level housing market, economic and demographic statistics, conduct an annual analysis at the state level:\n- Housing market data: house price index, rent price, number of days for house sales and sales price\n- Economic data: annual unemployment rate\n- Socioeconomic data: educational and demographic indicators\n\nRequirements:\n1. Data aggregation: Aggregate city-level data by state and year, and calculate the annual median\n2. Feature engineering: Calculate the housing market characteristics of each state each year, including house price growth rate, rent growth rate, price-to-rent ratio, etc.\n3. Data standardization: Standardize all numerical features\n4. Cluster analysis: Divide the state-year observations into 4 housing market types\n5. Anomaly detection: Calculate the Euclidean distance from each observation to its corresponding cluster center as the anomaly score\n6. Sort by descending anomaly score and output the relevant results\n\nOutput: output.csv (contains state name, year, cluster label, anomaly score, sorted by descending anomaly score)", "data_sources": ["Zillow House Price Data/City_MedianRentalPrice_AllHomes.csv", "Zillow House Price Data/City_Zhvi_AllHomes.csv", "Zillow House Price Data/DaysOnZillow_City.csv", "Zillow House Price Data/Sale_Prices_City.csv", "Unemployment in America Per US State.csv", "U.S. Education.csv", "US Census Demographic Data/acs2017_county_data.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Command-Line and Shell Operations", "Data Aggregation and Grouping", "Row-wise Operations and Aggregation", "Time Series & Temporal Grouping", "Incremental and Comparative Calculations", "Time Difference and Gradient Calculation", "Arithmetic and Cumulative Calculations", "Data Type and Format Conversion", "Preprocessing and File Structure Adjustments", "Data Integration and Merging", "Data Alignment & Merging", "Join Operations and Merging", "SQL Pivot and Crosstab Techniques", "Data Normalization and Standardization", "Preprocessing and Scaling", "Column-specific or Feature-wise Processing", "Feature Selection and Statistical Computation", "Clustering and Post-Processing", "Cluster Label Assignment", "Outlier Detection and Filtering", "Array and Matrix Manipulation", "Stochasticity and Reproducibility", "Clustering and Hierarchical Methods", "Data Export and Output Processing", "Data Serialization & File Handling", "Formatting and Output Organization", "In-place vs Copy Operations"], "domain": "real_estate", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_model(output_file_name='output.csv', gold_file_name='result.csv', matched_columns=[0, 1], calculate_columns=[3], metric='pearson', lower_bound=0.8, upper_bound=1.0)"]} {"id": "real_estate_18", "question": "The National Housing Policy Institute of the United States needs to assess the health status of the housing markets in each state of the United States in 2017. Based on urban and state-level housing markets, economic and demographic data, a comprehensive assessment is to be conducted:\n- Housing market data: house price index (ZHVI), 1-bedroom rent price, and days on market\n- Economic data: annual unemployment rate and median household income\n- Socioeconomic data: education total revenue\n\nRequirements:\n1. Data aggregation: Aggregate city-level data to the state-level using median, based on 2017 data. For education data, use the latest available year (fallback to 2016 if 2017 is unavailable). Fill missing values with the column median.\n2. Calculate housing market health indicators:\n - Housing price stability (standard deviation of house price index across 2017 months)\n - Rental yield (annual 1-bedroom rent / house price index)\n - Market liquidity (inverse of the number of days on market)\n - Employment health (inverse of unemployment rate)\n - Education quality (education total revenue)\n - Economic vitality (median household income)\n3. Data standardization: Normalize all indicators to the range of 0-1 using Min-Max scaling. For indicators where lower is better (price volatility, days on market, unemployment rate), use 1 - normalized value.\n4. Calculate the comprehensive housing health score: Weighted average with equal weights (1/6 each)\n5. Sort by the comprehensive score in descending order\n\nOutput: output.csv (Contains state abbreviation, comprehensive housing health score, and intermediate indicators for each state, sorted by score in descending order)", "data_sources": ["Zillow House Price Data/City_MedianRentalPrice_1Bedroom.csv", "Zillow House Price Data/City_Zhvi_AllHomes.csv", "Zillow House Price Data/DaysOnZillow_State.csv", "U.S. Education.csv", "Unemployment in America Per US State.csv", "US Census Demographic Data/acs2017_county_data.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Command-Line and Shell Operations", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Column Selection and Consistency Checks", "Time Formatting and String Manipulation", "Mapping and Lookup", "In-place vs Copy Operations", "Dictionary Manipulation and Construction", "Data Structure Handling (Dictionaries, Lists)", "Arithmetic Transformations and Normalization", "Data Normalization and Preprocessing", "Normalization and Weighted Aggregation", "Indexing and Row-Level Operations", "Data Export and Output Processing", "Data Serialization & File Handling"], "domain": "real_estate", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_model(output_file_name='output.csv', gold_file_name='result.csv', matched_columns=[0], calculate_columns=[1], metric='mae', lower_bound=0.01, upper_bound=0)"]} {"id": "real_estate_19", "question": "A national housing policy research group aims to investigate how economic and social factors in each state of the United States affect the synchronicity of the housing market during the recovery phase following the economic recession (2015 - 2018). Based on the housing market data of each state, including the number of days the houses are on the market, rental prices, and housing value indices, a state-level housing similarity network is constructed. For each state, compute the mean of each housing indicator over the 2015-2018 monthly data, standardize the resulting feature vector, and use the Euclidean distance between standardized vectors as edge weights. Apply K-Means clustering (k=4, random_state=42) to identify synchronous housing market clusters. Then, integrate background data to enrich this graph: map the node border colors to the average eighth-grade math scores of each state (from education data, summarized by state), adjust the node transparency using the average unemployment rate (2015 - 2018), and set the node size according to the growth rate of housing value (January 2015 to January 2020). Additionally, calculate the average violent crime rate within each cluster and display it as a heatmap in a separate subplot placed to the right of the main network visualization (use a two-panel figure with the network scatter on the left and the heatmap subplot on the right, with width ratio 3:1). Use PCA for the network layout. Generate a high-resolution visualization with a dark background and save it to output.png (300 DPI). Finally, construct an adjacency matrix using the 25th percentile of pairwise distances as the edge threshold, count the number of connected components via DFS, and save the result to output.csv with columns 'metric' and 'value'.", "data_sources": ["U.S. Education.csv", "Unemployment in America Per US State.csv", "United States Crime Rates By City Population/crime_100_250.csv", "Zillow House Price Data/DaysOnZillow_State.csv", "Zillow House Price Data/State_MedianRentalPrice_AllHomes.csv", "Zillow House Price Data/State_Zhvi_AllHomes.csv"], "skills": ["Data Loading with Pandas", "Directory and File Management", "Data Inspection and Exploration", "Time Formatting and String Manipulation", "Time Series Handling and Indexing", "Time Series & Temporal Grouping", "Data Integration and Merging", "Join Operations and Merging", "Distance Matrix Handling", "Array and Matrix Manipulation", "Clustering and Hierarchical Methods", "Cluster Label Assignment", "Stochasticity and Reproducibility", "Statistical Calculations and Quantiles", "Data Aggregation and Grouping", "Arithmetic and Cumulative Calculations", "Incremental and Comparative Calculations", "Numerical Operations and Type Conversion", "In-place vs Copy Operations", "Handling Missing Data", "Imputation Methods", "Graph Data Preparation and Cleaning", "Color and Palette Usage", "Graph Styling and Visualization", "Plot Customization and Layout", "Plot Customization and Annotation", "Plot Customization (Aesthetics)", "Using Seaborn for Statistical Plots", "Image Handling and Exporting", "Graph Algorithms and Clustering", "Numerical Comparison and Proximity Checks", "Graph Analysis and Metrics", "Data Serialization & File Handling", "Data Storage and Structuring"], "domain": "real_estate", "output_file_name": ["output.csv", "output.png"], "gold_file_name": ["result.csv", "result.png"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['value'], thresholds={'value': None})", "compare_image(output_file_name='output.png', gold_file_name='result.png', calculate_columns=['type', 'graph_title', 'x_label', 'y_label'])"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result.png')"]} {"id": "real_estate_21", "question": "The National Housing Policy Research Group is investigating how educational investment and labor market conditions relate to the affordability of multi-bedroom rents in major U.S. metropolitan areas.\n\nIdentify cities that have at least 24 months of non-missing 2-bedroom rental data during the period 2010-2019. For these qualifying cities, compile a comprehensive dataset that includes:\n- The latest available (December 2019) rental prices for each multi-bedroom type and all housing types, as well as the housing value index\n- State-level education expenditure per student (from the most recent available year) and average unemployment rate\n- County-level demographic indicators: total population, household income, poverty rate, unemployment rate, and per capita income\n\nMerge the data using city-state identifiers for housing data, state identifiers for education and unemployment data, and county-state identifiers for census data.\n\nOutput: output.csv (a comprehensive dataset with one row per qualifying city)", "data_sources": ["U.S. Education.csv", "Unemployment in America Per US State.csv", "Zillow House Price Data/City_MedianRentalPrice_2Bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_4Bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_5BedroomOrMore.csv", "Zillow House Price Data/City_MedianRentalPrice_AllHomes.csv", "Zillow House Price Data/City_Zhvi_AllHomes.csv", "US Census Demographic Data/acs2017_county_data.csv"], "skills": ["Data Loading with Pandas", "Column Iteration and Processing", "Arithmetic and Cumulative Calculations", "Data Transformation and Column Manipulation", "Data Structure Handling (Dictionaries, Lists)", "Dictionary Manipulation and Construction", "Column Manipulation / Creation", "Sorting, Limiting, and Ranking", "Row-wise Operations and Aggregation", "Column Selection and Consistency Checks", "Handling Missing Data", "Data Inspection and Exploration", "Filtering and Criteria-Based Selection", "Data Filtering and Grouping", "Mapping and Lookup", "String Manipulation and Conversion", "Data Cleaning and Transformation", "Column-wise Transformations and Aggregation", "Function Application and Vectorization", "Parsing and Reading Data Files", "File Existence and Access Verification", "Command-Line and Shell Operations", "Time-based Filtering and Matching", "Geospatial Data Handling and Mapping", "Conditional Data Processing", "Join Operations and Merging", "Data Integration and Merging", "Geospatial Data Processing"], "domain": "real_estate", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['RegionName', 'state_abbr', 'latest_rental_2br', 'education_expenditure_per_student', 'average_unemployment_rate', 'TotalPop', 'Income', 'Poverty', 'Unemployment', 'IncomePerCap'], thresholds={'latest_rental_2br': None, 'education_expenditure_per_student': None, 'average_unemployment_rate': None, 'TotalPop': None, 'Income': None, 'Poverty': None, 'Unemployment': None, 'IncomePerCap': None})"]} {"id": "real_estate_22", "question": "Real estate market analysts need to develop a Housing Market Stress Index (HMSI) to assess the health of the real estate market in each state of the United States during the period from 2015 to 2019.\n\nThe HMSI is composed of two components:\n1. Housing price volatility: For each state-year, calculate the standard deviation of year-over-year ZHVI growth rates across cities within that state.\n2. Rent-to-Value ratio: For each state-year, calculate the ratio of median rental price to median housing value index.\n\nNormalize each component using Min-Max scaling across all state-year observations, then sum the two normalized components to obtain the HMSI. Calculate the average HMSI for each state over the 2015-2019 period, and output the top 5 states with the highest average HMSI, ranked in descending order.\n\nOutput: output.csv (containing state and average HMSI for the top 5 states)", "data_sources": ["Zillow House Price Data/City_Zhvi_AllHomes.csv", "Zillow House Price Data/City_MedianRentalPrice_AllHomes.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Pandas-Specific Operations", "Column Selection and Consistency Checks", "Column Iteration and Processing", "DataFrame Transformation and Reshaping", "Date Adjustment and Alignment", "Error Handling and Invalid Dates", "Data Aggregation and Grouping", "Data Integration and Merging", "Join Operations and Merging", "Command-Line and Shell Operations", "Time-based Filtering and Matching", "Filtering and Criteria-Based Selection", "Percentage and Variation Calculations", "Statistical Analysis and Metrics", "Mathematical and Statistical Computations", "Arithmetic and Cumulative Calculations", "Normalization and Percentile Calculations", "Arithmetic Transformations and Normalization", "Time Difference and Gradient Calculation", "Ranking and Top N Logic", "Sorting, Limiting, and Ranking", "Data Storage and Structuring"], "domain": "real_estate", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['State', 'Avg_HMSI'], thresholds={'Avg_HMSI': None})"]} {"id": "real_estate_25", "question": "A national real estate investment firm needs to build a city-level home price forecasting model and rigorously evaluate its performance using multi-dimensional socioeconomic indicators. Using monthly home price indices, all listed city-level rental and ZRI price sources, state-level unemployment rates, education funding data, and county-level demographic statistics aggregated to state-level summaries, construct a time series prediction pipeline that:\n\n1. Loads and standardizes data formats from multiple sources with different temporal granularities and geographic levels\n2. Integrates multi-source data using pandas merge operations to build a comprehensive feature dataset aligned by city, state, and time period, with the rental sources combined at city-month level before merging\n3. Computes time-series window features including 6-month and 12-month rolling averages, rolling standard deviations (volatility), year-over-year change rates, and annualized rent-to-price ratios\n4. Restricts each city to the overlapping time window where home prices and all exogenous variables are available, and applies ARIMA(1,1,1) models with exogenous variables (6-month rental moving averages, unemployment rates, annualized rent-to-price ratios, median income, and education revenue) to forecast home prices for cities with at least 60 months of complete overlapping observations\n5. Uses 80% of each selected city's overlapping-window data for training and 20% for testing; if more than 30 cities satisfy the criteria, process the 30 cities with the longest complete overlapping histories, breaking ties by state and city name\n6. Calculates performance metrics with 95% confidence intervals using Bootstrap resampling (1000 iterations with random_state=42)\n\nOutput a JSON file named 'output.json' containing exactly five evaluation metrics with keys `mae`, `rmse`, `mape`, `r2`, and `weighted_mae` (using maximum-scaled home-value weights, giving higher weights to higher-priced properties). Each metric must include three values: 'low' (2.5th percentile), 'mid' (50th percentile/median), and 'high' (97.5th percentile), all rounded to 4 decimal places.", "data_sources": ["Zillow House Price Data/City_Zhvi_AllHomes.csv", "Zillow House Price Data/City_MedianRentalPrice_AllHomes.csv", "Zillow House Price Data/City_MedianRentalPrice_Sfr.csv", "Zillow House Price Data/City_MedianRentalPrice_1Bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_2Bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_3Bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_4Bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_5BedroomOrMore.csv", "Zillow House Price Data/City_Zri_AllHomesPlusMultifamily.csv", "Zillow House Price Data/City_Zri_SingleFamilyResidenceRental.csv", "Unemployment in America Per US State.csv", "U.S. Education.csv", "US Census Demographic Data/acs2017_county_data.csv"], "skills": ["Data Loading with Pandas", "Date and Time Conversion", "Time Formatting and String Manipulation", "Data Normalization and Standardization", "Data Normalization and Preprocessing", "Command-Line and Shell Operations", "Data Alignment & Merging", "Data Aggregation and Grouping", "Join Operations and Merging", "Data Integration and Merging", "Column Selection and Consistency Checks", "Trend and Smoothing Techniques", "Lagged Variables and Rolling Features", "Arithmetic and Cumulative Calculations", "Rolling Window Operations", "Time Series and Window Analysis", "Function Application and Vectorization", "Model Training & Evaluation", "ARIMA Model Fitting", "Exogenous Variable Handling", "Filtering and Criteria-Based Selection", "Time-based Filtering and Matching", "Data Splitting and Sampling", "Data Splitting and Leakage Prevention", "Model Prediction and Output Handling", "Model Architecture and Weight Management", "Parameter Estimation and Bootstrap Methods", "Statistical Modeling and Uncertainty", "Bootstrap Resampling in Models", "Mathematical and Statistical Computations", "Statistical Calculations and Quantiles", "Formatting and Output Organization", "Model Evaluation Metrics", "Data Export and Output Processing", "Stochasticity and Reproducibility"], "domain": "real_estate", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'mae': {'low': 0.05, 'mid': 0.05, 'high': 0.05}, 'rmse': {'low': 0.05, 'mid': 0.05, 'high': 0.05}, 'mape': {'low': 0.05, 'mid': 0.05, 'high': 0.05}, 'r2': {'low': 0.05, 'mid': 0.05, 'high': 0.05}, 'weighted_mae': {'low': 0.05, 'mid': 0.05, 'high': 0.05}})"]} {"id": "real_estate_26", "question": "A housing policy research institute aims to identify abnormal fluctuations in U.S. state real estate markets between 2010 and 2018. Using monthly market indicators including home price indices, rental prices, days on market, and sale prices, along with state-level unemployment rates, education funding, and demographic statistics, construct an anomaly detection pipeline that:\n\n1. Loads and standardizes multi-source data with different temporal granularities, converting wide-format time series to long-format\n2. Integrates data using merge operations aligned by state and year, aggregating monthly data to annual averages\n3. Designs a composite anomaly scoring algorithm using weighted Z-scores across multiple market indicators (home prices, rents, days on market, sale prices, unemployment). Education funding and demographic statistics are used as auxiliary integration/background variables and do not need to be included in the composite score.\n4. Applies smoothed Z-Score anomaly detection (3-year lag window, 2.0 threshold, 0.5 influence factor) to identify significant deviations\n5. Generates multi-panel visualizations showing raw scores, smoothed trends, control bounds, and anomaly signals for representative states, where representative states are defined deterministically as follows: first select states with at least 5 annual observations and at least one non-zero anomaly signal, sort them alphabetically by state abbreviation, and take the first 5; if fewer than 5 states satisfy this rule, fill the remaining slots using states with the most annual observations, breaking ties alphabetically.\n6. Outputs structured results including anomaly signals, smoothed averages, rolling standard deviations, and statistical summaries\n\nOutput two files: (1) 'output_image.png' containing a multi-panel visualization with 5 representative states selected by the rule above, each showing left panel (composite anomaly score, smoothed trend line, and green-shaded control bounds) and right panel (anomaly signals as red/blue bars where +1 indicates positive anomaly, -1 indicates negative anomaly); (2) 'output.json' containing a dictionary with keys 'analysis_period' (set to '2010-2018'), 'algorithm_params' (with 'lag': 3, 'threshold': 2.0, 'influence': 0.5), and 'states' (mapping each state to its 'years' array, 'original_scores' array, 'smoothed_avg' array, 'rolling_std' array, 'upper_bound' array, 'lower_bound' array, 'signals' array, and 'anomaly_stats' object containing 'positive_anomalies' count, 'negative_anomalies' count, 'total_anomalies' count, and 'anomaly_years' list).", "data_sources": ["Zillow House Price Data/DaysOnZillow_State.csv", "Zillow House Price Data/Sale_Prices_State.csv", "Zillow House Price Data/State_MedianRentalPrice_AllHomes.csv", "Zillow House Price Data/State_Zhvi_AllHomes.csv", "U.S. Education.csv", "Unemployment in America Per US State.csv", "US Census Demographic Data/acs2015_county_data.csv", "US Census Demographic Data/acs2017_county_data.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Date and Time Conversion", "Time Series Handling and Indexing", "Time Formatting and String Manipulation", "Data Structure Handling (Dictionaries, Lists)", "Pandas-Specific Operations", "Element-wise Dataframe Operations", "Function Application and Vectorization", "Command-Line and Shell Operations", "Data Aggregation and Grouping", "Time Series Resampling and Aggregation", "Data Integration and Merging", "Join Operations and Merging", "Data Preparation and Aggregation", "Filtering and Criteria-Based Selection", "Time-based Filtering and Matching", "Z-Score Calculations", "Arithmetic and Cumulative Calculations", "Normalization and Weighted Aggregation", "Outlier Detection and Filtering", "Trend and Smoothing Techniques", "Rolling Statistics and Window-Based Signal Processing", "Multiple Series/Traces Visualization", "Layout and Multi-Panel Visualizations", "Plot Customization and Annotation", "Plot Customization (Aesthetics)", "Image Handling and Exporting", "Data Serialization & File Handling", "Data Storage and Structuring", "Handling Missing Data"], "domain": "real_estate", "output_file_name": ["output_image.png", "output.json"], "gold_file_name": ["result_image.png", "result.json"], "eval_func": ["compare_image('output_image.png', 'result_image.png', calculate_columns=['type'])", "compare_json('output.json', 'result.json', thresholds={'states': None})"], "post_process_func": ["image_post_process('output_image.png')", "image_post_process('result_image.png')"]} {"id": "real_estate_27", "question": "A housing policy research institute aims to build a state-level housing affordability analysis dashboard to visualize the relationships between home prices, rental prices, affordability ratios, and socioeconomic indicators. Using monthly home price indices, rental price data, state-level unemployment rates, and county-level demographic statistics from 2017, construct a comprehensive analysis pipeline that:\n\n1. Loads and standardizes multi-source data with different temporal granularities, converting wide-format monthly time series to long-format annual aggregates for the 2010-2018 period\n2. Integrates data using pandas merge operations aligned by state and year for housing and unemployment data, and merges 2017 county-level demographic statistics aggregated to the state level as static socioeconomic context\n3. Calculates housing affordability metrics including home price-to-income ratio and rent-to-income ratio, plus year-over-year growth rates for both home prices and rents\n4. Creates a static multi-panel visualization showing: (a) top 20 states by annual average home value as horizontal bar chart, (b) top 20 states by annual average rent price as horizontal bar chart, (c) scatter plot of home price-to-income ratio vs. rent-to-income ratio colored by unemployment rate, (d) scatter plot of unemployment rate vs. home value growth rate\n\nOutput one file: 'output.png' containing a 2x2 grid of subplots (16x12 inches, 150 DPI) with the four visualizations described above for year 2018 data.", "data_sources": ["Zillow House Price Data/State_Zhvi_AllHomes.csv", "Zillow House Price Data/State_MedianRentalPrice_AllHomes.csv", "Unemployment in America Per US State.csv", "US Census Demographic Data/acs2017_county_data.csv"], "skills": ["Data Loading with Pandas", "Data Exploration and Comparison", "Data Inspection and Understanding", "DataFrame Transformation and Reshaping", "Date and Time Conversion", "Time Formatting and String Manipulation", "Command-Line and Shell Operations", "Data Alignment & Merging", "Data Aggregation and Grouping", "Time Series & Temporal Grouping", "Data Integration and Merging", "Join Operations and Merging", "Data Preparation and Aggregation", "Pandas-Specific Operations", "Column-wise Transformations and Aggregation", "Filtering and Criteria-Based Selection", "Time-based Filtering and Matching", "Statistical and Mathematical Modeling", "Arithmetic and Cumulative Calculations", "Percentage and Variation Calculations", "Handling Missing Data", "Data Export and Output Processing", "Subplot and Layout Management", "Layout and Multi-Panel Visualizations", "Bar Chart Creation and Layout", "Multiple Series/Traces Visualization", "Plot Creation and Configuration", "Plot Customization and Layout"], "domain": "real_estate", "output_file_name": ["output.png"], "gold_file_name": ["result.png"], "eval_func": ["compare_image('output.png', 'result.png', calculate_columns=['type'])"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result.png')"]} {"id": "real_estate_29", "question": "An economic research institute aims to analyze the lead-lag relationship between state-level home price indices and socioeconomic indicators to identify predictive signals for housing market changes. Using monthly home price indices and state-level unemployment rate data, construct a cross-correlation analysis pipeline that:\n\n1. Loads and cleans time series data, converting wide-format monthly data to long-format, normalizing state identifiers to two-letter USPS abbreviations, and normalizing both series to a common monthly timestamp convention anchored to the first day of each month\n2. Computes 12-month rolling mean and standard deviation for home price indices using at least 6 observed months per rolling window to capture trends and volatility patterns\n3. Computes 12-month rolling statistics for unemployment rates using at least 6 observed months per rolling window to smooth short-term fluctuations\n4. Performs centered, normalized cross-correlation analysis between home price trends and unemployment trends with lag range from -24 to +24 months (negative lags indicate unemployment leads home prices, positive lags indicate home prices lead unemployment). For each state, first align both rolling-mean series to the complete monthly index from 2010-01 through 2019-12, then fill missing values by forward fill followed by backward fill before computing correlations.\n5. Identifies each state's strongest lag relationship, then ranks states whose strongest absolute correlation is greater than 0.1\n\nOutput a JSON file named 'output.json' containing: (1) 'analysis_metadata' object with fields 'time_range' (set to '2010-01 to 2019-12'), 'lag_range_months' (array [-24, 24]), 'correlation_threshold' (0.1), 'window_size' (12), 'total_states_analyzed' (integer), and 'significant_relationships_found' (integer, number of states above the correlation threshold); (2) 'top_10_relationships' array where each element contains 'state' (string, two-letter USPS abbreviation), 'variable1' (string, set to 'ZHVI_Rolling_Mean'), 'variable2' (string, set to 'Unemployment_Rolling_Mean'), 'correlation' (float, rounded to 4 decimals), 'lag_months' (integer), 'abs_correlation' (float, rounded to 4 decimals), and 'relationship' (string, one of 'Unemployment leads ZHVI', 'ZHVI leads Unemployment', or 'Synchronous'); (3) 'summary_statistics' object summarizing the top 10 relationships with 'mean_correlation', 'max_correlation', 'min_correlation' (all floats rounded to 4 decimals), and 'mean_lag_months' (float rounded to 1 decimal).", "data_sources": ["Zillow House Price Data/State_Zhvi_AllHomes.csv", "Unemployment in America Per US State.csv"], "skills": ["Data Loading with Pandas", "Data Cleaning and Transformation", "Pandas-Specific Operations", "Date and Time Conversion", "Trend and Smoothing Techniques", "Rolling Window Operations", "Rolling Statistics and Window-Based Signal Processing", "Time Series and Window Analysis", "Cross-Correlation and Time-Series Alignment", "Statistical Correlation Analysis", "Cross/Merge Products and Filtering by Time Windows", "Data Alignment & Merging", "Data Export and Output Processing", "Data Serialization & File Handling", "Data Storage and Structuring", "Correlation and Relationship Analysis"], "domain": "real_estate", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json('output.json', 'result.json')"]} {"id": "real_estate_30", "question": "A real estate analytics firm needs to build a Housing Market Health Index (HMHI) model to comprehensively evaluate the health status of housing markets across US states and identify the healthiest and least healthy markets. Using monthly home price indices, unemployment rates, crime statistics, education funding data, and demographic statistics, construct a multi-dimensional scoring system that:\n\n1. Loads and standardizes multi-source data with different temporal granularities and geographic levels, converting wide-format Zillow time series to long-format with unified date formats (YYYY-MM-DD) and using state abbreviations (e.g., CA, NY) in the final scoring outputs\n2. Calculates market liquidity scores using price volatility metrics derived from monthly home price changes, normalized to 0-100 scale where higher volatility indicates better liquidity\n3. Calculates housing affordability scores using 2019 average home price levels and 2017 per-capita income data converted to annual income, normalized to 0-100 scale where lower ratios indicate better affordability\n4. Calculates economic stability scores using average unemployment rates from 2015-2019, normalized to 0-100 scale where lower unemployment indicates higher stability\n5. Calculates public safety scores using crime-related indicators aggregated by state, normalized to 0-100 scale where lower crime rates indicate higher safety; if no usable crime score can be derived, use the fallback weighting scheme without the safety dimension\n6. Calculates education resource scores using per-student education revenue from 2015-2019, normalized to 0-100 scale where higher spending indicates better resources\n7. Constructs composite HMHI scores using weighted aggregation: liquidity 25%, affordability 25%, economic stability 20%, safety 15%, education 15% (adjusting weights to 30/30/25/0/15 if safety data is not used)\n8. Ranks all states by HMHI scores and identifies top 5 healthiest and bottom 5 least healthy markets\n\nOutput two files: (1) a JSON file named 'output.json' containing: 'top_5_healthiest', 'bottom_5_least_healthy', 'all_states_ranking', 'weights_used', 'methodology', and 'calculation_date'; (2) a CSV file named 'hmhi_ranking.csv' containing the complete state ranking table sorted by HMHI score.", "data_sources": ["Zillow House Price Data/State_Zhvi_AllHomes.csv", "Unemployment in America Per US State.csv", "United States Crime Rates By City Population/crime_40_60.csv", "United States Crime Rates By City Population/crime_60_100.csv", "United States Crime Rates By City Population/crime_100_250.csv", "United States Crime Rates By City Population/crime_250_plus.csv", "U.S. Education.csv", "US Census Demographic Data/acs2015_county_data.csv", "US Census Demographic Data/acs2017_county_data.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Conversion and Post-Loading Processing", "Time Series Handling and Indexing", "Date and Time Conversion", "Mapping and Lookup", "Data Structure Handling (Dictionaries, Lists)", "Percentage and Variation Calculations", "Normalization and Percentile Calculations", "Mathematical and Statistical Computations", "Arithmetic and Cumulative Calculations", "Debugging and Error Resolution", "Normalization and Weighted Aggregation", "Set and Membership Analysis", "Handling Missing or Edge Cases", "Ranking and Scoring Mechanisms", "Sorting, Limiting, and Ranking", "Ranking and Top N Logic", "Data Serialization & File Handling", "Data Storage and Structuring"], "domain": "real_estate", "output_file_name": ["output.json", "hmhi_ranking.csv"], "gold_file_name": ["result.json", "result_hmhi_ranking.csv"], "eval_func": ["compare_json('output.json', 'result.json', thresholds={'weights_used': {'liquidity': None, 'affordability': None, 'stability': None, 'safety': None, 'education': None}})", "compare_csv(output_file_name='hmhi_ranking.csv', gold_file_name='result_hmhi_ranking.csv', ignore_order=False, thresholds={'Liquidity': None, 'Affordability': None, 'Stability': None, 'Safety': None, 'Education': None, 'HMHI': None})"]} {"id": "real_estate_31", "question": "A national real estate investment company wants to build a regression-based forecasting system to predict housing value indices and rental prices for different property types (1-4 bedrooms) to guide investment portfolio allocation decisions. Using data from 2015 to 2018, construct a multi-target regression workflow that integrates external socioeconomic indicators including state-level education expenditures, unemployment rates, and county-level demographic statistics. Use 2015-2017 observations for training and treat 2018 as the holdout forecasting period. Use monthly city-level target observations; aggregate unemployment to state-year means and treat ACS 2017 demographics as static state features. To keep results reproducible, use random_state=42 for sampling with caps of 62,500 rows per melted target source and 500,000 rows for the merged panel; fill feature missing values with column means and then training-set means within each target split; apply StandardScaler followed by PCA(n_components=0.95); and fit a separate LinearRegression model for each target. The system should: 1) Load and merge city-level housing value and rental price data; 2) Integrate external socioeconomic data; 3) Standardize feature scales and apply dimensionality reduction techniques; 4) Train target-specific regression models for each housing value or rental series; 5) Evaluate 2018 holdout performance and save results to 'output.json' with 'metrics' containing nested objects for each target variable, where each target object has 'r2' and 'mae'.", "data_sources": ["U.S. Education.csv", "Unemployment in America Per US State.csv", "US Census Demographic Data/acs2017_county_data.csv", "Zillow House Price Data/City_Zhvi_1bedroom.csv", "Zillow House Price Data/City_Zhvi_2bedroom.csv", "Zillow House Price Data/City_Zhvi_3bedroom.csv", "Zillow House Price Data/City_Zhvi_4bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_1Bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_2Bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_3Bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_4Bedroom.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Directory and File I/O", "Command-Line and Shell Operations", "DataFrame Transformation and Reshaping", "Data Conversion and Post-Loading Processing", "Time-based Filtering and Matching", "Indexing and Selection", "Dataframe Construction and Optimization", "Row and Index Handling", "Column Selection and Consistency Checks", "Data Preprocessing and Column Management", "Data Integration and Merging", "Join Operations and Merging", "Handling Missing Data", "Stochasticity and Reproducibility", "Mathematical and Statistical Computations", "Data Structure Handling (Dictionaries, Lists)", "Data Structure Understanding and Initialization", "Feature Selection and Dimensionality Reduction", "Model Configuration and Import", "Regression Modeling and Interpretation", "Model Evaluation & Validation", "Model Training & Evaluation", "Model Evaluation Metrics"], "domain": "real_estate", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'metrics': None})"]} {"id": "real_estate_32", "question": "A national real estate policy research institute aims to identify stable housing markets across US states by analyzing housing price volatility and filtering outliers. Using monthly home price indices and rental price data for 1-bedroom and 2-bedroom properties, construct a volatility analysis pipeline that:\n\n1. Loads and integrates multi-bedroom housing market data, converting wide-format monthly time series to long-format with unified date formats. Merge home price data with rental data for both 1-bedroom and 2-bedroom properties aligned by city, state, and date\n2. Calculates housing volatility scores for each state-month combination. Standardize home price indices (ZHVI), 1-bedroom rent, and 2-bedroom rent using Z-score normalization, then compute the standard deviation of these three standardized metrics as the volatility score (lower scores indicate more stable markets)\n3. Filters outliers using an enhanced 3-sigma rule based on median and interquartile range (IQR). Calculate median volatility and IQR, then define bounds: lower_bound = median - 3 * 1.35 * IQR, upper_bound = median + 3 * 1.35 * IQR. Retain observations within these bounds as valid data\n4. Generates a grouped bar chart showing the latest median home prices, 1-bedroom rents, and 2-bedroom rents for the top 20 states by home price after outlier filtering\n5. Outputs statistical results including total observations, valid observations after filtering, number of outliers removed, outlier percentage, volatility thresholds used, and latest state-level metrics for all states after filtering\n\nOutput three files: (1) 'output.png' containing a grouped bar chart (14x8 inches, 150 DPI) showing housing market indicators for the top 20 states, with chart title 'Stable Housing Market Indicators After Outlier Filtering', X-axis labeled 'State', Y-axis labeled 'Amount (Thousands/USD)', and legend labels 'Median Home Price (ZHVI)', '1-Bedroom Rent', and '2-Bedroom Rent'; (2) 'output_data.json' containing total observations, valid observations, outliers removed, outlier percentage, and volatility thresholds; (3) 'output_metrics.csv' containing latest state-level metrics (State, ZHVI, Rent_1Br, Rent_2Br, Volatility_Score, Latest_Date) for all states after filtering.", "data_sources": ["Zillow House Price Data/City_Zhvi_AllHomes.csv", "Zillow House Price Data/City_MedianRentalPrice_1Bedroom.csv", "Zillow House Price Data/City_MedianRentalPrice_2Bedroom.csv"], "skills": ["Data Loading with Pandas", "Data Conversion and Post-Loading Processing", "Custom Function Application for Date Correction", "Parsing and Reading Data Files", "Encoding and Format Identification", "Command-Line and Shell Operations", "Data Alignment & Merging", "Join Operations and Merging", "Data Integration and Merging", "Date and Time Conversion", "Data Aggregation and Grouping", "Statistical and Mathematical Modeling", "Z-Score Calculations", "Arithmetic Transformations and Normalization", "Arithmetic and Cumulative Calculations", "Data Export and Output Processing", "Outlier Detection and Filtering", "Statistical Calculations and Quantiles", "Conditional Aggregation and Filtering", "Filtering and Criteria-Based Selection", "Sorting, Limiting, and Ranking", "Bar Chart Creation and Layout", "Multiple Series/Traces Visualization", "Data Storage and Structuring", "Data Serialization & File Handling"], "domain": "real_estate", "output_file_name": ["output_data.json", "output_metrics.csv", "output.png"], "gold_file_name": ["result.json", "result.csv", "result_image.png"], "eval_func": ["compare_json(output_file_name='output_data.json', gold_file_name='result.json', thresholds={'total_observations': None, 'valid_observations': None, 'outliers_removed': None, 'outlier_percentage': None, 'volatility_thresholds': {'lower_bound': None, 'upper_bound': None}})", "compare_csv(output_file_name='output_metrics.csv', gold_file_name='result.csv')", "compare_image(output_file_name='output.png', gold_file_name='result_image.png', calculate_columns=['type', 'graph_title', 'labels', 'x_label', 'y_label', 'xtick_labels'])"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result_image.png')"]} {"id": "social_network_01", "question": "A social media platform's security team is investigating human (non-bot) user accounts that may be spreading hate-related content. Compute the Jaccard similarity between each human user's tweet text and known hateful/offensive speech content. For gender identification, only consider gender classification records with a confidence level of at least 0.8; if no matching gender data is available for a user, label their gender as 'unknown'. Report only users whose maximum Jaccard similarity score is at least 0.05, with each user appearing only once. Save the results to output1.csv with columns: Username, gender, Retweet Count, Follower Count, max_jaccard_score.", "data_sources": ["Hate_Speech_and_Offensive_Language.csv", "bot_detection_data.csv", "gender-classifier-DFE-791531.csv"], "skills": ["Data Loading with Pandas", "Encoding and Format Identification", "Text Processing and Cleaning", "Data Normalization and Preprocessing", "In-place vs Copy Operations", "Filtering and Criteria-Based Selection", "Data Filtering and Matching", "Join Operations and Merging", "Handling Missing Data", "Pandas-Specific Operations", "Similarity Computation (Cosine/Jaccard/etc.)", "Set and Membership Analysis", "Thresholding and Validation", "Data Structure and Dictionary Operations", "Data Storage and Structuring", "Data Structure Creation and Manipulation", "Data Export and Output Processing", "Indexing and Row-Level Operations", "Function Application and Vectorization"], "domain": "social_network", "output_file_name": ["output1.csv"], "gold_file_name": ["result1.csv"], "eval_func": ["compare_csv(output_file_name='output1.csv', gold_file_name='result1.csv', ignore_order=True, specified_columns=['Username', 'gender', 'Retweet Count', 'Follower Count', 'max_jaccard_score'], thresholds={'max_jaccard_score': None})"]} {"id": "social_network_02", "question": "Generate a 2x2 visualization report (save as cross_platform_engagement_analysis.png) for cross-platform social media analysis:\n\n(a) Boxplot: Twitter engagement rate distribution between Bot and Human users.\n - Build Bot detection model using Random Forest with 5-fold cross-validation.\n - Engagement rate = Retweet Count / Follower Count.\n - Title: 'Twitter Engagement: Bot vs Human'.\n\n(b) Stacked Bar Chart: Content toxicity distribution by engagement quartiles.\n - Use np.random.seed(42) to create random engagement scores, then assign records to Q1-Q4 as four equal-sized quartile groups; use viridis colormap.\n - Title: 'Content Toxicity by Engagement Quartile'.\n\n(c) Stacked Bar Chart: Airline sentiment distribution.\n - Use coolwarm colormap.\n - Title: 'Airline Sentiment Distribution'.\n\n(d) Scatter Plot: Instagram influence score vs engagement rate.\n - Engagement rate (%) = (avg_likes / followers) × 100.\n - Color-code by country.\n - Title: 'Instagram: Influence Score vs Engagement Rate'.", "data_sources": ["Hate_Speech_and_Offensive_Language.csv", "bot_detection_data.csv", "Twitter_US_Airline_Sentiment.sqlite", "top_insta_influencers_data.csv"], "skills": ["Data Cleaning and Transformation", "Data Import and Library Setup", "Path Construction and Manipulation", "Data Loading with Pandas", "Parsing and Reading Data Files", "Numerical Operations and Type Conversion", "Data Normalization and Preprocessing", "Text & String Manipulation", "Handling Missing Data", "Data Inspection and Exploration", "ETL and Data Integration", "Feature Engineering and Embeddings", "Data Preprocessing & Encoding", "Preprocessing and Scaling", "Column-specific or Feature-wise Processing", "Arithmetic and Cumulative Calculations", "Arithmetic Transformations and Normalization", "In-place vs Copy Operations", "Array and Matrix Manipulation", "Function Application and Vectorization", "Hyperparameter Tuning Strategies", "Model Training & Evaluation", "Library Usage (Scikit-Learn)", "Parallel and Concurrent Execution", "Stochasticity and Reproducibility", "Plot Customization (Aesthetics)", "Subplot and Layout Management", "Layout and Multi-Panel Visualizations", "Plot Creation and Configuration", "Plot Customization and Annotation", "Bar Chart Creation and Layout", "Color and Palette Usage", "Plot Customization and Layout", "Output and Logging", "Line Collection Customization", "SQL Pivot and Crosstab Techniques"], "domain": "social_network", "output_file_name": ["cross_platform_engagement_analysis.png"], "gold_file_name": ["result.png"], "eval_func": ["compare_image(output_file_name='cross_platform_engagement_analysis.png', gold_file_name='result.png', calculate_columns=['type'])"], "post_process_func": ["image_post_process('cross_platform_engagement_analysis.png')", "image_post_process('result.png')"]} {"id": "social_network_05", "question": "A social media platform needs to identify low-credibility user accounts that may pose risks to the community. Build a multi-dimensional credibility scoring system that evaluates user trustworthiness and identifies the 100 users with the lowest credibility scores for security review.\n\nThe system should integrate information from all provided data sources, using username as the join key.\n\nFeature definitions:\n- hate_proximity: Use TF-IDF vectorization (max_features=1000, English stop words removed) on user tweet text, then compute cosine similarity against hate speech entries. Each user's score is the mean of per-tweet maximum cosine similarities.\n- engagement_rate = (mean likes + mean retweets) / (follower count + 1)\n- Fill missing confidence values with 0.5, other missing numerical values with 0.\n\nModel features (standardized via StandardScaler): bot detection label, verification status, follower count, gender classification confidence, profile completeness confidence, engagement_rate, and hate_proximity.\n\nTrain two models to predict risk:\n- Logistic Regression (random_state=42) targeting bot label\n- Random Forest (n_estimators=100, random_state=42) targeting a synthetic label: (bot_label × 0.7 + hate_proximity × 0.3) > 0.5\n\ncredibility_score = 1 − (0.6 × LR risk probability + 0.4 × RF risk probability). Global random seed: np.random.seed(42).\n\nOutput: Save the 100 lowest-credibility users to output.csv with columns: username, credibility_score, rank (1 = lowest credibility).", "data_sources": ["bot_detection_data.csv", "gender-classifier-DFE-791531.csv", "Hate_Speech_and_Offensive_Language.csv", "twitter_dataset.csv"], "skills": ["ETL and Data Integration", "Data Loading with Pandas", "Data Integration and Merging", "Path Construction and Manipulation", "Command-Line and Shell Operations", "Feature Engineering and Embeddings", "Text Processing and Cleaning", "Feature Extraction and Vectorization", "Similarity Computation (Cosine/Jaccard/etc.)", "Statistical Analysis and Metrics", "Handling Missing Data", "Data Preprocessing & Encoding", "Dynamic Data Transformation and Insertion", "Vectorization and Performance Optimization", "Algorithm Selection and Implementation", "Model Training & Evaluation", "Probability Modeling and Conversion", "Normalization and Weighted Aggregation", "Sorting, Limiting, and Ranking", "In-place vs Copy Operations", "Stochasticity and Reproducibility", "Data Export and Output Processing", "Data Structure Creation and Manipulation"], "domain": "social_network", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['rank', 'username', 'credibility_score'], thresholds={'rank': None, 'credibility_score': None})"]} {"id": "social_network_06", "question": "A social media platform needs to evaluate the effectiveness of its automated content moderation systems across three classification tasks: bot detection, hate speech identification, and user demographic (gender) classification. Build a text classification evaluation framework using the three provided datasets.\n\nTechnical specifications:\n- Feature extraction: TF-IDF vectorization with max_features=5000, ngram_range=(1, 2), and English stop words removal\n- Classifier: Logistic regression with max_iter=1000, random_state=42, and one-vs-rest strategy for multi-class tasks\n- Data split: 80/20 train/test, random_state=42, stratified by label\n- Cross-validation: 5-fold on training sets, scored by accuracy\n- Evaluation metrics: accuracy and macro-averaged F1 score on test sets\n\nDetermine the best-performing model by accuracy (use task identifiers: bot_detection, hate_speech, gender_classification) and compute the average cross-validation score across all models.\n\nSave results to output.json with all floating-point values rounded to 4 decimal places.\nOutput fields: bot_accuracy, bot_f1, bot_cv_mean, hate_accuracy, hate_f1, hate_cv_mean, gender_accuracy, gender_f1, gender_cv_mean, best_model, best_accuracy, avg_cv_score", "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Command-Line and Shell Operations", "Data Cleaning and Transformation", "Data Preprocessing and Column Management", "Text Processing and Cleaning", "Data Preprocessing & Encoding", "Categorical Data Preprocessing and Simplification", "Feature Extraction and Vectorization", "Data Splitting and Sampling", "Data Splitting and Leakage Prevention", "Stochasticity and Reproducibility", "Vectorization and Performance Optimization", "Model Training and Customization", "Model Configuration and Import", "Classification and Prediction Modeling", "Encoding and Vector Representation", "Library Usage (Scikit-Learn)", "Cross-Validation and Optimization", "Model Evaluation & Validation", "Model Evaluation Metrics", "Data Serialization & File Handling", "Data Storage and Structuring", "Validation and Output Formatting", "Output and Logging", "Array and Matrix Manipulation"], "domain": "social_network", "data_sources": ["bot_detection_data.csv", "Hate_Speech_and_Offensive_Language.csv", "gender-classifier-DFE-791531.csv"], "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'bot_accuracy': 0.1, 'bot_f1': 0.1, 'hate_accuracy': 0.1, 'hate_f1': 0.1, 'gender_accuracy': 0.1, 'gender_f1': 0.1, 'best_accuracy': 0.1, 'avg_cv_score': 0.1})"]} {"id": "social_network_08", "question": "Cross-platform user engagement and content toxicity analysis.\n\nIntegrate six data sources covering Twitter, YouTube, and Instagram to analyze cross-platform user engagement patterns and content toxicity.\n\nFor Twitter data, determine content toxicity by matching preprocessed tweets (lowercase, URLs/mentions/hashtags/special characters removed) against the hate speech dataset using TF-IDF vectorization (stop_words='english', ngram_range=(1, 2), max_features=5000) with cosine similarity. When the best match similarity >= 0.3, assign the corresponding toxicity class from the hate speech record; otherwise classify as class 2 (neutral). Enrich Twitter data with bot detection labels and gender information through username matching. For YouTube and Instagram, assign defaults: bot_label=-1, gender='unknown', toxicity_class=2.\n\nCalculate normalized engagement rate as total engagement divided by audience size for each platform. Treat zero audience sizes as missing during the rate calculation, then set missing or infinite engagement rates to 0 while retaining the records.\n\nGroup by platform, bot_label, gender, and toxicity_class. Compute mean, standard deviation, and count of engagement rates per group, rounding mean and std to 6 decimal places.\n\nSet np.random.seed(42) for reproducibility.\n\nSave results to output.csv with columns: platform, bot_label, gender, toxicity_class, mean, std, count.", "data_sources": ["Hate_Speech_and_Offensive_Language.csv", "Trending_YouTube_Video.csv", "bot_detection_data.csv", "gender-classifier-DFE-791531.csv", "twitter_dataset.csv", "top_insta_influencers_data.csv"], "skills": ["Data Loading with Pandas", "Implementation with Libraries and Tools", "Text Processing and Cleaning", "Numerical Data Handling", "String Manipulation and Conversion", "Directory and File I/O", "Array and Matrix Manipulation", "Function Application and Vectorization", "Similarity Computation (Cosine/Jaccard/etc.)", "Document Similarity and Embedding", "Indexing and Row-Level Operations", "Data Alignment & Merging", "Data Transformation and Column Manipulation", "Data Filtering and Matching", "Arithmetic and Cumulative Calculations", "Data Integration and Merging", "Column Selection and Consistency Checks", "Dynamic Data Transformation and Insertion", "In-place vs Copy Operations", "Data Normalization and Standardization", "Handling Missing or Edge Cases", "Arithmetic and Logical Data Fixes", "Data Conversion and Post-Loading Processing", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Data Export and Output Processing"], "domain": "social_network", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, thresholds={'bot_label': None, 'toxicity_class': None, 'mean': None, 'std': None, 'count': None})"]} {"id": "social_network_10", "question": "Social media user influence network analysis.\n\nIntegrate user data from two data sources by matching usernames case-insensitively, and aggregate interaction metrics per user. Construct a directed interaction graph: for each user, create incoming edges from randomly selected other users based on their mention count (capped at 10 edges per user), with source user selection probability weighted by follower count. Use random seed 42 for reproducibility.\n\nCalculate PageRank centrality scores with damping factor alpha=0.85 and edge weights, then rank users by influence.\n\nOutput: Save the top 10 most influential users to output.csv with columns: rank, username, pagerank_score (rounded to 6 decimal places), mention_count, follower_count.", "data_sources": ["bot_detection_data.csv", "twitter_dataset.csv"], "skills": ["Data Loading with Pandas", "Data Aggregation and Grouping", "Join Operations and Merging", "Data Preparation and Formatting", "Element-wise Dataframe Operations", "In-place vs Copy Operations", "Graph Creation and Manipulation", "Graph Data Preparation and Cleaning", "Array and Matrix Manipulation", "Indexing and Row-Level Operations", "Hierarchical and Network Data Analysis", "Graph Analysis and Metrics", "Graph Algorithms and Clustering", "Sorting, Limiting, and Ranking", "Data Storage and Structuring"], "domain": "social_network", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['rank', 'username', 'pagerank_score', 'mention_count', 'follower_count'], thresholds={'pagerank_score': None})"]} {"id": "social_network_11", "question": "Identify maximal consecutive tweet sequences (within 24h intervals) from same users. Compute per sequence: length (tweet count), bot label mode (Username case-insensitive, -1 for no match), gender mode (fuzzy name matching threshold 0.8, case-insensitive, length difference ≤3, 'unknown' for no match), average engagement (retweets+likes mean, rounded to 4 decimals, missing=0). Assign user_group_id (starting from 1). Output to output.csv: user_group_id, Username, Bot_Label_Mode, Gender_Mode, Consecutive_Block_Length, Avg_Engagement, sorted by user_group_id ascending.", "data_sources": ["bot_detection_data.csv", "gender-classifier-DFE-791531.csv", "twitter_dataset.csv"], "skills": ["Data Loading with Pandas", "Encoding and Format Identification", "Parsing and Reading Data Files", "Dependency Management and Setup", "Text & String Manipulation", "Text Processing and Cleaning", "Handling Missing Data", "Data Categorization & Mapping", "Data Labeling and Structured Data Handling", "Data Filtering and Matching", "Data Aggregation and Grouping", "Entity Mapping and Matching", "Fuzzy Matching and Record Linkage", "Indexing and Row-Level Operations", "Sorting, Limiting, and Ranking", "Date and Time Arithmetic", "Change Detection and Contiguity Analysis", "Unique Identifier and Entity Management", "Grouping and Index Assignment", "In-place vs Copy Operations", "Arithmetic and Cumulative Calculations", "Statistical Analysis and Metrics", "Type Casting and Data Compatibility", "Numerical Operations and Type Conversion", "Formatting and Output Organization", "Data Export and Output Processing", "CSV Processing"], "domain": "social_network", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['user_group_id', 'Username', 'Bot_Label_Mode', 'Gender_Mode', 'Consecutive_Block_Length', 'Avg_Engagement'], thresholds={'Avg_Engagement': None})"]} {"id": "social_network_16", "question": "A social media research team is investigating whether user engagement patterns differ significantly across subgroups defined by bot status, gender identity, and hate speech content. Using datasets containing bot classification labels with retweet metrics, gender classifications with engagement counts, and hate speech annotations with vote totals, perform statistical tests to identify significant differences. Conduct three separate analyses: (1) compare retweet engagement between human users (Bot Label = 0) and bot accounts (Bot Label = 1); (2) compare engagement counts between male and female users (gender:confidence ≥ 0.5) with confirmed profiles; (3) compare total annotator votes across three content categories (hate speech, offensive language, and neutral content). For each comparison, test normality assumptions (Shapiro-Wilk (n ≤ 5000) or Kolmogorov-Smirnov (n > 5000)),test homogeneity of variances (Levene), and select appropriate test (t-test or Mann-Whitney U test) accordingly. Apply Bonferroni correction for the three pairwise comparisons in the hate speech analysis (adjusted α = 0.05/3 ≈ 0.0167). Output the results to 'output.json' containing a JSON array in the format [{'dataset_comparison': ..., 'test_type': ..., 'p_value': ...}, ...] for all significant differences (p < 0.05 after correction), where dataset_comparison is exactly one of 'bot_human_vs_bot', 'gender_male_vs_female', 'hate_hate_vs_offensive', 'hate_hate_vs_neither', or 'hate_offensive_vs_neither', and test_type is exactly one of 't-test' or 'Mann-Whitney U'.", "data_sources": ["Hate_Speech_and_Offensive_Language.csv", "bot_detection_data.csv", "gender-classifier-DFE-791531.csv"], "skills": ["Data Loading with Pandas", "Encoding and Format Identification", "Filtering and Criteria-Based Selection", "Statistical Analysis and Testing", "Statistical Diagnostics and Testing", "In-place vs Copy Operations", "Probability Distributions and Statistical Modeling", "Multiple Comparisons and Hypothesis Testing", "Combinatorics and Set Operations", "Data Serialization & File Handling"], "domain": "social_network", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'dataset_comparison': None, 'test_type': None, 'p_value': None}, matched_keys=['dataset_comparison'])"]} {"id": "social_network_18", "question": "A customer experience team at an aviation analytics firm is analyzing airline customer feedback to understand sentiment distribution and identify primary drivers of negative experiences. Using a dataset containing customer tweets with airline names, sentiment classifications, and tweet texts, perform comprehensive sentiment analysis: (1) extract all tweet records with airline identifiers and sentiment labels; (2) calculate sentiment distribution statistics for each airline, computing both absolute counts and percentages; (3) analyze negative feedback to identify primary complaint categories by matching tweet content against keywords:\n- delay: delay, delayed, late, wait, waiting, hours, waited\n- service: service, rude, staff, customer, attitude, unhelpful, rudest\n- baggage: baggage, luggage, bag, lost, damage, suitcase, damaged, lost\n- cancel: cancel, cancelled, cancellation, flight cancelled, canceled\n- seat: seat, seating, overbook, overbooking, upgrade, cramped\n- food: food, meal, drink, hungry, refreshment, thirsty\n- other: tweets containing none of the above keywords; (4) output sentiment statistics to 'output.csv' with columns airline, sentiment (exactly one of: positive, negative, or neutral), count, and percentage rounded to exactly two decimal places; (5) output negative reason analysis to 'negative_reasons.csv' with columns airline, reasons, and count. Ensure all text analysis is case-insensitive and tweets may belong to multiple complaint categories.", "data_sources": ["Twitter_US_Airline_Sentiment.sqlite"], "skills": ["ETL and Data Integration", "SQLite-Specific Operations", "Database Interaction and SQL", "Data Loading with Pandas", "Data Inspection and Exploration", "Data Aggregation and Grouping", "Data Filtering and Grouping", "Percentage and Variation Calculations", "Normalization and Percentile Calculations", "Indexing and Selection", "Filtering and Criteria-Based Selection", "Text Processing and Cleaning", "Data Structure and Dictionary Operations", "Text Processing and Matching", "String-Based Aggregation and Operations", "In-place vs Copy Operations", "Function Application and Vectorization", "Data Export and Output Processing", "CSV Processing", "Data Serialization & File Handling", "Output and Logging"], "domain": "social_network", "output_file_name": ["output.csv", "negative_reasons.csv"], "gold_file_name": ["result.csv", "negative_reasons_gold.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['airline', 'sentiment', 'count', 'percentage'], thresholds={'percentage': None})", "compare_csv(output_file_name='negative_reasons.csv', gold_file_name='negative_reasons_gold.csv', ignore_order=True, thresholds={'count': None})"]} {"id": "social_network_21", "question": "A social media analytics team needs to build a user behavior profiling system to analyze characteristics of different Twitter user types.\n\nRequirements:\n\n1. Create an in-memory database for efficient data processing.\n\n2. From the bot detection dataset, categorize users by combining bot/human label (0=human, 1=bot) and verification status. For each category, compute:\n - User count\n - Average follower count, average retweet count, and average mention count (all rounded to 2 decimal places)\n - Engagement rate = (avg retweet count / max(avg follower count, 1)) × 1000, rounded to 2 decimal places\n\n3. From the gender classifier dataset, compute user count per gender category, only including records with gender confidence score > 0.8.\n\n4. From the hate speech dataset, compute user count per content type category, with class mapping: 0 → hate_speech, 1 → offensive, 2 → neither.\n\nOutput (output.csv):\nColumns: category, user_count, avg_follower_count, avg_retweet_count, avg_mention_count, engagement_rate, data_source\n- category format: '{user_type}_{verified_status}' for bot detection data (e.g., 'human_verified'), 'gender_{type}' for gender data, 'content_{type}' for hate speech data\n- avg_follower_count, avg_retweet_count, avg_mention_count, engagement_rate are null for non-bot-detection rows\n- data_source: 'bot_detection', 'gender_classifier', or 'hate_speech'\n- Sort by data_source ascending, then category ascending", "data_sources": ["bot_detection_data.csv", "gender-classifier-DFE-791531.csv", "Hate_Speech_and_Offensive_Language.csv", "Twitter_US_Airline_Sentiment.sqlite"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Encoding and Format Identification", "SQLite-Specific Operations", "Database Interaction and SQL", "File Existence and Access Verification", "Debugging and Error Resolution", "Header and Metadata Processing", "Error Handling and Malformed Data", "ETL and Data Integration", "Data Parsing and Delimiter Handling", "Column Manipulation / Creation", "Data Cleaning and Transformation", "Handling Missing Data", "Time Formatting and String Manipulation", "Filtering and Criteria-Based Selection", "Data Normalization and Standardization", "Data Categorization & Mapping", "In-Memory File Operations", "Pandas-Specific Operations", "Batch Processing and Performance Optimization", "Table Creation and SQL Formatting", "Statistical Analysis and Metrics", "Arithmetic and Cumulative Calculations", "Log Analysis and User Behavior Insights", "Formatting and Output Organization", "Data Export and Output Processing", "Data Serialization & File Handling", "CSV Processing"], "domain": "social_network", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['category', 'user_count', 'avg_follower_count', 'avg_retweet_count', 'avg_mention_count', 'engagement_rate', 'data_source'], thresholds={'avg_follower_count': None, 'avg_retweet_count': None, 'avg_mention_count': None, 'engagement_rate': None})"]} {"id": "social_network_22", "question": "Analyze Twitter and YouTube user activity patterns and content characteristics. Time periods: 0-6/6-12/12-18/18-24 hours.\n\nOutput:\n\n1. twitter_time_stats.csv (Twitter bot/human by time period): user_type (bot/human), time_period (early_morning/morning/afternoon/evening), metric_name (tweet_count/percentage), metric_value\n\n2. twitter_day_stats.csv (Twitter bot/human by day type): user_type (bot/human), day_type (weekday/weekend), metric_name (tweet_count/percentage), metric_value\n\n3. twitter_content_stats.csv (Twitter hate speech classification across three content categories): type (hate/offensive/neural), time_period (all), metric_name (tweet_count/percentage), metric_value\n\n4. youtube_stats.csv (YouTube videos):time_period (all), metric_name (video_count/percentage), metric_value\n\n5. youtube_vs_twitter_comparison.csv: time_period (4 periods), percentage_diff", "data_sources": ["Hate_Speech_and_Offensive_Language.csv", "Trending_YouTube_Video.csv", "bot_detection_data.csv", "twitter_dataset.csv"], "skills": ["ETL and Data Integration", "Data Loading with Pandas", "Parsing and Reading Data Files", "DataFrame Operations and Manipulation", "Data Integration and Merging", "Join Operations and Merging", "Timestamp Conversion and Time Manipulation", "Date and Time Conversion", "Column Manipulation / Creation", "Data Transformation and Column Manipulation", "Function Application and Vectorization", "Custom Function Development for Time Logic", "Business Day Logic and Custom Calculations", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Percentage and Variation Calculations", "Normalization and Percentile Calculations", "Data Categorization & Mapping", "Pandas-Specific Operations", "Time Series Analysis and Forecasting", "Statistical Analysis and Testing", "Incremental and Comparative Calculations", "Data Export and Output Processing", "Data Serialization & File Handling", "Formatting and Output Organization"], "domain": "social_network", "output_file_name": ["twitter_time_stats.csv", "twitter_day_stats.csv", "twitter_content_stats.csv", "youtube_stats.csv", "youtube_vs_twitter_comparison.csv"], "gold_file_name": ["twitter_time_stats_gold.csv", "twitter_day_stats_gold.csv", "twitter_content_stats_gold.csv", "youtube_stats_gold.csv", "youtube_vs_twitter_comparison_gold.csv"], "eval_func": ["compare_csv(output_file_name='twitter_time_stats.csv', gold_file_name='twitter_time_stats_gold.csv', ignore_order=True, specified_columns=['user_type', 'time_period', 'metric_name', 'metric_value'], thresholds={'metric_value': None})", "compare_csv(output_file_name='twitter_day_stats.csv', gold_file_name='twitter_day_stats_gold.csv', ignore_order=True, specified_columns=['user_type', 'day_type', 'metric_name', 'metric_value'], thresholds={'metric_value': None})", "compare_csv(output_file_name='twitter_content_stats.csv', gold_file_name='twitter_content_stats_gold.csv', ignore_order=True, specified_columns=['type', 'time_period', 'metric_name', 'metric_value'], thresholds={'metric_value': None})", "compare_csv(output_file_name='youtube_stats.csv', gold_file_name='youtube_stats_gold.csv', ignore_order=True, specified_columns=['time_period', 'metric_name', 'metric_value'], thresholds={'metric_value': None})", "compare_csv(output_file_name='youtube_vs_twitter_comparison.csv', gold_file_name='youtube_vs_twitter_comparison_gold.csv', ignore_order=True, specified_columns=['time_period', 'percentage_diff'], thresholds={'percentage_diff': None})"]} {"id": "social_network_23", "question": "Compare **bot vs human** Twitter engagement using the **bot-detection** accounts file and the **tweet activity** file. **Inner-join** on **normalized username**; dedupe bot labels to **one row per normalized username** by majority Bot Label: assign **bot** only if **1** appears more often than **0**; ties are **human**. \n\nPer **user_type**, compute **mean likes**, **mean retweets**, **mean likes / mean retweets** (ratio to **2** decimals), and **mean tweet character length**. Per user, sum **likes + retweets**; take **top 10** bots and **top 10** humans by that sum.\n\nEmit **output.csv** with **28** rows and columns **user_type**, **metric_type**, **metric_value**, **description**. **Block order (reference pipeline):** for **avg_likes**, **avg_retweets**, **ratio**, **avg_length** emit **human** then **bot**; then **10** `top_users` rows for **bot**; then **10** for **human**. **metric_value** uses **2** decimals for aggregates; top-user rows look like **`username(12345)`** (integer total engagement in parentheses). Descriptions are short English sentences mirroring the metric.\n", "data_sources": ["bot_detection_data.csv", "twitter_dataset.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Element-wise Dataframe Operations", "Pandas-Specific Operations", "Data Integration and Merging", "Join Operations and Merging", "ETL and Data Integration", "Row Manipulation and Duplication", "Categorical vs Numerical Type Identification", "Column Manipulation / Creation", "Text and Sequence Processing", "Arithmetic and Cumulative Calculations", "Data Transformation and Column Manipulation", "DataFrame Operations and Manipulation", "Function Application and Vectorization", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Column-wise Transformations and Aggregation", "Incremental and Comparative Calculations", "Data Filtering and Grouping", "Ranking and Top N Logic", "Sorting, Limiting, and Ranking", "Data Storage and Structuring", "Data Structure Creation and Manipulation", "Data Serialization & File Handling", "Data Export and Output Processing", "CSV Processing", "Output and Logging"], "domain": "social_network", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['user_type', 'metric_type', 'metric_value'])"]} {"id": "social_network_24", "question": "A social media analytics team needs to analyze engagement efficiency patterns across different follower tiers on Twitter.\n\nAnalyze the engagement efficiency of bot-labeled tweet records (bot label=1) and human-labeled tweet records (bot label=0) across follower tiers. After matching the two files by normalized Username, perform the analysis on the resulting joined records. Exclude joined records with 0 followers.\n\nFollower tiers: small (<1000), medium (1000-10000), large (>10000)\n\nEngagement efficiency metrics (per 1000 followers):\n- Retweet efficiency = (retweets / follower count) * 1000\n- Like efficiency = (likes / follower count) * 1000\n- Total efficiency = ((retweets + likes) / follower count) * 1000\n\nFor each user_type and follower_tier combination, calculate average efficiencies and high efficiency ratio (percentage of joined records whose total efficiency exceeds the median total efficiency of their user_type group, format: X.XX%).\n\nOutput columns: user_type, follower_tier, avg_retweet_efficiency, avg_like_efficiency, avg_total_efficiency, high_efficiency_ratio\nSort by user_type (human before bot), then follower_tier (small → medium → large). All efficiency values rounded to 2 decimal places.", "data_sources": ["bot_detection_data.csv", "twitter_dataset.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Element-wise Dataframe Operations", "Pandas-Specific Operations", "Filtering and Criteria-Based Selection", "ETL and Data Integration", "Data Integration and Merging", "Join Operations and Merging", "Data Labeling and Structured Data Handling", "Arithmetic Transformations and Normalization", "Threshold-Based Categorization or Filtering", "Data Categorization & Mapping", "DataFrame Operations and Manipulation", "Function Application and Vectorization", "Statistical Analysis and Metrics", "Data Aggregation and Grouping", "Percentage and Variation Calculations", "Statistical Analysis and Testing", "Formatting and Output Organization", "Sorting, Limiting, and Ranking", "Data Export and Output Processing", "Index Handling and Conversion"], "domain": "social_network", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['user_type', 'follower_tier', 'avg_retweet_efficiency', 'avg_like_efficiency', 'avg_total_efficiency', 'high_efficiency_ratio'], thresholds={'avg_retweet_efficiency': None, 'avg_like_efficiency': None, 'avg_total_efficiency': None})"]} {"id": "social_network_25", "question": "Analyze engagement behavior patterns between bot and human users on Twitter. User account data contains bot detection labels (1=bot, 0=human), and tweet activity data contains engagement metrics. Match users between the two datasets by username (normalized to lowercase with whitespace stripped).\n\nFor each user type (bot vs human), compute:\n- Average retweets and likes per tweet\n- Average engagement rate, defined as (retweets + likes) / (follower count + 1e-8)\n- Average account age in days from account creation to 2026-06-12\n- Total tweet count and unique user count\n- Average engagement per 1000 followers, defined as engagement rate × 1000\n- Efficiency category: for each record, classify engagement per 1000 followers as \"high\" (>100), \"medium\" (>50), or \"low\" (≤50), then take the mode per user type\n\nOutput a CSV named output.csv with exactly 2 rows (human first, then bot), columns: user_type, avg_retweets, avg_likes, avg_engagement_rate, avg_account_age_days, total_tweets, unique_user_count, engagement_per_1000, efficiency_category. All numeric values rounded to 4 decimal places.", "data_sources": ["bot_detection_data.csv", "twitter_dataset.csv"], "skills": ["ETL and Data Integration", "Data Loading with Pandas", "Parsing and Reading Data Files", "Numerical Operations and Type Conversion", "Data Labeling and Structured Data Handling", "Preprocessing and File Structure Adjustments", "Arithmetic Transformations and Normalization", "Date and Time Conversion", "Time Formatting and String Manipulation", "Data Inspection and Exploration", "DataFrame Operations and Manipulation", "Data Integration and Merging", "Join Operations and Merging", "Column Manipulation / Creation", "Pandas-Specific Operations", "Time Difference and Gradient Calculation", "Date and Time Arithmetic", "Arithmetic and Cumulative Calculations", "Statistical Analysis and Metrics", "Data Categorization & Mapping", "Conditional Aggregation and Filtering", "Function Application and Vectorization", "Data Aggregation and Grouping", "Unique Identifier and Entity Management", "Combinatorics and Set Operations", "Column-wise Transformations and Aggregation", "Row-wise Operations and Aggregation", "Log Analysis and User Behavior Insights", "Validation and Verification of Merge Results", "Type Casting and Data Compatibility", "Formatting and Output Organization", "Data Export and Output Processing", "CSV Processing"], "domain": "social_network", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=['user_type', 'avg_retweets', 'avg_likes', 'avg_engagement_rate', 'avg_account_age_days', 'total_tweets', 'unique_user_count', 'engagement_per_1000', 'efficiency_category'], thresholds={'avg_retweets': None, 'avg_likes': None, 'avg_engagement_rate': None, 'avg_account_age_days': None, 'total_tweets': None, 'unique_user_count': None, 'engagement_per_1000': None})"]} {"id": "social_network_26", "question": "Cross-platform **engagement calibration** (Twitter, YouTube, Instagram) from the four project tables.\n\n**Filters:** Twitter — drop rows whose tweet text appears among **hate-speech–labeled** posts in the hate-speech corpus (**class 0** there), keep **non-bot** accounts with **> 1000** followers. YouTube — **views > 100,000** and **ratings not disabled**. Instagram — parse **k/m/b** follower strings, keep **≥ 1,000,000** followers.\n\n**Rates:** Twitter **retweets / (followers + 1)**; YouTube **(likes + comments) / (views + 1)**; Instagram **parsed avg likes / numeric followers**.\n\n**Per-platform transforms:** Twitter **MinMax** on rates; YouTube **StandardScaler**; Instagram **log1p** then **MinMax**. **Concatenate** all transformed rates, **average rank** (`rankdata` **average**), map ranks to **[0,1]** via **(rank − 1)/(N − 1)**; split back and take the **mean** of the **Instagram** slice.\n\nSave **output.csv** with a single column **instagram_normalized_mean** (**4** decimal places).\n", "data_sources": ["Hate_Speech_and_Offensive_Language.csv", "bot_detection_data.csv", "Trending_YouTube_Video.csv", "top_insta_influencers_data.csv"], "skills": ["Filtering and Criteria-Based Selection", "Data Loading with Pandas", "Parsing and Reading Data Files", "Set and Membership Analysis", "String Manipulation and Parsing", "Header and Metadata Processing", "Data Parsing and Delimiter Handling", "Function Application and Vectorization", "DataFrame Operations and Manipulation", "Percentage and Variation Calculations", "Incremental and Comparative Calculations", "Data Normalization and Standardization", "Preprocessing and Scaling", "Arithmetic Transformations and Normalization", "Normalization and Percentile Calculations", "Data Normalization and Preprocessing", "Mathematical and Statistical Computations", "Ranking and Normalization", "Data Aggregation and Grouping", "Statistical Calculations and Quantiles", "Output and Logging", "Data Serialization & File Handling", "Data Storage and Structuring"], "domain": "social_network", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_model(output_file_name='output.csv', gold_file_name='result.csv', matched_columns=None, calculate_columns=['instagram_normalized_mean'], metric='mae', lower_bound=0.0, upper_bound=0.01)"]} {"id": "social_network_27", "question": "A social media integrity team is evaluating a user credibility scoring model. For each user, compute a credibility score using the L-BFGS-B optimizer. Use an initial credibility score of 0.5 for every user, bounds of [0, 1], and maxiter = 1000. The optimizer attempts to minimize:\n\n composite_loss = mean((bot_label + toxicity_weight + anomaly_flag) × credibility_score)\n\nWhere for each user:\n- bot_label: the user's bot detection label\n- anomaly_flag: 1 if the user's total retweet count (aggregated across all available data sources) exceeds the 95th percentile, 0 otherwise\n- toxicity_weight: determined by matching the user's tweet content against a toxicity-labeled dataset using TF-IDF cosine similarity (max_features=1000, stop_words='english', ngram_range=(1,2)); assign the toxicity class of the best match if cosine similarity ≥ 0.3, otherwise default to neutral (class 2). Weight mapping: class 0 (hate speech) = 1.0, class 1 (offensive) = 0.7, class 2 (neutral) = 0.0\n\nAfter running the optimizer, calculate the final normalized composite loss (mean across all users) from the credibility scores, rounded to 6 decimal places.\n\nOutput Format (output.csv): single row with column normalized_composite_loss", "data_sources": ["Hate_Speech_and_Offensive_Language.csv", "bot_detection_data.csv", "twitter_dataset.csv", "gender-classifier-DFE-791531.csv"], "skills": ["Data Loading with Pandas", "Encoding and Format Identification", "Data Aggregation and Grouping", "Outlier Detection and Filtering", "Threshold-Based Categorization or Filtering", "Peak Detection & Identification", "Function Application and Vectorization", "Indexing and ID Assignment", "Data Labeling and Structured Data Handling", "Mathematical Foundations and Algorithm Understanding", "Loss Function and Evaluation", "Ranking and Scoring Mechanisms", "Text Processing and Cleaning", "Feature Extraction and Vectorization", "Similarity Computation (Cosine/Jaccard/etc.)", "Thresholding and Validation", "Data Categorization & Mapping", "Efficient Data Structures and Algorithms", "Batch Processing and Performance Optimization", "Normalization and Weighted Aggregation", "Output and Logging", "CSV Processing"], "domain": "social_network", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_model(output_file_name='output.csv', gold_file_name='result.csv', matched_columns=None, calculate_columns=['normalized_composite_loss'], metric='mae', lower_bound=0.0, upper_bound=0.0001)"]} {"id": "social_network_30", "question": "A social media research team is building a cross-platform user credibility model and needs to identify the most discriminative numerical features from multiple Twitter datasets through hierarchical feature selection.\n\nLoad the provided datasets and perform cross-dataset hierarchical feature analysis. For each dataset, identify relevant numerical features and classify them into two semantic types: engagement/count metrics and confidence scores. Apply z-score normalization (StandardScaler) for count features and min-max scaling to [0,1] (MinMaxScaler) for confidence features. Fill missing count features with 0 and missing confidence scores with 0.5. Convert string-type numeric columns to float before normalization.\n\nApply PCA (random_state=42) to each dataset separately, retaining components explaining 95% of variance. Compute feature importance using: importance_j = Σ_k(|loading_kj| × explained_variance_ratio_k) over retained components, then normalize each dataset's feature importance vector to sum to 1.\n\nAggregate feature importance across datasets, prefixing each feature with a short dataset name ('bot', 'gender', 'airline') in the format '{prefix}_{original_feature_name}'. Select the top-k most important features where k equals the average number of PCA components across datasets (rounded to nearest integer).\n\nSave results to output.json with the following structure:\n{\n \"selected_features\": [\"prefix_featureA\", \"prefix_featureB\", ...], // top-k features (with dataset prefix) sorted alphabetically\n \"n_components_per_dataset\": {\n \"bot_detection\": ,\n \"gender_classification\": ,\n \"airline_sentiment\": \n },\n \"explained_variance_per_dataset\": {\n \"bot_detection\": [, ...], // list of explained variance ratios for each retained component\n \"gender_classification\": [, ...],\n \"airline_sentiment\": [, ...]\n },\n \"feature_importance_per_dataset\": {\n \"bot_detection\": {\"\": , ...}, // normalized importance scores (sum to 1) using original feature names without prefix\n \"gender_classification\": {\"\": , ...},\n \"airline_sentiment\": {\"\": , ...}\n },\n \"overall_top_features\": [\"prefix_featureX\", \"prefix_featureY\", ...] // top-k features (with dataset prefix) ranked by descending aggregated importance\n}", "data_sources": ["bot_detection_data.csv", "gender-classifier-DFE-791531.csv", "Twitter_US_Airline_Sentiment.sqlite"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "SQLite-Specific Operations", "Database Interaction and SQL", "Encoding and Format Identification", "ETL and Data Integration", "Command-Line and Shell Operations", "Domain-Specific and Contextual Imputation", "Text Processing and Matching", "Handling Missing Data", "Custom Functions for Missing Value Handling", "Column Manipulation / Creation", "Text & String Manipulation", "Function Application and Vectorization", "Data Normalization and Standardization", "Preprocessing and Scaling", "Data Normalization and Preprocessing", "Data Structure Understanding and Initialization", "Feature Selection and Dimensionality Reduction", "Stochasticity and Reproducibility", "Feature Engineering and Embeddings", "Mathematical and Statistical Computations", "Ranking and Top N Logic", "Sorting, Limiting, and Ranking", "Data Serialization & File Handling", "Data Storage and Structuring", "Formatting and Output Organization"], "domain": "social_network", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'selected_features': None, 'n_components_per_dataset': {'bot_detection': None, 'gender_classification': None, 'airline_sentiment': None}, 'explained_variance_per_dataset': {'bot_detection': 0.02, 'gender_classification': 0.02, 'airline_sentiment': 0.02}, 'feature_importance_per_dataset': {'bot_detection': 0.05, 'gender_classification': 0.05, 'airline_sentiment': 0.05}, 'overall_top_features': None})"]} {"id": "social_network_31", "question": "A social media research team is investigating whether automated accounts show different engagement patterns on Twitter. Using the two provided datasets, standardize missing-value sentinels, load the cleaned tables into an in-memory SQLite database, and use an SQL join on case-normalized usernames to identify users appearing in both datasets. Then compute a 3×3 Pearson correlation matrix (and accompanying p-values) among: (1) bot label (0=human, 1=bot), (2) normalized engagement defined as (retweets + likes) / (follower count + 1), and (3) mention count. Restrict analysis to matched users with non-null values for all three variables. Output the results to output.json with format: {\"correlation_matrix\": [[...]], \"p_values\": [[...]], \"columns\": [\"bot_label\", \"normalized_engagement\", \"mention_count\"]}.", "data_sources": ["bot_detection_data.csv", "twitter_dataset.csv"], "skills": ["Parsing and Reading Data Files", "Custom Functions for Missing Value Handling", "Data Loading with Pandas", "SQLite-Specific Operations", "Database Interaction and SQL", "Joining and Lookup Operations", "ETL and Data Integration", "Arithmetic Transformations and Normalization", "Pandas-Specific Operations", "Data Handling & Preparation", "Column Selection and Consistency Checks", "Correlation Matrix Generation", "Statistical Correlation Analysis", "P-Value Calculation and Interpretation", "Data Storage and Structuring", "Data Serialization & File Handling", "Array and Matrix Manipulation"], "domain": "social_network", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'correlation_matrix': 1e-10, 'p_values': 1e-10, 'columns': None})"]} {"id": "social_network_33", "question": "A social media research team is investigating how user demographics influence engagement across platforms and whether automated accounts show different behavioral patterns. Using the provided datasets, conduct three statistical tests and save the results to output.csv with the following schema: feature (string), target (string), test_type (string), statistic (float), p_value (float), effect_size (float), significant (boolean). The three tests are: (1) assess whether user gender affects engagement metrics by comparing favorite counts between male and female users; (2) evaluate if video content categories impact normalized engagement (calculated as likes divided by views) using the Kruskal-Wallis H test; and (3) test whether automated accounts have different follower counts compared to human accounts using the Mann-Whitney U test. For all two-group comparisons, use the Mann-Whitney U test with Cliff's delta as the effect size; for multi-group comparisons, use the Kruskal-Wallis H test with epsilon-squared as the effect size. Use alpha=0.05 to determine statistical significance.", "data_sources": ["Trending_YouTube_Video.csv", "bot_detection_data.csv", "gender-classifier-DFE-791531.csv"], "skills": ["Data Loading with Pandas", "Encoding and Format Identification", "Parsing and Reading Data Files", "Command-Line and Shell Operations", "Statistical Testing for Feature-Target Evaluation", "Statistical Analysis and Testing", "Normalization and Percentile Calculations", "Interpreting and Communicating Statistical Results", "P-Value Calculation and Interpretation", "Data Storage and Structuring", "Formatting and Output Organization", "Data Export and Output Processing", "CSV Processing"], "domain": "social_network", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['test_type', 'significant', 'statistic', 'p_value', 'effect_size'], thresholds={'statistic': None, 'p_value': None, 'effect_size': None})"]} {"id": "sports_06", "question": "Analyze physical distinctiveness across 12 athlete groups: Olympic Basketball/Swimming/Weightlifting/Gymnastics, NBA Centers/Guards/Forwards/All, Soccer Goalkeepers/Defenders/Midfielders/Strikers. Convert height to cm, weight to kg. Calculate Cohen's d effect size, Kruskal-Wallis test, and KL divergence (10 bins) for height/weight differences. Skip groups with <10 samples. For all three metrics, treat distinctiveness as a group's average pairwise separation from the other eligible groups, with height and weight contributing equally; report the Kruskal-Wallis component on a negative-log p-value scale. Combine metrics: Total Score = Cohen's d × 0.4 + Kruskal-Wallis × 0.3 + KL × 0.3. Rank groups by total score.\n\nFor soccer players, group all players by overall_rating into 4 tiers: 'Soccer Goalkeepers' (overall_rating ≥ 85), 'Soccer Defenders' (80 ≤ overall_rating < 85), 'Soccer Midfielders' (75 ≤ overall_rating < 80), 'Soccer Strikers' (overall_rating < 75). Use the latest rating record per player.\n\nOutput: output.csv containing only the top 3 groups (Athlete_Group, Total_Distinctiveness_Score), output2.png showing top 3 groups (bar chart with title 'Top 3 Most Physiologically Distinct Athlete Groups', x-axis 'Total Distinctiveness Score', y-axis 'Athlete Group').", "data_sources": ["athlete_events.csv", "NBA Database/common_player_info.csv", "European_Soccer_database.sqlite"], "skills": ["Directory and File I/O", "File Existence and Access Verification", "Data Loading with Pandas", "Parsing and Reading Data Files", "Database Interaction and SQL", "ETL and Data Integration", "Data Cleaning and Transformation", "Pandas-Specific Operations", "Preprocessing and File Structure Adjustments", "Time Formatting and String Manipulation", "Data Grouping & Clustering", "DataFrame Operations and Manipulation", "In-place vs Copy Operations", "Function Application and Vectorization", "Incremental and Comparative Calculations", "Data Binning and Grid Creation", "Entropy and Log Probability Calculations", "Statistical Inequality Calculation", "Statistical Analysis and Testing", "Multiple Comparisons and Hypothesis Testing", "Array and Matrix Manipulation", "Data Transformation and Calculation", "Normalization and Weighted Aggregation", "Ranking and Scoring Mechanisms", "Data Filtering and Grouping", "Filtering and Criteria-Based Selection", "Sorting, Limiting, and Ranking", "Ranking and Top N Logic", "Bar Chart Creation and Layout", "Image Handling and Exporting", "Data Storage and Structuring", "Data Serialization & File Handling", "Formatting and Output Organization", "Visualization and Output Generation"], "domain": "sports", "output_file_name": ["output.csv", "output2.png"], "gold_file_name": ["result.csv", "result2.png"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['Total_Distinctiveness_Score'], thresholds={'Total_Distinctiveness_Score': None})", "compare_image(output_file_name='output2.png', gold_file_name='result2.png', calculate_columns=['type','graph_title','x_label'])"], "post_process_func": ["image_post_process('output2.png')", "image_post_process('result2.png')"]} {"id": "sports_07", "question": "Analyze athlete physique evolution trends (1946-2016) for three groups: 'Elite_Olympic' (medalists), 'NBA_Active', 'Other'. Calculate yearly average height (cm) and weight (kg) for each group. For NBA_Active, use NBA players with a roster status in common_player_info.csv, assign each selected player to one representative year based on the 2016 reference season and season_exp, and keep that year within 1946-2016. Apply forward fill for sparse years, then backward fill to cover years before each group's first available data. Keep count as the number of original records observed for each group-year before filling, with 0 for filled-only years. Rank years 1946-2016.\n\nOutput: output1.csv (year, athlete_category, Height, Weight, count), output2.png with two panels: top shows height trends (title 'Evolution Trends of Average Athlete Height (1946-2016)', x-axis 'Year', y-axis 'Average Height (cm)', lines for each group with markers 'o', legend labels formatted as '{category} Avg Height' e.g. 'Elite_Olympic Avg Height'), bottom shows weight trends (title 'Evolution Trends of Average Athlete Weight (1946-2016)', x-axis 'Year', y-axis 'Average Weight (kg)', lines with markers 's', legend labels formatted as '{category} Avg Weight' e.g. 'Elite_Olympic Avg Weight').", "data_sources": ["athlete_events.csv", "NBA Database/common_player_info.csv"], "skills": ["Directory and File I/O", "File Existence and Access Verification", "Data Loading with Pandas", "Pandas-Specific Operations", "Handling Missing Data", "DataFrame Operations and Manipulation", "Column-specific or Conditional Logic", "Data Filtering and Transformation", "Data Categorization & Mapping", "Interval and Range Operations", "Data Integration and Merging", "ETL and Data Integration", "Dynamic Data Transformation and Insertion", "In-place vs Copy Operations", "Function Application and Vectorization", "Array and Series Generation for Time", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Time Series & Temporal Grouping", "Time Series Resampling and Aggregation", "Array and Matrix Manipulation", "Multiple Series/Traces Visualization", "Layout and Multi-Panel Visualizations", "Plot Customization and Layout", "Plot Customization (Aesthetics)", "Image Handling and Exporting", "Data Serialization & File Handling", "Data Export and Output Processing", "Formatting and Output Organization", "Line Collection Customization"], "domain": "sports", "output_file_name": ["output1.csv", "output2.png"], "gold_file_name": ["result1.csv", "result2.png"], "eval_func": ["compare_csv(output_file_name='output1.csv', gold_file_name='result1.csv', ignore_order=True, specified_columns=['year', 'athlete_category', 'Height', 'Weight'], thresholds={'Height': None, 'Weight': None})", "compare_image(output_file_name='output2.png', gold_file_name='result2.png', calculate_columns=['type','graph_title','x_label','y_label','labels'])"], "post_process_func": ["image_post_process('output2.png')", "image_post_process('result2.png')"]} {"id": "sports_08", "question": "Compare physique across NBA, Soccer, and Olympic athletes. Convert to cm/kg, filter height (100-250cm) and weight (30-200kg). Calculate: (1) mean and std for each sport's height/weight, (2) ANOVA F-statistic and p-value for height/weight, (3) Cohen's d for pairwise comparisons (NBA-Soccer, NBA-Olympic, Soccer-Olympic).\n\nOutput: output.csv with columns metric, value (float, rounded to 4 decimal places). Metrics: {Sport}_H_Mean, {Sport}_H_Std, {Sport}_W_Mean, {Sport}_W_Std, ANOVA_H_F, ANOVA_H_P, ANOVA_W_F, ANOVA_W_P, D_H_{Sport1}_{Sport2}, D_W_{Sport1}_{Sport2}.", "data_sources": ["European_Soccer_database.sqlite", "athlete_events.csv", "NBA Database/common_player_info.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "SQLite-Specific Operations", "Database Interaction and SQL", "Column Name and Schema Management", "Column Manipulation / Creation", "Data Integration and Merging", "Vertical Stacking and Binding", "DataFrame Operations and Manipulation", "Dynamic Data Transformation and Insertion", "In-place vs Copy Operations", "Array and Matrix Manipulation", "ETL and Data Integration", "Command-Line and Shell Operations", "Function Application and Vectorization", "Data Type and Format Conversion", "Data Conversion and Transformation", "Numerical Data Handling", "Numerical Operations and Type Conversion", "Filtering and Criteria-Based Selection", "Data Cleaning and Transformation", "Statistical Analysis and Metrics", "Statistical Calculations and Descriptive Statistics", "Statistical Analysis and Testing", "Data Storage and Structuring", "Formatting and Output Organization", "Data Serialization & File Handling", "Data Export and Output Processing"], "domain": "sports", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_model(output_file_name='output.csv', gold_file_name='result.csv', matched_columns=['metric'], calculate_columns=['value'], metric='mse', lower_bound=0, upper_bound=0.01)"]} {"id": "sports_09", "question": "Compare elite athletes across Olympic (team sport medalists), NBA (vertical leap Z-score > 1.0 AND sprint Z-score < -1.0), and Soccer (height and weight percentiles > 0.8). Fill missing height/weight with median within sport/gender (Olympic) or position (NBA) groups, ensure all heights in cm, weights in kg. Calculate Z-scores within each group, then compute: (1) mean and std for each group's height/weight, (2) ANOVA F-statistic and p-value, (3) Cohen's d for pairwise comparisons (Olympic-NBA, Olympic-Soccer, NBA-Soccer).\n\nOutput: output.csv with columns metric, value (float, rounded to 4 decimal places). Metrics: {Group}_Height_Mean, {Group}_Height_Std, {Group}_Weight_Mean, {Group}_Weight_Std, ANOVA_Height_F, ANOVA_Height_P, ANOVA_Weight_F, ANOVA_Weight_P, CohensD_H_{Group1}_{Group2}, CohensD_W_{Group1}_{Group2}.", "data_sources": ["European_Soccer_database.sqlite", "athlete_events.csv", "NBA Database/common_player_info.csv", "NBA Database/draft_combine_stats.csv"], "skills": ["Data Cleaning and Transformation", "Data Import and Library Setup", "Path Construction and Manipulation", "Data Loading with Pandas", "Handling Missing Data", "Numerical Data Handling", "Data Conversion and Post-Loading Processing", "SQLite-Specific Operations", "Database Interaction and SQL", "Normalization and Percentile Calculations", "Statistical Calculations and Quantiles", "Z-Score Calculations", "Mathematical and Statistical Computations", "Array and Matrix Manipulation", "ETL and Data Integration", "Command-Line and Shell Operations", "Function Application and Vectorization", "Boolean Logic and Masking", "Filtering and Criteria-Based Selection", "Dynamic Data Transformation and Insertion", "Statistical Analysis and Metrics", "Statistical Calculations and Descriptive Statistics", "Statistical Analysis and Testing", "Data Transformation and Calculation", "Formatting and Output Organization", "Data Serialization & File Handling", "Data Export and Output Processing"], "domain": "sports", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_model(output_file_name='output.csv', gold_file_name='result.csv', matched_columns=['metric'], calculate_columns=['value'], metric='mse', lower_bound=0, upper_bound=0.05)"]} {"id": "sports_11", "question": "Cross-Source Athlete Physique Database Construction\n\nIntegrate Olympic and NBA athlete physique data into unified database. Olympics: Summer events only, drop duplicates by ID (keep first), mark missing with height_missing/weight_missing. NBA: merge player info with draft combine stats (prioritize combine data), convert units (inches×2.54→cm, pounds×0.453592→kg). Cross-source matching: normalize names (lowercase, remove spaces/punctuation), propagate NBA physique to matching Olympics basketball players. Imputation: Olympics fill by sport median, NBA fill by position median, remaining by global median. Output: athlete_id, source, sport, height, weight, height_missing (0=available, 1=missing), weight_missing.", "data_sources": ["athlete_events.csv", "NBA Database/common_player_info.csv", "NBA Database/draft_combine_stats.csv", "NBA Database/player.csv"], "skills": ["ETL and Data Integration", "Data Loading with Pandas", "Parsing and Reading Data Files", "Indexing and Selection", "Unique Identifier and Entity Management", "Row Manipulation and Duplication", "Column Name and Schema Management", "Handling Missing Data", "In-place vs Copy Operations", "Data Alignment & Merging", "Data Integration and Merging", "Join Operations and Merging", "Column Selection and Consistency Checks", "Text Processing and Matching", "Data Filtering and Matching", "Indexing and Row-Level Operations", "Function Application and Vectorization", "Data Aggregation and Grouping", "Numerical Data Handling", "Data Cleaning and Transformation", "Data Export and Output Processing", "Data Serialization & File Handling", "Dynamic Data Transformation and Insertion"], "domain": "sports", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['athlete_id', 'source', 'sport', 'height', 'weight', 'height_missing', 'weight_missing'], thresholds={'height': None, 'weight': None, 'height_missing': None, 'weight_missing': None})"]} {"id": "sports_13", "question": "Cross-Sport Athlete Physique Comparison with Performance Stratification\n\nAnalyze height/weight distributions across NBA, Olympics basketball, and Soccer athletes with performance stratification. Performance metrics: NBA (avg_pts from game stats), Olympics (medal_rate = medals/events), Soccer (mean rating). Stratify by terciles: q33 and q66 thresholds → high/medium/low tiers. Convert units to height (cm) and weight (kg). Visualization to athlete_physique_analysis.png: 3×3 facet grid scatter plot (rows: sport, columns: performance tier) showing height vs weight. Output output.csv: sport (NBA/Olympics/Soccer), height_mean, height_median, weight_mean, weight_median, sample_size.", "data_sources": ["athlete_events.csv", "NBA Database/common_player_info.csv", "NBA Database/draft_combine_stats.csv", "NBA Database/game.csv", "European_Soccer_database.sqlite"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Database Interaction and SQL", "ETL and Data Integration", "Data Alignment & Merging", "Data Integration and Merging", "Join Operations and Merging", "Statistical Analysis and Metrics", "Unique Identifier and Entity Management", "Arithmetic and Cumulative Calculations", "Data Cleaning and Transformation", "Pandas-Specific Operations", "In-place vs Copy Operations", "Statistical Calculations and Quantiles", "Array and Matrix Manipulation", "Visualization and Interpretation", "Using Seaborn for Statistical Plots", "Multiple Series/Traces Visualization", "Plot Creation and Configuration", "Plot Customization (Aesthetics)", "Plot Customization and Layout", "Data Export and Output Processing", "Data Storage and Structuring", "Data Serialization & File Handling", "Statistical Calculations and Descriptive Statistics"], "domain": "sports", "output_file_name": ["output.csv", "athlete_physique_analysis.png"], "gold_file_name": ["result.csv", "athlete_physique_analysis_gold.png"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['sport', 'height_mean', 'height_median', 'weight_mean', 'weight_median', 'sample_size'])", "compare_image(output_file_name='athlete_physique_analysis.png', gold_file_name='athlete_physique_analysis_gold.png', calculate_columns=['type'])"], "post_process_func": ["image_post_process('athlete_physique_analysis.png')", "image_post_process('athlete_physique_analysis_gold.png')"]} {"id": "sports_14", "question": "NBA Physical Attributes Impact on Career Performance\n\nAnalyze correlation between NBA players' physical attributes (height, wingspan, vertical leap, sprint speed) and career performance metrics (draft round, career span). Filter valid careers (0-25 years). Composite score = -correlation_with_draft + correlation_with_career (lower draft round is better). Normalize weights based on absolute composite scores.\n\nOutput:\n1. output.csv: attribute, correlation_with_draft, p_value_draft, correlation_with_career, p_value_career, composite_score, normalized_weight\n2. physical_attributes_analysis.png (2×2):\n - Panel 1 (Heatmap): Correlation matrix of Physical Attributes vs Draft Round/Career Span\n - Panel 2 (Bar Chart): Normalized Weights of Physical Attributes\n - Panel 3 (Scatter): Height (inches) vs Draft Round\n - Panel 4 (Scatter): Max Vertical Leap (inches) vs Career Span (years)", "data_sources": ["NBA Database/common_player_info.csv", "NBA Database/draft_combine_stats.csv", "NBA Database/draft_history.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Structure Understanding and Initialization", "Data Alignment & Merging", "Data Integration and Merging", "Join Operations and Merging", "Arithmetic and Cumulative Calculations", "Data Cleaning and Transformation", "Numerical Operations and Type Conversion", "Column-specific or Feature-wise Processing", "Filtering and Criteria-Based Selection", "Statistical Analysis and Metrics", "Statistical Correlation Analysis", "Correlation and Relationship Analysis", "Ranking and Scoring Mechanisms", "Normalization and Weighted Aggregation", "Visualization and Interpretation", "Layout and Multi-Panel Visualizations", "Subplot and Layout Management", "Correlation Matrix Generation", "Color and Palette Usage", "Bar Chart Creation and Layout", "Plot Customization (Aesthetics)", "Plot Customization and Layout", "Data Export and Output Processing", "CSV Processing"], "domain": "sports", "output_file_name": ["output.csv", "physical_attributes_analysis.png"], "gold_file_name": ["result.csv", "physical_attributes_analysis_gold.png"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['correlation_with_draft', 'correlation_with_career', 'normalized_weight'], thresholds={'correlation_with_draft': None, 'correlation_with_career': None, 'normalized_weight': None})", "compare_image(output_file_name='physical_attributes_analysis.png', gold_file_name='physical_attributes_analysis_gold.png', calculate_columns=['type'])"], "post_process_func": ["image_post_process('physical_attributes_analysis.png')", "image_post_process('physical_attributes_analysis_gold.png')"]} {"id": "sports_16", "question": "Cross-League Athlete Height Distribution Comparison with KDE\n\nCompare height distributions of NBA, Olympics basketball, and European soccer athletes using Kernel Density Estimation. Convert units to height (cm) and weight (kg). Filter outliers (150 < height < 250). Visualization: height_distribution_kde.png with normalized histogram (bins=50) background and Gaussian KDE curves (500 points) for three groups. Mark peak positions with vertical dashed lines and circle markers. Output output.csv: nba_height_peak_cm, nba_mean_height, nba_std_height, nba_sample_size, olympics_mean_height, olympics_std_height, olympics_sample_size, soccer_mean_height, soccer_std_height, soccer_sample_size", "data_sources": ["athlete_events.csv", "NBA Database/common_player_info.csv", "NBA Database/draft_combine_stats.csv", "European_Soccer_database.sqlite"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Database Interaction and SQL", "ETL and Data Integration", "Data Cleaning and Transformation", "Data Alignment & Merging", "Join Operations and Merging", "Arithmetic and Cumulative Calculations", "Outlier Detection and Filtering", "Filtering and Criteria-Based Selection", "Numerical Data Handling", "Row Manipulation and Duplication", "Preprocessing and File Structure Adjustments", "In-place vs Copy Operations", "Statistical Plotting and Density Estimation", "Histogram Creation and Manipulation", "Plot Creation and Configuration", "Multiple Series/Traces Visualization", "Peak Detection & Identification", "Plot Customization and Annotation", "Plot Customization (Aesthetics)", "Normalization and Percentile Calculations", "Functional Data Handling and Iterative Plotting", "Array and Matrix Manipulation", "Line Collection Customization", "Data Export and Output Processing", "Statistical Analysis and Metrics", "Formatting and Output Organization", "Data Serialization & File Handling", "CSV Processing"], "domain": "sports", "output_file_name": ["output.csv", "height_distribution_kde.png"], "gold_file_name": ["result.csv", "height_distribution_kde_gold.png"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['nba_height_peak_cm', 'nba_mean_height', 'nba_sample_size'], thresholds={'nba_height_peak_cm': None, 'nba_mean_height': None, 'nba_sample_size': None})", "compare_image(output_file_name='height_distribution_kde.png', gold_file_name='height_distribution_kde_gold.png', calculate_columns=['type'])"], "post_process_func": ["image_post_process('height_distribution_kde.png')", "image_post_process('height_distribution_kde_gold.png')"]} {"id": "sports_17", "question": "Cross-Sport Athlete Physique Statistical Inference\n\nPerform statistical analysis comparing NBA, Olympics basketball, and Soccer athlete physical characteristics (height, weight) with performance correlations. Convert units to height (cm) and weight (kg). Filter outliers (150 < height < 250, 50 < weight < 200). Effect size classification: Small (<0.5), Medium (0.5-0.8), Large (≥0.8) based on Cohen's d. ANOVA significance: p < 0.05 threshold. Correlations: NBA (height/weight vs draft position), Soccer (height/weight vs overall performance rating). Output:\n1. output.csv: total_effect_sizes, large_effects (int), medium_effects, small_effects, significant_anova, total_correlations\n2. effect_sizes.csv (NBA vs Olympics, NBA vs Soccer, Olympics vs Soccer): metric (Height/Weight), group1, group2, cohens_d, effect_size (Small/Medium/Large)\n3. anova_results.csv: metric, f_statistic, p_value\n4. correlations.csv: sport, metric, correlation, p_value", "data_sources": ["athlete_events.csv", "NBA Database/common_player_info.csv", "NBA Database/draft_combine_stats.csv", "NBA Database/draft_history.csv", "European_Soccer_database.sqlite"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Database Interaction and SQL", "SQLite-Specific Operations", "ETL and Data Integration", "Data Alignment & Merging", "Join Operations and Merging", "Preprocessing and File Structure Adjustments", "Data Aggregation and Grouping", "Indexing and Selection", "In-place vs Copy Operations", "Data Cleaning and Transformation", "Data Transformation and Column Manipulation", "Numerical Operations and Type Conversion", "Filtering and Criteria-Based Selection", "Statistical Analysis and Metrics", "Arithmetic and Cumulative Calculations", "Statistical Analysis and Testing", "Array and Matrix Manipulation", "Statistical Correlation Analysis", "Data Export and Output Processing", "Data Storage and Structuring", "CSV Processing", "Data Serialization & File Handling", "Data Inspection and Summarization", "Mathematical and Statistical Computations"], "domain": "sports", "output_file_name": ["output.csv", "effect_sizes.csv", "anova_results.csv", "correlations.csv"], "gold_file_name": ["result.csv", "effect_sizes_gold.csv", "anova_results_gold.csv", "correlations_gold.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['total_effect_sizes', 'large_effects', 'medium_effects', 'small_effects', 'significant_anova', 'total_correlations'], thresholds={'total_effect_sizes': None, 'large_effects': None, 'medium_effects': None, 'small_effects': None, 'significant_anova': None, 'total_correlations': None})", "compare_csv(output_file_name='effect_sizes.csv', gold_file_name='effect_sizes_gold.csv', ignore_order=True, thresholds={'cohens_d': None})", "compare_csv(output_file_name='anova_results.csv', gold_file_name='anova_results_gold.csv', ignore_order=True, thresholds={'f_statistic': None, 'p_value': None})", "compare_csv(output_file_name='correlations.csv', gold_file_name='correlations_gold.csv', ignore_order=True, thresholds={'correlation': None, 'p_value': None})"]} {"id": "sports_20", "question": "Analyze NBA team offensive efficiency by comparing home scoring vs away points allowed. \n\nData preprocessing:\n- Validate team abbreviations against team.csv\n- Filter invalid scores\n- Cross-verify scores between records and detailed scoring data (tolerance: ±1 point)\n- Filter inconsistent records\n\nOffensive efficiency calculation:\n- For each team: home points scored = sum(pts_home when team is home)\n- For each team, define efficiency ratio = total home points scored / total away points allowed\n- If away_points_allowed = 0, efficiency ratio = 0\n- Round all ratios to 4 decimal places\n- Rank teams by efficiency ratio descending\n\nOutput team_offensive_efficiency.csv with schema: team_abbreviation (uppercase), pts_scored_home, home_games, pts_allowed_away, away_games, offensive_efficiency_ratio.\n\nOutput output.csv: total_teams, total_games_analyzed, avg_efficiency_ratio, median_efficiency_ratio, top_team, top_efficiency, bottom_team, bottom_efficiency", "data_sources": ["NBA Database/game.csv", "NBA Database/team.csv", "NBA Database/line_score.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Cleaning and Transformation", "Unique Value Extraction", "Unique Identifier and Entity Management", "Handling Missing Data", "Time Formatting and String Manipulation", "Data Manipulation and Validation", "Header and Metadata Processing", "Filtering and Criteria-Based Selection", "Data Alignment & Merging", "Data Integration and Merging", "Join Operations and Merging", "Data Comparison and Validation", "Column Selection and Consistency Checks", "Data Filtering and Matching", "Row-wise and Column-wise Logical Evaluation", "In-place vs Copy Operations", "Column-wise Transformations and Aggregation", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Arithmetic and Cumulative Calculations", "Arithmetic Transformations and Normalization", "Sorting, Limiting, and Ranking", "Indexing and Row-Level Operations", "Data Export and Output Processing", "CSV Processing", "Data Inspection and Summarization", "Formatting and Output Organization", "Ranking and Top N Logic"], "domain": "sports", "output_file_name": ["output.csv", "team_offensive_efficiency.csv"], "gold_file_name": ["result.csv", "team_offensive_efficiency_gold.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['total_teams', 'avg_efficiency_ratio', 'top_team'], thresholds={'total_teams': None, 'avg_efficiency_ratio': None})", "compare_csv(output_file_name='team_offensive_efficiency.csv', gold_file_name='team_offensive_efficiency_gold.csv', ignore_order=True, thresholds={'pts_scored_home': None, 'home_games': None, 'pts_allowed_away': None, 'away_games': None, 'offensive_efficiency_ratio': None})"]} {"id": "sports_24", "question": "Compare Olympic, NBA, and soccer athlete height/weight statistics.\n\nRequirements:\n- Load data and extract height/weight; convert to metric (cm, kg); remove missing values\n- Calculate descriptive stats (mean, median, std, Q1/Q3) per sport\n- Perform pairwise t-tests (height & weight) with Cohen's d effect sizes\n- Interpret effect sizes: Negligible(<0.2) NBA median) / (total number of Olympic medalist records from shared countries)", "data_sources": ["athlete_events.csv", "noc_regions.csv", "NBA Database/common_player_info.csv", "NBA Database/team.csv"], "skills": ["Type Management and Validation", "Type Casting and Data Compatibility", "Data Validation and Type Consistency", "Array and Matrix Manipulation", "String and Categorical Data Handling", "Data Normalization and Standardization", "Geospatial Data Handling and Mapping", "Data Categorization & Mapping", "In-place vs Copy Operations", "Function Application and Vectorization", "Logical Operators for Combining Conditions", "Filtering and Criteria-Based Selection", "Time-based Filtering and Matching", "Imputation Methods", "Domain-Specific and Contextual Imputation", "Data Structure Creation and Manipulation", "Column Selection and Consistency Checks", "Data Alignment & Merging", "Data Type and Format Conversion", "Numerical Operations and Type Conversion", "Probability Calculations and Statistical Computation", "Conditional Aggregation and Filtering", "Numerical Comparison and Proximity Checks", "Statistical Calculations and Descriptive Statistics", "Set and Membership Analysis", "Data Filtering and Matching", "Data Storage and Structuring", "Data Serialization & File Handling"], "domain": "sports", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json('output.json', 'result.json', thresholds={'probability': 0.05, 'shared_countries_count': 0, 'nba_median_height': 0.05, 'olympic_athletes_count': 0.05})"]} {"id": "sports_32", "question": "A sports analytics firm is building a cross-sport talent identification system to detect elite athletes whose physical metrics significantly deviate from sport-specific norms. Analyze Olympic athlete records containing height, weight, sport, and NOC (National Olympic Committee) codes, along with NBA player data containing height, weight, position, and draft information. Identify all athletes who are statistical outliers in height or weight within their sport using IQR-based thresholds with an optimized multiplier (targeting 5-10% outlier ratio). The analysis should incorporate temporal context by detecting structural breaks and physique shifts in sport-wide metrics over time, as well as peak events where individual athletes exceed the 95th percentile of their sport/position. Return a pandas DataFrame with columns ['source', 'sport', 'name', 'metric', 'value', 'z_score', 'is_outlier', 'temporal_context', 'is_peak_event', 'is_physique_shift'], where each row corresponds to a detected extreme value. The output should be saved to 'output.csv'. Use source labels exactly 'Olympic' and 'NBA'; include only rows where is_outlier is True; compute z_score as a signed value rounded to two decimal places; encode temporal_context as 'structural_break_YYYY' for structural-break years and blank/NaN otherwise. NBA rows should use sport='Basketball', blank/NaN temporal_context, and is_physique_shift=False.", "data_sources": ["athlete_events.csv", "noc_regions.csv", "NBA Database/common_player_info.csv", "NBA Database/draft_history.csv"], "skills": ["Data Import and Library Setup", "Data Loading with Pandas", "Parsing and Reading Data Files", "Rolling Statistics and Window-Based Signal Processing", "Rolling Window Operations", "Statistical Analysis and Metrics", "Arithmetic and Cumulative Calculations", "Array and Matrix Manipulation", "Function Application and Vectorization", "Peak Detection & Identification", "Outlier Detection and Filtering", "Encoding and Format Identification", "String Manipulation and Parsing", "Data Aggregation and Grouping", "Data Preprocessing & Encoding", "Data Handling & Preparation", "Handling Missing Data", "Numerical Data Handling", "Joining and Alignment Logic", "Line and Structure Detection", "Time Difference and Gradient Calculation", "Handling Null or Unmatched Values", "Gradient and Derivative Methods", "Difference and Trend Computation", "Statistical Calculations and Quantiles", "Algorithm Tuning and Optimization", "Model Evaluation & Validation", "Data Serialization & File Handling", "In-place vs Copy Operations"], "domain": "sports", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['source', 'sport', 'name', 'metric', 'value', 'z_score', 'is_outlier', 'temporal_context', 'is_peak_event', 'is_physique_shift'], thresholds={'value': None, 'z_score': None})"]} {"id": "sports_33", "question": "A sports analytics firm wants to compare physical attributes (height and weight) across four elite athlete groups: NBA players, European soccer players, Olympic basketball athletes, and Olympic football athletes. The analysis integrates data from NBA draft combine measurements (in imperial units), a European soccer database where player heights are in cm and weights are in pounds, and Olympic athlete event records where heights are in cm and weights are in kg, with NOC region mappings. Segment all athletes into 4 physique clusters using K-Means (k=4, random_state=42) on their height (cm) and weight (kg) data, then evaluate pairwise differences between the groups by independently sampling 100 athletes from each group with random_state=42 and computing Cohen's d effect sizes and Welch's t-test p-values for both height and weight. Save results to 'output.csv' with columns: comparison_name, height_cohens_d, weight_cohens_d, height_pvalue_anova, weight_pvalue_anova. Use group labels NBA, Soccer, Olympic_Basketball, Olympic_Football, with comparison_name in format 'Group1 vs Group2' ordered as listed. Round Cohen's d to 4 decimal places. Format p-values in scientific notation (e.g., '1.23e-45') when below 0.0001, otherwise round to 6 decimal places.", "data_sources": ["European_Soccer_database.sqlite", "athlete_events.csv", "noc_regions.csv", "NBA Database/common_player_info.csv", "NBA Database/draft_combine_stats.csv", "NBA Database/draft_history.csv", "NBA Database/game.csv", "NBA Database/player.csv"], "skills": ["Model Configuration and Import", "Data Import and Library Setup", "Data Loading with Pandas", "Parsing and Reading Data Files", "SQLite-Specific Operations", "Database Connectivity and JDBC", "Database Interaction and SQL", "ETL and Data Integration", "Batch Processing and Performance Optimization", "Custom Programming and Functions", "Data Normalization and Standardization", "Data Normalization and Preprocessing", "Data Conversion and Transformation", "Helper Functions and Reusable Code", "In-place vs Copy Operations", "Filtering and Criteria-Based Selection", "Data Filtering and Grouping", "Data Filtering and Matching", "Error Handling and Invalid Dates", "Data Type and Format Conversion", "Data Filtering and Transformation", "Handling Missing Data", "Date and Time Conversion", "Date and Time Arithmetic", "Dynamic Data Transformation and Insertion", "MultiIndex and Hierarchical Indexing", "Index Handling and Conversion", "Array and Series Generation for Time", "Arithmetic and Cumulative Calculations", "Signal Generation and Functional Data", "Interpolation and Reconstruction", "Pandas-Specific Operations", "Data Structure Understanding and Initialization", "Vertical Stacking and Binding", "Data Integration and Merging", "Clustering and Post-Processing", "Cluster Label Assignment", "Stochasticity and Reproducibility", "Statistical Analysis and Testing", "Feature Selection and Statistical Computation", "Data Transformation and Calculation", "Data Comparison and Validation", "Incremental and Comparative Calculations", "Statistical Analysis and Metrics", "Array and Matrix Manipulation"], "domain": "sports", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['comparison_name', 'height_cohens_d', 'weight_cohens_d', 'height_pvalue_anova', 'weight_pvalue_anova'], thresholds={'height_cohens_d': None, 'weight_cohens_d': None, 'height_pvalue_anova': None, 'weight_pvalue_anova': None})"]} {"id": "strategy_2", "question": "In data_5.csv, calculate the KS and LIFT values of the model on the held-out test set. The prediction_score column contains the model score. Rows with data_flag equal to 'train' or 'val' are the training set and must be used only to build 10 equal-frequency score bins after sorting prediction_score in ascending order. Rows with data_flag equal to 'test' or 'oot' are the held-out test set; calculate all output statistics on this held-out test set after assigning each row to the training-derived score bins. In this dataset, the held-out flag is 'oot'. Samples with value 1 in the '有资有意' column are positive samples, and samples with value 0 are negative samples. Use the format [A,B] to represent each training-derived bin boundary, rounded to 5 decimal places. Scores below the minimum training boundary should be assigned to bin 1; scores above the maximum training boundary should be assigned to bin 10. For each bin, calculate bin_cnt, pos_cnt, neg_cnt, pos_lift, pos_cum_rate, neg_cum_rate, and diff, where pos_lift = (bin positive rate) / (overall test-set positive rate), pos_cum_rate and neg_cum_rate are cumulative rates from low score to high score, and diff = abs(pos_cum_rate - neg_cum_rate). Add a total row with '\\N' in credit_bin, 'total' in bin, test-set totals for bin_cnt/pos_cnt/neg_cnt, '\\N' for pos_lift/pos_cum_rate/neg_cum_rate, and the maximum bin-level diff. Save the results to output.csv with headers: credit_bin, bin, bin_cnt, pos_cnt, neg_cnt, pos_lift, pos_cum_rate, neg_cum_rate, diff. The bin, pos_lift, pos_cum_rate, neg_cum_rate, and diff columns should all be kept to 5 decimal places. Missing values should be represented with '\\N'. Sort rows by credit_bin ascending, with the total row last.", "skills": ["Data Loading with Pandas", "Data Binning and Grid Creation", "Statistical Analysis and Metrics", "CSV Processing"], "domain": "strategy", "data_sources": ["data_5.csv"], "gold_file_name": ["result-strategy-2.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result-strategy-2.csv', ignore_order=False, thresholds={'bin_cnt': 0, 'pos_cnt': 0, 'neg_cnt': 0, 'pos_lift': 1e-5, 'pos_cum_rate': 1e-5, 'neg_cum_rate': 1e-5, 'diff': 1e-5})"]} {"id": "strategy_3", "question": "In data_1.csv, calculate the conversion metrics for different score segments, including the number of outbound calls, calls connected, SMS sent, link clicks, checks, applications, and conversions. For scores above 0.99, use 0.001 as the bin width. Output the results to output.csv with headers: score_bucket, total, oncall, cnt_send, cnt_click, cnt_check, cnt_apply, cnt_upgrade. For score_bucket, use the format [A,B] for the highest bin and [A,B) for all other bins.", "skills": ["Parsing and Reading Data Files", "Data Loading with Pandas", "Directory and File I/O", "Command-Line and Shell Operations", "Handling Null or Unmatched Values", "Array and Matrix Manipulation", "Statistical Analysis and Metrics", "Conditional Aggregation and Filtering", "Column-wise Transformations and Aggregation", "Function Application and Vectorization", "Event Tracking and Funnel Analysis", "Sorting, Limiting, and Ranking", "Type Conversion and Data Integrity", "Data Export and Output Processing", "Data Storage and Structuring"], "domain": "strategy", "data_sources": ["data_1.csv"], "gold_file_name": ["result-strategy-3.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result-strategy-3.csv', ignore_order=False, thresholds={'total': None, 'oncall': None, 'cnt_send': None, 'cnt_click': None, 'cnt_check': None, 'cnt_apply': None, 'cnt_upgrade': None})"]} {"id": "strategy_5", "question": "In data_6.csv, calculate monthly statistics for scored sample records. A scored sample record is a row where apply_date is not empty (equivalently, the score columns are populated in this dataset). Use the month derived from the dt column by integer division by 100. For each month, calculate: click_cnt = number of retained rows, register_cnt = number of rows where register_cnt > 0, apply_cnt = number of rows where apply_cnt > 0, credit_cnt = number of rows where credit_cnt > 0, credit_rate = credit_cnt / apply_cnt, credit_value = sum of credit_value, avg_credit_value = credit_value / credit_cnt, loan_cnt = number of rows where loan_cnt > 0, loan_cnt_30d = number of rows where loan_cnt > 0 and first_loan_time is 0 to 30 days after dt, loan_rate_30d = loan_cnt_30d / credit_cnt, loan_value_30d = sum of loan_value for rows counted in loan_cnt_30d, and avg_loan_value_30d = loan_value_30d / loan_cnt_30d. Values requiring decimals should be kept to 2 decimal places. Add a final overall summary row with mth equal to 'all', computed from all retained scored sample records rather than by averaging monthly rows. Save the results to output.csv with headers: mth, click_cnt, register_cnt, apply_cnt, credit_cnt, credit_rate, credit_value, avg_credit_value, loan_cnt, loan_cnt_30d, loan_rate_30d, loan_value_30d, avg_loan_value_30d. Sort month rows ascending and place the 'all' row last.", "skills": ["Data Loading with Pandas", "Date and Time Arithmetic", "Conditional Aggregation and Filtering", "CSV Processing"], "domain": "strategy", "data_sources": ["data_6.csv"], "gold_file_name": ["result-strategy-5.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result-strategy-5.csv', ignore_order=False, thresholds={'click_cnt': 0, 'register_cnt': 0, 'apply_cnt': 0, 'credit_cnt': 0, 'credit_rate': 0.005, 'loan_cnt': 0, 'loan_cnt_30d': 0, 'loan_rate_30d': 0.005})"]} {"id": "strategy_7", "question": "In data_6.csv, analyze credit approval rate and average credit amount by quality score bin for scored sample records. A scored sample record is a row where model_score_3_pct is not empty; use model_score_3_pct as the quality score. Derive the month from the dt column by taking its first six digits. Create 10 fixed-width quality_bin groups from model_score_3_pct: bin 1 is [0.0, 0.1), bin 2 is [0.1, 0.2), ..., bin 9 is [0.8, 0.9), and bin 10 is [0.9, 1.0]. Values outside [0, 1] should be clipped to the nearest endpoint before assigning the bin. For each quality_bin and each month 202512, 202601, and 202602, calculate credit_rate = count rows where credit_cnt > 0 divided by count rows where apply_cnt > 0, and avg_credit_value = sum credit_value for rows where credit_cnt > 0 divided by count rows where credit_cnt > 0. If a denominator is zero, output '\\N'. Also add a quality_bin='total' row for each metric across all bins. The total column must exclude December 2025 (202512) and must be recomputed from the combined rows for months 202601 and 202602, not by averaging the displayed monthly values. Save the results to output.csv with headers: metric_type, quality_bin, 202512, 202601, 202602, total. The credit_rate rows should be kept to 5 decimal places, and avg_credit_value rows should be kept to 2 decimal places. Output all credit_rate rows for quality_bin 1 through 10 and total first, followed by all avg_credit_value rows for quality_bin 1 through 10 and total.", "skills": ["Data Loading with Pandas", "Data Binning and Grid Creation", "Conditional Aggregation and Filtering", "CSV Processing"], "domain": "strategy", "data_sources": ["data_6.csv"], "gold_file_name": ["result-strategy-7.csv"], "output_file_name": ["output.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result-strategy-7.csv', ignore_order=False)"]} {"id": "tourism_01", "question": "Assess whether there are systematic differences in user satisfaction among accommodation, indoor attractions, outdoor attractions, and destination experiences.\nFirst, unify the four variables of accommodation satisfaction from short-term rental listings, indoor cultural attractions visit ratings, outdoor leisure venues visit ratings, and tourists' satisfaction with the destination from transaction records into a common scale of 1-5 points, then apply robust Z-score standardization to centralize each distribution. Calculate the mean, standard deviation, and 95% confidence interval for each of these four sources. \nConduct a one-way analysis of variance to test whether significant differences exist in the average satisfaction across different domains, and report the F-statistic, p-value, and eta-squared effect size.\n\nOutput: Two CSV files - output1.csv containing source statistics (mean, std, ci_lower, ci_upper), and output2.csv containing ANOVA results (statistic, p_value, effect_size)", "data_sources": ["Airbnb_Open_Data.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "TripAdvisor Indonesia Tourism/Transaction.xlsx"], "skills": ["Data Loading with Pandas", "Handling Missing Data", "Excel File Handling and Automation", "Binary Data Handling", "Command-Line and Shell Operations", "Data Cleaning and Transformation", "Normalization and Percentile Calculations", "Array and Matrix Manipulation", "Arithmetic Transformations and Normalization", "Z-Score Calculations", "Robust Standard Errors and Covariance Estimation", "Probability Distributions and Statistical Modeling", "Mathematical and Statistical Computations", "Statistical Calculations and Quantiles", "Statistical Analysis and Inference", "Statistical Modeling and Uncertainty", "Statistical Analysis and Testing", "Summation Techniques", "Arithmetic and Cumulative Calculations", "Data Storage and Structuring", "Data Export and Output Processing", "Formatting and Output Organization"], "domain": "tourism", "output_file_name": ["output1.csv", "output2.csv"], "gold_file_name": ["result1.csv", "result2.csv"], "eval_func": ["compare_csv(output_file_name='output1.csv', gold_file_name='result1.csv', ignore_order=True, specified_columns=['mean', 'std', 'ci_lower', 'ci_upper'])", "compare_csv(output_file_name='output2.csv', gold_file_name='result2.csv', ignore_order=True, specified_columns=['statistic', 'p_value', 'effect_size'])"]} {"id": "tourism_02", "question": "Study the ratings given by international tourists from different regions to various attractions in a Southeast Asian destination country, and interpret these ratings by combining macro-level indicators of the destination country.\nFirst, calculate the average rating for each combination of attraction type from attraction type data and user's continent of origin from user data using transaction ratings from destination transaction data. \nThen supplement each row with the destination country's GDP per capita from country macro data and its visa-free score from passport index data.\n\nOutput: Save the result to output.csv file. The DataFrame should contain columns: AttractionType, Continent, Avg_Rating, Country_GDP_per_Capita, Visa_Free_Score", "data_sources": ["countries of the world.csv", "henley_passport_index_2025_new.csv", "TripAdvisor Indonesia Tourism/Continent.xlsx", "TripAdvisor Indonesia Tourism/Item.xlsx", "TripAdvisor Indonesia Tourism/Transaction.xlsx", "TripAdvisor Indonesia Tourism/Type.xlsx", "TripAdvisor Indonesia Tourism/User.xlsx"], "skills": ["Path Construction and Manipulation", "Data Loading with Pandas", "Parsing and Reading Data Files", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Join Operations and Merging", "Data Integration and Merging", "Column Selection and Consistency Checks", "Data Joining and Relationship Management", "Data Cleaning and Transformation", "Data Transformation and Column Manipulation", "Numerical Operations and Type Conversion", "Data Aggregation and Grouping", "Pandas-Specific Operations", "Column Management and Reordering", "ETL and Data Integration", "Data Export and Output Processing", "CSV Processing"], "domain": "tourism", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['AttractionType', 'Continent', 'Avg_Rating', 'Country_GDP_per_Capita', 'Visa_Free_Score'])"]} {"id": "tourism_04", "question": "Construct a unified Tourism Attractiveness Score (TAS) system to conduct cross-source benchmarking and ranking of high-performing entities across short-term rentals, indoor attractions, and outdoor attractions.\nFirst, filter high-performing entities from each data source (quality indicators ≥ 4.0 and valid demand indicators for short-term rentals, indoor attractions, and outdoor attractions; perfect rating for attraction transactions). \nThen perform standardization processing on quality indicators like ratings and demand indicators like visit counts, availability days, and transaction frequency to eliminate dimensional differences, and calculate the raw TAS score for each entity as the average of standardized quality and demand indicators. Add an extra 0.1 point bonus for entries whose entity names contain UNESCO World Heritage related keywords (such as 'heritage', 'temple', 'palace', 'monument', 'cathedral', 'castle'), and finally combine entities from all sources, sort by TAS score in descending order, and extract the top 10.\n\nOutput: A list of the top 10 entities ranked by TAS in CSV format(output.csv), containing four columns: source, entity_id, entity_name, tas_score", "data_sources": ["Airbnb_Open_Data.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "TripAdvisor Indonesia Tourism/Item.xlsx", "TripAdvisor Indonesia Tourism/Transaction.xlsx"], "skills": ["Data Import and Library Setup", "Data Loading with Pandas", "Parsing and Reading Data Files", "Directory and File I/O", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Boolean Logic and Masking", "Filtering and Criteria-Based Selection", "Indexing and Selection", "Data Filtering and Matching", "Handling Missing Data", "In-place vs Copy Operations", "Preprocessing and Scaling", "Data Normalization and Standardization", "Arithmetic and Cumulative Calculations", "Data Aggregation and Grouping", "Join Operations and Merging", "Data Integration and Merging", "Column Selection and Consistency Checks", "Column Management and Reordering", "Dynamic Data Transformation and Insertion", "Column/Row-wise Computations", "Boolean Logic and Conditional Checks", "Data Structure and Rule Evaluation", "String-Based Aggregation and Operations", "Function Application and Vectorization", "Sorting, Limiting, and Ranking", "Validation and Output Formatting", "Data Storage and Structuring", "Data Export and Output Processing", "Formatting and Output Organization"], "domain": "tourism", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['entity_id', 'entity_name', 'tas_score'])"]} {"id": "tourism_05", "question": "Analyze how weather conditions influence visitor satisfaction across accommodation and attraction types.\nFirst, integrate multiple data sources including accommodation listings, indoor and outdoor attractions, and tourist site reviews.\nThen, extract text features from data source category labels using TF-IDF vectorization with max_features=5 to encode categorical information.\nNext, fit a Ridge regression model with alpha=1.0 to predict standardized ratings based on text features. Generate residuals and identify the histogram bin with highest frequency.\nThen, estimate the effect of weather variables (temperature, rainfall) on ratings using statistical regression analysis.\nFinally, apply K-Means clustering with k selected by Silhouette Score (testing k=2,3,4) on the model features to identify optimal tourism market segments.\nOutput(output.csv): A CSV file with columns 'metric_type', 'value'. Rows include: ridge_residual_peak_bin, ridge_r2_score, bayesian intercept and coefficient parameters, kmeans_best_k, kmeans_silhouette_score, kmeans center dimensions, and cluster sizes. The metrics are ridge_residual_peak_bin, ridge_r2_score, bayesian_intercept_mean, bayesian_intercept_std, bayesian_tmax_mean, bayesian_tmax_std, bayesian_rain_mean, bayesian_rain_std, kmeans_best_k, kmeans_silhouette_score, kmeans_center_dim0, kmeans_center_dim1, kmeans_center_dim2, kmeans_cluster_0_size, kmeans_cluster_1_size, kmeans_cluster_2_size, kmeans_cluster_3_size", "data_sources": ["datasets/tourism/Airbnb_Open_Data.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "datasets/tourism/TripAdvisor Indonesia Tourism/Transaction.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/Item.xlsx"], "skills": ["Data Loading with Pandas", "Directory and File I/O", "Parsing and Reading Data Files", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Joining and Alignment Logic", "Data Integration and Merging", "Data Handling & Preparation", "Data Alignment & Merging", "Array and Matrix Manipulation", "Indexing and Row-Level Operations", "Feature Selection and Dimensionality Reduction", "Feature Extraction and Vectorization", "Encoding and Vector Representation", "Vectorization and Performance Optimization", "Model Training & Evaluation", "Preprocessing and Scaling", "Model Training and Inference", "Histogram Creation and Manipulation", "Peak Detection & Identification", "Regression Modeling and Interpretation", "Stochasticity and Reproducibility", "Data Manipulation and Summarization", "Clustering and Topic Modeling", "Clustering and Post-Processing", "Cluster Label Assignment", "In-place vs Copy Operations", "Clustering and Hierarchical Methods", "Data Export and Output Processing", "Data Storage and Structuring", "Data Serialization & File Handling", "CSV Processing"], "domain": "tourism", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['metric_type', 'value'])"]} {"id": "tourism_08", "question": "Evaluate user satisfaction differences across four tourism domains: accommodation, indoor attractions, outdoor attractions, and destination experiences through statistical analysis.\nFirst, calculate satisfaction scores from accommodation satisfaction data in short-term rental data, cultural attraction satisfaction scores in indoor attraction data, natural attraction satisfaction scores in outdoor attraction data, and destination experience satisfaction scores in attraction transaction data.\n Then normalize ratings to a common scale, compute descriptive statistics including mean, median, standard deviation, and skewness for each group, perform six pairwise Kolmogorov-Smirnov two-sample tests to compare rating distribution differences and report p-values, and determine whether statistically significant differences exist between accommodation and attraction rating distributions at significance level α=0.05.\n\nOutput: Cross-domain satisfaction analysis results in JSON format (output1.json) with the following structure: top-level keys 'descriptive_statistics' (containing sub-keys 'Airbnb', 'Indoor Attractions', 'Outdoor Attractions', 'TripAdvisor', each with float values for 'mean', 'median', 'std', 'skewness'), 'kolmogorov_smirnov_tests' (containing sub-keys for each pairwise comparison formatted as ' vs ', e.g. 'Airbnb vs Indoor Attractions', each with 'ks_statistic' and 'p_value'), and 'accommodation_vs_attraction_test' (with 'ks_statistic' and 'p_value'); descriptive statistics in CSV format (output2.csv) with columns ['Source', 'mean', 'median', 'std', 'skewness']; Kolmogorov-Smirnov test results in CSV format (output3.csv) with columns ['Comparison', 'ks_statistic', 'p_value']; a histogram visualization (output4.png) with a 2x2 subplot layout showing rating distributions separately for each of the four tourism sources (one subplot per source), with each subplot titled by its source name, graph_title='Rating Distribution by Tourism Source', x_label='Rating (1-5)', y_label='Frequency'; and a box plot visualization (output5.png) comparing rating distributions across tourism sources with graph_title='Rating Distribution Comparison Across Tourism Sources', x_label=['Airbnb', 'Indoor', 'Outdoor', 'TripAdvisor'], y_label='Rating (1-5)'", "data_sources": ["Airbnb_Open_Data.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "TripAdvisor Indonesia Tourism/Transaction.xlsx"], "skills": ["Data Import and Library Setup", "Data Loading with Pandas", "Parsing and Reading Data Files", "Path Construction and Manipulation", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Data Extraction and Manipulation", "Handling Missing Data", "Data Cleaning and Transformation", "Normalization and Percentile Calculations", "Array and Matrix Manipulation", "Statistical Calculations and Descriptive Statistics", "Multiple Comparisons and Hypothesis Testing", "Statistical Analysis and Testing", "Statistical Testing for Feature-Target Evaluation", "Interpreting and Communicating Statistical Results", "Dynamic Data Transformation and Insertion", "Data Storage and Structuring", "Data Serialization & File Handling", "Data Structure Creation and Manipulation", "CSV Processing", "Data Export and Output Processing", "Histogram Creation and Manipulation", "Plot Customization (Aesthetics)"], "domain": "tourism", "output_file_name": ["output1.json", "output2.csv", "output3.csv", "output4.png", "output5.png"], "gold_file_name": ["result1.json", "result2.csv", "result3.csv", "result4.png", "result5.png"], "eval_func": ["compare_json(output_file_name='output1.json', gold_file_name='result1.json', thresholds={'descriptive_statistics': {'Airbnb': {'mean': None, 'median': None, 'std': None, 'skewness': None}, 'Indoor Attractions': {'mean': None, 'median': None, 'std': None, 'skewness': None}, 'Outdoor Attractions': {'mean': None, 'median': None, 'std': None, 'skewness': None}, 'TripAdvisor': {'mean': None, 'median': None, 'std': None, 'skewness': None}}, 'kolmogorov_smirnov_tests': {'Airbnb vs Indoor Attractions': {'ks_statistic': None, 'p_value': [0, 0.001]}, 'Airbnb vs Outdoor Attractions': {'ks_statistic': None, 'p_value': [0, 0.001]}, 'Airbnb vs TripAdvisor': {'ks_statistic': None, 'p_value': [0, 0.001]}, 'Indoor Attractions vs Outdoor Attractions': {'ks_statistic': None, 'p_value': [0, 0.001]}, 'Indoor Attractions vs TripAdvisor': {'ks_statistic': None, 'p_value': [0, 0.001]}, 'Outdoor Attractions vs TripAdvisor': {'ks_statistic': None, 'p_value': [0, 0.001]}}, 'accommodation_vs_attraction_test': {'ks_statistic': None, 'p_value': [0, 0.001]}})", "compare_csv(output_file_name='output2.csv', gold_file_name='result2.csv', ignore_order=True, specified_columns=['Source', 'mean', 'median', 'std', 'skewness'])", "compare_csv(output_file_name='output3.csv', gold_file_name='result3.csv', ignore_order=True, specified_columns=['Comparison', 'ks_statistic', 'p_value'])", "compare_image(output_file_name='output4.png', gold_file_name='result4.png', calculate_columns=['type','graph_title','x_label','y_label'])", "compare_image(output_file_name='output5.png', gold_file_name='result5.png', calculate_columns=['type','graph_title','xtick_labels','y_label'])"], "post_process_func": ["image_post_process('output4.png')", "image_post_process('result4.png')", "image_post_process('output5.png')", "image_post_process('result5.png')"]} {"id": "tourism_10", "question": "Conduct cross-market benchmarking analysis of tourist satisfaction and demand patterns across three markets: New York City accommodation, UK indoor attractions, and outdoor attractions.\nFirst, extract pricing and service fee data from short-term rental data for outlier removal using IQR method, extract rating and visit data from indoor attraction data for IQR-based outlier filtering, and extract rating and visit data from outdoor attraction data for IQR-based outlier filtering. Then calculate mean, median, standard deviation, interquartile range (IQR), and total count of valid entries for each of the three sub-domains after cleaning.\n\nOutput output.json: JSON array containing eight fields: subdomain (NY_Accommodation, UK_Indoor_Attractions, Outdoor_Attractions), mean_value (mean of price for Airbnb or rating for attractions), median_value (median of price/rating), std_value (standard deviation), iqr_value (interquartile range), total_count (count of valid entries), has_significant_peak (whether count > 100), peak_month (July if has peak, else N/A)", "data_sources": ["Airbnb_Open_Data.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Path Construction and Manipulation", "Command-Line and Shell Operations", "Data Cleaning and Transformation", "Numerical Operations and Type Conversion", "Function Application and Vectorization", "Outlier Detection and Filtering", "Data Handling & Preparation", "Numerical Data Handling", "Data Filtering and Transformation", "Array and Matrix Manipulation", "Statistical Calculations and Descriptive Statistics", "Statistical Calculations and Quantiles", "Mathematical and Statistical Computations", "Profiling and Benchmarking", "Peak Detection & Identification", "Data Storage and Structuring", "Data Serialization & File Handling", "Data Export and Output Processing"], "domain": "tourism", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'subdomain': None, 'mean_value': None, 'median_value': None, 'std_value': None, 'iqr_value': None, 'total_count': None, 'has_significant_peak': None, 'peak_month': None}, matched_keys=['subdomain'])"]} {"id": "tourism_11", "question": "Construct a unified time-series panel dataset for cross-regional tourism demand analysis by integrating multiple tourism data sources.\n\nThe panel should combine tourism activity data from four categories across three regions:\n- Indonesia attractions (TripAdvisor data): geo_category = 'Indonesia_Attractions', with attraction_type from the native type classification, aggregated monthly by attraction type\n- UK indoor attractions (FISETIO dataset): geo_category = 'UK_Museums', attraction_type = 'Museum', aggregate total visits by date\n- UK outdoor attractions (FISETIO dataset): geo_category = 'UK_Parks', attraction_type = 'Park', aggregate total visits by date\n- NYC accommodations (Airbnb data): geo_category = 'NYC_Accommodations', attraction_type = 'Accommodation', count reviews by date as demand proxy\n\nEnrich all rows uniformly with Indonesia's GDP per capita (from the countries dataset) and visa-free score (from the Henley passport index).\n\nOutput: Save as output.csv with columns: month_year, geo_category, attraction_type, monthly_visits, gdp_per_capita, visa_free_score.", "data_sources": ["Airbnb_Open_Data.csv", "countries of the world.csv", "henley_passport_index_2025_new.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "TripAdvisor Indonesia Tourism/Item.xlsx", "TripAdvisor Indonesia Tourism/Transaction.xlsx", "TripAdvisor Indonesia Tourism/Type.xlsx"], "skills": ["Directory and File Management", "Data Loading with Pandas", "Excel File Handling and Automation", "Binary Data Handling", "Command-Line and Shell Operations", "Join Operations and Merging", "Date Adjustment and Alignment", "Data Collection and Preparation", "Data Aggregation and Grouping", "Data Structure Understanding and Initialization", "Date and Time Conversion", "Custom Programming and Functions", "Data Alignment & Merging", "Index Handling and Conversion", "Data Transformation and Column Manipulation", "Data Integration and Merging", "Column Selection and Consistency Checks", "Data Export and Output Processing"], "domain": "tourism", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['month_year', 'geo_category', 'attraction_type', 'monthly_visits', 'gdp_per_capita', 'visa_free_score'])"]} {"id": "tourism_12", "question": "Cross-domain tourism benchmarking: one **2×2** **matplotlib** figure saved as **output1.png** from the bundled **NYC rental**, **UK indoor/outdoor monthly** panels, **Indonesian** transaction+taxonomy tables, **national GDP/population**, and **passport** scores.\n\n**Top-left** — boxplot of **review score** by **room type**; **graph_title** `Airbnb Review Ratings by Room Type`, **x_label** `Room Type`, **y_label** `Review Rating`, tick **labels** for each room type.\n\n**Top-right** — **dual-axis** time series of **mean monthly visits** (indoor vs outdoor) and **mean temperature**; **graph_title** `Monthly Visits and Temperature Trends`, **x_label** `Month`, left **y_label** `Average Visits`, right **y_label** `Temperature (°C)`, **labels** distinguishing indoor visits, outdoor visits, and average temperature.\n\n**Bottom-left** — horizontal **mean rating** by **attraction type**; highlight **`Beaches`** in **coral** and show its **numeric** mean; **graph_title** `Average TripAdvisor Ratings by Attraction Type (Indonesia)`, **x_label** `Average Rating`, **y_label** `Attraction Type`.\n\n**Bottom-right** — scatter **GDP per capita** vs **visa-free score**, point area from **national population** (use **sqrt** scaling for marker size), **viridis**-style color mapping of visa-free score; **graph_title** `GDP per Capita vs Visa-Free Score\\n(Bubble size = Population)`, **x_label** `GDP per Capita ($)`, **y_label** `Visa-Free Score`, **colorbar** labeled `Visa-Free Score`.\n", "data_sources": ["Airbnb_Open_Data.csv", "countries of the world.csv", "henley_passport_index_2025_new.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "TripAdvisor Indonesia Tourism/Transaction.xlsx", "TripAdvisor Indonesia Tourism/Item.xlsx", "TripAdvisor Indonesia Tourism/Type.xlsx"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Numerical Data Handling", "Data Cleaning and Transformation", "Directory and File Management", "Preprocessing and File Structure Adjustments", "Date Adjustment and Alignment", "Data Alignment & Merging", "Data Integration and Merging", "Join Operations and Merging", "Data Aggregation and Grouping", "Sorting and Aggregation", "Element-wise Dataframe Operations", "Data Preparation and Aggregation", "Subplot and Layout Management", "Using Seaborn for Statistical Plots", "Multiple Series/Traces Visualization", "Bar Chart Creation and Layout", "Plot Customization (Aesthetics)", "Plot Customization and Layout", "Line Collection Customization"], "domain": "tourism", "output_file_name": ["output1.png"], "gold_file_name": ["result1.png"], "eval_func": ["compare_image(output_file_name='output1.png', gold_file_name='result1.png', calculate_columns=['type', 'graph_title', 'x_label', 'y_label'])"], "post_process_func": ["image_post_process('output1.png')", "image_post_process('result1.png')"]} {"id": "tourism_14", "question": "Cross-market tourism benchmark: from the bundled **NYC short-term rental**, **UK indoor/outdoor attraction**, and **Indonesian attraction-transaction** sources, build **one composite heatmap** comparing **satisfaction** (ratings read as a **1–5** scale, **cool** colors for lower and **warm** for higher) and **relative demand** (use each market’s natural volume proxies—reviews, visits, or transactions—apply **log1p**, then **min–max** demand **across the three markets** so **saturation** reflects cross-market intensity).\n\nLayout: synthetic **x**-axis with three vertical bands labeled **`NYC (Airbnb)`**, **`UK (FISETIO)`**, **`Indonesia (TripAdvisor)`**; **y**-axis **10** graded satisfaction levels; each cell blends **hue** (satisfaction) and **saturation** (demand), with **brighter rows toward the bottom**; overlay **KDE**-derived shapes from the empirical rating structure; **colorbar** ticked **1.0–5.0** for satisfaction; annotate each band with **mean satisfaction** and **normalized demand** (e.g. μ / D style). Save as **output.png**.\n", "data_sources": ["Airbnb_Open_Data.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "TripAdvisor Indonesia Tourism/Transaction.xlsx", "TripAdvisor Indonesia Tourism/Item.xlsx", "TripAdvisor Indonesia Tourism/Type.xlsx"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Directory Structure and Validation Split Setup", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Data Handling & Preparation", "Numerical Data Handling", "Data Conversion and Post-Loading Processing", "Normalization and Percentile Calculations", "Mathematical and Statistical Computations", "Statistical Modeling and Uncertainty", "Multiple Series/Traces Visualization", "Color and Palette Usage", "Statistical Plotting and Density Estimation", "Data Binning and Grid Creation", "Plot Customization and Annotation", "Axes and Element Layering", "Line Collection Customization", "Plot Customization and Layout", "Plot Customization (Aesthetics)", "Output and Logging", "Statistical Analysis and Metrics", "Formatting and Output Organization"], "domain": "tourism", "output_file_name": ["output.png"], "gold_file_name": ["result.png"], "eval_func": ["compare_image(output_file_name='output.png', gold_file_name='result.png', calculate_columns=['type'])"], "post_process_func": ["image_post_process(output_file_name='output.png')", "image_post_process(output_file_name='result.png')"]} {"id": "tourism_15", "question": "Construct a unified tourism entity dataset from multi-source tourism data, and identify tourism archetypes using NMF topic modeling and K-Means clustering.\n\nIntegrate five categories of tourism entities: New York Airbnb short-term rental listings (limited to the first 500 entries with valid names), world heritage sites, UK indoor attractions, UK outdoor attractions, and Indonesia TripAdvisor attractions. For each entity, extract descriptive text and numerical features including demand indicators and ratings. Enrich each entity with its corresponding country's per capita GDP and visa-free score.\n\nUse TF-IDF (max_features=500, ngram_range=(1,2), min_df=2, max_df=0.8, stop_words='english') for text vectorization. Apply NMF (n_components=8, random_state=42, max_iter=500) for topic extraction. Construct a hybrid feature matrix combining topic weights with StandardScaler-normalized numerical features (demand proxy, rating, per capita GDP, visa-free score), then apply K-Means (n_clusters=6, random_state=42, n_init=10) for archetype clustering.\n\nEntity IDs follow the format: 'airbnb_{idx}', 'whc_{idx}', 'indoor_{idx}', 'outdoor_{idx}', 'indonesia_{AttractionId}', where idx is the original DataFrame row index. Source labels: 'Airbnb', 'World_Heritage', 'UK_Indoor', 'UK_Outdoor', 'Indonesia_TripAdvisor'.\n\nOutput columns: entity_id, source, dominant_topic, cluster_label, topic_weights. Save as output.csv and output.json.", "data_sources": ["Airbnb_Open_Data.csv", "whc-sites-2019.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "TripAdvisor Indonesia Tourism/Transaction.xlsx", "TripAdvisor Indonesia Tourism/Item.xlsx", "TripAdvisor Indonesia Tourism/Type.xlsx", "countries of the world.csv", "henley_passport_index_2025_new.csv"], "skills": ["Data Loading with Pandas", "Data Ingestion and Processing", "Path Construction and Manipulation", "Directory and File Management", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Data Extraction and Manipulation", "Text & String Manipulation", "Unique Identifier and Entity Management", "Text Processing and Matching", "Filtering and Criteria-Based Selection", "Text Processing and Cleaning", "Feature Extraction and Vectorization", "Vectorization and Performance Optimization", "Clustering and Topic Modeling", "Topic Modeling and Evaluation", "Stochasticity and Reproducibility", "Array and Matrix Manipulation", "Data Integration and Merging", "Join Operations and Merging", "Handling Missing Data", "Data Normalization and Standardization", "Preprocessing and Scaling", "Feature Engineering and Embeddings", "Encoding and Vector Representation", "Clustering and Post-Processing", "Cluster Label Assignment", "Clustering and Hierarchical Methods", "Data Aggregation and Grouping", "Data Export and Output Processing", "Formatting and Output Organization", "Data Serialization & File Handling", "CSV Processing", "Data Inspection and Summarization"], "domain": "tourism", "output_file_name": ["output.csv", "output.json"], "gold_file_name": ["result.csv", "result.json"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['entity_id', 'source', 'dominant_topic', 'cluster_label'])", "compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'entity_id': None, 'source': None, 'dominant_topic': None, 'cluster_label': None}, matched_keys=['entity_id'])"]} {"id": "tourism_16", "question": "Perform a data quality assessment on multi-source global tourism datasets by detecting anomalous visitor patterns.\n\nConstruct an SQLite database from four tourism data source categories, retaining only numerical features: (1) Airbnb short-term rental accommodation data, (2) FISETIO indoor attraction visit data, (3) FISETIO outdoor attraction visit data, and (4) TripAdvisor Indonesia tourism data.\n\nSplit each data source into training (70%) and validation (30%) sets (random_state=42). On the training sets only, apply Isolation Forest (contamination=0.1, random_state=42) with StandardScaler normalization and median imputation for missing values to detect anomalies.\n\nGenerate a quality assessment report containing source, total_records, anomalous_records, and outlier_percentage (rounded to 2 decimal places). Save the report as output.csv and output.json.", "data_sources": ["Airbnb_Open_Data.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "TripAdvisor Indonesia Tourism/Transaction.xlsx", "TripAdvisor Indonesia Tourism/User.xlsx", "TripAdvisor Indonesia Tourism/City.xlsx", "TripAdvisor Indonesia Tourism/Country.xlsx", "TripAdvisor Indonesia Tourism/Item.xlsx", "TripAdvisor Indonesia Tourism/Mode.xlsx", "countries of the world.csv", "henley_passport_index_2025_new.csv"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Excel File Handling and Automation", "Command-Line and Shell Operations", "SQLite-Specific Operations", "Database Interaction and SQL", "Data Structure Understanding and Initialization", "Stochasticity and Reproducibility", "ETL and Data Integration", "Table Creation and SQL Formatting", "Data Splitting and Sampling", "Data Splitting and Leakage Prevention", "Data Inspection and Validation", "Outlier Detection and Filtering", "Model Configuration and Import", "Data Serialization & File Handling", "Data Storage and Structuring", "Formatting and Output Organization", "Data Inspection and Summarization", "Data Aggregation and Grouping"], "domain": "tourism", "output_file_name": ["output.csv", "output.json"], "gold_file_name": ["result.csv", "result.json"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=False, specified_columns=[ 'total_records', 'anomalous_records', 'outlier_percentage'])", "compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'total_records': None, 'anomalous_records': None, 'outlier_percentage': None}, matched_keys=['total_records'])"]} {"id": "tourism_17", "question": "This is a cross-domain destination attractiveness benchmarking task. Construct a standardized country-level feature matrix by integrating multi-source tourism data with macroeconomic indicators.\n\nFor each tourism data source, compute Z-score standardized ratings (using each source's own mean and standard deviation) and determine a visit volume proxy based on record counts:\n- For the short-term rental data, retain only US listings.\n- For UK indoor and outdoor attraction data, fit LinearRegression to model weather effects on visit volumes and compute residuals. Combine indoor and outdoor results for the UK using a weighted average by record count.\n- For Indonesia tourism transaction data, join transactions with user and country information, and aggregate by user source country.\n\nBefore joining macroeconomic data, collapse duplicate country_name rows across sources by summing visit_volume_proxy and computing domain_rating_zscore as a count-weighted average.\n\nPerform additive seasonal decomposition with an annual cycle on monthly-resampled time series to extract trend components. Apply K-Means clustering (k=3, random_state=42) on domain_rating_zscore and visit_volume_proxy to assign trend segments.\n\nJoin the aggregated country-level results with macroeconomic data for per-capita GDP and passport index data for visa-free scores. Fill missing gdp_per_capita with 15000 and missing visa_free_score with 100.\n\nSave results as output.csv and output.json (records-oriented), with columns: country_name, domain_rating_zscore, visit_volume_proxy, gdp_per_capita, visa_free_score, trend_cluster.", "data_sources": ["Airbnb_Open_Data.csv", "countries of the world.csv", "henley_passport_index_2025_new.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "TripAdvisor Indonesia Tourism/Transaction.xlsx", "TripAdvisor Indonesia Tourism/User.xlsx", "TripAdvisor Indonesia Tourism/Country.xlsx"], "skills": ["Numerical Data Handling", "Data Loading with Pandas", "Parsing and Reading Data Files", "Directory and File I/O", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Time Series Handling and Preprocessing", "Z-Score Calculations", "Regression Modeling and Interpretation", "Model Training & Evaluation", "Time Series and Window Analysis", "Time Series & Temporal Grouping", "Normalization and Weighted Aggregation", "Vertical Stacking and Binding", "Data Integration and Merging", "Join Operations and Merging", "Clustering and Post-Processing", "Cluster Label Assignment", "Stochasticity and Reproducibility", "Clustering and Hierarchical Methods", "Data Transformation and Feature Engineering", "Data Export and Output Processing", "Data Serialization & File Handling"], "domain": "tourism", "output_file_name": ["output.csv", "output.json"], "gold_file_name": ["result.csv", "result.json"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['country_name', 'domain_rating_zscore', 'visit_volume_proxy', 'gdp_per_capita', 'visa_free_score'])", "compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'country_name': None, 'domain_rating_zscore': None, 'visit_volume_proxy': None, 'gdp_per_capita': None, 'visa_free_score': None}, matched_keys=['country_name'])"]} {"id": "tourism_19", "question": "Perform a cross-domain behavioral archetype clustering analysis across multi-source tourism data (short-term rental listings, indoor attraction visits, outdoor attraction visits, and attraction transaction records).\n\nFor each data source, extract rating and visit/review volume features at the feature-row level. Apply MinMax normalization to ratings and log1p transformation to visit volumes. Compute seasonal peak intensity once per source_type by aggregating monthly normalized ratings and fitting an ARIMA(1,1,1) model: define peaks as residual values exceeding residual mean + 0.5 × residual std, and calculate peak_month_ratio as the proportion of peaks. Use 0.5 as default when fewer than 24 monthly time points are available. For the transaction data, aggregate records by attraction before feature extraction, so each attraction contributes one feature row.\n\nAssign source_type labels: 'Airbnb', 'UK_Indoor', 'UK_Outdoor', 'Indonesia_TripAdvisor'. Apply K-Means clustering independently per source_type to the resulting feature rows with StandardScaler-standardized features. Select optimal k from [2, 10] using Silhouette Score (random_state=42, n_init=10). Assign globally unique cluster IDs starting from 0, incrementing sequentially across source types in the listed order.\n\nCompute per-cluster statistics over the feature rows assigned to each cluster: avg_normalized_rating, median_log_visits, peak_month_ratio, behavioral_diversity_score (std of normalized ratings), region_count (the number of feature rows in the cluster). Add constant macro indicators: avg_gdp_per_capita=25000, avg_literacy_pct=85.0, avg_visa_free_score=150.\n\nOutput columns: cluster_id, source_type, avg_normalized_rating, median_log_visits, peak_month_ratio, behavioral_diversity_score, region_count, avg_gdp_per_capita, avg_literacy_pct, avg_visa_free_score. Save as output.csv and output.json.", "data_sources": ["Airbnb_Open_Data.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "TripAdvisor Indonesia Tourism/Transaction.xlsx", "TripAdvisor Indonesia Tourism/Item.xlsx", "TripAdvisor Indonesia Tourism/Type.xlsx"], "skills": ["Data Loading with Pandas", "Data Cleaning and Transformation", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Arithmetic Transformations and Normalization", "Peak Detection & Identification", "File Handling and Operations", "Data Integration and Merging", "Column Selection and Consistency Checks", "Clustering and Post-Processing", "Cluster Label Assignment", "Stochasticity and Reproducibility", "Clustering and Hierarchical Methods", "Statistical Analysis and Metrics", "Data Grouping & Clustering", "Data Serialization & File Handling"], "domain": "tourism", "output_file_name": ["output.csv", "output.json"], "gold_file_name": ["result.csv", "result.json"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['cluster_id', 'source_type', 'avg_normalized_rating', 'median_log_visits', 'peak_month_ratio', 'behavioral_diversity_score', 'region_count', 'avg_gdp_per_capita', 'avg_visa_free_score'])", "compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'cluster_id': None, 'source_type': None, 'avg_normalized_rating': None, 'median_log_visits': None, 'peak_month_ratio': None, 'behavioral_diversity_score': None, 'region_count': None, 'avg_gdp_per_capita': None, 'avg_visa_free_score': None}, matched_keys=['cluster_id', 'source_type'])"]} {"id": "tourism_20", "question": "A **premium-destination** screening pipeline over the bundled **short-term rental**, **UK indoor/outdoor attractions**, **Indonesian transactions** (with user join where needed), **GDP**, **passport mobility**, and **UNESCO** coordinates. An entity passes only if **all** apply: **(1)** country **GDP per capita > USD 20,000** and **visa-free score ≥ 150**; **(2)** **≥ 4.5** mean score for listings and **≥ 4.0** for attractions; **(3)** demand proxy **above the category’s 75th percentile** (computed on the pre-filter pool for that category); **(4)** **indoor** sites dropped if **Pearson r(rain, visits) ≤ −0.3** on their own series; **(5)** listings **≤ USD 200** after price cleaning and within **10 km** (great-circle) of **some** heritage point; **(6)** **one consistent country-name normalization** across tables before joins.\n\nAfter filtering, run **K-Means** on **rating**, **visit volume**, and **price** (missing price → **0**), **standardize** features, search **k = 2…10** (capped by sample size), pick **k** with best **silhouette**. Export **output.csv** and **output.json** containing only **entity_id**, **source_type**, **rating**, **visit_volume**, **country**.\n", "data_sources": ["Airbnb_Open_Data.csv", "countries of the world.csv", "henley_passport_index_2025_new.csv", "whc-sites-2019.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "TripAdvisor Indonesia Tourism/Transaction.xlsx", "TripAdvisor Indonesia Tourism/Item.xlsx", "TripAdvisor Indonesia Tourism/User.xlsx"], "skills": ["Data Loading with Pandas", "Directory and File I/O", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Data Alignment & Merging", "Data Transformation and Feature Engineering", "Function Application and Vectorization", "Filtering and Criteria-Based Selection", "Data Filtering and Matching", "Geospatial Data Processing", "Data Preprocessing & Encoding", "Geospatial Distance Handling", "Distance Matrix Handling", "Filtering and Sorting Correlation Data", "Join Operations and Merging", "Data Filtering and Transformation", "Data Integration and Merging", "Clustering and Post-Processing", "Cluster Label Assignment", "Stochasticity and Reproducibility", "Clustering and Hierarchical Methods", "Data Export and Output Processing", "Data Serialization & File Handling", "Data Cleaning and Transformation"], "domain": "tourism", "output_file_name": ["output.csv", "output.json"], "gold_file_name": ["result.csv", "result.json"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['entity_id', 'source_type', 'rating', 'visit_volume', 'country'])", "compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'entity_id': None, 'source_type': None, 'rating': 0.1, 'visit_volume': 0.1, 'country': None}, matched_keys=['entity_id', 'source_type'])"]} {"id": "tourism_23", "question": "Construct a unified cross-regional tourism demand benchmark system to integrate real visitor transactions from Southeast Asian markets with synthetic performance indicators from major Western markets for assessing tourism resilience across diverse regions and data sources.\nFirst, enrich each individual TripAdvisor Indonesia transaction record with visitor origin attributes and macroeconomic context by joining demographic dimensions and country-level indicators. Preserve the original transaction-level granularity: do not aggregate, deduplicate, or summarize TripAdvisor records. For these records, set country to the destination country Indonesia; set origin_country from the visitor origin country; join visa_free_score on origin_country; join gdp_per_capita and population on the destination country Indonesia; use the numeric VisitMode value for visit_mode; and leave date, visits, rolling metrics, weather correlations, and ARIMA fields blank.\nThen, process temporal visitation patterns from the FISETIO Western indoor attraction data at the original row level. Sort all FISETIO indoor records globally by date, without grouping by individual attraction, before calculating rolling_3m, rolling_6m, rolling_9m, and rolling_12m as rolling cumulative sums over the globally sorted records. Quantify the global relationships between rain, temperature, sunshine, and visits, and attach those correlation values to each FISETIO indoor record.\nNext, apply ARIMA(1,1,1) forecasting on the 12-month rolling cumulative visits series resampled to monthly frequency, and create exactly 12 forward-looking forecast records.\nThen, process short-term rental market data from Western markets by filtering Airbnb listings where country is 'United States' and selecting key attributes including property identifiers, location information, accommodation types, pricing, and review metrics. Preserve one output row per selected Airbnb listing; do not aggregate listings.\nFinally, integrate standardized entity records from all regional sources and external market data into a unified analytical schema with consistent attribute definitions, capturing data provenance, geographic identifiers, entity characteristics, quality ratings, demand volumes, temporal aggregations, environmental correlations, and predictive indicators. Use these exact provenance labels: TripAdvisor Indonesia transaction records must have source='TripAdvisor_Indonesia' and data_type='real_transactions'; FISETIO indoor attraction records must have source='FISETIO_UK_Indoor' and data_type='synthetic_indicators'; Airbnb United States listing records must have source='Airbnb_US' and data_type='synthetic_indicators'; ARIMA forecast records must have source='FISETIO_UK_Indoor' and data_type='arima_forecast'.\nOutput(output.csv): A unified analytical table in CSV format containing cross-regional tourism demand benchmark data with standardized columns including source,country,origin_country,data_type,date,entity_name,entity_type,rating,visit_mode,visa_free_score,gdp_per_capita,population,visits,rolling_3m,rolling_6m,rolling_9m,rolling_12m,rain_visits_corr,temp_visits_corr,sunny_visits_corr,arima_forecast", "data_sources": ["datasets/tourism/TripAdvisor Indonesia Tourism/Transaction.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/Country.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/User.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/Item.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/Type.xlsx", "datasets/tourism/henley_passport_index_2025_new.csv", "datasets/tourism/countries of the world.csv", "datasets/tourism/Airbnb_Open_Data.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv"], "skills": ["Data Ingestion and Processing", "Data Loading with Pandas", "Data Handling & Preparation", "Directory Traversal and File Listing", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Join Operations and Merging", "Data Integration and Merging", "Lookup and Data Transformation Techniques", "Data Transformation and Indexing", "Data Cleaning and Transformation", "In-place vs Copy Operations", "Time Series Handling and Preprocessing", "Time Series Handling and Indexing", "Date and Time Conversion", "Rolling Window Operations", "Time Series and Window Analysis", "Statistical Correlation Analysis", "Correlation and Relationship Analysis", "ARIMA Model Fitting", "Time Series Analysis and Forecasting", "Time Series Resampling and Aggregation", "Filtering and Criteria-Based Selection", "Data Filtering and Matching", "Data Alignment & Merging", "Data Structure Creation and Manipulation", "Column Selection and Consistency Checks", "Array and Matrix Manipulation", "Data Export and Output Processing", "Data Serialization & File Handling"], "domain": "tourism", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['country','origin_country','data_type','date','entity_name','entity_type','rating','visit_mode','visa_free_score','gdp_per_capita','population','visits','rolling_3m','rolling_6m','rolling_9m','rolling_12m','rain_visits_corr','temp_visits_corr','sunny_visits_corr','arima_forecast'])"]} {"id": "tourism_24", "question": "Construct a unified performance benchmark system to identify top-tier visitor experiences across accommodation, indoor attractions, and outdoor destinations by analyzing satisfaction ratings from multiple data sources.\nFirst, extract valid rating records from each source and normalize satisfaction scores to a 0-1 scale using per-source Min-Max normalization (each source's min and max computed independently): process short-term rental ratings from accommodation data, indoor attraction ratings from museum visit records, outdoor attraction ratings from park visit data, and transaction ratings from Southeast Asian attraction reviews after joining with entity dimension tables.\nThen, calculate the global 90th percentile threshold across all normalized scores to establish a high-performance benchmark. Next, count rating records exceeding this threshold from each of the four source categories, including only records with valid ratings.\nFinally, compute statistical summaries for interpretability by calculating mean normalized ratings and 95% bootstrap confidence intervals for each source based on resampling methods.\nOutput(output.csv): A CSV file with columns 'metric_type', 'Airbnb', 'UK_Indoor', 'UK_Outdoor', 'Indonesia_Attractions'. Rows include: global_90th_percentile (value stored in the 'Airbnb' column; 'UK_Indoor', 'UK_Outdoor', 'Indonesia_Attractions' columns left empty), high_performing_count, total_valid_ratings, mean, ci_lower, ci_upper.", "data_sources": ["datasets/tourism/Airbnb_Open_Data.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "datasets/tourism/TripAdvisor Indonesia Tourism/Transaction.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/Item.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/Type.xlsx"], "skills": ["Data Ingestion and Processing", "Path Construction and Manipulation", "Directory and File Management", "Data Loading with Pandas", "Parsing and Reading Data Files", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Data Normalization and Standardization", "Arithmetic Transformations and Normalization", "Ranking and Normalization", "Type Conversion and Data Integrity", "Statistical Analysis and Testing", "Normalization and Percentile Calculations", "Mathematical and Statistical Computations", "Array and Matrix Manipulation", "Conditional Aggregation and Filtering", "Ranking and Top N Logic", "Data Structure Handling (Dictionaries, Lists)", "Data Generation and Simulation", "Statistical Modeling and Uncertainty", "Parameter Estimation and Bootstrap Methods", "Data Export and Output Processing", "Formatting and Output Organization", "Data Structure Creation and Manipulation", "CSV Processing"], "domain": "tourism", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['metric_type', 'Airbnb', 'UK_Indoor', 'UK_Outdoor', 'Indonesia_Attractions'])"]} {"id": "tourism_25", "question": "Construct a unified predictive model for tourist satisfaction (rating) and visit volume across accommodation, indoor attractions, and outdoor sites by integrating the provided data sources into a common schema. For datasets without a price field, use review count as a proxy for price. After numeric conversion, keep only complete records with positive rating, visits, and final price/proxy price. Label the data source categories as 'Airbnb', 'UK_Indoor', and 'UK_Outdoor'.\nUse the log1p-transformed price feature named 'price_log' and one-hot encoded data source features with the 'source_' prefix as the only input features. Train separate RandomForestRegressor models (n_estimators=100, random_state=42) for rating and visits prediction respectively, with a 20% test split (random_state=42). Calculate R² and MAE for both targets, and extract feature importance scores.\nOutput(output.csv): A CSV file with columns 'metric_type' and 'value', including: rating_r2, rating_mae, visits_r2, visits_mae, feature importance as {target}_importance_{feature_name}, and model/dataset metadata (n_estimators, random_state, test_size, total_samples, train_samples, test_samples, n_features). Round metric values to 4 decimal places where applicable.", "data_sources": ["datasets/tourism/Airbnb_Open_Data.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv"], "skills": ["Data Ingestion and Processing", "Directory and File I/O", "Data Loading with Pandas", "Command-Line and Shell Operations", "Data Cleaning and Transformation", "Numerical Operations and Type Conversion", "Data Filtering and Transformation", "Data Integration and Merging", "Feature Selection and Dimensionality Reduction", "Arithmetic Transformations and Normalization", "Data Transformation and Column Manipulation", "Categorical Data Preprocessing and Simplification", "Data Preparation and Formatting", "Array and Matrix Manipulation", "Model Training & Evaluation", "Data Splitting and Sampling", "Stochasticity and Reproducibility", "Model Training and Inference", "Parallel and Concurrent Execution", "Model Evaluation Metrics", "Data Export and Output Processing", "CSV Processing"], "domain": "tourism", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['metric_type', 'value'])"]} {"id": "tourism_28", "question": "Develop a unified tourism health index to compare tourism dynamics across accommodation, indoor attractions, and outdoor attractions from 2010 to 2019.\nFirst, integrate multiple data sources including Airbnb listings, UK indoor and outdoor attractions, and Indonesian tourist transactions. Compute monthly metrics for each source including visit volume proxies and average ratings.\nThen, calculate a health index for each source by combining visit volume and ratings normalized within each source independently using Min-Max scaling (40% each), and a fixed macroeconomic adjustment factor of 0.5 (20%), producing a composite score between 0 and 1.\nNext, apply a 3-month rolling average to smooth the health index time series for each source.\nFinally, use time series forecasting (Exponential Smoothing) to predict the next 12 months of health index values for each source and include both historical and forecasted values in the output.\nOutput(output.csv): A CSV file with columns 'year_month' (format 'YYYY-MM'), 'source' (Airbnb, FISETIO_Indoor, FISETIO_Outdoor, TripAdvisor), 'health_index' (normalized score), 'is_forecast' (True/False).", "data_sources": ["datasets/tourism/Airbnb_Open_Data.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "datasets/tourism/TripAdvisor Indonesia Tourism/Transaction.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/User.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/Country.xlsx"], "skills": ["Data Loading with Pandas", "Data Handling & Preparation", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Joining and Alignment Logic", "Join Operations and Merging", "Data Integration and Merging", "Time Series Handling and Preprocessing", "Statistical Analysis and Metrics", "Date Adjustment and Alignment", "Vertical Stacking and Binding", "Date and Time Conversion", "Type Casting and Data Compatibility", "Data Aggregation and Grouping", "Normalization and Weighted Aggregation", "Normalization and Percentile Calculations", "Data Normalization and Preprocessing", "Rolling Window Operations", "Trend and Smoothing Techniques", "In-place vs Copy Operations", "Time Series Analysis and Forecasting", "Time Series Handling and Indexing", "Time Series Specific Methods", "Model Prediction Troubleshooting", "Data Export and Output Processing", "Data Storage and Structuring", "Data Serialization & File Handling", "Data Inspection and Summarization"], "domain": "tourism", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['year_month', 'source', 'health_index', 'is_forecast'])"]} {"id": "tourism_29", "question": "Develop a composite Tourism Performance Index to benchmark high-performing destinations across accommodation, cultural, and natural attraction categories.\nFirst, identify high-performing accommodation listings with availability exceeding 200 days annually and review ratings of at least 4.0.\nThen, detect visitation peak months from indoor and outdoor attraction data where monthly visits exceed the mean plus one standard deviation, retaining only peaks with indoor ratings ≥4.0 or outdoor ratings ≥4.5.\nNext, filter for countries with high travel accessibility by joining country reference data with passport index data and selecting nations with visa-free score ≥170.\nThen, isolate 5-star rated visits from attraction transaction data and reconstruct user origin context through data joins.\nFinally, aggregate all qualifying records into a unified performance index on a 0–100 scale, grouped by Country, Year-Month, and AttractionCategory ('Accommodation', 'Museum-like', 'Park-like', or 'Attraction'), using quantile-normalized performance scoring.\nOutput(output.csv): A CSV file with columns 'Country', 'Year_Month', 'AttractionCategory', 'Performance_Index'.", "data_sources": ["datasets/tourism/Airbnb_Open_Data.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "datasets/tourism/TripAdvisor Indonesia Tourism/Transaction.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/User.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/Item.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/Type.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/Country.xlsx", "datasets/tourism/henley_passport_index_2025_new.csv"], "skills": ["Data Import and Library Setup", "Path Construction and Manipulation", "Data Loading with Pandas", "Parsing and Reading Data Files", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Filtering and Criteria-Based Selection", "Data Filtering and Matching", "Type Casting and Data Compatibility", "Peak Detection & Identification", "Statistical Analysis and Metrics", "Date and Time Conversion", "Data Aggregation and Grouping", "Join Operations and Merging", "Data Integration and Merging", "Normalization and Percentile Calculations", "Ranking and Normalization", "Formatting and Output Organization", "Pandas-Specific Operations", "Data Export and Output Processing", "CSV Processing", "Output and Logging"], "domain": "tourism", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['Country', 'Year_Month', 'AttractionCategory', 'Performance_Index'])"]} {"id": "tourism_30", "question": "Assess cross-market consistency in visitor satisfaction across accommodation listings, indoor attractions, and TripAdvisor attraction transactions, and in demand drivers for indoor and outdoor attractions.\nFirst, compute the mean review rating for each of the three satisfaction domains—accommodation listings, indoor attractions, and TripAdvisor attraction transactions.\nThen, calculate Pearson correlation coefficients between weather variables and monthly visits for indoor attractions (correlating maximum temperature, rainfall, and sunny hours with visit counts) and separately for outdoor attractions (correlating temperature, precipitation, and temperature difference with visit counts).\nNext, perform a one-way ANOVA test to determine whether the mean ratings differ significantly across the three satisfaction domains and report both the F-statistic and p-value.\nThen, compute the seasonal amplitude (standard deviation of the seasonal component) derived from an additive seasonal decomposition of total monthly visits over time, using a period of 12 months.\nFinally, calculate linear regression coefficients (standardized) linking user country-level GDP per capita and visa-free travel score to attraction ratings, after enriching user data via joins to country reference data.\nOutput(output.csv): A CSV file with columns 'metric_type', 'value' containing all computed statistics.", "data_sources": ["datasets/tourism/Airbnb_Open_Data.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "datasets/tourism/TripAdvisor Indonesia Tourism/Transaction.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/User.xlsx", "datasets/tourism/TripAdvisor Indonesia Tourism/Country.xlsx", "datasets/tourism/countries of the world.csv", "datasets/tourism/henley_passport_index_2025_new.csv"], "skills": ["Data Loading with Pandas", "Data Handling & Preparation", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Statistical Calculations and Descriptive Statistics", "Data Transformation and Calculation", "Column/Row-wise Computations", "Statistical Correlation Analysis", "Multiple Comparisons and Hypothesis Testing", "Statistical Analysis and Testing", "Time Series Handling and Preprocessing", "Time Series and Window Analysis", "Time Series & Temporal Grouping", "Array and Matrix Manipulation", "Regression Modeling and Interpretation", "Join Operations and Merging", "Preprocessing and Scaling", "Data Preparation and Formatting", "Model Training & Evaluation", "Data Export and Output Processing", "Dictionary Manipulation and Construction", "Statistical Analysis and Metrics", "Data Storage and Structuring", "Data Structure Creation and Manipulation", "CSV Processing"], "domain": "tourism", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['value'])"]} {"id": "tourism_31", "question": "Benchmark normalized tourism activity across three distinct markets—accommodations, cultural attractions, and tourist sites—on a common monthly scale from 2010 to 2019.\nFirst, calculate a composite activity metric per month for accommodation listings, grouped by the 'last review' date of each listing based on the product of total price volume (sum of price) and average review rating (mean of review rate number) per month.\nThen, compute total monthly visits across all indoor and outdoor attractions.\nNext, count monthly transactions as a proxy for visitation.\nFinally, normalize each market's monthly activity metric to a 0–1 scale using min-max scaling within that market over the 2010–2019 period.\nOutput(output.csv): A CSV file with columns 'year_month' (formatted as 'YYYY-MM'), 'source' (with values 'Airbnb_NYC', 'FISETIO_UK', or 'TripAdvisor_IDN'), and 'activity_index' (the normalized score).", "data_sources": ["datasets/tourism/Airbnb_Open_Data.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/outdoors.csv", "datasets/tourism/TripAdvisor Indonesia Tourism/Transaction.xlsx"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Path Construction and Manipulation", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Data Filtering and Grouping", "Date Adjustment and Alignment", "Statistical Analysis and Metrics", "Timestamp Conversion and Time Manipulation", "Time-based Filtering and Matching", "Data Normalization and Standardization", "Arithmetic Transformations and Normalization", "Data Normalization and Preprocessing", "Data Preparation and Aggregation", "Time Series & Temporal Grouping", "Data Aggregation and Grouping", "Normalization and Percentile Calculations", "Data Export and Output Processing", "Data Structure Creation and Manipulation", "CSV Processing", "Data Storage and Structuring"], "domain": "tourism", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['year_month', 'source', 'activity_index'])"]} {"id": "tourism_32", "question": "Assess whether high-quality segments across accommodation, indoor attractions, and attraction transactions exhibit consistent visitor satisfaction patterns to support unified quality benchmarks in global tourism analytics.\nFirst, identify high-quality accommodation listings in Manhattan (neighbourhood group = 'Manhattan') with verified hosts, price under $200, and annual availability greater than 100 days.\nThen, select museum visits during winter months (December, January, February) with ratings above 4.0 from indoor attraction data.\nNext, extract transactions where the visit mode corresponds to couples and rating is at least 4.\nCompute the mean, median, population standard deviation (ddof=0), and skewness of ratings for each filtered dataset.\nThen perform pairwise Kolmogorov-Smirnov two-sample tests between each pair of these three rating distributions and report all p-values.\nFinally, determine whether, at a significance level of α=0.05, the null hypothesis that the rating distributions are identical can be rejected for any pair.\nOutput(output.csv): A CSV file with columns 'metric_type', 'n', 'mean', 'median', 'std', 'skew', 'ks_pvalue', 'significant' containing descriptive statistics and KS test results. For KS-test rows, write 'Yes' in 'significant' when the null hypothesis can be rejected at α=0.05, and 'No' otherwise.", "data_sources": ["datasets/tourism/Airbnb_Open_Data.csv", "datasets/tourism/FISETIO A FIne-grained, Structured and Enriched Tourism Dataset for Indoor and Outdoor attractions/datasets/indoors.csv", "datasets/tourism/TripAdvisor Indonesia Tourism/Transaction.xlsx"], "skills": ["Data Loading with Pandas", "Directory and File I/O", "Parsing and Reading Data Files", "Excel File Handling and Automation", "Command-Line and Shell Operations", "Data Filtering and Grouping", "Filtering and Criteria-Based Selection", "Data Filtering and Matching", "Type Casting and Data Compatibility", "Data Cleaning and Transformation", "Time-based Filtering and Matching", "Date and Time Conversion", "Statistical Calculations and Descriptive Statistics", "Mathematical and Statistical Computations", "Array and Matrix Manipulation", "Multiple Comparisons and Hypothesis Testing", "Statistical Analysis and Testing", "Data Export and Output Processing", "Formatting and Output Organization", "Data Serialization & File Handling"], "domain": "tourism", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['n', 'mean', 'median', 'std', 'skew', 'ks_pvalue', 'significant'])"]} {"id": "transportation_02", "question": "Compute urban transportation pressure index for NYC taxi zones. Perform spatial join between taxi zones and NY census tracts to extract PT_P and WFH_P. Calculate average monthly pickups per zone (Q2 2024, rounded to integer). From NCR data, find vehicle type with highest No Driver Found cancellation rate. Compute pressure index: (monthly_trips × (1 − WFH_P/100)) / (PT_P + 1), sort descending.\n\nOutput: output.json with zone, borough, monthly_pickup_count, PT_P, WFH_P, urban_mobility_stress_index, ncr_high_cancel_vehicle.", "data_sources": ["NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "taxi_zones/taxi_zones.shp", "yellow_tripdata/yellow_tripdata_2024-04.parquet", "yellow_tripdata/yellow_tripdata_2024-05.parquet", "yellow_tripdata/yellow_tripdata_2024-06.parquet", "ncr_ride_bookings.csv"], "skills": ["Geospatial Data Processing", "Filtering and Criteria-Based Selection", "Coordinate System Management", "In-place vs Copy Operations", "Compression and Archiving", "Command-Line and Shell Operations", "Data Loading with Pandas", "Data Aggregation and Grouping", "Time Series Alignment and Matching", "Parsing and Reading Data Files", "Date and Time Conversion", "Statistical Analysis and Metrics", "Vertical Stacking and Binding", "Dynamic Data Transformation and Insertion", "Percentage and Variation Calculations", "Row-wise Operations and Aggregation", "Join Operations and Merging", "Arithmetic and Cumulative Calculations", "Formatting and Output Organization", "Pandas-Specific Operations", "Sorting, Limiting, and Ranking", "Data Serialization & File Handling", "Data Export and Output Processing"], "domain": "transportation", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'urban_mobility_stress_index': 0.01}, matched_keys=['zone'])"]} {"id": "transportation_05", "question": "Analyze NYC taxi travel patterns across boroughs to assess travel demand changes from January to February 2024.\nFilter out trips with abnormal values (distance: 0-100 miles, fare: 0-1000$) to ensure data quality. Identify the borough with the largest absolute increase in average total fare from January to February.\nFirst, output output1.json: JSON array containing analysis results for each borough and month with columns: borough (string), month (int), avg_trip_distance (float), avg_total_fare (float), trip_count (int), absolute_increase (float), is_max_increase (boolean).\nSecond, output output2.png with two subplots: (1) left subplot showing average trip distance comparison with graph_title='Average Trip Distance by Borough (Jan vs Feb 2024)', x_label='Borough', y_label='Average Trip Distance (miles)'; (2) right subplot showing average total fare comparison with graph_title='Average Total Fare by Borough (Jan vs Feb 2024)', x_label='Borough', y_label='Average Total Fare ($)'.", "data_sources": ["taxi_zones/taxi_zones.shp", "yellow_tripdata/yellow_tripdata_2024-01.parquet", "yellow_tripdata/yellow_tripdata_2024-02.parquet"], "skills": ["File Handling and Operations", "Path Construction and Manipulation", "Geospatial Data Processing", "In-place vs Copy Operations", "Compression and Archiving", "Command-Line and Shell Operations", "File Iteration and Traversal", "Directory and File I/O", "Parsing and Reading Data Files", "Data Conversion and Post-Loading Processing", "Join Operations and Merging", "Dynamic Data Transformation and Insertion", "Data Aggregation and Grouping", "Column-wise Transformations and Aggregation", "Data Filtering and Grouping", "Arithmetic and Cumulative Calculations", "Incremental and Comparative Calculations", "Data Serialization & File Handling", "Data Analysis and Visualization", "Subplot and Layout Management", "Bar Chart Creation and Layout", "Plot Customization and Layout", "SQL Pivot and Crosstab Techniques"], "domain": "transportation", "output_file_name": ["output1.json", "output2.png"], "gold_file_name": ["result1.json", "result2.png"], "eval_func": ["compare_json(output_file_name='output1.json', gold_file_name='result1.json', thresholds={'borough': None, 'month': None, 'avg_trip_distance': 0.05, 'avg_total_fare': 0.05}, matched_keys=['borough', 'month'])", "compare_image(output_file_name='output2.png', gold_file_name='result2.png', calculate_columns=['type', 'graph_title','x_label','y_label'])"], "post_process_func": ["image_post_process('output2.png')", "image_post_process('result2.png')"]} {"id": "transportation_06", "question": "Train a linear regression model to predict NYC yellow taxi fares (Q2 2024) using features: time (hour, day of week), trip (distance, passenger count), and borough dummy variables for pickup/dropoff (borough_pu_*, borough_do_*). Filter outliers using strict ranges: 0 < trip_distance < 100 miles and 0 < fare_amount < 500$. Split data (test_size=0.2, random_state=42). Output RMSE and R².\n\nOutput: output.json with {'RMSE': float, 'R2': float}.", "data_sources": ["taxi_zones/taxi_zones.shp", "yellow_tripdata/yellow_tripdata_2024-04.parquet", "yellow_tripdata/yellow_tripdata_2024-05.parquet", "yellow_tripdata/yellow_tripdata_2024-06.parquet"], "skills": ["Data Loading with Pandas", "Geospatial Data Processing", "Date and Time Conversion", "Timestamp Conversion and Time Manipulation", "Outlier Detection and Filtering", "Filtering and Criteria-Based Selection", "Path Construction and Manipulation", "Dynamic Data Transformation and Insertion", "Compression and Archiving", "Command-Line and Shell Operations", "Data Cleaning and Transformation", "Join Operations and Merging", "Data Integration and Merging", "Data Preprocessing & Encoding", "Data Transformation and Column Manipulation", "Model Training and Customization", "Model Training & Evaluation", "Data Splitting and Sampling", "Feature Engineering and Embeddings", "Stochasticity and Reproducibility", "Model Evaluation Metrics", "Data Storage and Structuring", "Data Serialization & File Handling", "Data Export and Output Processing", "Array and Matrix Manipulation"], "domain": "transportation", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'RMSE': None, 'R2': None})"]} {"id": "transportation_07", "question": "Identify NYC taxi zones with low public transit dependence (PT_P < 10%) and high car dependence (CA_P > 75%) that intersect with census tracts, then calculate their average monthly taxi pickups (Jan-May 2024), filtering zones with avg pickups > 100. Identify NCR vehicle type with highest No Driver Found cancellation rate (percentage) as benchmark.\n\nOutput: output.json with zone, borough, PT_P, avg_monthly_trips, ncr_vehicle_type, ncr_cancellation_rate.", "data_sources": ["NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "ncr_ride_bookings.csv", "taxi_zones/taxi_zones.shp", "yellow_tripdata/yellow_tripdata_2024-01.parquet", "yellow_tripdata/yellow_tripdata_2024-02.parquet", "yellow_tripdata/yellow_tripdata_2024-03.parquet", "yellow_tripdata/yellow_tripdata_2024-04.parquet", "yellow_tripdata/yellow_tripdata_2024-05.parquet"], "skills": ["Directory and File I/O", "Geospatial Data Processing", "Data Loading with Pandas", "Coordinate System Management", "In-place vs Copy Operations", "Compression and Archiving", "Command-Line and Shell Operations", "Batch Processing and Performance Optimization", "Filtering and Criteria-Based Selection", "Conditional Logic and Row-wise Operations", "Data Filtering and Transformation", "Time Series Alignment and Matching", "Data Aggregation and Grouping", "Arithmetic and Cumulative Calculations", "Dynamic Data Transformation and Insertion", "Conditional Aggregation and Filtering", "Join Operations and Merging", "DataFrame Transformation and Reshaping", "Formatting and Output Organization", "Data Serialization & File Handling", "Handling Missing or Edge Cases"], "domain": "transportation", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'zone': None, 'borough': None, 'PT_P': None, 'avg_monthly_trips': None, 'ncr_vehicle_type': None, 'ncr_cancellation_rate': None}, matched_keys=['zone'])"]} {"id": "transportation_08", "question": "Compute borough-level mobility metric comparing NYC and NCR transportation efficiency. Load NYC taxi data (Jan-Sep 2024), calculate total taxi revenue per borough. Load NCR data, compute total booking value and No Driver Found cancellation rate (percentage). Perform spatial join between taxi zones and NY census tracts to count tracts per borough. Calculate mobility metric: (taxi_revenue - ncr_booking_value) / tract_count for each borough.\n\nOutput: output.json with borough, taxi_revenue, ncr_booking_value, tract_count, mobility_metric, ncr_cancellation_rate.", "data_sources": ["NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "ncr_ride_bookings.csv", "taxi_zones/taxi_zones.dbf", "taxi_zones/taxi_zones.shp", "yellow_tripdata/yellow_tripdata_2024-01.parquet", "yellow_tripdata/yellow_tripdata_2024-02.parquet", "yellow_tripdata/yellow_tripdata_2024-03.parquet", "yellow_tripdata/yellow_tripdata_2024-04.parquet", "yellow_tripdata/yellow_tripdata_2024-05.parquet", "yellow_tripdata/yellow_tripdata_2024-06.parquet", "yellow_tripdata/yellow_tripdata_2024-07.parquet", "yellow_tripdata/yellow_tripdata_2024-08.parquet", "yellow_tripdata/yellow_tripdata_2024-09.parquet"], "skills": ["Data Cleaning and Transformation", "Geospatial Data Processing", "Coordinate System Management", "In-place vs Copy Operations", "Compression and Archiving", "Command-Line and Shell Operations", "Batch Processing and Performance Optimization", "Data Aggregation and Grouping", "Data Loading with Pandas", "Cross/Merge Products and Filtering by Time Windows", "Summation Techniques", "Dynamic Data Transformation and Insertion", "Arithmetic and Cumulative Calculations", "Unique Identifier and Entity Management", "Time Series Alignment and Matching", "Data Integration and Merging", "Join Operations and Merging", "Data Transformation and Calculation", "Data Export and Output Processing", "Data Serialization & File Handling", "Function Application and Vectorization"], "domain": "transportation", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'borough': None, 'taxi_revenue': None, 'ncr_booking_value': None, 'tract_count': None, 'mobility_metric': None, 'ncr_cancellation_rate': None}, matched_keys=['borough'])"]} {"id": "transportation_10", "question": "Train a random forest regression model (n_estimators=100) to predict hourly taxi demand per NYC borough (Q2 2024). Build features: hour, day of week, weekend flag, and historical demand lag features like 1 hour ago, 2 hours ago, and 24 hours ago. Include borough dummy variables. Use temporal split (80:20, no shuffle) and random_state=42. Output RMSE and MAE.\n\nOutput: output.json with {'RMSE': float, 'MAE': float}.", "data_sources": ["taxi_zones/taxi_zones.shp", "yellow_tripdata/yellow_tripdata_2024-04.parquet", "yellow_tripdata/yellow_tripdata_2024-05.parquet", "yellow_tripdata/yellow_tripdata_2024-06.parquet"], "skills": ["Data Loading with Pandas", "Path Construction and Manipulation", "Geospatial Data Handling and Mapping", "Compression and Archiving", "Command-Line and Shell Operations", "Data Type and Format Conversion", "Parsing and Reading Data Files", "Date and Time Conversion", "Time Formatting and String Manipulation", "Join Operations and Merging", "Dynamic Data Transformation and Insertion", "Time Series Analysis and Forecasting", "Time Series Resampling and Aggregation", "Date Adjustment and Alignment", "Holiday and Calendar Handling", "Lagged Variables and Rolling Features", "In-place vs Copy Operations", "Row-Dependent and Iterative Computations", "Event Modeling and Feature Engineering", "Encoding and Vector Representation", "Array and Matrix Manipulation", "Data Splitting and Leakage Prevention", "Model Training & Optimization", "Handling Missing Data", "Parallel and Concurrent Execution", "Stochasticity and Reproducibility", "Model Evaluation Metrics", "Data Serialization & File Handling"], "domain": "transportation", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'RMSE': None, 'MAE': None})"]} {"id": "transportation_11", "question": "This is a cross-city travel pattern comparison task. Using New York City yellow taxi trip data (January to September 2024), taxi zone geographic data, and India NCR ride-hailing booking data, identify the top 10 cross-borough origin-destination pairs in NYC by total trip count (excluding same-borough trips), and match each to the most similar NCR origin-destination pair.\n\nSemantic matching uses the following predefined keyword sets for each NYC borough:\n- Manhattan: ['central', 'connaught', 'barakhamba', 'pragati', 'aiims', 'saket']\n- Brooklyn: ['noida', 'faridabad', 'ghaziabad', 'indirapuram', 'vasundhara']\n- Queens: ['dwarka', 'palam', 'mahipalpur', 'airport', 'igi', 'aerocity']\n- Bronx: ['rohini', 'pitampura', 'shalimar', 'ashok', 'model town', 'jahangir']\n- Staten Island: ['vasant', 'munirka', 'sarojini', 'lajpat', 'greater kailash']\n\nConfidence score calculation:\n1. For pickup and dropoff respectively, compute the ratio of matched keywords (case-insensitive substring match) in the corresponding NCR location name to the total keyword count for that borough. Average the two ratios.\n2. Add 0.03 bonus for each hub keyword present in either NCR location name: ['airport', 'metro', 'station', 'sector', 'chowk', 'garden', 'nagar', 'colony'].\n3. If the NYC pair is Manhattan→Brooklyn/Queens, add 0.1 when the NCR dropoff location contains any of ['noida', 'faridabad', 'ghaziabad', 'dwarka']. If Brooklyn/Queens→Manhattan, add 0.1 when the NCR pickup location contains any of those keywords.\n4. Cap the score at 1.0 and round to 4 decimal places.\n\nFor each NYC borough pair, select the NCR pair with the highest confidence score. Save the result as output.csv with columns: pickup_borough, dropoff_borough, nyc_trip_count, ncr_pickup_location, ncr_drop_location, ncr_ride_count, analog_confidence_score (exactly 10 rows).", "data_sources": ["ncr_ride_bookings.csv", "taxi_zones/taxi_zones.shp", "yellow_tripdata/yellow_tripdata_2024-01.parquet", "yellow_tripdata/yellow_tripdata_2024-02.parquet", "yellow_tripdata/yellow_tripdata_2024-03.parquet", "yellow_tripdata/yellow_tripdata_2024-04.parquet", "yellow_tripdata/yellow_tripdata_2024-05.parquet", "yellow_tripdata/yellow_tripdata_2024-06.parquet", "yellow_tripdata/yellow_tripdata_2024-07.parquet", "yellow_tripdata/yellow_tripdata_2024-08.parquet", "yellow_tripdata/yellow_tripdata_2024-09.parquet"], "skills": ["Path Construction and Manipulation", "Directory and File I/O", "Data Loading with Pandas", "Geospatial Data Processing", "Parsing and Reading Data Files", "File Handling and Operations", "Compression and Archiving", "Binary Data Handling", "Command-Line and Shell Operations", "Join Operations and Merging", "Mapping and Lookup", "Co-occurrence and Pairwise Analysis", "Sorting, Limiting, and Ranking", "Data Collection and Preparation", "Dynamic Data Transformation and Insertion", "In-place vs Copy Operations", "Batch Processing and Performance Optimization", "Data Structure Understanding and Initialization", "Custom Similarity Functions", "Custom Programming and Functions", "Data Structure Creation and Manipulation", "Pandas-Specific Operations", "Data Export and Output Processing", "CSV Processing"], "domain": "transportation", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['pickup_borough', 'dropoff_borough', 'nyc_trip_count', 'ncr_pickup_location', 'ncr_drop_location', 'ncr_ride_count', 'analog_confidence_score'])"]} {"id": "transportation_13", "question": "This is an urban transportation service vulnerability assessment and cross-regional ride-hailing service comparison analysis task.\n\nPart 1: Identify taxi service vulnerability zones by combining NYC taxi zone boundaries, national transportation mode survey data (filtered to New York State records only), and yellow taxi trip records from January to June 2024. For each taxi zone, calculate its average public transit commuting percentage by spatially associating it with overlapping census tracts. Determine two thresholds: the 95th percentile of maximum monthly pickup counts across zones, and the 10th percentile of average public transit commuting percentage across zones. A zone is considered vulnerable if its maximum monthly pickup count >= the 95th percentile threshold AND its average public transit commuting percentage <= the 10th percentile threshold. For each vulnerable zone, compute a Service Vulnerability Index (SVI) = (1 - pt_p/100) × (max_monthly_pickups / median of max_monthly_pickups across all zones).\n\nPart 2: Using ride-hailing booking data, analyze cancellation patterns. For each combination of pickup location and vehicle type, calculate the cancellation rate as a percentage. Filter for combinations with at least 10 total bookings, then select the top 5 with the highest cancellation rates.\n\nPart 3: Generate a histogram of public transit commuting percentage distribution across all taxi zones, with a red vertical dashed line marking the 10th percentile threshold.\n\nOutput files:\n- output.csv: columns location_id, zone_name, borough, pt_p, max_monthly_pickups, service_vulnerability_index\n- output.json: columns pickup_location, vehicle_type, cancellation_rate, cancelled_count, total_count\n- output_image.png (type='bar', graph_title='Distribution of Public Transit Usage Across NYC Taxi Zones', x_label='Public Transit Commuting Percentage (PT_P)', y_label='Number of Taxi Zones')", "data_sources": ["NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "ncr_ride_bookings.csv", "taxi_zones/taxi_zones.shp", "yellow_tripdata/yellow_tripdata_2024-01.parquet", "yellow_tripdata/yellow_tripdata_2024-02.parquet", "yellow_tripdata/yellow_tripdata_2024-03.parquet", "yellow_tripdata/yellow_tripdata_2024-04.parquet", "yellow_tripdata/yellow_tripdata_2024-05.parquet", "yellow_tripdata/yellow_tripdata_2024-06.parquet"], "skills": ["Geospatial Data Processing", "Data Loading with Pandas", "Filtering and Criteria-Based Selection", "Coordinate System Management", "In-place vs Copy Operations", "Compression and Archiving", "Batch Processing and Performance Optimization", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Time Series Alignment and Matching", "Data Conversion and Post-Loading Processing", "Date Adjustment and Alignment", "SQLite-Specific Operations", "Dynamic Data Transformation and Insertion", "ETL and Data Integration", "Normalization and Percentile Calculations", "Statistical Calculations and Quantiles", "Outlier Detection and Filtering", "Threshold-Based Categorization or Filtering", "Arithmetic and Cumulative Calculations", "Join Operations and Merging", "Parsing and Reading Data Files", "Data Transformation and Column Manipulation", "Column Manipulation / Creation", "Conditional Aggregation and Filtering", "Logical Operators for Combining Conditions", "Sorting, Limiting, and Ranking", "Ranking and Top N Logic", "Histogram Creation and Manipulation", "Data Analysis and Visualization", "Formatting and Output Organization", "Column Selection and Consistency Checks", "CSV Processing", "Data Export and Output Processing", "Data Serialization & File Handling", "Data Storage and Structuring"], "domain": "transportation", "output_file_name": ["output.csv", "output.json", "output_image.png"], "gold_file_name": ["result.csv", "result.json", "result_image.png"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['location_id', 'zone_name', 'borough', 'pt_p', 'max_monthly_pickups', 'service_vulnerability_index'])", "compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'cancellation_rate': 0.05, 'cancelled_count': None, 'total_count': None}, matched_keys=['pickup_location', 'vehicle_type'])", "compare_image(output_file_name='output_image.png', gold_file_name='result_image.png', calculate_columns=['type', 'graph_title', 'x_label', 'y_label'])"], "post_process_func": ["image_post_process(output_file_name='output_image.png')", "image_post_process(output_file_name='result_image.png')"]} {"id": "transportation_16", "question": "Using commuting transportation mode survey data, New York taxi zone boundary data, and yellow taxi trip records from April to September 2024, identify high-potential zones suitable for comprehensive transportation intervention measures. Determine the public transportation commuting proportion for each taxi zone by spatially associating zones with New York State census tract-level commuting data. Aggregate taxi trip data by pickup zone to calculate average trip distance and total pickup count. A high-potential zone must simultaneously satisfy: average trip distance greater than 5 miles, public transportation commuting proportion greater than 30%, and total pickup count at or above the 80th percentile across all zones. Sort qualifying zones by pickup count in descending order and save to output.csv with columns: zone, borough, avg_trip_distance, pt_commuting_pct, pickup_count. Also generate output2.csv containing a statistical summary of all zones with columns: LocationID, zone, borough, avg_trip_distance, pt_commuting_pct, pickup_count.", "data_sources": ["NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "taxi_zones/taxi_zones.shp", "yellow_tripdata/yellow_tripdata_2024-04.parquet", "yellow_tripdata/yellow_tripdata_2024-05.parquet", "yellow_tripdata/yellow_tripdata_2024-06.parquet", "yellow_tripdata/yellow_tripdata_2024-07.parquet", "yellow_tripdata/yellow_tripdata_2024-08.parquet", "yellow_tripdata/yellow_tripdata_2024-09.parquet"], "skills": ["Geospatial Data Processing", "Data Loading with Pandas", "Filtering and Criteria-Based Selection", "Path Construction and Manipulation", "Directory and File Management", "Data Aggregation and Grouping", "Handling Missing or Edge Cases", "Handling Missing Data", "In-place vs Copy Operations", "Compression and Archiving", "Time Series Alignment and Matching", "Batch Processing and Performance Optimization", "Header and Metadata Processing", "Data Extraction and Manipulation", "Vertical Stacking and Binding", "Statistical Analysis and Metrics", "Binary Data Handling", "Dynamic Data Transformation and Insertion", "Join Operations and Merging", "Statistical Calculations and Quantiles", "Sorting, Limiting, and Ranking", "Column Selection and Consistency Checks"], "domain": "transportation", "output_file_name": ["output.csv", "output2.csv"], "gold_file_name": ["result.csv", "result2.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['zone', 'borough', 'avg_trip_distance', 'pt_commuting_pct', 'pickup_count'])", "compare_csv(output_file_name='output2.csv', gold_file_name='result2.csv', ignore_order=True, specified_columns=['LocationID', 'zone', 'borough', 'avg_trip_distance', 'pt_commuting_pct', 'pickup_count'])"]} {"id": "transportation_18", "question": "This is a cross-regional travel pattern comparison analysis task. Compare travel characteristics between New York City taxi data and India National Capital Region (NCR) ride-hailing data, aggregated by geographic units.\nFor NYC: Using the transportation mode survey data (filtered to New York State) and taxi zone boundaries, compute the average public transit commuting proportion for each taxi zone. Then load January to April 2024 yellow taxi trip data and aggregate by borough to calculate total ride counts, average trip distances, and mean public transit commuting proportions.\nFor NCR: Filter ride-hailing bookings to orders with status 'Completed' or 'Incomplete'. Clean pickup locations by removing suffixes (Sector, Block, Phase, Colony, Vihar, Enclave, Extension, Area) and standardizing city name variants (e.g., Gurugram to Gurgaon). Aggregate by cleaned city, keeping only cities with at least 100 rides.\nGenerate a unified comparison table sorted by total rides descending. Output as output.csv with columns: geography, total_rides, avg_trip_distance, pt_commuting_pct. NYC rows include pt_commuting_pct values while NCR rows have missing values.", "data_sources": ["NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "ncr_ride_bookings.csv", "taxi_zones/taxi_zones.shp", "yellow_tripdata/yellow_tripdata_2024-01.parquet", "yellow_tripdata/yellow_tripdata_2024-02.parquet", "yellow_tripdata/yellow_tripdata_2024-03.parquet", "yellow_tripdata/yellow_tripdata_2024-04.parquet"], "skills": ["Geospatial Data Processing", "Coordinate System Management", "Data Aggregation and Grouping", "Reshaping and Aggregation", "Handling Missing or Edge Cases", "In-place vs Copy Operations", "Compression and Archiving", "Time Series Alignment and Matching", "Data Loading with Pandas", "Header and Metadata Processing", "Vertical Stacking and Binding", "Join Operations and Merging", "Dynamic Data Transformation and Insertion", "Filtering and Criteria-Based Selection", "Data Cleaning and Transformation", "String Manipulation and Conversion", "Function Application and Vectorization", "Column-wise Transformations and Aggregation", "Column Manipulation / Creation", "Sorting, Limiting, and Ranking", "Data Export and Output Processing", "CSV Processing"], "domain": "transportation", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['geography', 'total_rides', 'avg_trip_distance', 'pt_commuting_pct'])"]} {"id": "transportation_19", "question": "Analyze the relationship between public transportation usage and taxi demand across New York City boroughs. Use commuting mode survey data (filtered to New York State), taxi zone boundaries, yellow taxi trip records from January to September 2024, and India NCR ride-hailing booking data.\nFor each borough: (1) spatially associate census tracts with taxi zones to obtain public transportation usage rates, and calculate the borough-level average; (2) calculate the mean of zone-level average trip distances and total pickup count; (3) include total NCR ride-hailing bookings (total number of records) as a cross-market benchmark, with the same value for all boroughs.\nGenerate output.csv with columns: borough, avg_trip_distance, pickup_count, public_transit_pct, total_ncr_bookings.", "data_sources": ["NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "ncr_ride_bookings.csv", "taxi_zones/taxi_zones.shp", "yellow_tripdata/yellow_tripdata_2024-01.parquet", "yellow_tripdata/yellow_tripdata_2024-02.parquet", "yellow_tripdata/yellow_tripdata_2024-03.parquet", "yellow_tripdata/yellow_tripdata_2024-04.parquet", "yellow_tripdata/yellow_tripdata_2024-05.parquet", "yellow_tripdata/yellow_tripdata_2024-06.parquet", "yellow_tripdata/yellow_tripdata_2024-07.parquet", "yellow_tripdata/yellow_tripdata_2024-08.parquet", "yellow_tripdata/yellow_tripdata_2024-09.parquet"], "skills": ["Geospatial Data Processing", "Data Loading with Pandas", "Data Structure Understanding and Initialization", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Column-wise Transformations and Aggregation", "In-place vs Copy Operations", "Compression and Archiving", "Time Series Alignment and Matching", "Batch Processing and Performance Optimization", "Directory Traversal and File Listing", "Vertical Stacking and Binding", "Dynamic Data Transformation and Insertion", "Join Operations and Merging", "Mathematical and Statistical Computations", "Parsing and Reading Data Files", "Data Transformation and Column Manipulation", "Data Export and Output Processing", "Data Serialization & File Handling", "Formatting and Output Organization"], "domain": "transportation", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['borough', 'avg_trip_distance', 'pickup_count', 'public_transit_pct', 'total_ncr_bookings'])"]} {"id": "transportation_21", "question": "Transportation policy research: compare how **trip distance** relates to **revenue** for **NYC yellow taxis** versus **ride-hailing in India’s National Capital Region**, focusing on NYC **boroughs with low public-transit commuting**. Use the project’s commute survey layer (New York state only), taxi zone boundaries, NYC yellow trip extracts for **January–March 2024**, and the NCR booking extract.\n\nDefine low-transit boroughs by spatially linking zones to commute areas, averaging each borough’s public-transit commute share, and taking boroughs **under 10%**; if none qualify, use the borough(s) with the **lowest** average (same tie-break as a defensible default). Restrict NYC trips to those boroughs with **positive distance and fare**; restrict NCR to **completed** trips with **positive distance and paid amount**.\n\nBuild **one** figure that overlays both markets: **50 equal-width** distance bins from **0** to the **overall maximum** distance across both sides; within each bin, sum **fare** (NYC) and **booking value** (NCR) as **total revenue** per bin. Include **title**, **axis labels**, **grid**, and **legend**. Report which bin has the **largest NYC yellow-taxi revenue** and write that closed interval to **output.txt** (e.g. `17.2–18.3 miles`, using a single en-dash between bounds). Save the figure as **output.png**.\n", "data_sources": ["NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "ncr_ride_bookings.csv", "taxi_zones/taxi_zones.shp", "yellow_tripdata/yellow_tripdata_2024-01.parquet", "yellow_tripdata/yellow_tripdata_2024-02.parquet", "yellow_tripdata/yellow_tripdata_2024-03.parquet"], "skills": ["Geospatial Data Processing", "Coordinate System Management", "Data Aggregation and Grouping", "Numerical Comparison and Proximity Checks", "Compression and Archiving", "Time Series Alignment and Matching", "Data Loading with Pandas", "Parsing and Reading Data Files", "Vertical Stacking and Binding", "Join Operations and Merging", "Filtering and Criteria-Based Selection", "Data Binning and Grid Creation", "Weighted Aggregation and Summation", "Vectorization and Performance Optimization", "Multiple Series/Traces Visualization", "Axes and Element Layering", "Plot Customization and Annotation", "Image Handling and Exporting", "Visualization and Output Generation", "Interval and Range Operations", "Output and Logging", "Line Collection Customization"], "domain": "transportation", "output_file_name": ["output.png", "output.txt"], "gold_file_name": ["result.png", "result.txt"], "eval_func": ["compare_image(output_file_name='output.png', gold_file_name='result.png', calculate_columns=['type'])", "compare_text(output_file_name='output.txt', gold_file_name='result.txt')"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result.png')"]} {"id": "transportation_22", "question": "Analyze how community-level public transportation commuting behavior affects taxi demand patterns in New York City. Using commuting mode survey data (New York State), taxi zone boundaries, and yellow taxi trip records (January–September 2024), compute a 7-day (168-hour) rolling average of hourly pickup volumes stratified by pickup zones' public transportation commuting proportion (PT_P) quintiles.\n\nFor each taxi zone, determine its PT_P by averaging values from spatially intersecting census tracts. Assign each trip to one of 5 PT_P quintiles (labeled 0–4) based on its pickup zone. Ensure complete hourly coverage with 0-filled gaps and use min_periods=1 for the rolling window.\n\nGenerate output.csv with columns: hour_bin, pt_quintile, rolling_avg_pickups.", "data_sources": ["NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "taxi_zones/taxi_zones.shp", "yellow_tripdata/yellow_tripdata_2024-01.parquet", "yellow_tripdata/yellow_tripdata_2024-02.parquet", "yellow_tripdata/yellow_tripdata_2024-03.parquet", "yellow_tripdata/yellow_tripdata_2024-04.parquet", "yellow_tripdata/yellow_tripdata_2024-05.parquet", "yellow_tripdata/yellow_tripdata_2024-06.parquet", "yellow_tripdata/yellow_tripdata_2024-07.parquet", "yellow_tripdata/yellow_tripdata_2024-08.parquet", "yellow_tripdata/yellow_tripdata_2024-09.parquet"], "skills": ["Geospatial Data Processing", "Data Loading with Pandas", "Data Structure Handling (Dictionaries, Lists)", "Data Categorization & Mapping", "In-place vs Copy Operations", "Compression and Archiving", "Time Series Alignment and Matching", "Directory Traversal and File Listing", "Timestamp Conversion and Time Manipulation", "Handling Missing Data", "Statistical Calculations and Quantiles", "Statistical Analysis and Metrics", "Dynamic Data Transformation and Insertion", "Batch Processing and Performance Optimization", "Time Series & Temporal Grouping", "Data Aggregation and Grouping", "Interval and Range Operations", "Rolling Window Operations", "Time Series and Window Analysis", "Time Series Resampling and Aggregation", "Sorting and Aggregation", "Time-based Filtering and Matching", "SQL Pivot and Crosstab Techniques"], "domain": "transportation", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['hour_bin', 'pt_quintile', 'rolling_avg_pickups'])"]} {"id": "transportation_23", "question": "Conduct a comprehensive transportation pattern analysis to examine the relationship between NYC taxi usage and local commuting behaviors, while establishing cross-regional benchmarks against ride-hailing dynamics in another metropolitan region.\nFirst, load and consolidate five months of yellow taxi trip records from January to May 2024, then aggregate pickup statistics including total trips, average base fare (fare_amount column), and average trip distance by pickup location. \nLoad taxi zone metadata and merge with aggregated statistics using inner join to enrich location information (only retaining zones with trip data). \nLoad census commuting data and filter to New York State census tracts (STATEFP = '36'), then perform spatial intersection analysis using 'intersects' predicate to associate taxi zones with commuting behavior metrics including public transit usage rate (PT_P), car-alone commute rate (CA_P), and work-from-home rate (WFH_P). \nLoad ride-hailing data from another metropolitan region to compute global benchmarks for average ride distance and booking cancellation rate (including 'Cancelled by Driver' and 'Cancelled by Customer' statuses). Deduplicate records by LocationID using groupby().first() to ensure one row per zone, identify top 10% high-traffic zones using 90th quantile thresholding, append cross-regional benchmark metrics as comparative references, and sort results by total pickup volume in descending order.\nOutput: A pandas DataFrame containing one row per NYC taxi pickup zone that has trip data and spatially overlaps with a New York census tract (STATEFP = '36'), with columns: LocationID, zone, borough, total_pickups, avg_fare, avg_trip_distance, PT_P, CA_P, WFH_P, is_top_10_pct, benchmark_avg_ride_distance, benchmark_cancellation_rate. Save the result to output.csv.", "data_sources": ["datasets/transportation/NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "datasets/transportation/ncr_ride_bookings.csv", "datasets/transportation/taxi_zones/taxi_zones.dbf", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-01.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-02.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-03.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-04.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-05.parquet"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "ETL and Data Integration", "Vertical Stacking and Binding", "Dynamic Data Transformation and Insertion", "Command-Line and Shell Operations", "Batch Processing and Performance Optimization", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Vectorization and Performance Optimization", "Geospatial Data Processing", "Join Operations and Merging", "Pandas-Specific Operations", "Compression and Archiving", "Filtering and Criteria-Based Selection", "In-place vs Copy Operations", "Time Series Alignment and Matching", "Column Selection and Consistency Checks", "Unique Value Extraction", "Outlier Detection and Filtering", "Indexing and Selection", "Statistical Calculations and Quantiles", "Data Transformation and Column Manipulation", "Sorting, Limiting, and Ranking", "DataFrame Column Management", "Data Export and Output Processing", "CSV Processing"], "domain": "transportation", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['total_pickups', 'avg_fare', 'avg_trip_distance', 'PT_P', 'CA_P', 'WFH_P', 'is_top_10_pct', 'benchmark_avg_ride_distance', 'benchmark_cancellation_rate'])"]} {"id": "transportation_24", "question": "Analyze the relationship between public transit usage and taxi inflow patterns in New York City to understand complementary or competing mobility dynamics.\nFirst, load and consolidate three months of yellow taxi trip records from January to March 2024, then calculate total weighted inflow (sum of trip distances) for each destination zone (DOLocationID). Load taxi zone geometries and merge with aggregated inflow statistics using inner join (only retaining zones with trip data). \nLoad census commuting data and filter to New York State census tracts (STATEFP = '36'), then perform spatial intersection analysis using 'intersects' predicate to associate taxi zones with public transit commuting percentage (PT_P). \nDeduplicate records by LocationID using groupby().first() to ensure one observation per zone, remove records with missing values using dropna(), compute the Pearson correlation coefficient between weighted inflow and PT_P, and report the result rounded to four decimal places.\nOutput(output.csv): A CSV file containing the Pearson correlation coefficient (rounded to 4 decimal places) in a single column named 'correlation'.", "data_sources": ["datasets/transportation/NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "datasets/transportation/taxi_zones/taxi_zones.shp", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-01.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-02.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-03.parquet"], "skills": ["ETL and Data Integration", "Directory and File I/O", "Path Construction and Manipulation", "Data Loading with Pandas", "Parsing and Reading Data Files", "Vertical Stacking and Binding", "Dynamic Data Transformation and Insertion", "Command-Line and Shell Operations", "Vectorization and Performance Optimization", "Weighted Aggregation and Summation", "Data Aggregation and Grouping", "Pandas-Specific Operations", "Geospatial Data Handling and Mapping", "Join Operations and Merging", "Compression and Archiving", "Geospatial Data Processing", "Coordinate System Management", "Filtering and Criteria-Based Selection", "In-place vs Copy Operations", "Time Series Alignment and Matching", "Data Integration and Merging", "Handling Missing Data", "Unique Value Extraction", "Statistical Correlation Analysis", "Statistical Analysis and Testing", "Data Export and Output Processing", "CSV Processing"], "domain": "transportation", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['correlation'])"]} {"id": "transportation_26", "question": "Analyze the relationship between commuting behavior and on-demand taxi pricing across New York City zones using hierarchical Bayesian regression.\nFirst, load nine months of yellow taxi trip records and compute zone-month level average fare per mile (filtering for fare_amount>0 and trip_distance>0). Load taxi zone geometries and census commuting data (STATEFP='36'), then perform spatial joins using zone centroid and census tract containment to associate each zone with public transit commuting share (PT_P) and work-from-home share (WFH_P). \nApply a one-dimensional Kalman filter within each zone (F=H=1, process_variance=0.1, measurement_variance=1.0), initialized with x0 equal to the first observed average fare per mile and P0=1, and use the filtered state after each predict/update step as the denoised value. Construct a hierarchical Bayesian regression model with zone-specific random intercepts and slopes using non-centered parameterization, where the response variable is the Kalman-filtered fare per mile and predictors are the standardized PT_P and WFH_P, with likelihood precision weighted by monthly trip counts. Use PyMC priors global_intercept~Normal(0,10), beta_pt_p~Normal(0,5), beta_wfh_p~Normal(0,5), random intercept/PT slope/WFH slope scales~HalfNormal(2), and observation sigma~HalfNormal(5).\nUse PyMC for MCMC inference with 2,000 post-tune samples, tune=2000, target_accept=0.9, and random_seed=42. Remove records with missing values before model fitting.\nOutput(output.csv): A CSV file containing the posterior mean and 94% highest-density interval (HDI) for the global parameters (global_intercept, beta_pt_p, beta_wfh_p), with columns: parameter, mean, hdi_3%, hdi_97%.", "data_sources": ["datasets/transportation/NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "datasets/transportation/taxi_zones/taxi_zones.shp", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-01.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-02.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-03.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-04.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-05.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-06.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-07.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-08.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-09.parquet"], "skills": ["Data Import and Library Setup", "Geospatial Data Processing", "ETL and Data Integration", "Compression and Archiving", "Dependency Management and Setup", "Command-Line and Shell Operations", "Data Loading with Pandas", "Data Conversion and Post-Loading Processing", "Data Aggregation and Grouping", "Column-wise Transformations and Aggregation", "Dynamic Data Transformation and Insertion", "Batch Processing and Performance Optimization", "Join Operations and Merging", "In-place vs Copy Operations", "Data Integration and Merging", "Kalman Filter Core Operations", "Time-based Filtering and Matching", "Advanced Modeling with State Space Framework", "Array and Matrix Manipulation", "Indexing and Row-Level Operations", "Data Preparation and Formatting", "Encoding and Vector Representation", "Model Specification and Construction", "Statistical Assumptions and Limitations", "Sampling Techniques", "Statistical Analysis and Inference", "Statistical Modeling and Uncertainty", "Data Manipulation and Summarization", "Data Export and Output Processing", "Data Storage and Structuring"], "domain": "transportation", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['parameter', 'mean', 'hdi_3%', 'hdi_97%'], thresholds={'parameter': None, 'mean': 0.3, 'hdi_3%': 0.3, 'hdi_97%': 0.3})"]} {"id": "transportation_27", "question": "Construct a unified rider archetype identification system to analyze urban mobility patterns by integrating trip transaction data with census-level commuting behavior across multiple time periods.\nFirst, load and process multi-month trip records from urban transportation datasets, extracting temporal features including pickup times, fare amounts, trip distances, and zone identifiers, while applying data quality filters to ensure valid records.\nThen, enrich trip data with geographic and demographic context by joining zone geometries and metadata, and spatially associate with census commuting data to assign mode-specific percentages including public transit usage, car availability, and work-from-home rates to each zone.\nNext, construct a feature representation capturing zone trip counts across five time-of-day periods: night [0,6), morning_rush [6,9), daytime [9,17), evening_rush [17,21), late_evening [21,24) and commuting modes, apply PCA with 3 components to distill essential patterns, and apply K-Means clustering (k=5, random_state=42, n_init=10) to identify distinct rider archetypes.\nFinally, post-process the identified clusters by determining dominant geographic regions and computing geographic centroids for each archetype.\nOutput(output.csv): A CSV file containing rider archetype analysis results with columns: cluster_id, dominant_borough, centroid_longitude, centroid_latitude.", "data_sources": ["datasets/transportation/NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "datasets/transportation/taxi_zones/taxi_zones.dbf", "datasets/transportation/taxi_zones/taxi_zones.shp", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-01.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-02.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-03.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-04.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-05.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-06.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-07.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-08.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-09.parquet"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Filtering and Criteria-Based Selection", "Data Validation and Type Consistency", "ETL and Data Integration", "Dynamic Data Transformation and Insertion", "Command-Line and Shell Operations", "Batch Processing and Performance Optimization", "Time Formatting and String Manipulation", "Date and Time Arithmetic", "Statistical Analysis and Metrics", "Data Aggregation and Grouping", "Geospatial Data Processing", "Geospatial Data Handling and Mapping", "Join Operations and Merging", "Data Integration and Merging", "Imputation Methods", "In-place vs Copy Operations", "Compression and Archiving", "Time Series and Window Analysis", "Preprocessing and Scaling", "Data Normalization and Preprocessing", "Dimensionality Reduction Techniques", "Feature Selection and Dimensionality Reduction", "Dimensionality and Shape Management", "Array and Matrix Manipulation", "SQL Pivot and Crosstab Techniques", "Clustering and Post-Processing", "Model Training & Evaluation", "Stochasticity and Reproducibility", "Clustering and Hierarchical Methods", "Centroid Tracking and Iteration Logging", "Formatting and Output Organization", "CSV Processing", "Data Export and Output Processing", "Histogram Creation and Manipulation"], "domain": "transportation", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['cluster_id', 'dominant_borough', 'centroid_longitude', 'centroid_latitude'])"]} {"id": "transportation_28", "question": "Build a zone-level urban transportation demand forecasting and pattern analysis system by integrating multi-month NYC yellow taxi trip data, census commuting behavior data, and ride booking operational records.\nFor demand forecasting: use 2024 January–August trip records as training data and September as validation. Filter to records with positive fare and positive trip distance, with pickup zone IDs between 1 and 263 inclusive, extracting temporal features including pickup times, fare amounts, trip distances, and zone identifiers. Aggregate to zone-month level trip counts as the demand target. Enrich zones with commuting mode percentages from NTAD census data (New York State only) via nearest spatial join, filling missing values with median. Train an MLPRegressor (hidden_layer_sizes=(64, 32), max_iter=500, random_state=42, early_stopping=True, validation_fraction=0.1) with StandardScaler-normalized features: sine/cosine cyclic month encoding and commuting mode percentages (public transit, car availability, work-from-home). Evaluate on validation data using MAE, RMSE, R², and Pearson correlation at overall and per-borough levels.\nFor clustering analysis: apply dimensionality reduction to distill essential zone-level patterns from trip and commuting features, and perform clustering analysis to identify distinct mobility archetypes. Aggregate zone-level mean trip count, average fare, and average distance from training data, combined with public transit and work-from-home commuting percentages. Standardize, apply PCA (n_components=3), then KMeans (n_clusters=4, random_state=42, n_init=10). Report the silhouette score.\nFor text analysis: from the ride booking records, clean text by removing non-alphanumeric characters, apply TF-IDF vectorization (max_features=100, English stop words removed), and extract the top 5 terms associated with vehicle breakdown themes based on mean TF-IDF scores.\nOutput(output.json): A JSON file structured as {'overall': {'MAE': val, 'RMSE': val, 'R²': val, 'correlation': val}, 'per_borough': {borough: {'MAE': val, 'RMSE': val, 'R²': val, 'correlation': val}, ...}, 'best_silhouette_score': val}, all values rounded to 4 decimal places.\nOutput(output.csv): A CSV file with a single column 'top_5_vehicle_breakdown_terms' containing the top 5 terms.", "data_sources": ["datasets/transportation/NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "datasets/transportation/ncr_ride_bookings.csv", "datasets/transportation/taxi_zones/taxi_zones.shp", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-01.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-02.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-03.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-04.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-05.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-06.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-07.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-08.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-09.parquet"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Data Conversion and Post-Loading Processing", "Filtering and Criteria-Based Selection", "Dynamic Data Transformation and Insertion", "Command-Line and Shell Operations", "Binary Data Handling", "Batch Processing and Performance Optimization", "Data Aggregation and Grouping", "Geospatial Data Processing", "Join Operations and Merging", "Data Integration and Merging", "Imputation Methods", "KNN and Nearest Neighbor Techniques", "In-place vs Copy Operations", "Compression and Archiving", "Event Modeling and Feature Engineering", "Array and Matrix Manipulation", "Model Training & Optimization", "Stochasticity and Reproducibility", "Model Evaluation & Validation", "Model Evaluation Metrics", "Clustering and Post-Processing", "Data Grouping & Clustering", "Dimensionality Reduction Techniques", "Feature Selection and Dimensionality Reduction", "Dimensionality and Shape Management", "Clustering and Hierarchical Methods", "Text Processing and Cleaning", "Regex and Text Manipulation", "Feature Extraction and Vectorization", "Topic Modeling and Evaluation", "Vectorization and Performance Optimization", "Data Storage and Structuring", "Data Serialization & File Handling", "Data Structure Handling (Dictionaries, Lists)"], "domain": "transportation", "output_file_name": ["output.json", "output.csv"], "gold_file_name": ["result.json", "result.csv"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'overall': {'MAE': 0.05, 'RMSE': 0.05, 'R²': 0.05, 'correlation': 0.05}, 'per_borough': None, 'best_silhouette_score': 0.1})", "compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['top_5_vehicle_breakdown_terms'])"]} {"id": "transportation_29", "question": "Construct a unified urban mobility analysis system to evaluate the relationship between local commuting behavior and on-demand transportation usage across NYC taxi zones. Use 2024 January through September yellow taxi trip data, taxi zone geographic boundaries, and NTAD census commuting data (filtered for New York State). Filter trip records to exclude non-positive fares and invalid zone IDs. Aggregate pickup counts and average fares per zone, then spatially associate each zone with its nearest census tract to obtain public transit usage and work-from-home percentages (fill missing values with median). Apply K-Means clustering (k=4, random_state=42, n_init=10) on standardized (zero-mean, unit-variance) features to classify zones. Also generate borough-level aggregate statistics, with borough average fare as the simple mean of zone-level averages and each borough's percentage share of total pickups rounded to 2 decimal places.\n\nOutput(output.csv): Zone-level cluster results with columns: LocationID, borough, cluster_id, total_pickups, avg_fare, PT_P, WFH_P.\nOutput(output2.csv): Borough-level statistics with columns: borough, total_pickups, avg_fare, percentage.", "data_sources": ["datasets/transportation/NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "datasets/transportation/taxi_zones/taxi_zones.shp", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-01.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-02.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-03.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-04.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-05.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-06.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-07.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-08.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-09.parquet"], "skills": ["Data Loading with Pandas", "Parsing and Reading Data Files", "Filtering and Criteria-Based Selection", "Directory and File Management", "Directory and File I/O", "Dynamic Data Transformation and Insertion", "Command-Line and Shell Operations", "Batch Processing and Performance Optimization", "Data Aggregation and Grouping", "Column-wise Transformations and Aggregation", "Geospatial Data Processing", "Geospatial Data Handling and Mapping", "Data Conversion and Post-Loading Processing", "Geospatial Distance Handling", "Join Operations and Merging", "Joining and Lookup Operations", "Unique Identifier and Entity Management", "Data Filtering and Matching", "Handling Missing Data", "Statistical and Mathematical Modeling", "KNN and Nearest Neighbor Techniques", "In-place vs Copy Operations", "Compression and Archiving", "Preprocessing and Scaling", "Data Normalization and Standardization", "Clustering and Post-Processing", "Cluster Label Assignment", "Stochasticity and Reproducibility", "Clustering and Hierarchical Methods", "Statistical Analysis and Metrics", "Percentage and Variation Calculations", "Mathematical and Statistical Computations", "Ranking and Top N Logic", "Sorting, Limiting, and Ranking", "Data Export and Output Processing", "Data Serialization & File Handling", "Formatting and Output Organization"], "domain": "transportation", "output_file_name": ["output.csv", "output2.csv"], "gold_file_name": ["result.csv", "result2.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['LocationID', 'borough', 'cluster_id', 'total_pickups', 'avg_fare', 'PT_P', 'WFH_P'])", "compare_csv(output_file_name='output2.csv', gold_file_name='result2.csv', ignore_order=True, specified_columns=['borough', 'total_pickups', 'avg_fare', 'percentage'])"]} {"id": "transportation_30", "question": "Construct a unified urban mobility demand forecasting system to predict hourly transportation pickup intensity by integrating multi-month historical trip transaction records with census-level commuting patterns and geographic zone information.\nFirst, load and split multi-month historical trip records into training (months 1-8) and testing (month 9) sets, extracting timestamps and zone identifiers while applying data quality filters to ensure valid records.\nThen, aggregate transaction data at the hourly and zone level to create demand targets, and engineer temporal features including hour-of-day, day-of-week, month indicators, weekend flags, and cyclic encodings to capture periodic patterns.\nNext, enrich the dataset with geographic context by loading zone geometries and spatially associating with census commuting data to assign mode-specific percentages including public transit usage, work-from-home rates, and car availability to each zone.\nThen, merge temporal features with commuting characteristics to create a comprehensive feature matrix, and apply XGBoost regression (n_estimators=200, learning_rate=0.05, max_depth=6, random_state=42, objective='reg:squarederror') to model hourly demand patterns.\nFinally, perform 3-fold time-series cross-validation to assess model stability, train the final model on the complete training set, evaluate predictive performance on the holdout test set using standard regression metrics, extract feature importance scores to identify key drivers of demand, and export all model metadata and evaluation results.\nOutput(output.json): A JSON file containing model configuration (best_hyperparameters), cross-validation performance (cross_validated_r2), test set metrics (test_r2, test_mae), and feature importance rankings (feature_importances).", "data_sources": ["datasets/transportation/NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "datasets/transportation/taxi_zones/taxi_zones.shp", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-01.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-02.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-03.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-04.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-05.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-06.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-07.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-08.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-09.parquet"], "skills": ["Data Loading with Pandas", "Data Handling & Preparation", "Data Conversion and Post-Loading Processing", "Project Organization and Structure", "ETL and Data Integration", "Filtering and Criteria-Based Selection", "Timestamp Conversion and Time Manipulation", "Dynamic Data Transformation and Insertion", "Command-Line and Shell Operations", "Batch Processing and Performance Optimization", "Time Series & Temporal Grouping", "Data Aggregation and Grouping", "Time Series Handling and Preprocessing", "Array and Matrix Manipulation", "Geospatial Data Processing", "Imputation Methods", "Coordinate System Management", "In-place vs Copy Operations", "Compression and Archiving", "Join Operations and Merging", "Data Integration and Merging", "Event Modeling and Feature Engineering", "Library Usage (Scikit-Learn)", "Time Series Analysis and Forecasting", "Model Training & Evaluation", "Model Evaluation & Validation", "Cross-Validation and Optimization", "Stochasticity and Reproducibility", "Data Storage and Structuring", "Model Prediction and Output Handling", "Data Export and Output Processing", "Data Structure Handling (Dictionaries, Lists)", "Model Saving & Versioning"], "domain": "transportation", "output_file_name": ["output.json"], "gold_file_name": ["result.json"], "eval_func": ["compare_json(output_file_name='output.json', gold_file_name='result.json', thresholds={'cross_validated_r2': 0.1, 'test_r2': 0.1, 'test_mae': 0.1})"]} {"id": "transportation_31", "question": "Construct a unified urban mobility pattern analysis system to examine the relationship between local commuting behavior and on-demand transportation usage across administrative regions by integrating multi-month trip transaction records with census-level commuting patterns and geographic zone information.\nFirst, load and process multi-month historical trip records from urban transportation datasets, extracting timestamps and zone identifiers while applying data quality filters to ensure valid records.\nThen, aggregate transaction data at the monthly and zone level to create temporal demand patterns, and enrich trip data with geographic context by joining zone geometries and administrative boundaries.\nNext, spatially associate trip data with census commuting data to assign mode-specific percentages including public transit usage to each zone, and compute aggregated statistics at the administrative region level.\nThen, generate comprehensive visualizations including bar charts showing total demand distribution by region with percentage annotations, and scatter plots revealing relationships between transportation usage and commuter behavior profiles.\nFinally, export temporal statistics at multiple aggregation levels and visualization outputs for comprehensive mobility pattern analysis.\nOutput(output2.csv): A CSV file containing monthly borough statistics with columns: borough, month, total_pickups, avg_pt_p.Output(output.csv): A CSV file containing borough summary with columns: borough, total_pickups, avg_pt_p, percentage.Output(output.png): A PNG visualization with two subplots. Top subplot: A bar chart showing total yellow taxi pickups by borough (Jan-Sep 2024) with x-axis labeled 'Borough', y-axis labeled 'Total Pickups (9 months)', and percentage annotations on each bar. Bottom subplot: A scatter plot showing the relationship between average public transit commute percentage (PT_P) and total pickups by borough, with x-axis labeled 'Average Public Transit Commute Percentage (PT_P)', y-axis labeled 'Total Pickups (9 months)', and borough labels on each data point.", "data_sources": ["datasets/transportation/NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "datasets/transportation/taxi_zones/taxi_zones.shp", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-01.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-02.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-03.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-04.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-05.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-06.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-07.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-08.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-09.parquet"], "skills": ["Data Import and Library Setup", "Path Construction and Manipulation", "Data Loading with Pandas", "File Iteration and Traversal", "Data Filtering and Transformation", "Vertical Stacking and Binding", "Timestamp Conversion and Time Manipulation", "Dynamic Data Transformation and Insertion", "Command-Line and Shell Operations", "Batch Processing and Performance Optimization", "Data Aggregation and Grouping", "Geospatial Data Processing", "Geospatial Data Handling and Mapping", "Indexing and ID Assignment", "Join Operations and Merging", "Unique Identifier and Entity Management", "Handling Missing Data", "Coordinate System Management", "Imputation Methods", "In-place vs Copy Operations", "Compression and Archiving", "Time Series Alignment and Matching", "Statistical Analysis and Metrics", "Data Inspection and Summarization", "Percentage and Variation Calculations", "Plot Customization (Aesthetics)", "Subplot and Layout Management", "Bar Chart Creation and Layout", "Plot Customization and Annotation", "Multiple Series/Traces Visualization", "Plot Customization and Layout", "Data Export and Output Processing", "Output and Logging"], "domain": "transportation", "output_file_name": ["output2.csv", "output.csv", "output.png"], "gold_file_name": ["result2.csv", "result.csv", "result.png"], "eval_func": ["compare_csv(output_file_name='output2.csv', gold_file_name='result2.csv', ignore_order=True, specified_columns=['borough', 'month', 'total_pickups', 'avg_pt_p'])", "compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['borough', 'total_pickups', 'avg_pt_p', 'percentage'])", "compare_image(output_file_name='output.png', gold_file_name='result.png', calculate_columns=['type', 'graph_title', 'x_label', 'y_label', 'xtick_labels'])"], "post_process_func": ["image_post_process('output.png')", "image_post_process('result.png')"]} {"id": "transportation_32", "question": "Construct a unified urban mobility typology analysis system to identify distinct transportation usage patterns across administrative regions by integrating multi-month trip transaction records with census-level commuting patterns and geographic zone information.\n\nFirst, load and process nine months (January-September 2024) of yellow taxi trip records, filtering for valid zone identifiers (PULocationID and DOLocationID within 1-263 range) and positive fare amounts and trip distances.\nThen, aggregate transaction data at the zone level to compute mobility intensity metrics including pickup frequency (trip count), average fare, and average trip distance.\nNext, enrich zone-level data with geographic context by loading taxi zone geometries and NTAD census commuting data (filtered to New York State, STATEFP='36'), then use nearest-neighbor spatial join (sjoin_nearest) to assign public transit usage rate (PT_P) and work-from-home rate (WFH_P) to each zone, deduplicating by distance and filling missing values with median.\nThen, standardize features (pickup_intensity, avg_fare, avg_trip_distance, PT_P, WFH_P) using StandardScaler, and apply K-Means clustering (k=4, random_state=42, n_init=10) to segment zones into distinct mobility-commuting profiles.\nNext, compute cross-borough flow intensities by analyzing origin-destination trips, filtering out intra-borough trips, and aggregating inter-borough trip volumes by pickup borough.\nFinally, aggregate cluster assignments with cross-borough flow metrics and commuting characteristics at the cluster-borough level, sort by cluster_id and borough, and export the unified typology results.\n\nOutput(output.csv): A CSV file containing mobility typology results with columns: cluster_id, borough, avg_inter_borough_flow, mean_PT_P, mean_WFH_P.", "data_sources": ["datasets/transportation/NTAD_Means_of_Transportation_to_Work_-1194660124623303343.gpkg", "datasets/transportation/taxi_zones/taxi_zones.shp", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-01.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-02.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-03.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-04.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-05.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-06.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-07.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-08.parquet", "datasets/transportation/yellow_tripdata/yellow_tripdata_2024-09.parquet"], "skills": ["Data Loading with Pandas", "Path Construction and Manipulation", "Filtering and Criteria-Based Selection", "Vertical Stacking and Binding", "ETL and Data Integration", "Dynamic Data Transformation and Insertion", "Command-Line and Shell Operations", "Batch Processing and Performance Optimization", "Data Aggregation and Grouping", "Geospatial Data Handling and Mapping", "Geospatial Data Processing", "Geospatial Distance Handling", "Join Operations and Merging", "Handling Missing or Edge Cases", "Data Filtering and Transformation", "Coordinate System Management", "KNN and Nearest Neighbor Techniques", "Imputation Methods", "In-place vs Copy Operations", "Compression and Archiving", "Feature Selection and Statistical Computation", "Clustering and Post-Processing", "Model Training & Evaluation", "Column Management and Reordering", "Stochasticity and Reproducibility", "Clustering and Hierarchical Methods", "Sorting, Limiting, and Ranking", "Data Export and Output Processing"], "domain": "transportation", "output_file_name": ["output.csv"], "gold_file_name": ["result.csv"], "eval_func": ["compare_csv(output_file_name='output.csv', gold_file_name='result.csv', ignore_order=True, specified_columns=['cluster_id', 'borough', 'avg_inter_borough_flow', 'mean_PT_P', 'mean_WFH_P'])"]} {"id": "transportation_35", "question": "A transportation analytics firm is assessing temporal demand patterns in urban taxi systems to inform fleet allocation strategies. \nThe analysis begins by loading taxi zone boundary data and trip records spanning multiple months, then initializes a DuckDB database to facilitate efficient data processing. \nAll monthly trip datasets are consolidated into a unified view through SQL operations to enable comprehensive temporal analysis. \nTrip records are enriched with borough information by joining pickup locations with zone boundaries, enabling spatial aggregation of demand patterns. Hourly pickup counts are computed for each administrative district by grouping trips based on their pickup time and location, after which a centered 7-day rolling average is applied to smooth short-term fluctuations and reveal underlying demand trends. \nThe final step identifies the maximum value of this smoothed hourly pickup series across all boroughs and the entire analysis period. \nThe query pipeline leverages SQL for data retrieval and transformation, with time-series smoothing implemented as a rolling window operation over datetime-indexed hourly aggregates.\nResults should be saved to output.txt in the following format:\nLine 1: \"Maximum 7-day rolling average hourly pickups: \" (rounded to 2 decimal places)\nFollowed by a blank line, then \"Top 10 highest values:\"\nThen 10 lines, each formatted as: \" | | \" (value rounded to 2 decimal places), sorted in descending order.", "data_sources": ["taxi_zones/taxi_zones.shp", "yellow_tripdata/yellow_tripdata_2024-01.parquet", "yellow_tripdata/yellow_tripdata_2024-02.parquet", "yellow_tripdata/yellow_tripdata_2024-03.parquet", "yellow_tripdata/yellow_tripdata_2024-04.parquet", "yellow_tripdata/yellow_tripdata_2024-05.parquet", "yellow_tripdata/yellow_tripdata_2024-06.parquet", "yellow_tripdata/yellow_tripdata_2024-07.parquet", "yellow_tripdata/yellow_tripdata_2024-08.parquet", "yellow_tripdata/yellow_tripdata_2024-09.parquet"], "skills": ["Path Construction and Manipulation", "Geospatial Data Processing", "Data Loading with Pandas", "Command-Line and Shell Operations", "Database Interaction and SQL", "Data Collection and Preparation", "Data Structure Creation and Manipulation", "Data Structure Understanding and Initialization", "SQL Set Operations and Query Combination", "CTE and View Construction in SQL", "Data Integration and Merging", "Joining and Alignment Logic", "Indexing and Query Optimization", "Data Aggregation and Grouping", "Statistical Analysis and Metrics", "Time Series Specific Methods", "Rolling Window Operations", "Time Series and Window Analysis", "Efficient Data Structures and Algorithms", "Ranking and Top N Logic", "Output and Logging", "Data Export and Output Processing"], "domain": "transportation", "output_file_name": ["output.txt"], "gold_file_name": ["result.txt"], "eval_func": ["compare_text(output_file_name='output.txt', gold_file_name='result.txt')"]}