About nitrogen acidity in function groups
First of all, a terminology correction. While a nitrogen atom may be basic, a nitrogen atom itself won't be acidic, rather, the hydrogen atom attached to that nitrogen atom would be acidic, if at all.

Now, whenever given an arbitrary compound, and this also holds true for atoms like carbon, oxygen, etc., here's what you need to do to determine the acidic and the basic atoms.

What does acidity mean? Acidity means the ability to lose a proton from the compound. The higher the ability to lose a proton, the higher the acidity. If a compound, on losing a proton, forms a more stable conjugate base, it is considered more able to lose a proton. Hence, it is also more acidic (than other similar protons in that compound).

What does basicity mean? Basicity means the ability to donate a lone pair of electrons to a proton. The higher the ability to donate a lone pair to a proton, the higher the basicity. If a compound, on donating a lone pair, forms a more stable conjugate acid, it is considered more able to donate a lone pair. Hence, it is also more basic (than other similar lone pairs in that compound).

They both sound similar, don't they? That's because they're on the same underlying principle: a chemical species would want to accept a proton or donate a lone pair if the resulting species is more stable.

Now, you can simply check for this in any given compound by deprotonating every H-atom and protonating every lone pair, while applying the simple rules of aromaticity, resonance, hyperconjugation, and inductive effects individually to each.