Data visualization with SAS programming

Using SAS to create a spatial file for Tableau

Reply
Grand Advisor
Posts: 16,297

Using SAS to create a spatial file for Tableau

I have shape files that I need to get prepared for Tableau. I was hoping to find a way to do that in SAS.

I can import the files, and export it back to a CSV, but I'm having trouble getting the order variable correct.

This is the reference from Tableau I have regarding the file format required. 

Creating Tableau Polygons from ArcGIS Shapefiles | Tableau Software

Thanks for any help!

SAS Employee
Posts: 963

Re: Using SAS to create a spatial file for Tableau

I don't really know anything about using Tableau, but looking at the Tableau doc, it looks like they want your map polygon/border data to have a variable called ET_ORDER that shows the order in which to connect the points.

Once you import the ESRI shape file into SAS (using 'proc mapimport'), then you could add an ET_ORDER variable as follows:

data my_map; set my_map;

ET_ORDER=_n_;

run;

Of course, since you've already got the map imported into SAS, you might want to just use "proc gmap" (rather than Tableau) to plot the maps also! Smiley Happy

Grand Advisor
Posts: 16,297

Re: Using SAS to create a spatial file for Tableau

Is there a way to get online maps, such as google map or bing map as the base layer for a map in SAS?

SAS Employee
Posts: 963

Re: Using SAS to create a spatial file for Tableau

Yes - with a bit of "thinking outside the box" Smiley Happy

Here is an example where I download a tile-based map, and then annotate my lat/long points on it:

http://robslink.com/SAS/democd57/jordan_lake_paddling.htm

http://robslink.com/SAS/democd57/jordan_lake_paddling_info.htm

jordan_lake_paddling.png

Grand Advisor
Posts: 16,297

Re: Using SAS to create a spatial file for Tableau

OK. Here's my ideal scenario, which I don't think even Tableau can handle out of the box.

I have custom regions, in Canada.  I'd like to

1. Create a map that has a google/BING map underlay with my regions on top. I have my regions currently in a SHP file.

2. If a person clicks on a certain region the html tip or pop up displays the name of the region and a table appears (on the right or below) that shows some summary statistics for the area.

3. Overlay 6 different point types that show different location types that can be clicked on/off.

#3 is more of a nice to have than required at this point.

SAS Employee
Posts: 963

Re: Using SAS to create a spatial file for Tableau

Ahh - sounds like you need something more like this then (combining polygons with the tile map):

http://robslink.com/SAS/democd57/florida_hurricanes.htm

http://robslink.com/SAS/democd57/florida_hurricanes_info.htm

florida_hurricanes.png

Post a Question
Discussion Stats
  • 5 replies
  • 1069 views
  • 3 likes
  • 2 in conversation