As long as you can relay on file names and sorting those files in raw/data
by names in lexical order is equivalent of sorting them by their age, following solution would be enough:
DATAFILE:=$(lastword $(sort $(wildcard data/raw/*.json)))
all:
@echo The latest datafile is $(DATAFILE)
If not, you need to rely on operating system commands. For Unix system many implementations (certainly, the GNU one) support -t to sort by modification time. So it would be:
DATAFILE:=$(firstword $(shell ls -t data/raw/*.json))