Toward a nitrogen footprint calculator for Tanzania

We present the first nitrogen footprint model for a developing country: Tanzania. Nitrogen (N) is a crucial element for agriculture and human nutrition, but in excess it can cause serious environmental damage. The Sub-Saharan African nation of Tanzania faces a two-sided nitrogen problem: while there is not enough soil nitrogen to produce adequate food, excess nitrogen that escapes into the environment causes a cascade of ecological and human health problems. To identify, quantify, and contribute to solving these problems, this paper presents a nitrogen footprint tool for Tanzania. This nitrogen footprint tool is a concept originally designed for the United States of America (USA) and other developed countries. It uses personal resource consumption data to calculate a per-capita nitrogen footprint. The Tanzania N footprint tool is a version adapted to reflect the low-input, integrated agricultural system of Tanzania. This is reflected by calculating two sets of virtual N factors to describe N losses during food production: one for fertilized farms and one for unfertilized farms. Soil mining factors are also calculated for the first time to address the amount of N removed from the soil to produce food. The average per-capita nitrogen footprint of Tanzania is 10 kg N yr−1. 88% of this footprint is due to food consumption and production, while only 12% of the footprint is due to energy use. Although 91% of farms in Tanzania are unfertilized, the large contribution of fertilized farms to N losses causes unfertilized farms to make up just 83% of the food production N footprint. In a developing country like Tanzania, the main audiences for the N footprint tool are community leaders, planners, and developers who can impact decision-making and use the calculator to plan positive changes for nitrogen sustainability in the developing world.


