A spatiotemporal database on the energy, macro and micro-nutrients from the Brazilian agricultural production

To construct this database, we integrate the nutritional content of 62 crops and 5 livestock categories to estimate the amount of 21 macro and micro-nutrients (including energy) that were produced from agriculture in each Brazilian municipality during the last three decades. Additionally, we allocate these nutrients according to their share in the food system (for example, human food, animal feed, export etc.). It is a unique data source on macro and micro-nutrients availability for human consumption and animal feed, but also regarding another aspects of the food system, such as international agricultural trade, energy production (for example, in the form of ethanol) or post-harvest and post-processing losses, from local to national levels, in a wide time frame of 30 years. This database can be used in scientific research regarding food and nutrition security and in the construction of indicators for monitoring food and agricultural programs and policies that aim at the promotion of food and nutritional security. Also, it has the potential to enable broader analysis of the food system as whole in terms of food stability and resilience.


Specifications table
Agricultural and Biological Sciences (General), Specific subject area Land use and food security Type of data Table  How data were  acquired We acquired subnational crop and livestock production from the National Institute for Geography and Statistics (IBGE); nutritional values of the agricultural commodities were taken from the Brazilian

Value of the data
• This dataset has the potential to be used in scientific research about spatio-temporal dynamics of agricultural production and for monitoring the broader aspects of food systems, food and nutrition security policies and governance from local to national levels in a considerable time frame. • The scientific community that is interested in food system dynamics and food security may be directly benefited; local, regional and national stakeholders in the field of agricultural production, food governance and nutrition are also potential beneficiaries of this dataset. • It can be used to build food security and nutrition indicators, to map regions with possible prevalence of food insecurity and to aid the analysis of spatio-temporal aspects of the Brazilian food system (e.g. stability and resilience studies). • This data reports for the first time how much macro and micro-nutrients were produced from agriculture in all the Brazilian municipalities along the last tree decades. More considerably is the allocation of the nutrients human food, animal feed, commodity exports, losses etc. • This dataset is useful for mapping spatial patterns of food production and their changes through time, indicating the most important regions for food production in the country.

Data Description
We provide a yearly dataset of 20 macro and micro-nutrients, plus energy (in kcal), derived from agricultural production (listed in the columns of Table 1 ), as well as their allocation in the Brazilian food system, to all of the 5563 Brazilian municipalities in the period of 1988 to 2017. Agricultural production was collected from the National Institute for Geography and Statistics (IBGE), the official source of statistics for Brazil. Five livestock and 62 crop products were available covering both the entire time series of 30 years and the whole country, so the complete agricultural information from IBGE was used in this database.         The dataset consists in 20 tables, each containing the values for a specific nutrient produced every year (columns) in the municipalities (rows). The tables are labelled with the name of the nutrient (e.g.: dataset_Energy.tab, dataset_Mg.tab...). Each municipality contains 8 rows corresponding to the allocation of the nutrient in the Brazilian food system: 1) the total amount of that nutrient produced in a specific year, based on nutritional information of 62 crops and 5 livestock categories; 2) the amount of a nutrient that was derived from crop processing to oil; 3) the quantity of nutrient delivered to the food system directly as food for human consumption; 4) the quantity of nutrient that was exported, thus, not available to the national food system; 5) the quantity of nutrient delivered to the food system as animal feed; 6) the quantity of nutrient that returned to the food system in the form of seeds; 7) other uses (e.g. ethanol production) and; 8) the amount of nutrients lost in post-harvesting and post-processing.
The names and the content of the columns are the following: -geocod: the unique geocode of each Brazilian municipality, as defined by the National Institute of Geography and Statistics (IBGE). It can be used to transform the sheet to a shapefile. -Municipality: the name of the municipality (State abbreviation).
-Type: which of the 20 nutrients listed in the Table 1 is reported in the sheet (with unit).
-FBS: total production of the nutrient in the municipality and the fraction that is delivered to the food system, from the FAO's Food Balance Sheet. Total means all of the produced nutrients; Processed means the fraction that is processed, mainly into oil; Food is the total amount of nutrient from food, after accounting for commodity processing; Export is the amount of exported nutrients after accounting for commodity processing; Feed is the amount of nutrients used for animal feed, after accounting for commodity processing; Seed is the amount of nutrients that return to the food system in the form of seeds; Other use is the amount of nutrients that are not delivered to the Brazilian food system, but domestically used, mainly in the form of Ethanol; Losses is the amount of nutrients that are lost from the food system after cropping and after processing. -XYYYY: The years from 1988 to 2017 (e.g. X1988, X1989, X1990… X2017).

Experimental Design, Materials, and Methods
We generated the database on nutrients production and allocation in the Brazilian food system by converting the subnational agricultural production to nutrients equivalent, based on the nutrient composition of each agricultural commodity, following previous studies with the same methods [ 1 , 2 ].

