How to convince a journal editor that my paper is not a duplicate?
Just enumerate in which ways the two papers actually differ. As you already do in your question above: they differ in (i) contents, (ii) purposes, (iii) data sets. 

The reviewer may of course still think that these differences are not large enough to warrant a second paper. In that case, you need to reconsider whether you actually think that the second paper can stand alone. But your first step is articulating how you think the two papers are different.