Introduction
Nitrogen (N) is a crucial element of life on Earth: it makes up most of the atmosphere and cycles through the biosphere and hydrosphere. Though the cells of all living things require nitrogen, most of the Earth's nitrogen is in the inert form N 2 , which is unusable to most organisms. Transforming N 2 to useful 'reactive' nitrogen requires energy. Reactive nitrogen is defined as all nitrogen species other than N 2 (Galloway et al 2003). In nature, biological nitrogen fixation (and, to a small extent, lightning) supply the biosphere with reactive nitrogen. Today, on a global terrestrial basis, the creation of reactive N is dominated by anthropogenic processes, both intentional (legume cultivation and the Haber-Bosch synthesis of ammonia) and unintentional (fossil fuel combustion). When reactive N escapes from anthropogenic systems, it can accumulate in the environment and degrade water and air quality. This degradation of environmental and human health is magnified by the nitrogen cascade (Galloway et al 2003) in which the same atom of reactive N may have deleterious effects in many different systems.
In Tanzania, N pollution is a serious issue. Coral reefs off the coast of Tanzania as well as the waters of Lake Victoria show signs of advanced eutrophication (Odada et al 2004, Machiwa 2003. In Tanzania's largest city, Dar es Salaam, air quality is compromised by unhealthy levels of NO 2 and groundwater is polluted with agricultural nitrates (Mbuligwe and Mengiseny 2005), endangering both vulnerable ecosystems and human health.
It is a challenge of modern society to produce food and energy while minimizing the environmental damage of agriculture and fossil fuel consumption.
A key component of this challenge is to develop human understanding about the consequences of resource use on the release of excess reactive N to the environment. The N footprint tool links an individual's or community's consumption habits with the release of reactive N (Leach et al 2012). Only a fraction of the total N loss is linked to the N contained in the food itself, while most of the total N investment (Leip et al 2014a) is lost in the food production chain. It is therefore referred to as 'virtual' N (Leach et al 2012), a concept similar to virtual water (Allan 1998).
To date, N-footprint models have been created for the USA, the Netherlands, Germany, Japan, Austria, the United Kingdom, and Australia, which are all developed countries , Liang et al 2016. These calculators have allowed consumers to visualize their consumption in terms of N resources and pollution. This paper presents the first nitrogen footprint calculator for a developing country where N is in limited supply (Palm et al 2004, Sutton et al 2011. Tanzania has a 'two-sided' nitrogen problem: firstly, reactive nitrogen causes environmental damage when released, especially in urban areas where air and water quality are compromised. Secondly, Tanzania, like many countries in sub-Saharan Africa, struggles with nitrogen deficiencies in feeding its population (Palm et al 2010). These deficiencies lead to significant health problems: Kulwa et al (2006) found that 43% of Tanzanian children exhibit signs of severe malnutrition including protein deficiency. The nitrogen balance of Tanzania is negative (À30 kg N ha yr À1 ), as much of the soil nitrogen removed by farming, erosion and leaching is not replaced each year (Stoorvogel and Smaling 1990). This outflow rate is the result of significant N extraction by crops of 20-50 kg N ha À1 , with erosion removing another 3-10 kg ha À1 (Brekke et al 1999). Loss of soil fertility also drives the clearing of forests to gain new fertile land for crop production, thus aggravating the erosion-pollution problem (Leip et al 2014a). N fertilizer applications are expected to increase in sub-Saharan Africa and the sandy soils of Tanzania may predispose farm lands to fertilizer loss, although soil profiles vary widely (Tully et al 2016). Advocating for efficient use of N fertilizers and reducing N loss through the food production system becomes even more important as the use of fertilizer increases.
The objective of this paper is to develop an N footprint model for Tanzania to connect consumption and N loss in a way that can be useful to farmers, planners, leaders, and countries that make agricultural, social, and consumption decisions.

Methods
A nitrogen footprint is the total amount of reactive N released to the environment as a result of an entity's activities. In this case, that entity is a person in Tanzania who consumes the national average amount of food and energy. The N footprint model brings together two components: food (production and consumption) and energy (consumption for household uses, transportation, and goods and services).

Food production: virtual nitrogen factors
Virtual N is defined as N released to the environment during food production, but not contained in the consumed food itself (Leach et al 2012). Estimating virtual N for food requires consideration of each step of the food production process. Food products go through long journeys from field to table and at each step a certain amount of N is lost. A virtual N factor (VNF) sums up these virtual N losses for each food type. This concept is known in other studies as a N loss factor (Leip et al 2014b).
The VNF concept must be adapted to reflect the different nitrogen resources used for food production in a developing country. For fields that receive fertilizer, the greatest losses of N occur at the first step in the production process, in which only a small portion of available N is taken up by the crop and the rest is lost to the environment. However, this scenario can only be applied to the 9% of farms in Tanzania that are fertilized (NBS 2008). The other 91% of farms do not use fertilizer and must rely on soil reserves for crop nutrition. Unfertilized crops do not experience a large loss of N during crop N uptake because they are assumed to draw only what they need from the soil. To include both of these scenarios in the model, two sets of virtual N factors were developed: one for fertilized plots and one for unfertilized plots. These two sets of VNFs were used to calculate a weighted average set of VNFs representing Tanzania (table 1).
Tanzania, like much of Africa and unlike the USA, has an agricultural economy that is primarily dependent on existing soil N. In sub-Saharan Africa, most countries now have severely depleted soil resources due to decades of nutrient mining (Bekunda et al 2010). This issue is addressed in this study using the concept of soil mining factors, which are used to demonstrate the amount of N mined from soil but are not used in the N footprint calculation (see section 2.2 and figure 1). The Tanzanian food system is a system of interconnected 'pools' of N, reflecting the nature of small-scale subsistence farming (Williams et al 1999, Swai et al 2007. This system is fundamentally different from the monoculture, independent agriculture systems of the United States. The virtual N factors are calculated to reflect the interconnectedness of the Tanzania food system (see supplemental material stacks.iop.org/ERL/12/ 034016/mmedia). For example, Tanzania does not separate specialized dairy cattle from meat cattle, unlike the United States and other industrialized societies. As a result, the virtual N factor for milk is connected to the beef virtual N factor. Similarly, the production of eggs is connected to the production of meat chickens.
90% of the nutrition requirements of cattle and other livestock are met by grazing on unfertilized, natural grasslands, which is different from most developed countries (Sarwatt and Mollel 2008). This makes the virtual N factor of Tanzania livestock products low compared to those in developed countries. Grass feeding does not incur large N losses as does feeding cultivated grain to cattle, but it can deplete the soil, as much of the nitrogenous waste emitted by cattle as manure is leached into the environment rather than returned to the soil (Rufino et al 2014). . It depicts the general N pathway through the Tanzanian food system. N enters from new sources (synthetic or organic fertilizers: orange box) or soil reserves (brown box). The food production pathway is depicted in the green boxes. At each step of the food production process, some N is lost to the environment (blue box) before the produced food product is consumed (red box). There is N loss at each step, including at crop uptake, and we do not partition losses into specific N species. Recycled N, with 50% of N assumed recycled at each step, are shown returning to the nitrogen pool, reducing N requirements for the next iteration of the model. 'Virtual N' is the N loss per N consumed in a final food product, depicted as the N in the blue box divided by the N in the red box. 'Soil mining' is the N drawn from soil reserves per N consumed in the food product. This representation is a simplification based on the assumption that N mineralized from soil organic matter will be fully available for plant uptake thus does not contribute itself to N losses. At each step in the model after crop harvest, N recycling is assumed to be 50%. There are very little data on the recycling of agricultural by-products in Tanzania. 50% is a reasonable estimate because while farmers need to maximize soil fertility, there are many factors that inhibit recycling and composting of waste (Sanchez et al 1997). For example, crop residues are often used for animal feed, collected for household fuel, or the nutrients may be lost to the environment before being incorporated into the soil. Kihara et al (2014), in a study of the Tanzania Babati farmlands, found that 100% of the stover (leftover plant material after harvest) was exported to use for animal feed or fuel. Vegetable and cereal recycling is higher in Tanzania than in the USA because of the traditional smallholder agricultural methods and lack of other fertilizer sources. However, there is less recycling of meat processing waste in Tanzania than in the USA model (Leach et al 2012) because the Tanzanian livestock industry lacks the industrial infrastructure necessary to funnel by-products back into the meat production system. As pictured by figure 1, the final step in the model is ingestion and excretion of nitrogenous waste by humans. Unlike many industrialized countries, Tanzania lacks sewage treatment that reduces nitrogen release to the environment, so all nitrogen in food is assumed lost in wastewater.
Because virtual N factors for unfertilized crops are lower than those for fertilized plots (table 1), it was necessary to calculate the food N footprints for both unfertilized and fertilized crops using separate sets of virtual N factors and combine them in a weighted average. The proportion used for the weighted average was based on the percentage of unfertilized farms (91%; NBS 2008) and the percentage of N in production from soil mining and not fertilizer (83%; see equations (1) and (2).

Food production: soil mining factors
For Tanzania and other developing countries, fertilizer availability is limited, so most agricultural N is supplied by existing pools in the soil. Such removal of nutrients from the soil is referred to as 'soil mining' (Van der Pol 1992). Because the N reservoir is not replenished to compensate for the N removed by the crop, the soil N pool diminishes with time (Smaling et al 1997). This depletion of soil resources has been ongoing for decades in sub-Saharan Africa at an estimated 22 kg N ha À1 (Bekunda et al 2010). N soil mining is an enormous threat to food security in sub-Saharan Africa (Smaling et al 1997). In developed countries, the N needed for crop growth is generally supplied in excess and by external sources such as inorganic fertilizers (Palm et al 2004), though soil mining might be relevant in extensive farming regions (Özbek and Leip 2015, Özbek et al 2016, Leip et al 2014b. A soil mining factor is defined as the kg N removed from the soil pool of N (rather than from externally supplied N) per kg N consumed in a food (table 1, figure 1).
The soil mining phenomenon is important because a significant portion of Tanzanian fields go without fertilizer as it is expensive and often hard to obtain (Sheahan and Barrett 2014). The National Sample Census of Agriculture 2007/08 reported that only 9% of smallholder Tanzanian farmers used inorganic fertilizers on their crops (NBS 2008). Growing without exogenous fertilizer leads to nutrient loss with each crop cycle. In Babati, Tanzania, 74% of fields had negative N balances (Kihara et al 2014) due to the lack of fertilizer.
Crops grown without fertilizers produce about half the yield of their fertilized counterparts (Carsky et al 1999). AGRA (2011) consistently found that maize given 30 kg ha À1 N fertilizer (a commonly recommended application rate) produced twice the grain as unfertilized crops. In another study, with application of fertilizer, yield was approximately doubled in maize and rice crops in sub-Saharan Africa (Yanggen 1998). Unfertilized crops, by necessity, draw N from the soil. This concept is represented by the following equation: If N yield,fertilized is the yield for the fertilized fields [kg N ha yr À1 ], f unfertilized is the percent of land that is unfertilized, and f yield is the factor comparing unfertilized to fertilized yields, then we obtain the average crop N yield as: Assuming that the N recovery rate for N released through soil mineralization is 100%, the proportion of soil mining N (thus N soilmining = N yield,fertilized Ã f yield Ã f unfertilized ), and that fertilized plots receive 100% of N (thus N fertilizer = N yield,fertilized Ã (1Àf unfertilized )), then: Available data suggest that the value for f yield is 0.5, as unfertilized fields produce half the yield of fertilized fields (e.g. Carsky et al 1999), and f unfertilized is 0.91, as 91% of farms are unfertilized (NBS 2008). The assumption is that those 9% of farms that do receive fertilizer receive enough to achieve the doubling in yield. Inserting these values in equation (2) yields 83%. Thus 83% of the N taken up by a given crop comes from soil reserves rather than inorganic fertilizer. To model soil mining due to insufficient fertilization, crop N uptake amounts were multiplied by 83%.
In the case of animal products that come from pasture-fed animals (cattle and other ruminants), there is some soil mining that occurs with grazing. Grasslands naturally have inflows and outflows of N due to biological N-fixation, leaching, and deposition, but adding cattle to the system adds a new loss pathway for the grassland, potentially leading to increased soil Environ. Res. Lett. 12 (2017) 034016 mining. Most N in the manure is returned to the grazing land. However, some of that N is lost due to volatilization in this process (approximately 34%: Brouwer and Powell 1998). To account for this type of soil mining, the portion of N derived from pastureland and excreted in waste is multiplied by a factor of 0.34.
It is important to clarify that virtual N factors and soil mining factors measure very different things. A high soil mining factor means a high proportion of N in the product comes from soil reserves. A high virtual N factor means that a high proportion of N used in production of said product is lost to the environment. The soil mining factor reflects the source of N, whereas the virtual N factor reflects how much N is lost to the environment. High virtual N and high soil mining factors can both be environmentally detrimental: a large amount of N is lost to the environment and soil N is depleted, respectively. Improvement efforts must strike a balance between providing enough N to avoid soil mining while also avoiding increased N loss to the environment. An increase in fertilizer additions could help reduce soil mining but at the same time increase the risk of N input losses, in particular once soil mining has been stopped and N input still increases. There may be an optimum soil management with both minimum soil mining and losses of external inputs.

Energy consumption
The N footprint of Tanzania is affected by energy consumption in several sectors: household energy use, transportation, food, and goods and services including infrastructure. The reactive N species released in fuel combustion is NO x (NO þ NO 2 ), which is an air pollutant at high concentrations. To calculate the overall energy N-footprint for Tanzania, the average per-capita consumption of each fuel type was multiplied by its NO x emission factor. For these calculations, NO x is assumed to be NO 2 .
Tanzanian households consume energy mostly in the forms of biomass, kerosene, and electricity. National-level data on residential energy consumption and the appropriate emission factors were obtained from the International Energy Agency (IEA 2010).
To calculate N released from transportation in Tanzania, the following assumptions were made: 1) that gasoline is consumed only by cars and that diesel fuel is only consumed by trucks and buses, and 2) that the average cars and trucks were 1990s models with over 100 000 miles. The latter assumption is based on observations of Tanzanian highways during the 2010 field study. The US EPA gives mileage estimates for fuel burned in vehicles of this age, so an estimate of the total miles traveled by cars and trucks can be calculated by starting with the total amount of gasoline and fuel burned (US EPA 1995). Other forms of transportation, such as air and rail, are not included in these calculations because of the low rates of use of these modes of transportation in Tanzania.

Indirect energy analysis
A top-down energy analysis considering indirect energy usage was conducted. This analysis was performed to ensure that all energy-related N emissions resulting from personal consumption patterns were accounted for, using the methodology developed by Leach et al (2013). This analysis included some aspects of food and transport related energy emissions as well as all goods and services sectors. An example of indirect energy consumption is the energy used to build infrastructure to bring electricity to homes.
The top-down energy N footprint was calculated using an environmentally extended input-output analysis, a technique which considers only the N emissions that happen within the bounds of a country and allocates them to personal consumption patterns (Kitzes 2013). To avoid double-counting N emissions, the bottom-up energy N emissions described in the above sections were subtracted from the N emissions calculated with this top-down calculation. The combined bottom-up and top-down approach is useful because it allows the bottom-up analysis to be interactive and to scale with the user's consumption, while the top-down analysis ensures that indirectly related energy N emissions are also included in the user's footprint.

Food nitrogen footprint
As shown in table 1, the VNFs for fertilized farms are all higher than or equal to those for unfertilized farms (except for milk, which is considered a byproduct of beef, and actually has a slightly higher VNF in an unfertilized scenario; the same explanation applied to eggs, which have the same VNF fertilized or unfertilized). It is reasonable that unfertilized VNFs would be lower than fertilized VNFs because unfertilized crops only take up the N needed for crop growth and do not have the losses associated with application of fertilizer. Fertilized wheat and rice have the highest VNFs of crops, and beef and milk the highest VNFs of animal products. Of unfertilized crops, vegetables had the highest crop VNF due to the low protein yield compared to grains. The combined VNFs were weighted based on the percentage yield produced from unfertilized crops (83%), so they generally reflect the same patterns as the unfertilized VNFs.
The soil mining factors (SMF) generally followed similar patterns to the VNFs, reflecting that crops and animal products that lose more N tend to also take up more N (table 1). Beef has the largest soil mining factor overall, and of crop products, vegetables and rice have the highest SMFs. Legumes (beans) have a SMF of zero because they fix their own N via biological N fixation. Fish has a SMF of zero because it requires no soil input.
Environ. Res. Lett. 12 (2017) 034016 The largest contributor to the Tanzania N footprint is the food production footprint, and in particular, virtual N losses. In Tanzania, the average consumption of N in food is 2 kg N yr À1 per capita. Energy used in the production of food adds 0.1 kg N yr À1 . Virtual N is by far the largest contributor to the food N footprint and the overall N foodprint. Overall, the per-capita food N footprint is 8.8 kg N yr À1 (table 2).
If all farms in Tanzania used fertilizer, the per-capita virtual N from food production would be 13.8 kg N yr À1 (figure 2). However if all farms were unfertilized, it would be only 5.3 kg N yr À1 . The weighted food virtual N footprint representative of Tanzania's current proportions of fertilized and unfertilized farms was found to be 6.7 kg N yr À1 .

Energy N footprint
The largest sector contributing to the energy N footprint is transportation energy (0.80 kg N capita yr À1 ), mostly due to public transit use (bus travel). Household energy consumption contributes 0.2 kg N capita yr À1 , and goods and services contribute 0.2 kg N capita yr À1 . The total energy N footprint is 1.3 kg N capita yr À1 .

Total nitrogen footprint
The average annual per-capita N footprint for Tanzania is 10 kg N (table 2). 88% of the N footprint is accountable to food production and consumption, with 67% of the N footprint from virtual N losses. Energy use contributes only 12% to the total N footprint.

Quality and uncertainty analyses
Studies of the environment and agriculture in Africa face the challenge of limited and contradictory data. To address data uncertainty, a sensitivity analysis of virtual N factor calculations was performed using maize and beef as representative food products. This analysis used the method developed by Leach et al (2013). Each variable used for each step of the production process was increased by 100% and the percentage change in the overall virtual N factor was recorded (see supplementary material).
The maize virtual N factor was most sensitive to the initial first two steps of the calculation: N uptake/loss (62% change) and food/crop residue (82% change). The beef virtual N factor was most sensitive to the animal/ manure step (58% change) and the carcass/slaughter waste steps (80% change). The sensitivity analysis was  extended to the overall Tanzania N footprint. 100% scaling of each calculation for the maize VNF resulted in 0% to 24% change in the total N footprint. 100% scaling of each calculation for the beef VNF resulted in 0% to 5% change in total N footprint. Confidence ratings were assigned to each data source used in factor calculations. The ratings ranged from 1-5 with 5 being a Tanzaniaspecific farm-level study, and 1 being an estimate based on observations from field work. The virtual N factors and overall N footprint showed relatively low sensitivity to percentage of recycled waste products. None of these manipulations produced a change of a single virtual N factor greater than 80% or a change in the total footprint above 24%. This analysis shows that while one factor can be significantly impacted by a change in variable data, it has a limited impact on the overall footprint.
Because the virtual N factors are calculated from six or more independent variables, the sensitivity of the factors to any one factor is limited. The virtual N factor method is strengthened by this characteristic because uncertainty in a single variable will not change a single virtual N factor significantly, and the effects are even more diffuse when considering the overall N footprint.
As demonstrated by the sensitivity analysis, one of the most important variables incorporated in crop virtual N factors is N uptake or use efficiency (NUE), a percentage value used as the N uptake/loss ratio step in calculating VNFs. For the purposes of this paper, the source of the nitrogen, whether inorganic or organic or how long it has been in the soil pool, does not make a difference in the NUE. Based on the available data, in smallholder farm systems it is impossible to separate fertilizer N sources from recycled N or N already in the soil from previous seasons. NUE values for rice and maize were obtained from Krupnik et al (2004) and are specific to farms in southern Africa. These values are 24% and 23%, respectively. These values compare reasonably to other sources: from Cassman et al (2002), NUE of rice in a typical Asian small operation farm was 31%. NUE of wheat from studies in India ranged from 18% in poor weather and fertilizer conditions to 50% in controlled farm experiments; the 18% NUE value for wheat is used in the VNF (Cassman et al 2002). Dobermann (2007) obtained theoretical NUE figures around 50% for staple grains, but the authors point out that from the limited onfarm studies, NUEs are substantially lower, in the 30%-40% range. It is more likely that the Tanzanian farms that have access to fertilizer achieve NUE resembling the on-farm studies.

Discussion
This paper presents the first N footprint model for a developing country, Tanzania. An important new concept for adapting the N footprint to a developing country is soil mining factors (section 4.1). Comparisons to other countries' N footprints found that Tanzania had by far the lowest N footprint (section 4.2). Finally, the development of this new model has identified strategies to reduce N losses in Tanzania (section 4.3).

Soil mining
Soil mining of nitrogen is a serious problem in developing countries. Soil mining provides one benefit (food production), while causing damage by both reducing soil fertility and mobilizing reactive N that then causes environmental problems. Incorporating the soil mining factors into the N footprint model is necessary to reflect the different nitrogen cycling problems that occur in developing countries.
Crop-specific studies in Tanzania show that the soil mining demands of most crops, on top of weatherrelated erosion of nutrients, far outweigh the deposition rate (5-10 kg N ha À1 ; Bobbink et al 2010). Brekke et al (1999) found that N extraction rates for common Tanzanian crops ranged from 20-50 kg N ha À1 , with erosion removing another 3-10 kg N ha À1 . Galy-Lacaux and Delon (2014) estimate that in wet savannah lands such as the majority of Tanzania, the annual atmospheric N deposition rate of 6-10 kg ha À1 is approximately balanced by atmospheric N emission rates of 9-10 kg ha À1 . Thus the atmospheric deposition cannot offset any crop-related N losses, especially compared to the considerable losses through soil mining. Soil mining is a very important aspect of the Tanzanian N landscape and is considered in detail in this paper. As exact soil mining loss rates are unknown, we assumed that the N recovery rate for N released through soil mining is 100%. Thus our estimate for the soil mining factor may underestimate actual soil mining in Tanzania.
Legumes are considered a soil mining-neutral crop. Grown in the small farming systems considered here, they have modest positive effects on soil N, though nitrogenous fertilizers added to the system may decrease the N fixation activity (Bekunda et al 2010). If legumes do contribute significant amounts of N to African soils, it may be over the course of many years (Carsky et al 1999). Small-holder farmers may lack the resources to rotate and manage legume crops effectively. For these reasons we do not assign legumes a significant positive contribution to the soil N balance. Nonetheless, legume cultivation can greatly benefit farming regions. A study in Babati, TZ showed that higher pigeon pea productivity was associated with lower soil mining, and areas devoted to growing pigeon pea are estimated to fix 54 kg N ha yr À1 on average (Kihara et al 2014). To model the significance of legume contributions in the N calculator, the legume category has a soil mining factor of zero and relatively low virtual N factor, indicating that legumes are an important food source with a much lower environmental cost than other protein sources. Environ. Res. Lett. 12 (2017) 034016 A soil mining factor is assumed to be valid until the soil eventually becomes effectively exhausted of nitrogen. Soil mining and the resulting decrease in soil nutrients has been occurring over decades; average rates of soil nutrient decline are reported in the literature (Bekunda et al 2010, Stoorvogel and Smaling 1990, Van der Pol 1992. As it is customary to use average annual rates of change in soil nutrients in these studies, it is reasonable to create a soil mining factor from these rates. This factor can be made year-specific by updating it with new data. Naturally, if soil fertility did experience complete exhaustion, the factor would become invalid. However this analysis assumes a state in which the system does not experience drastic change from year-to-year, though it is being gradually depleted. In addition, the time-to-collapse would depend greatly on the soil type and management system and rate of addition of new fertile farmland. When soil N stocks are exhausted or reduced, it is likely that some lands are taken out of production and replaced with new agricultural land obtained from deforestation. Deforestation rates in Tanzania are among the highest in the world; between 1990 and 2005 an estimated 412 000 ha per annum were cleared, equivalent to about 1.1% of the total forest area per year (Blomley and Iddi 2009). Thus for the current analysis we assume that constant annual soil mining factors are valid.

Comparison of Tanzania N footprint to other N footprints
When compared to the N footprints of developed countries (the United States and the Netherlands; Leach et al 2012), the per-capita N footprint of Tanzania is strikingly low at 10 kg N yr À1 capita À1 (figure 3). The USA holds the largest per-capita footprint at 39 kg N yr À1 (updates to Leach et al 2012), which is about four times the N footprint of Tanzania. For all countries, the largest portion of the footprint is food production.
The most significant differences between Tanzania's N footprint and the footprints of developed countries are in food production and consumption, especially consumption of protein. Tanzania is the only country depicted where the per-capita protein consumption is less than the WHO's estimated daily requirement of 75 g protein per average weight adult (Schönfeldt and Hall 2012). Low protein consumption is associated with lower N emissions from consumed food as well as low N emissions during the production of protein-rich foods. Tanzania has much smaller losses of N along the food production pathways due to the integrated, small-scale nature of the food system. The virtual N loss per-capita in Tanzania is less than half of USA virtual N loss. N footprints of food products calculated for countries of the European Union show values close to the data estimated for Tanzania only for Romania, Bulgaria, and Slovakia (Leip et al 2014a).
The Tanzania food production N footprint was split into fertilized and unfertilized farms (i.e. drawing N from soil mining), a calculation that has not been completed for any other country. The soil mined portion of the food production N footprint of Tanzania is much larger than that from fertilizer. This is because most of the food produced (83%) comes from unfertilized farms that mine soil N.
The Netherlands and Austria appear to have a lower N footprint associated with food consumption than Tanzania (figure 3). These low footprints are due Environ. Res. Lett. 12 (2017) 034016 to a very high level of sewage treatment that prevents much of consumed N from being released into the environment. Without this treatment, the N footprint due to food consumption would be comparable to other developed countries, and higher than Tanzania's food consumption N footprint.
In the USA, non-food related N emissions from transport, housing, and goods and services make up about 30% of the total N footprint. Tanzania has small energy, transportation, and goods and services consumption compared to the developed countries. In Tanzania these categories comprise less than 10% of the total N footprint due to lack of nationwide infrastructure, car ownership, modern building supplies, and home electricity. It is possible that energy-related N emissions will increase with economic development and urbanization in Tanzania.

Improvements based on the Tanzania N footprint calculator
The tools developed in this paper can be used to identify the areas that will yield the largest improvements in N efficiency for Tanzania. Virtual N factors and soil mining factors are themselves a tool for visualizing efficiency and environmental cost of foods relative to each other. Virtual N, as the N released by food production but not consumed in a food product, is a concept that targets the release of N into the environment. Soil mining, on the other hand, addresses the origin of food N and the amount of N pulled from soil reserves to meet crop demands.
The N Footprint (table 2) shows the largest sources of N emissions by sector. From this information it is clear which sectors to focus on to most effectively reduce overall emissions. Food production and consumption contribute 88% of the per-capita N footprint for Tanzania. From an environmental and economic perspective, it makes sense to focus efforts on food production with the goal of improving N efficiency and reducing waste. This method is also the best from a human health perspective, as improving efficiency can optimize nutrition. Increasing efficiency for farmers can lead to greater food yields, allowing a healthy level of protein consumption at less cost.
Tanzania has in place an integrated local food system that is in some ways more efficient than the industrialized agriculture of developed countries. Intensive recycling of organic wastes and limited use of inorganic fertilizer are the norm, and food preparation methods are frugal. This efficiency is by necessity, as farmers and householders are usually constrained by funds, climate, lack of infrastructure and fertilizer availability. However, because this relative efficiency is based on poverty rather than education and strategy, there is much room for improvement.
Ideally, farmers in Tanzania would be able to focus on growing crops and livestock with both low VNF and SMF values, or at least balance high-factor crops and animals with low-factor crops. Foods with low virtual N factors cause smaller amounts of released excess N that can cause environmental pollution. Foods with low soil mining factors contribute to food security because they do not exacerbate the problem of soil nutrient depletion. The virtual N factors and soil mining factors for each food (table 1) are valuable tools to use on both sides of the Tanzania N problem. Crops with the lowest VNFs include starchy roots, beans, and vegetables. Maize has a lower VNF than rice or wheat. Livestock with the lowest VNFs include small ruminants (goats and sheep), poultry and fish.
The VNFs indicate that it may be more N-efficient to keep chickens as long as possible for eggs (rather than using them for meat before they stop laying) because the VNF for eggs is slightly lower than that for poultry meat. This same relationship does not hold true for beef and milk, however.
The crop with the lowest SMF is beans, which have a SMF of zero because they add N to the soil through biological fixation. Of animal products, poultry and eggs have the lowest SMF, and small ruminants have a lower SMF than beef, making them a better choice for soil fertility preservation.
If possible given other limitations, it is ideal for Tanzanian farmers to focus their efforts on growing crops and animal products with lower SMF and VNF. Some of these choices could include choosing to raise goats instead of cows, maize instead of wheat, and adding crops of legumes to replenish the soil where possible, all would make a significant reduction in the N emissions and soil depletion of that farm. These changes would require education and training in the necessary skills, and potentially investment in the cost of changing small farms to a more efficient strategy.
It is acknowledged that there are other limiting factors that affect productivity: for example, phosphorus as a limiting nutrient in both nitrogen uptake efficiency and nitrogen fixation by legumes. Phosphorus is also a common deficiency in African soils (Coetzee et al 2016). The effect of deficiencies in phosphorus and other nutrients on nitrogen dynamics, while beyond the scope of this paper, could be explored in future work.
The development of Virtual N factors and soil mining factors breaks down the variables that make some crops and livestock less efficient than others, and offers insight into how individual crops and animal product types could be treated to increase their efficiency. As shown by the sensitivity analysis (section 3.4), the SMF and VNF for crops are most strongly affected by the growth of the crop: NUE and the portioning of N into the harvested fruit of the plant. NUE can be improved by growing more efficient seed strains that have higher NUE and portion more N into grain, and by using agricultural techniques that optimize fertilizer application and irrigation. The SMF and VNF for animal products are most sensitive to percentage of N lost in manure and during slaughter. Environ. Res. Lett. 12 (2017) 034016 Introducing more efficient breeds of livestock and reducing the N waste with improved meat processing techniques could increase the efficiency and lower the SMF and VNF of all animal products.
The Tanzania N Calculator could be used to translate the suggestions of agricultural research into clear estimates of the benefit to Tanzanian farmers. For example, Kihara et al (2014) suggest a technique of harvesting grain only instead of the practice of removing the entire plant. This practice could potentially lower both the SMF and VNF of a crop. If studied and modeled through the N Calculator, changing the appropriate components of the N factor for each crop, one could estimate the N savings on individual and region-wide scales due to this single change.
It is understood that Tanzanian farmers are already under significant constraints when it comes to their farming methods. This paper does not advocate making sweeping changes in agriculture, but rather gradually implementing strategies to reduce soil mining and shift towards low N-factor foods and other N-efficient changes. Capturing wastewater and processing it to use as a resource is possible, if appropriate measures are taken to protect public health. Farmers could be educated about the crops and livestock that are most N-efficient, saving them both time and money on fertilization. However, it is not expected that the burden of change will be on small farmers. For this reason, the Tanzania N-Footprint tool is primarily aimed at community leaders and organizations that are promoting development and agricultural policies, education in Tanzania and other developing countries. These organizations have an influence in the development goals of communities, subsidies promoting certain crops over others, and educational curriculums and media that reach farmers directly.

Conclusions
Nitrogen is both a limiting factor for food production and an environmental pollutant in Tanzania. A flexible, wise approach to N management is crucial for facing the challenge of producing sustainable amounts of food on increasingly infertile land. Many African countries face the same challenge of widespread subsistence farming, accelerating population growth, depleted soil nutrients and limited fertilizer availability. This paper and the N-Calculator concept is applicable to many other developing countries because of these similarities, and this approach can be further developed to be applied in other developing countries.
The Tanzania N-Calculator can be used to predict the effect of changes to the food and energy system. Since management resources are limited, the tool can show the points in the farming and food production process where efforts should be focused to reduce N loss. The tool can also point out what food products are most efficient to grow and which are the most wasteful in terms of nitrogen. Development organizations, policy makers, funders and other leaders can use the N-Calculator to help design educational and agricultural programs and policy recommendations. This N footprint tool adds to a global network of tools that will measure N footprints for communities and countries and highlight strategies for increasing N efficiency.