I've currently hit a dead end with a data cleaning problem in R.
I've used the R package googleways to reverse geocode some lat long values with the code
smallsample$address <- apply(smallsample, 1, function(x){
google_reverse_geocode(location = [login to view URL](c(x["[login to view URL]"],
x["[login to view URL]"])),
key = "xxx")
})
It produces a series of nested lists inside the $address column of the smallsample data frame. The list is from the google maps API.
One of the nested lists is as follows:
smallsample$address$`2620`$results$address_components[[1]]
long_name short_name types
1 2 2 street_number
2 Peacock Street Peacock St route
3 Brunswick West Brunswick West locality, political
4 Moreland City Moreland administrative_area_level_2, political
5 Victoria VIC administrative_area_level_1, political
6 Australia AU country, political
7 3055 3055 postal_code
where 2620 is the row name.
I'm interested in creating new variables in the original smallsample dataset that contains the list "types" as column names and the values of "long_name" as values.
Please note that you cannot assume that the google API will return the exact same "type" values for each ping of the API.
If you accept then I will send you the original R file.
I can assist you in cleaning up and reformating the data into the required structure using R.
Relevant Skills and Experience
I have extensive experience using R for data acquisition, cleaning, preprocessing, statistical analysis and machine learning.
Proposed Milestones
$155 AUD - On completion
Stay tuned, I'm still working on this proposal.
The delivery date and budget are a guide only. May change depending on the complexity/simplicity of the problem. Interested to know more.
Relevant Skills and Experience
Master in data manipulation and analysis using R. Have experience in working with maps data.
Proposed Milestones
$30 AUD - Understanding the project thoroughly
$130 AUD - Final deliverable
Is creating new variables included in the project? What do you mean types changes at each ping?