Nutritional composition of the agricultural commodities
First, we collected 62 crop and 5 livestock categories production available for all of the 5563 Brazilian municipalities in the period of 1988 to 2017. This data is distributed by the IBGE and available in: https://sidra.ibge.gov.br/pesquisa/ppm/tabelas (for livestock production) and https://sidra.ibge.gov.br/pesquisa/pam/tabelas (for crop production). Then, based on the Brazilian Table of Food Composition (TACO) [3] , we converted the agricultural production to nutrient equivalent ( Equation 1 ). Whenever a specific nutritional composition was not reported in TACO, we used the United States Department of Agriculture (USDA)'s National Food and Nutrient Analysis Program (NFNAP) values [4] . nutrient production = agricultural production * nutritional composition (1) Where, nutrient production is the nutritional equivalent production of one of the nutrients in a given municipality and year (units per 100g of product are reported in the columns of Table 1 ) from each the commodities in a given municipality and year ( agricultural production in tonnes of each product as reported by the IBGE, listed in the columns of Table 1 ) and nutritional composition is the value of each nutrient for each commodity, as shown in Table 1 .
The amount of nutrients produced in each municipality was calculated by summing the nutritional content of each crop and livestock production in each year ( Equation 2 ). total nutrient production = nutrient production (2) Where, total nutrient production is the sum of a nutrient produced by all of the 62 crops and 5 livestock commodities in a given municipality and year. This database provide a specific table for each nutrient, as described in the previous section (20 tables named with the specific nutrient).

Allocation of the nutrients according to the Food Balance Sheets
Then, we allocated the nutrients into "Processed", "Food", "Export", "Feed", "Seed", "Other Uses" and "Losses" based on the FAO's FBS, that report the production and amount of the commodities that are distributed into these categories. We did not use the raw values of the FBS, but the proportion of them (relative to the total production reported in the FBS) because the FAO's data is reported in 10 0 0 units of the IBGE's units: tonnes of crop, kilograms of meat (beef, pig and poultry), litres of milk or thousand dozens of eggs. We thus opted to preserve the more detailed information reported by the IBGE.
The allocation into the FBS's categories followed the Eq. 3 : Where, Allocation is the FBS's categories described above, nutrient production is derived from Equation 1 and FBS proportion is the proportion of each category reported in the FBS, relative to the total production from FBS. For each nutrient in a specific table, the Allocation is provided for all of the municipalities and years in eight rows in the column called "FBS" in the dataset. As in reference [2] , some assumptions had to be made in order to allocate the nutrients into FAO's categories: "Other Uses" of Cottonseed were considered as "Fibres" (thus, lost from the food system) and "Other Uses" of potatoes and cassava, which were 2% and 6% of the total production in the period, were allocated to "Food", as they are staple food in Brazil. Also, the amount of "Other Uses" of Milk was allocated to "Food", as it might represent cheese, yoghurt and other dairy products for human consumption. In the case of Sugar-Cane, "Other Uses" corresponds to the ethanol production for biofuel, while the "Processed" portion matches the national sugar production. "Processed" proportions of Castor Beans, Cottonseed and Soybeans were allocated to Oil while the "Processed" proportions of Groundnut, Rice, Barley, Coconuts, Maize and Grapes were allocated proportionally as food or feed, according to the domestic use. The ratio of Oil or Ethanol production to "Processed" crop (e.g. soybeans or sugar cane) from FBS was used to convert raw crop nutrients to Oil or Ethanol. In the case of soybeans, the range of fraction of crop production that is converted to Oil is between 0.17 and 0.20 in the time series, while the fraction of sugar cane ranges from 0.10 to 0.13. Once the "Processed" calories were calculated, they were allocated to "Export", "Feed" and "Food" according to the respective proportion of these categories in the Oil and Sugar sheets. FAO's Technical Conversion Factors for Agricultural Commodities [5] was used to convert livestock weight to edible proportions of beef, pig and poultry meat.
Since crop and livestock production were available in Brazil at sub-national level until 2017 and the FBS only until 2013, by the time we built this database, we modelled the proportions of food, feed, exports etc. for the period of 2014 to 2017 using linear regression with IBGE's production as the predictor. To minimize the effects of the trend in the time series, and to ensure that the best regression parameters were used, for each of the agricultural products we ran 24 different regressions comprising different periods, i.e. 1988-2013, 1989-2013, 1990-2013… 2011-2013, and the model with the higher adjusted R ² was selected to predict food, feed, exports and processed products. The adjusted R ² was used for model selection because it takes into account the sample size, thus it was a suitable parameter to compare the models.
The "Food", "Export", "Feed", "Seed", "Other Uses" and "Losses" rows in the tables also account for the processed products, thus when summing these 6 rows the result is equal to the total nutrient production in a given municipality. The row "Processed" should not be considered in this case to avoid double counting of the nutrients. "Losses" also include nutrient loss in the conversion of raw crop to oil or sugar.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships which have, or could be perceived to have, influenced the work reported in this article.