Q:

What are all the nutrients in the USDA composition API?

I am working on a data visualization app using the USDA API. I am pulling the foods and extracting the nutrients, of which there are usually 90-150 different values. I want to get a sum of different groupings of nutrients, but am not sure what goes in each group as the IDs jump around. 
For example, I am not sure if Minerals should use IDs 301-317 or [301, 303, ... 312, 315, 317]. 
Is there a location with all these nutrients and IDs laid out in english? I've checked the nutrient list/search and the PDF description in the full USDA ACCESS database download but haven't been able to find what I'm looking for.

Edit: I could use their groups to process summations, but unfortunately there is repeated data in some nutrient groups. For example, I believe there are individual isoflavone fields and a 'Total Isoflavone' field, summing would double count.

A:

You can see all the nutrition information on the USDA's SR28 reference guid here, page 16.
I used usda-sqlite to process the data into SQLite. Then uploaded it to https://sqliteonline.com/ and ran custom SQL commands.
SQL

SELECT * FROM  nutrient; - print out all the potential nutrients & their data. Yay!
SELECT Count(*) FROM  food; - 8789
SELECT Count(*) FROM  food where food_group_id !=300 and food_group_id !=3500 - 8257 - Exclude all baby food and Native American food
SELECT id FROM  food; - [ [food.id] ]
SELECT id,long_desc FROM  food; - [ [food.id, food.long_desc] ]
SELECT id,name FROM  nutrient; - [ [nutrient.id, nutrient.name] ]
SELECT count(*),food_group.name FROM food inner join food_group on food.food_group_id=food_group.id group by food_group_id; - the count of all the foods in each food group

Every food's serving size, if it has one
SELECT 
  food.id,
  food.long_desc,
  gm_weight
FROM  food 
INNER JOIN weight ON weight.food_id=food.id
where weight.description=='serving';

Nutrient amounts per 100g of food
SELECT 
  food.id,
  nutrient.name,
  nutrition.amount
FROM  nutrition 
INNER JOIN food ON nutrition.food_id=food.id 
INNER JOIN nutrient ON nutrition.nutrient_id=nutrient.id;

