BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ptimusk
Obsidian | Level 7

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?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ptimusk
Obsidian | Level 7

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

6 REPLIES 6
Reeza
Super User

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

 

https://ifttt.com/gmail

ptimusk
Obsidian | Level 7

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.

Reeza
Super User

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

ptimusk
Obsidian | Level 7

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.

ptimusk
Obsidian | Level 7

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.

ptimusk
Obsidian | Level 7

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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