Controlling data completeness
In practice, it often happens that data is missing for some reason. If you take Mathematica's data about the countries of the world, not all of them will have updated information on population, GDP, and other parameters. In order to check the data for completeness, you can use the Missing
function:
This formula computes how many countries do not contain the information of the PopulationGrowth
parameter. The M
ap function substitutes as an argument of the CountryData
function values for all the countries that are stored in the database. The _Missing
filter computes only those countries whose information is missing.
Note
There is also a short form of the Map
- Map[f,{a,b,c}]
function that can be written as f/@{a,b,c}
. The result in both cases will be {f[a],f[b],f[c]}
.
To prevent missing data that affects statistics, you can use the DeleteCases
function:
Thus, all the data used by Mathematica to find the PopulationGrowth
parameter values and that fail to do this will...