Post processing
You can export this data to JSON and do further processing, like indexing. 
Example: After exporting to JSON (use the button in the top left) the final example returns an array of [food.id,nutrient.id,nutrition.amount] for every food matching the WHERE clause. You may want to index this to speed up searches and cut down on file size (otherwise there's lots of repeat food.id data in those arrays). After doing this my JSON reduced from ~10MB to 7.0MB.
    let b = Amt.reduce((total, curr) => {
        const foodId = curr[0];
        const nutrientId = curr[1];
        const amt = curr[2];
        const foodIsNew = !(foodId in total);
        if (foodIsNew) total[foodId] = {};
        total[foodId][nutrientId] = amt;
        return total;
    }, {})
    console.log(JSON.stringify(b)); //note this add " characters to the beginning and end when printing to the console

Update
It looks like the available SQL is out of date with respect to what's available on the FDA API. I wrote a script to plug into the API and grab all the nutrient names and shove them all into one object. This is the result:
{
    "203": "Protein",
    "204": "Total lipid (fat)",
    "205": "Carbohydrate, by difference",
    "207": "Ash",
    "208": "Energy",
    "209": "Starch",
    "210": "Sucrose",
    "211": "Glucose (dextrose)",
    "212": "Fructose",
    "213": "Lactose",
    "214": "Maltose",
    "221": "Alcohol, ethyl",
    "255": "Water",
    "257": "Adjusted Protein",
    "262": "Caffeine",
    "263": "Theobromine",
    "268": "Energy",
    "269": "Sugars, total",
    "287": "Galactose",
    "291": "Fiber, total dietary",
    "301": "Calcium, Ca",
    "303": "Iron, Fe",
    "304": "Magnesium, Mg",
    "305": "Phosphorus, P",
    "306": "Potassium, K",
    "307": "Sodium, Na",
    "309": "Zinc, Zn",
    "312": "Copper, Cu",
    "313": "Fluoride, F",
    "315": "Manganese, Mn",
    "317": "Selenium, Se",
    "318": "Vitamin A, IU",
    "319": "Retinol",
    "320": "Vitamin A, RAE",
    "321": "Carotene, beta",
    "322": "Carotene, alpha",
    "323": "Vitamin E",
    "324": "Vitamin D",
    "325": "Vitamin D2",
    "326": "Vitamin D3",
    "328": "Vitamin D (D2 + D3)",
    "334": "Cryptoxanthin, beta",
    "337": "Lycopene",
    "338": "Lutein + zeaxanthin",
    "341": "Tocopherol, beta",
    "342": "Tocopherol, gamma",
    "343": "Tocopherol, delta",
    "401": "Vitamin C",
    "404": "Thiamin",
    "405": "Riboflavin",
    "406": "Niacin",
    "410": "Pantothenic acid",
    "415": "Vitamin B-6",
    "417": "Folate, total",
    "418": "Vitamin B-12",
    "421": "Choline, total",
    "430": "Vitamin K (phylloquinone)",
    "431": "Folic acid",
    "432": "Folate, food",
    "435": "Folate, DFE",
    "454": "Betaine",
    "501": "Tryptophan",
    "502": "Threonine",
    "503": "Isoleucine",
    "504": "Leucine",
    "505": "Lysine",
    "506": "Methionine",
    "507": "Cystine",
    "508": "Phenylalanine",
    "509": "Tyrosine",
    "510": "Valine",
    "511": "Arginine",
    "512": "Histidine",
    "513": "Alanine",
    "514": "Aspartic acid",
    "515": "Glutamic acid",
    "516": "Glycine",
    "517": "Proline",
    "518": "Serine",
    "521": "Hydroxyproline",
    "573": "Vitamin E, added",
    "578": "Vitamin B-12, added",
    "601": "Cholesterol",
    "605": "Trans Fat",
    "606": "Saturated Fat",
    "607": "4:0",
    "608": "6:0",
    "609": "8:0",
    "610": "10:0",
    "611": "12:0",
    "612": "14:0",
    "613": "16:0",
    "614": "18:0",
    "615": "20:0",
    "617": "18:1 undifferentiated",
    "618": "18:2 undifferentiated",
    "619": "18:3 undifferentiated",
    "620": "20:4 undifferentiated",
    "621": "DHA",
    "624": "22:0",
    "625": "14:1",
    "626": "16:1 undifferentiated",
    "627": "18:4",
    "628": "20:1",
    "629": "EPA",
    "630": "22:1 undifferentiated",
    "631": "DPA",
    "636": "Phytosterols",
    "638": "Stigmasterol",
    "639": "Campesterol",
    "641": "Beta-sitosterol",
    "645": "Monounsaturated Fat",
    "646": "Polyunsaturated Fat",
    "652": "15:0",
    "653": "17:0",
    "654": "24:0",
    "662": "16:1 t",
    "663": "18:1 t",
    "664": "22:1 t",
    "665": "18:2 t not further defined",
    "666": "18:2 i",
    "669": "18:2 t,t",
    "670": "18:2 CLAs",
    "671": "24:1 c",
    "672": "20:2 n-6 c,c",
    "673": "16:1 c",
    "674": "18:1 c",
    "675": "18:2 n-6 c,c",
    "676": "22:1 c",
    "685": "18:3 n-6 c,c,c",
    "687": "17:1",
    "689": "20:3 undifferentiated",
    "693": "Fatty acids, total trans-monoenoic",
    "696": "13:0",
    "697": "15:1",
    "710": "Daidzein",
    "711": "Genistein",
    "712": "Glycitein",
    "713": "Total isoflavones",
    "714": "Biochanin A",
    "715": "Formononetin",
    "716": "Coumestrol",
    "731": "Cyanidin",
    "734": "Proanthocyanidin dimers",
    "735": "Proanthocyanidin trimers",
    "736": "Proanthocyanidin 4-6mers",
    "737": "Proanthocyanidin 7-10mers",
    "738": "Proanthocyanidin polymers (>10mers)",
    "740": "Petunidin",
    "741": "Delphinidin",
    "742": "Malvidin",
    "743": "Pelargonidin",
    "745": "Peonidin",
    "749": "(+)-Catechin",
    "750": "(-)-Epigallocatechin",
    "751": "(-)-Epicatechin",
    "752": "(-)-Epicatechin 3-gallate",
    "753": "(-)-Epigallocatechin 3-gallate",
    "758": "Eriodictyol",
    "759": "Hesperetin",
    "762": "Naringenin",
    "770": "Apigenin",
    "773": "Luteolin",
    "785": "Isorhamnetin",
    "786": "Kaempferol",
    "788": "Myricetin",
    "789": "Quercetin",
    "794": "(+)-Gallocatechin",
    "851": "ALA",
    "853": "20:3 n-6",
    "855": "20:4 n-6",
    "856": "18:3i",
    "857": "21:5",
    "858": "22:4"
}

