1. Introduction
In recent years, an increase has been observed in research related to agro-industrial supply chains because of the role they play in food security [
1,
2,
3]. Their direct relationship with countries’ environmental impact and contribution to sustainable development [
4] plays an important role in the global economy. Around 4% of the world’s Gross Domestic Product (GDP) provides employment to over 27% of the world’s workforce, particularly in developing countries [
5] like Mexico, where the agriculture sector generates approximately 3.5% of the national GDP and employs more than 5.5 million people [
6].
Foreign trade plays a fundamental role in the agricultural sector. In the case of Mexico, Mexican agricultural exports have experienced an annual increase of 5% in the last decade [
7], reaching a value close to USD 52 billion in 2023 and representing 10% of the nation’s total exports. This situation has positioned Mexico as one of Latin America’s leading exporters of agricultural products, which has also generated the need for efficient logistics and information systems that ensure the transparency and optimization of business processes and improve the sector’s sustainability [
8].
For this reason, research works in the scientific literature have explored the use of business intelligence (BI) in sectors such as agriculture [
9] as they recognize dashboards as fundamental tools for providing information on key performance indicators (KPIs). However, only some of these have focused explicitly on integrating control panels and data analysis in agricultural business operations [
10,
11,
12]. Some works [
10,
11] have highlighted the benefits of using data analysis technologies and BI to improve decision-making in agriculture, such as enhanced productivity, sustainability, and cost reduction. Similarly, others have integrated open and spatiotemporal data into BI systems to facilitate a more accurate analysis of agricultural production, which contributes to users making more informed decisions based on spatial data [
12]. Thus, the literature on agricultural trade dashboards is still in its early stages, with limited examples available. This highlights the need for further research on BI applications in agricultural trade, and particularly on how these tools can optimize decision-making and increase the visibility of trade flows.
Efficiency in logistics and information transparency are critical factors for maximizing economic benefits and strengthening international trade relations. However, the lack of a comprehensive and precise vision of agricultural product export and import operations has limited the sector’s growth potential and competitiveness. This lack of visibility and real-time data access prevents producers and exporters from optimizing their processes, reducing costs, and responding effectively to global market demands. In response to this need, the Bank of Mexico (BANXICO) made the “Foreign Trade Information Cube”—a tool that allows for queries and downloads of monthly statistical information from Mexico’s Merchandise Trade Balance with a higher level of detail than that previously available [
13]—and other datasets available to the public through the Economic Information System (SIE), including relevant economic and financial information for the country, such as the Agricultural Products Balance [
14]. These resources offer valuable information for investment decision-making, market opportunity identification, risk management, and academic studies and research development.
Nevertheless, while previous tools and other datasets from the National Institute of Statistics and Geography (INEGI) website are valuable for accessing disaggregated data, they have limitations regarding their direct application in strategic decision-making. Although they offer a wide range of data, comprehensive analyses or dynamic visualizations should be provided to facilitate the rapid and accurate interpretation of that data. A user-friendly interface and interactive visualizations are necessary to identify real-time patterns, trends, and emerging opportunities. Not all users have the technical knowledge to manipulate and extract value from these data. Therefore, developing tools such as interactive dashboards is necessary to convert these data into actionable information, facilitating faster decision-making in commercial or agricultural contexts. Thus, this research seeks to deliver a dashboard that integrates data from these sources and presents them through easy-to-interpret visualizations so that stakeholders obtain helpful information quickly and efficiently, especially for users without extensive technical knowledge.
The Agri-logistics Observatory at the Sonora Institute of Technology (ITSON)—where the dashboard is implemented—is a valuable tool for students, educators, and society. Structured open data on economy and business sources are provided from public organizations, such as the INEGI, Ministry of Economy, and additional research projects developed by ITSON [
15]. In contrast to existing studies on dashboards and BI tools in agriculture [
10,
11,
12], which primarily focus on broad production metrics and general applications of data analysis technologies, the present research uses a novel approach by concentrating specifically on agricultural trade operations. Additionally, the literature contains numerous cases of dashboard design [
16,
17,
18], but these works rarely detail the dashboard construction process [
19] as this case does, which hinders their replicability and limits their practical applicability, even though their methodological proposals are included [
20,
21,
22].
Unlike previous works, the present study emphasizes the detailed methodology and exact metrics used in its Data Analysis and Expressions (DAXs) to construct the dashboard, additionally filling the gap in the agricultural trading literature by providing a detailed guide for creating an agri-logistics dashboard. For example, the Cross-Industry Standard Process for Data Mining (CRISP-DM) methodology is used as a framework and demonstrates how business intelligence can be applied specifically to the agricultural trade sector, offering practical insights into how these tools can be effectively deployed in real-world scenarios. This specialized business intelligence dashboard is designed to meet the unique needs of the agricultural trading sector. Users can visualize critical metrics, such as trade balances, product-specific export and import trends, and logistics dynamics, within a user-friendly interface. This innovation significantly improves its accessibility and usability for stakeholders in the agricultural sector, enabling actionable insights to be derived from complex datasets.
The CRISP-DM methodology, widely recognized in both industry and academia [
23,
24], is applied in the present study to develop a data analysis model that enables the creation of an agricultural dashboard. This dashboard provides detailed and relevant visualizations of the trade balance and the main exports and imports of agricultural products. Furthermore, this methodology also integrates information on transport and logistics dynamics, optimizing the sector’s strategic decision-making.
The present study hypothesizes that a detailed methodology on how to replicate this dashboard design could be a valuable tool for future use in agricultural commerce, since it offers clear, real-time visual information that can improve decision-making processes when applied by interested parties. Its novelty lies in its detailed approach, since the research found in the documented cases on BI application does not include it. Therefore, the present study provides a solution beyond data visualization to improve decision-making processes in this particular sector.
2. Materials and Methods
Figure 1 presents a general description of the procedure followed to design the development of the present study, taking the CRISP-DM model as a reference. This procedure illustrates the general workflow and technical steps taken to design the dashboard but is explained in detail below to make it reproducible and adaptable to future developments.
2.1. Microsoft Power Business Intelligence (BI) Overview
Microsoft Power BI is a business intelligence (BI) tool specializing in visualizing and creating interactive reports to facilitate the efficient analysis of large datasets. Not only does it allow for the connection of different data sources but it also allows for the creation of customized measures and other manipulation actions using DAX language (Data Analysis and Expressions), which is an easy-to-use language for non-technical users due to its similarity to Excel. This tool has an easy-to-use interface and a free version that makes it accessible to all users, which is why it was chosen for this project.
Each CRISP-DM phase below details how Power BI was used, with specific references to the technical setup, features, and configurations applied during the project. However, it is important to note that readers would be expected to have a basic understanding of the tool’s interface and functionalities to fully understand the technical terms and processes described, including the use of DAX formulas, data modeling, and configuration options.
2.2. Business Understanding
The project’s first phase, following the CRISP-DM framework, involved a deep understanding of the context of the study object and focused on identifying the fundamental needs and objectives that would guide the dashboard’s development into an integral part of the ITSON Agri-Logistics Observatory. The ITSON Agri-Logistics Observatory—where the dashboard developed in this project would be included—comprises several control panels or dashboards related to agri-logistics across different sectors: agriculture, animal husbandry and exploitation, fishing, the food and beverage manufacturing industry, transportation, postal services, and warehousing.
In the agriculture, animal husbandry and exploitation, and fishing sectors, three different dashboards were identified: (a) Agricultural Production, which displays data on the planting, harvesting, and loss of various crops in Mexico from 2003 to 2022, as well as critical indicators such as production value and volume and yield per hectare; (b) Livestock Production, which provides data on the value and volume of livestock production, average carcass price, and total number of animals slaughtered for various species in Mexico from 2006 to 2022; and (c) Fishing Production, which shows the production value of fish, their share based on origin, landed and live weights by municipality, and the top 20 species with the highest value.
An active-establishment dashboard was also identified in the food and beverage manufacturing sector. This dashboard displays the establishments dedicated to the food, beverage, and tobacco industries that were active in Mexico in 2022. All the above dashboards offer general information related to Mexico, and using slicers allows for more efficient and quick data visualization. For the last economic sector—transportation, postal services, and warehousing—a dashboard based on INEGI data shows the establishments dedicated to providing transportation, parcels, and storage services active in Mexico in 2022.
Additionally, the observatory has a purely informational publication section. In this area, articles derived from research projects conducted by the academic body can be found. The general purpose of the project was defined with a clear understanding of the observatory’s objective and the resources it possessed at the time. The main goal was to optimize the visualization and analysis of data related to exporting and importing agricultural products in Mexico. This initial business understanding was fundamental in aligning the dashboard’s development with the sector’s strategic needs.
Several critical business needs were identified during this phase, including greater transparency in foreign trade information and the optimizing of decision-making processes. Additionally, stakeholders involved in the project were identified, and their roles and expectations were understood. Perspectives from a representative sector and other critical academic stakeholders were considered to ensure that the dashboard’s design met the needs of all parties involved. Collecting these requirements and expectations was essential to defining the key performance indicators (KPIs) that would guide the evaluation of the dashboard’s effectiveness.
The CRISP-DM phase of business understanding culminated in a clear vision of the expected impact of the project that would guide the subsequent development phases, which included focusing on evaluating the performance of exports and their contribution to the economy, understanding the dependency on imported products, analyzing domestic supply, identifying the most profitable and costly products and the most productive regions and those requiring support to improve their export performance, and assessing the sector’s dependency on each type of transportation.
2.3. Data Understanding
The CRISP-DM framework led the project into its second phase: data understanding. This stage was crucial to ensure that the data used were suitable and relevant to the project objectives and could be transformed into valuable information for decision-making in the agricultural sector. The process began by analyzing the dataset created by the Banco de Mexico. This dataset contains detailed information on foreign trade operations carried out by Mexico, explicitly focusing on the agricultural sector. These data, expressed in USD, provide a comprehensive overview of the imports and exports of 47 agricultural products (
Table 1), allowing for a precise understanding of international trade transactions from January 1993 to December 2023.
Subsequently, two additional datasets issued by INEGI were incorporated into our work. The first one contained information on Mexico’s exports in thousands of USD, broken down by state from 2007 to 2023. However, for the present study, only information on the agriculture; animal husbandry and exploitation; fishing, hunting, and capturing subsectors from each Mexican state was considered. This dataset was essential for conducting a detailed geographical analysis of agricultural foreign trade within Mexico, enabling the identification of regional patterns in the production and export of farm products. The second INEGI dataset focused on merchandise exports by mode of transport from 2007 to the present, providing valuable insights into logistical dynamics. A dimension table based on the North American Industrial Classification System (NAICS) complemented these data. This classification allowed for the consistent organization and categorization of agricultural products, facilitating a comparative analysis and the identification of specific trends within each product category: sector, subsector, and branch.
Finally, a GeoJSON file containing the geographic boundaries of Mexican states was integrated. This geospatial resource was essential for visualizing the data in a geographic context, allowing for the creation of interactive maps within the dashboard that displayed exports and imports by state. This addition significantly improved the users’ ability to interpret the data based on geographic location. The data’s quality was carefully evaluated throughout this CRISP-DM phase, including for completeness, accuracy, and relevance.
Table 2 summarizes the outcome of this step for the three primary datasets used in developing the dashboard.
Additionally, a descriptive table summarizes the key characteristics of the additional datasets used in the project (
Table 3), focusing on industrial classification and geospatial information. These data were fundamental for properly segmenting and visually representing information in the dashboard.
Both tables summarize the essential characteristics of the datasets required for analysis, highlighting their structure and specific relevance to the project. They also list the necessary cleaning actions to ensure the quality of the data used in the dashboard in the subsequent data preparation phase.
2.4. Data Preparation
The data preparation phase, aligning with the CRISP-DM framework, is crucial and often the most laborious part of the process. It involves selecting and transforming the necessary data in advance of the dashboard’s modeling phase. During this stage, multiple operations were performed in Power Query as part of Power BI (Version: 2.137.1102.0 64-bit, October 2024) to obtain an optimal database to feed the dashboard.
First, various datasets were loaded into Power BI. The dataset issued by Banco de Mexico was named Operations_FT. The data provided by INEGI, which included exports by state, were named Operations_States, and the dataset corresponding to exports by type of transport was called Transport_Operations. The structured table with the NAICS data was named Classification.
Once the tables were loaded into Power Query, several key transformations were carried out. For the Operations_FT query, the first row was promoted to a header, and the appropriate formats were assigned to the columns, such as date, text, or fixed decimal number, according to the data type. Delimiters split columns to remove irrelevant words, and duplicate records and product codes that did not provide significant value were eliminated. Additionally, value replacements were made to clean the database, and irrelevant records, such as sums, were discarded to ensure that only pertinent data for the study were retained.
Database normalization was carried out by splitting the columns according to product, type of operation, value, and transaction date. This action allowed for the better organization and accessibility of the data. In the case of the Classification query based on NAICS structure, a table was created to identify the corresponding code for each of the 44 products. This table did not require additional modifications as it was designed with the necessary conditions for its use in the dashboard.
In Operations_States, all the tables were unified into a single query, which optimized storage space and facilitated more precise connections between the tables. Before unification, each query was cleaned by removing irrelevant rows and columns, such as information on subsectors not pertinent to the study (only the subsectors of agriculture; animal husbandry and exploitation; and fishing, hunting, and capture were retained). Data were promoted to headers with appropriate formats depending on the data type (date, number, or text). The database was then reshaped into a consolidated structure with four columns: state, subsector, description of the subsector, and value.
Regarding the export operations database organized by type of transport, a similar cleaning process was carried out, removing products unrelated to the agricultural sector (in this case, only products classified as live animals, meat, and edible offal; fish, crustaceans, and mollusks; milk, dairy products, eggs, and honey; other animal products; plants and floriculture products; vegetables, plants, roots, and tubers; edible fruits and nuts; coffee, tea, mate, and spices; cereals; milling products; oilseeds and miscellaneous fruits were retained and classified according to the NAICS structure). The result was a table organized into operation, product, description of the subsector, type of transport, and value columns.
Finally, for the GeoJSON file, the only modification made in Power Query was adjusting the column name referring to the states to facilitate the necessary connections via a common denominator between the datasets. This series of transformations ensured that all data were in a suitable format for developing and visualizing the model in the final dashboard.
2.5. Data Modeling
Once the previous preparation phase, where data were cleaned and filtered, was completed, the project moved to the modeling phase of the CRISP-DM framework, which ensured that the data were structured correctly for analysis. The first step was to create a calendar table, which is essential for filtering and connecting tables based on the dates of foreign trade operations. This table was configured using the measure Calendario = CALENDAR(DATE(1993,1,1), TODAY()), which spans from January 1993 to the current date, allowing for dynamic updates as the database is refreshed.
The resulting model consisted of six connected tables within Power BI (
Figure 2), which represented the structure of the relationships among various data sources for analyzing commercial operations in Mexico’s agricultural sector. All relationships established were one-to-many, indicated by the 1:* symbol in
Figure 2. This model serves primarily as a data organization tool rather than a complex statistical model. It defines how data are structured and linked, enabling flexible exploration and the analysis of foreign trade in the agricultural sector. This configuration facilitates the connection of tables based on dates. It provides a solid framework for exploring and analyzing foreign trade in the farm sector, ensuring that data remain synchronized and continuously updated. Although the data model is not statistical, basic descriptive statistics, such as averages, frequency distributions, and proportional breakdowns are calculated using the data. These statistics provide valuable insights into trade trends, helping users to better understand the dynamics of Mexico’s agricultural exports and imports.
The Operations_FT table acts as a central node in the model, indirectly connecting with other key tables—Operations_States and Transport_Operations—through the Calendar table, enabling data to be filtered according to time. It is the primary data source for export and import operations, storing subsector descriptions, dates, and products and is also related to the Classification table via the Product field. Each operation can be mapped to its corresponding productive classification according to SCIAN, enabling temporal analysis.
The Operations_States table only contains export data by state and is connected to GeoJSON_Estados, which allows for the visualizing of these operations on maps using geospatial data. The Transport_Operations table contains details about the transportation modalities used for exports, allowing for segmented analyses by transport type. Unlike a traditional star schema, the data model was deliberately designed to handle the Operations_States and Transport_Operations tables separately due to their distinct data. The analysis of transport and state-level operations demonstrates the significant differences in their volume and granularity. Combining these tables into a single structure would risk degrading performance, especially as the dataset grows in complexity and size. This approach ensures that each part of the model operates optimally, preventing performance issues and enhancing query efficiency.
However, all relationships in the model are configured as one-to-many (1:*), where one entity in one table (e.g., a product in Classification) can relate to multiple records in another table (e.g., products in Operations_FT). For example, several key measures were created from the fields in the Operations_FT table to represent the information in various accurately created visualizations. These KPIs included (a) Trade Balance, (b) Total Export Value, (c) Total Import Value, (d) Relative Product Weight in Operations, (e) Product Participation in Total Operations, and (f) Transport Participation by Subsector.
Trade Balance is a key performance indicator (KPI) designed to measure the net difference between exports and imports within the agricultural sector. This KPI is calculated using a formula in Power BI that sums the export values and then subtracts the import values. The DAX expression used for this calculation is as follows:
Trade Balance = | (1) |
SUMX(FILTER(‘Operations_FT’, ‘Operations_FT’[Operation] = “Exports”), ‘Operations_FT’[Value]) − |
SUMX(FILTER(‘Operations_FT’, ‘Operations_FT’[Operation] = “Imports”), ‘Operations_FT’[Value]) |
This expression uses the SUMX function to iterate over the Operación_CE table, first filtering the records corresponding to exports, summing their values, and then doing the same for imports. The export result is subtracted from the total imports, providing a precise metric that reflects whether the trade balance is positive (a surplus) or negative (a deficit).
A line chart used this measure on the
Y-axis, with the year on the
X-axis and two additional measures that differentiated and totaled the exports and imports. These measures were calculated using the following DAXs:
Total Export Value = | (2) |
SUMX( |
FILTER(‘Operations_FT’, ‘Operations_FT’[Operation] = “Exports”), |
‘Operations_FT’[Value] |
) |
Total Import Value = | (3) |
SUMX( |
FILTER(‘Operations_FT’, ‘Operations_FT’[Operation] = “Imports”), |
‘Operations_FT’[Value] |
) |
The line chart displays the country’s trade balance and intends to visualize how agricultural foreign trade operations have evolved. The diagram shows the path Mexico’s trade has taken since 1993, demonstrating increases or decreases in imports and exports.
A map chart was also included to represent the total annual imports by state. This chart was configured by placing the field in the location area of the field pane, obtained from the GeoJSON_States table, which contains the coordinates required to display a map of Mexico with political divisions. The sum of the export value by the state was placed in the values’ area as a bubble size.
To illustrate the Relative Product Weight in Operations (exports and imports), a stacked bar chart was included, where the
Y-axis represents the product field and the
X-axis shows its value from the Operations_FT table, expressed as a percentage of the total. This same value was configured as a sum in the Tooltip to provide additional information to the user. At the same time, the operation field was placed in the Legend section to differentiate between exports and imports visually. Additionally, a measure was assigned to calculate the relative weight of each product in terms of the total operations using the following DAX:
Relative Product Weight in Operations = | (4) |
DIVIDE( |
SUM(‘Operations_FT’[Value]), |
CALCULATE( |
SUM(‘Operations_FT’[Value]), |
REMOVEFILTERS(‘Operations_FT’[Operation]) |
), |
0 |
) |
This measure calculates the proportion of the total value associated with a specific product relative to the total value of all operations, removing filters applied to the operation field. In this manner, a percentage is obtained that reflects the importance of each product in the context of total trade, facilitating the comparison between products in the chart.
Another KPI is Product Participation in Total Operations, which is a metric designed to calculate the percentage that the export/import of a specific product represents relative to the total exports/imports of the agricultural sector. This indicator allows for the evaluation of the relative importance of each product within the export/import basket. Its DAXs are as follows:
Participation_Product = | (5) |
SWITCH( |
TRUE(), |
SELECTEDVALUE(‘Operations_FT’[Operation]) = “Exports”, |
DIVIDE( |
[Total Export Value_Per_Product], |
CALCULATE( |
[Total Export Value_Per_Product], |
ALLSELECTED(‘Operations_FT’[Product]) |
) |
), |
SELECTEDVALUE(‘Operations_FT’[Operation]) = “Imports”, |
DIVIDE( |
[Total Import Value_Per_Product], |
CALCULATE( |
[Total Import Value_Per_Product], |
ALLSELECTED(‘Operations_FT’[Product]) |
) |
), |
DIVIDE( |
[Total Export Value_Per_Product] + [Total Import Value_Per_Product], |
CALCULATE( |
SUM(‘Operations_FT’[Value]), |
ALLSELECTED(‘Operations_FT’[Product]) |
) |
) |
) |
where
Total Export Value_Per_Product = | (6) |
CALCULATE( |
SUM(‘Operations_FT’[Value]), |
‘Operations_FT’[Operation] = “Exports” |
) |
And:
Total Import Value_Per_Product = | (7) |
CALCULATE( |
SUM(‘Operations_FT’[Value]), |
‘Operations_FT’[Operation] = “Imports” |
) |
This measure calculates the participation percentage of a product based on the selected operation, whether export or import, or in the total, when no specific operation is selected. SWITCH is used to determine the current operation and calculates the participation percentage by dividing the total exports or imports by the filtered total of exports or imports, as appropriate. If no specific operation is selected, the total participation is calculated by dividing the sum of exports and imports of the product by the filtered total of that product’s values.
Using ALLSELECTED ensures that the measure respects the filters applied in the report, providing an accurate assessment within the selected context. As a result, the measure provides a percentage value that indicates how much each product contributes to the total exports or imports of the sector. A KPI is crucial for identifying which products are the most significant in the structure of agricultural sector exports/imports. Analysts and decision-makers can focus on the products most impacting the trade balance.
A Treemap was included for visual analysis to show the participation of exports and imports by product. This chart was configured using the product category and the corresponding participation measure (export or import), facilitating the visualization of the proportion of each product in foreign trade. In its configuration, the created measure was placed in the values field, and the product was placed in the category area. The previously explained Total Export Value and Total Import Value measures were included as Tooltips.
Finally, with the data from the Transport_Operations table, a simple measure was created to obtain the value of the KPI Transport Participation by Subsector using the following DAX:
Total_Per_Transport = | (8) |
SUM(‘Transport_Operations’[Value]) |
This measure is the total value of exports by type of transport, so the corresponding proportion can be generated as a stacked bar chart, configuring the
Y-axis value as a percentage of the General Total of this measure placing it in the Data Label section within the value option, which is another measure that considers this subsector:
Participation_Transport_Subsector = | (9) |
DIVIDE ( |
SUM(‘Transport_Operations’[Value]), |
CALCULATE( |
SUM(‘Transport_Operations’[Value]), |
REMOVEFILTERS(‘Transport_Operations’[Description Subsector]) |
), |
0 |
) |
This measure calculates the value proportion of each subsector relative to the total values for a specific transportation type. SUM is used to obtain the sum of the value in the current context (i.e., for each row in the chart). Then, CALCULATE is used with SUM and REMOVEFILTERS to compute the total values without considering the filter applied to the Description_Subsector field; thus, the total is provided by transportation type. Finally, the DIVIDE function performs a division to determine the subsector share as a percentage relative to the total for each transportation type, ensuring that any potential division-by-zero error is handled by returning a value of 0. This method ensures that the subsector share calculation is accurate and appropriate for the context of a stacked bar chart. This stacked bar chart has the Transport field as the X-axis, the subsector in the Legend section, and this measure as the tooltip.
Lastly, four data slicers were incorporated to enhance users’ interaction with the reports: (a) operation, which allows the selection of exports and imports; (b) subsector, which includes agriculture; forestry; animal husbandry; and fishing, hunting, and trapping; (c) product, which filters among the 43 traded products; and (d) year, which covers from 1993 to the present. The first three slicers work exclusively with visualizations based on Operations_FT data.
2.6. Model Evaluation
Following the dashboard model’s development, the evaluation phase was conducted as outlined by the CRISP-DM framework. This phase included a thorough assessment during a meeting with a key stakeholder from the agricultural sector. The primary goal of this meeting was to gather feedback on the business intelligence solution developed in Power BI and to collect suggestions for future improvements.
The dashboard’s ability to provide a clear view of the agricultural sector’s trade balance was highlighted during the presentation, showcasing Mexico’s leading import and export products. Additionally, the capability of the system to customize analyses through filters was demonstrated, allowing users to explore exports by state and subsector, offering a versatile tool for decision-making.
The evaluation process incorporated several metrics used to assess the dashboard’s performance and usability, including the accuracy of data visualizations, the data retrieval speed, and the error rate. The accuracy of data visualizations was assessed by comparing the visualized data against verified datasets and visuals. In contrast, the data retrieval speed was measured by recording the time taken for the dashboard to load and render visualizations. Additionally, the error rate was documented by tracking the number of errors encountered during user interactions, providing insights into areas for improvement. The results are shown in
Table 4.
The client showed great interest in the tool and asked several questions regarding the data collection methodology, the accuracy of the visualizations, and the system’s ability to adapt to future sector needs. One of the key observations was the request to include information about the quantity exported per product in addition to the subsector data. However, specific details were explained about the fact that the amount exported per product in tons was unavailable from the data sources used, limiting our ability to incorporate this metric into the dashboard at this project stage. Despite this limitation, the client expressed interest in the tool and recognized its potential for visualizing and analyzing relevant data on agricultural foreign trade. This meeting was crucial for obtaining direct feedback from the end-user and guiding future project development phases to better meet the agricultural market’s needs.
Simultaneously, periodic meetings were held with a Power BI expert to validate the aggregations, measures, and modifications implemented in the dashboard. These sessions were essential to ensure that the measures used were accurate, data cleaning was executed correctly, and the final product was intuitive and easy to use for end-users. Continuous validation of the model allowed us to identify areas of improvement and ensure that the dashboard met the expected standards of quality and accuracy.
2.7. Model Implementation
The Model Implementation phase, guided by the CRISP-DM framework, included integrating the dashboard into the institution’s agro-logistics observatory and publishing it online (
https://sites.google.com/potros.itson.edu.mx/observatorioagrologistico, accessed on 10 July 2024), a crucial step in the model’s implementation. However, the relevance and effectiveness of the tool require continuous maintenance to be performed, including constantly updating the database, adapting to new needs, and strengthening the control panel in response to changes in information and user expectations. Thus, this tool could contribute to the continuous improvement and strengthening of organizational culture [
25], as well as increase the complexity of analyses as a part of data mining, as explained [
26].
Constant communication between the central observatory team and the involved workgroups was established to ensure the dashboard’s vitality. This should be achieved through regular planning and result-monitoring meetings, ensuring that the dashboard continues to be a valuable and robust tool for analyzing agricultural foreign trade. This collaborative approach is critical to the project’s long-term sustainability and success. Once published in the ITSON agro-logistics observatory, the tool will be available to academics, educators, and the general community to be used as a resource for future research, consultation, and analysis.
3. Results
Figure 3 shows the designed dashboard, which includes cards displaying the total value of exports and imports according to the given selection (subsector, product, or year). This dashboard can be viewed in greater detail and interactively following this link:
https://bit.ly/AgriculturalForeignTrade, accessed on 10 July 2024.
The Agricultural Foreign Trade Dashboard offers a comprehensive view of agricultural trade in Mexico since 1993, providing critical visualizations that enable export and import analyses. In the upper left section of the dashboard, the total values for exports and imports in the sector are highlighted, amounting to USD 21,784,281 and USD 21,118,945, respectively, for the selected year, 2023. A line chart in the middle of the dashboard illustrates the evolution of the trade balance from 1999 to 2023. It shows a steady increase in the value of both exports and imports, with a more pronounced growth in exports in recent years. To the right of the line chart, an interactive map displays the geographical distribution of agricultural exports by state, with larger bubbles representing states with higher export volumes. This map reveals the significance of certain regions, particularly in the central and northwestern parts of the country, for agricultural foreign trade, which aligns with the presence of critical agricultural and livestock areas in these regions.
Below the line chart, a stacked bar chart compares the proportion of exports and imports of various agricultural products. When imports are selected as the operation, this chart reveals that Mexico remains dependent on imported products, such as corn and soybean, while maintaining a solid export capacity for fruits and vegetables. Subsequently, a Treemap details the contribution of each product to the country’s total trade operations (in this case, imports), highlighting the predominance of corn and soybean, along with other significant products like wheat, which also play a crucial role in foreign trade.
Finally, a stacked bar chart on the right side displays the distribution of the transportation types used by different agricultural subsectors. Road transport emerges as the most utilized, especially in agriculture, underscoring its importance for the movement of perishable goods within the country. Maritime transport is also relevant, particularly for exporting agricultural products to international markets. Altogether, this dashboard is a powerful tool for analyzing and understanding the dynamics of agricultural foreign trade in Mexico. The additional data slicers allow information to be filtered by operation, subsector, product, and year, facilitating more specific data explorations. This analysis reveals the strengths and dependencies of Mexican agricultural trade, highlighting the importance of particular regions and products and the need for robust logistical infrastructure to maintain and enhance competitiveness in the international market.
4. Discussion
4.1. Trade Balance
A visualization was included to show Mexico’s trade balance (exports–imports) from 1990 to 2023 (
Figure 4). The green line in the chart represents this KPI, which is the difference between exports and imports. If positive, it means that exports exceed imports. Additionally, the total value of Mexican exports is shown in blue, and the total value of imports into the country is shown in orange.
As observed, exports and imports show a general upward trend, while the trade balance fluctuates over time, indicating variations in the net balance between exports and imports. When both exports and imports show an upward trend, it can be interpreted as a positive indicator of international trade growth, which is particularly important in developing countries [
27]. Exports represent the sale of goods and services abroad, while imports are the purchases of goods and services from abroad. An increase in both areas suggests an active economy and greater participation in global trade.
However, it is essential to consider fluctuations in the trade balance. Various factors can influence these fluctuations. For example, the graph highlights what happened in 2008, when the world faced a global financial crisis that affected many economies, including Mexico’s. The global demand for goods and services fell, and exports, especially those related to the U.S. market, decreased significantly, contributing to a trade deficit. Similarly, during the crisis, Mexico experienced a decline in domestic production compared to the demand for consumer goods, leading to an increase in imports to satisfy domestic consumption, exacerbating the trade deficit [
28].
Likewise, the chart shows the effects of the COVID-19 pandemic on the country’s trade balance. The pandemic caused significant disruptions to global supply chains and an economic slowdown that initially reduced exports and imports. However, with its economic recovery, Mexico has experienced increased domestic demand, driving imports to meet the growing consumption of goods and raw materials. Despite the recovery in exports, the increase in imports has contributed to a trade deficit. Additionally, fluctuations in international prices, especially in oil, and disruptions to global supply chains have exacerbated the situation, affecting the country’s trade balance [
29].
The analysis of these fluctuations provides critical insights for agricultural policymakers. For example, the impacts of crises like the 2008 financial collapse and COVID-19 highlight the importance of building resilient agricultural export strategies that can withstand external shocks. Mexico’s dependence on specific markets, such as the U.S., emphasizes the need for diversification strategies to reduce its vulnerability to single-market disruptions.
This chart can be consulted for the analyzed products, offering relevant information for agricultural decision-makers. Data on trade balance, imports, and exports are crucial for effective production planning; knowing trends in imports and exports allows production to be adjusted to align with global demand and market opportunities. For example, if the data show an increase in the export of certain products, producers may increase their production to take advantage of the external demand. Moreover, these data are essential for designing export and import strategies. Analyzing the trade balance helps identify opportunities to access new markets and negotiate advantageous trade agreements. Understanding which products are in high demand abroad can guide companies in adapting their offerings to meet those needs.
Furthermore, the analysis of imports and exports aids in risk management. Fluctuations in these data can affect prices and the availability of agricultural products. Understanding these dynamics allows companies to manage risks associated with price volatility and supply chain issues. In a comparative context, similar studies in various countries have demonstrated that fluctuations in trade balance directly influence agricultural production strategies. For instance, research has shown that farmers adjust their production based on fluctuations in the trade balance, leading to more informed planting decisions and improved market access. Specifically, a study evaluating the impact of international trade on the world’s agricultural production indicates that such fluctuations can significantly affect farming strategies and productivity [
30].
Moreover, the sensitivity of the agrarian sector to exchange rate depreciation highlights how external economic factors can alter production decisions, reinforcing the need for strategic planning in response to market dynamics [
31]. Additionally, another publication discusses the impact of economic globalization on value-added agriculture, providing a framework for understanding how global economic conditions affect local production strategies [
32]. Lastly, research on agricultural fluctuations and international economic conditions emphasizes the importance of adapting agrarian policies to ensure food security and market stability, illustrating the interconnectedness of trade dynamics and production [
33].
Knowing the flow of trade is critical to efficiently managing inputs and sales in terms of supply chain optimization. Agricultural companies should adjust their logistics and inventory management based on information about imports and exports to ensure a smooth supply chain. Additionally, policymakers can use these data to support local producers by investing in infrastructure that improves supply chain efficiency. Such interventions can help local agriculture to remain competitive in the global market. Data are also essential for assessing competitiveness in the global market. A surplus in exports may indicate a competitive advantage, while a deficit may highlight areas that need improvement. This information allows companies to adopt strategies to strengthen their position in the international market. A trade trend analysis can also reveal opportunities to develop new products that respond to emerging demands in international markets. Identifying these patterns helps companies innovate and diversify their offerings.
Research in various countries also supports the notion that understanding trade dynamics leads to better policy formulation. For instance, a study titled “Dynamics of International Trade: A 30-Year Analysis of Key Exporting Nations” analyzes the evolution of trade networks and their impact on the trade policies of critical countries, emphasizing the necessity of integrating trade data analytics into policy frameworks to inform decision-making processes [
34]. Research highlights that well-informed policy decisions, backed by comprehensive data analysis, can significantly strengthen a country’s position in the global agricultural market.
Lastly, data on international trade affect financial planning and investment decisions in the agricultural sector. Investors and lenders use this information to assess agricultural companies’ viability and growth potential, influencing their decisions on financing and development.
4.2. Total Export Value by State
Another way of analyzing exports offered by the dashboard is by state, using the map visualization (
Figure 5). The chart displays a map of Mexico with several blue circles of varying sizes overlaid on it, each representing the exports of the selected year (2023) across different states within Mexico, globally, for all analyzed sectors. The size of the circles corresponds to the volume or value of these exports. The graph highlights the states of Michoacán, Sonora, and Sinaloa, indicating significant export activity in those regions.
The states of Michoacán, Sonora, and Sinaloa stand out on the export map due to their strong agricultural economies, where the production and export of farming, livestock, and fishing products are of great importance. In the case of Sonora, its outstanding export activity can be attributed to several key factors. Sonora has a favorable climate and extensive agricultural areas, allowing it to produce various high-quality agricultural products such as wheat, grapes, and asparagus. Additionally, the state has a strong livestock industry, especially in beef production, which is in high demand nationally and internationally [
35]. Sonora also benefits from its strategic geographic location, facilitating its access to international markets, particularly the United States, Mexico’s leading trading partner. Ports on the Gulf of California, such as the Port of Guaymas, and efficient transportation infrastructure contribute to the state’s ability to export large volumes of products. This combination of factors positions Sonora as a leader in exports within the agricultural sector, which is reflected in the significant size of its blue circle on the map.
By utilizing the dashboard, stakeholders can observe these trends using filters and drill-down functionalities to analyze further how different products or subsectors contribute to a region’s overall export performance. This capability ensures that high-level executives and operational teams can make data-driven decisions, whether identifying growth opportunities or addressing bottlenecks in logistics or production. The dashboard’s interactive design is not just a feature but a practical tool that allows users to compare states side by side, which provides valuable insights for regional planning and investment decisions. For example, producers looking to expand into new markets could use this feature to identify regions with high export potential but underdeveloped infrastructure, making informed decisions about where to allocate resources.
4.3. The Relative Weight of Products in Trade Operations
Figure 6 illustrates the percentage relationship between the exports and imports of various agricultural products in Mexico, ordered by the total value of operations, which is measured as a relative percentage. Each bar represents a specific product, and the length of the sections within each bar indicates the proportion of exports (in blue) versus imports (in orange).
For instance, in 2023, the products with the highest value were maize and soybean seeds, both of which showed a predominance of imports over exports, indicating Mexico’s significant reliance on acquiring these products from abroad. In the case of maize, a crop of great national importance both economically and culturally, this dependency arises because domestic production is insufficient to meet national demand, despite the country producing more than 27 million tons of maize annually. White maize (for flour) is made in more significant quantities. However, there is a deficit in the yellow maize essential for animal feed and industry, underscoring the need for agricultural policies to strengthen national production and promote food security and sovereignty [
36]. Conversely, other legumes and vegetables, such as avocados, show a clear predominance of exports, reflecting Mexico’s strong capacity to produce and sell these products in international markets. This fact is further facilitated by the removing of specific sanitary and phytosanitary barriers in countries like the United States, Mexico’s main client [
37].
An interesting detail is the near-total absence of imports for products like tomatoes. This indicates self-sufficiency in meeting national needs and suggests that production is abundant enough to generate an exportable surplus. The dashboard’s ability to dynamically visualize such comparisons between product groups allows users to quickly assess Mexico’s competitive advantages and areas where strategic improvements are needed. By offering this functionality, the dashboard is an essential tool for producers, policymakers, and trade analysts which enables them to create tailored strategies based on data, such as identifying where to increase production or reduce import dependency. For example, entrepreneurs involved in producing and commercializing products where exports dominate, such as avocados or tomatoes, could focus on expanding their operations into new international markets. Such expansion would diversify their risk and enhance their global competitiveness. Additionally, those operating in sectors with high import dependency, such as maize, could explore investing in local production to reduce costs and lessen their reliance on international market fluctuations.
From an academic perspective, this visualization enables researchers and analysts to study the dynamics of agricultural trade in Mexico, providing critical data for developing studies on the sector’s competitiveness. Academia could use this information to identify patterns and trends in the exports and imports of various products, offering evidence-based recommendations to entrepreneurs and policymakers. Moreover, the dashboard’s modular design allows for easy updates as new data become available, ensuring it remains a relevant and practical tool for ongoing research and strategy development.
4.4. Contribution of Products to Total Agricultural Foreign Trade
Figure 7 illustrates the contribution of various products to foreign trade, a critical metric for understanding the distribution of products in terms of total exports and imports. This visualization identifies the most significant products in each type of operation and provides insight into international trade trends.
The dashboard’s ability to dynamically illustrate the contribution of each product to Mexico’s total foreign trade is a crucial feature that offers real-time insights for decision-makers. Visualizing these data allows users to quickly identify which products dominate export operations and assess how their importance shifts over time. This functionality enables stakeholders, such as agricultural producers, policymakers, and traders, to focus on high-value products and adjust their production strategies or trade policies accordingly.
The analysis of 2023 reveals a significant shift compared to previous years. While avocados had historically dominated as one of the leading export products, their share in 2023 stands at 13.9%, surpassed by the group of other legumes and vegetables, which represents 14.4% of the total. This group, encompassing a variety of products, stands out for its diversity and relevance in exports. Although a detailed breakdown of the specific products within this group is not provided, it is essential to note that Sonora—a state known for producing wheat, maize, and other legumes—plays a significant role in this category. This is particularly relevant given that the agro-logistics observatory is maintained at an institution in Sonora, highlighting the importance of analyzing these exports locally.
The dashboard also supports granular analyses, enabling users to filter by product groups and delve into regional export trends. This feature makes it easier to identify opportunities to increase the export of specific products or shift focus toward emerging high-demand categories, further emphasizing the dashboard’s role in strategic decision-making. Tomatoes, with a 12.5% share, also play a significant role in exports. Their demand may be driven by the global need for fresh and processed tomatoes, with factors such as product quality, seasonality, and trade agreements influencing their success. In this context, Sinaloa stands out as the leading producer of tomatoes [
38].
Moreover, the dashboard can track how market demand influences export volumes over time, allowing for strategic infrastructure and production capacity investments. Analyzing specific products in terms of their exports provides a comprehensive view of economic trends and highlights certain states’ crucial role in the supply chain and the country’s trade strategy. This type of analysis offers several critical advantages for decision-makers. First, understanding which products dominate exports and how they vary over time helps to identify opportunities and make timely adjustments to production, investment, and marketing strategies. Additionally, identifying the locations these products allows for targeting investments in infrastructure and technology to where they can have the most significant impact. These investments include developing new production capacities, improving logistics, and supporting innovation in critical regions. Aligning investments with areas that offer the most significant growth opportunities ensures that resources are used effectively.
Another essential aspect is supply chain planning and management. Knowing which products are in high demand helps forecast supply and demand, enabling better inventory management and reducing the costs associated with transportation and storage. This foresight facilitates more efficient and adaptable logistics in response to market fluctuations. Finally, analyzing how products vary in the market helps businesses and policymakers adapt to consumer preferences and changes in global market dynamics. This adaptation is crucial for adjusting export strategies and seizing emerging opportunities, ensuring that companies remain competitive in an ever-changing environment.
4.5. Types of Transportation Used for Exports by Subsector
The chart in
Figure 8 illustrates the distribution of the transportation modes utilized in the agricultural sector, classified by SCIAN subsectors.
In the 2023 analysis of transportation methods used for the distribution of products across various economic subsectors, road transport emerges as the predominant mode. This method is the most widely used among the five analyzed, accounting for 60.32% of the total, with a particular emphasis on the agriculture subsector, where 63.6% of products transported by this mode are agricultural goods. This high percentage underscores the critical role of road transport in distributing these products, as it offers flexibility and extensive coverage across Mexico, which is essential for efficiently handling large volumes of fresh and perishable goods.
Maritime transport is the second most crucial mode, accounting for only 22.76% of the total in 2023. This transport mode is also the most relevant for the agriculture subsector, with 76.1% of the products transported this way, indicating that most are destined for international markets via maritime routes. In contrast, the use of marine transport is lower in the livestock subsector, reflecting the need to adapt transportation options based on the nature of the product and its destination. Through the dashboard’s visualization, users can easily observe these trends and make informed decisions on improving transportation efficiency for different subsectors. For example, by understanding which products rely heavily on maritime transport, exporters can plan logistics more effectively, ensuring that routes and port capacities are aligned with export needs.
Rail and air transport are used less than the previous modes. In 2023, rail transport was almost exclusively used for agriculture, suggesting its suitability for large-scale, non-urgent transport routes. Air transport, however, is used almost equally across all sectors but minimally, reflecting its high cost and that its use is limited to high-value or perishable products requiring rapid delivery. Finally, other modes of transport have an insignificant share in the agricultural sector, with the livestock subsector being practically the only one that relied on these methods in 2023. The analysis of this KPI highlights the significant dependence of certain subsectors on specific transportation modes and provides insight into opportunities for optimizing logistics chains, as suggested by [
39]. Understanding these dynamics is crucial for making informed decisions, including about diversifying transportation options and improving supply chain efficiency within each subsector.
4.6. Contribution of the Dashboard to Sustainability
This dashboard can encourage sustainable agricultural practices if producers or policymakers track products to analyze their performance over time and make decisions based on this analysis. For instance, they might adjust their production or promote specific policies to reduce the overproduction of low-demand crops and avoid unnecessary resource use. Furthermore, the dashboard identifies the regions with the highest exports, which often correlates with significant environmental degradation. Policymakers could analyze this information to design better regulations, ensuring that agriculture remains sustainable while meeting export demands.
By integrating data on infrastructure, the dashboard could also highlight the exporting regions that need to strengthen their infrastructure. This information would allow stakeholders to direct investments toward green technology that promotes sustainability. Decisions based on the analysis derived from this dashboard aim to ensure that economic growth does not come at the expense of environmental health.
4.7. Ethical Considerations in Data Collection and Visualization
The data used in this panel come from prestigious government institutions, such as INEGI, which makes them reliable. However, inadequate visualization can lead to misinterpretation and wrong decisions, which affect stakeholders. Transparency in its design is essential to avoid this situation. Therefore, the methodology presented in the present study details each incorporated element. The data sources, cleaning process, visualization types used, and all the settings applied are indicated.
4.8. Limitations and Opportunities for Future Development
While the current dashboard provides valuable insights with historical data on agricultural trade, there are notable limitations to its design that can be improved. First, the dashboard should include predictive analytics capabilities, leveraging Power BI forecasting capabilities or the possibility of integration with Python to develop machine learning models, which would further elevate the dashboard’s utility for stakeholders. Moreover, the dashboard has limitations regarding data granularity. It only presents export data at the state level without being able to break them down by municipality, which could limit the users’ ability to make regional decisions. Additionally, the data used for the dashboard are expressed in currency format, and there are no data on tons of production, which would allow for more appropriate demand planning than just considering the value of products in dollars.
Future development efforts should address these limitations by improving data granularity, integrating predictive capabilities, and allowing the use of metrics with types of units other than currencies. These improvements would transform the dashboard from a tool primarily for historical analysis into a more comprehensive decision-making platform for strategic and operational planning.
5. Conclusions
The present project’s main contribution lies in developing a business intelligence system on international trade in Mexico’s agricultural sector and in documenting the methodology used, including the technical details of its design and the use of DAXs within Power BI. These expressions, a collection of functions, operators, and constants that can be used in a formula, are crucial in transforming raw data into meaningful insights. This documentation allows replicating the system in other contexts, especially when designing and applying DAXs within Power BI. It is a valuable resource for future projects involving similar data analysis needs.
The developed dashboard integrates multiple data sources to bridge the gap between raw data and actionable insights, making data more digestible and facilitating decision-makers’ access to data concerning product exports and imports, with particular attention paid to the types of transportation used to move the products. This dashboard allows interested parties to obtain precise and comprehensible visualizations to analyze the sector’s situation. For instance, the trade balance visualization of Mexico’s exports and imports from 1990 to 2023, the map of exports by state, and charts analyzing the distribution of the transportation used by each subsector provide valuable insights into the dynamics of international trade in the Mexican agricultural sector. These features offer useful insights into the dynamics of international trade, offering stakeholders critical information for strategic planning.
Policymakers can use the dashboard to visualize and compare export trends across states, allowing for more informed decisions regarding trade policies, subsidies, and specific agricultural development sectors. Traders and agricultural producers can use the dashboard to identify the essential products and regions that drive export. This data-backed approach can lead to decisions that improve their competitiveness in international markets, such as diversifying export portfolios and exploring new markets. Researchers can use the dashboard to filter data by product, region, and time, allowing them to conduct detailed studies on agricultural competitiveness, supply chain efficiency, and market trends. Regarding sustainability, the dashboard’s analysis capabilities help promote environmentally friendly practices. By analyzing trends in product exports, stakeholders can make decisions that contribute to sustainable agricultural growth and improve logistics efficiency.
Furthermore, integrating infrastructure data could allow stakeholders to invest in green technology, enhancing sustainability in the export process. Concerning the ethical implications of data collection, using data sourced from reputable government institutions like INEGI ensures reliability. However, it is essential to recognize the need to present these data transparently to avoid their misinterpretation. In other words, this is why the methodology details all data cleaning and visualization steps: to ensure transparency and reproducibility.
Future iterations of the system should focus on overcoming its current limitations by integrating predictive analytics, allowing for finer geographic analyses, and incorporating additional data. These improvements would transform the dashboard into a more comprehensive decision-making tool, moving beyond historical analysis to support forward-looking strategies. The dashboard’s implementation in the institution’s agro-logistics observatory marks an essential step toward more strategic, data-driven decision-making in Mexico’s agricultural sector. With continued development, this system is poised to contribute to the sustainable growth and competitiveness of agricultural exports.