Hello for a bit of context here are some descriptions of the variables:

ano_nac is the year the birth occured
  • Years range from 2010-2019 (if it is relevant to anyone)
prov_nac is the province where the birth occured
  • Provinces are coded 1-32.
edama is the age of the mother at the time of the birth
  • Age ranges from 9-18 (I'm interested in seeing number of births for mothers under the age of 18).
Here is what I need help with:
  • Does anyone know of a code I could use to convert the numeric coded values of provinces (prov_nac) to list the actual province name. So for example, instead of an observation having a 1 under this variable it would name the actual province (e.g. Districto Nacional).
  • Does anyone know how I can create variables to collapse the number of observations. So instead of each observation referencing a particular birth (as it does now), an observation would reflect the number of births underwent by a mother of a particular age (let's say 17) born in a particular province in a particular year? Does this make sense? I can try to explain a bit further if people have questions.
Any help would be greatly appreciated!

Dataset example here:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input int ano_nac byte(prov_nac edama)
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2011 1 18
2011 1 18
2010 1 18
2011 1 18
2011 1 18
2010 1 18
2010 1 18
2011 1 18
2011 1 18
2010 1 18
2010 1 18
2011 1 18
2010 1 18
2010 1 18
2010 1 18
2011 1 18
2011 1 18
2011 1 18
2011 1 18
2011 1 18
2010 1 18
2011 1 18
2011 1 18
2011 1 18
2011 1 18
2011 1 18
2011 1 18
2011 1 18
2011 1 18
2011 1 18
2011 1 18
2011 1 18
2011 1 18
2011 1 18
2011 1 18
2010 1 18
2011 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 18
2010 1 17
2010 1 17
2010 1 17
2010 1 17
2010 1 17
2010 1 17
2010 1 17
2010 1 17
2010 1 17
2010 1 17
2010 1 17
2010 1 17
2010 1 17
2010 1 17
2011 1 18
2011 1 18
2012 1 18
2011 1 18
end