reworked to_geojson functionality into 3 sep fxns
added magrittr as an import to allow use of pipes