DATA Step, Macro, Functions and more

GIS analysis: How can I parse gmail files that contains lat/long and then display on a GIS

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 75
Accepted Solution

GIS analysis: How can I parse gmail files that contains lat/long and then display on a GIS

[ Edited ]

Background to the problem

 

There is a game I have started playing that sends out gmails when the other team takes actions. It is a sort of capture the flag game between two teams. The game is called Ingress and the actions play out on the real world's maps from Google with game pieces that tend to be things like monuments, churches, artist painted wall murals, statues and other things that you might want to see in the physical environment. You need to get within 30 meters of these points on the map/real world then play the game with the location on your GPS enabled cell phone with the Ingress app. Then the other team will come along and basically try to take back the location for their team. This is an exercise type game as much of it requires one to walk to the locations in the real world.

 

The first part of the problem: Parsing the e-mails/gmail notifications for time and location or other info.

 

Every time a location you have captured is attacked you get a gmail notification. The problem I want to solve is parsing the latitude and longitude of the location out of these gmails and may be the location name and the time the attack happened. I want to say, go through every gmail ever received from the game and make a complete dataset perhaps using PROC JSON to get the gmail info.

 

The rest of the problem is not too difficult but I would be interested to see examples of how others GIS map movement or paths and how best to display this?

 

 


Accepted Solutions
Solution
‎03-31-2017 02:29 PM
Frequent Contributor
Posts: 75

Re: GIS analysis: How can I parse gmail files that contains lat/long and then display on a GIS

[ Edited ]

Gmail and Google allow archiving data. I was able to move all the e-mails into one folder and archive these as an mbox file which is just a text file. This was easy to import into SAS and then parse for the URL's I was looking for. Now  I move on to using an API in SAS to access these URL's in some systematic fashion hopefully making a moving 2 dimensional map display of the the game play that has occured.

View solution in original post


All Replies
Super User
Posts: 17,750

Re: GIS analysis: How can I parse gmail files that contains lat/long and then display on a GIS

I love SAS but wonder if this isn't better achieved via IFTTT

 

https://ifttt.com/gmail

Frequent Contributor
Posts: 75

Re: GIS analysis: How can I parse gmail files that contains lat/long and then display on a GIS

[ Edited ]

That's interesting that IFTTT and it may take me a while to figure out what it is and how powerful it could be.

 

For me doing a game example in SAS and may be presenting the solution at the user group will allow a business user to adapt it to  business problem.

Super User
Posts: 17,750

Re: GIS analysis: How can I parse gmail files that contains lat/long and then display on a GIS

I'd probably use IFTTT to parse out the data and then SAS to process it. Curious to see where you take this Smiley Happy

Frequent Contributor
Posts: 75

Re: GIS analysis: How can I parse gmail files that contains lat/long and then display on a GIS

[ Edited ]

IFTTT did not have a robust enough application. I tried it it but it did not manage to get much of the e-mail and was too basic.

Frequent Contributor
Posts: 75

Re: GIS analysis: How can I parse gmail files that contains lat/long and then display on a GIS

It looks like Google have an API for Gmail I can use.

 

https://developers.google.com/gmail/api/

 

Now to read some SAS blogs and write some code.

Solution
‎03-31-2017 02:29 PM
Frequent Contributor
Posts: 75

Re: GIS analysis: How can I parse gmail files that contains lat/long and then display on a GIS

[ Edited ]

Gmail and Google allow archiving data. I was able to move all the e-mails into one folder and archive these as an mbox file which is just a text file. This was easy to import into SAS and then parse for the URL's I was looking for. Now  I move on to using an API in SAS to access these URL's in some systematic fashion hopefully making a moving 2 dimensional map display of the the game play that has occured.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 353 views
  • 3 likes
  • 2 in conversation