For a group of $2n$ $(n\geq1)$ knights and knaves satisfying the puzzle conditions, there must be exactly $n$ knaves. Moreover, all knaves must occupy the first $n$ positions in the row (left to right direction)
We can provide a very elegant proof of this fact by considering this situation if there were $2n$ people in a row. Clearly, for $n\geq 1$, there is at least one knight and one liar, as otherwise the situation would obviously be untrue. From this, consider the leftmost person - there are no liars to his left (which is obviously not more than the number of knights to his right). Thus, he is a liar. The rightmost person obviously has no knights to his right and at least that liar to the left - so he must be a knight.
How do we use this? Take the original $2014$ people. The leftmost is a liar, the rightmost is a knight. If we exclude these two people, we don't modify the situation - we've removed a liar from the left and a knight from the right, so everyone's counts on both sides decrease by one. Thus, we have the $2012$ people in the middle remaining - and the leftmost must be a liar and the rightmost is a knight. Remove them. There are now $2010$ people left. We continue in this manner, pairing liars and knights and, at the end, we have proven that the 1007 leftmost people were liars and the 1007 rightmost were knights.
We can generalize this answer to handle the case where there are $n$ people and we ask everyone in the line whether there there are more knaves to their left than knights to the right and receive a "yes" or "no" answer from each person. In particular, let's consider cases:
If the leftmost person in line says "no", he is a knight (since there are no knaves to his left). We can remove him without affecting the relevant counts of everyone else, so this reduces it to the $n-1$ person case.
If the leftmost person says "yes" and the rightmost says "no", then both are knaves; we can safely remove the rightmost one without affecting anyone's counts.
- If the leftmost and rightmost people say "yes", then the leftmost is a knave and the rightmost is a knight; we can remove both people, decreasing everyone's count by $1$ on both sides and not affecting their answers.
Therefore, every case can be reduced to a smaller case and we can thusly identify everyone.
A more elegant proof of the same more general fact as in the previous section is that there must be some $k$ such that the first $k$ people have more knaves to their left than knights to the rest, and this is not true for the rest of the people. This $k$ satisfies that must be more knaves (who answer "yes") among the first $k-1$ as knights (who also answer "yes") among those at position $k+1$ and beyond and that there must be at least as many knights (who answer "yes") in positions $k+2$ and beyond as knaves among the first $k$ (who answer "yes").
This is to say, if you proceed through the line left to right and receive the answer "yes" $2c+1$ times, then everyone before the $c^{th}$ person to say "yes" had fewer knaves to their left than knights to their right and everyone after had the opposite - this suffices to figure out who lied, as you know the truth. Similarly, if you get an answer of "yes" $2c$ times, then the $c^{th}$ person (and everyone before, but no one after) had fewer knaves to their left than knights to their right.