I have a dataset that contains a latitude and longitude written like 20.55E and 30.11N. I want to replace these direction strings with an appropriate - where required. So basically, I'll map based on the condition and change the value.
Currently, I have a Schema
and I'm trying to sort out the TransformProcess
My Schema
is like this:
new Schema.Builder()
.addColumnTime("dt", DateTimeZone.UTC)
.addColumnsDouble("AverageTemperature" , "AverageTemperatureUncertainty")
.addColumnsInteger("City" , "Country")
.addColumnsFloat("Latitude" , "Longitude")
.build();
And I'm stuck with my TransformProcess
like this:
new TransformProcess.Builder(schema)
.filter(new FilterInvalidValues("AverageTemperature" , "AverageTemperatureUncertainty"))
.stringToTimeTransform("dt","yyyy-MM-dd", DateTimeZone.UTC)
. // map currentLatitude -> remove direction string and put sign
I am trying to follow this code from a tutorial and after the TransformProcess
, I'll do the Spark
stuff and save the data.
My question is:
How can I perform the mapping?
From the API docs of TansformProcess
, I cannot make sense of anything that will help me solve my problem.
I am using the Datavec library in Deeplearning4J