Showing posts with label spatial. Show all posts
May 4, 2023
Tableau Techniques for Top Notch Spatial Analytics
airlines
,
analytics
,
distance
,
emoji
,
how to
,
lines
,
London
,
mapping
,
path
,
rats
,
routes
,
shape
,
shapefile
,
spatial
,
tableau
,
tug
,
video
No comments
Looking to level up your data visualization skills? Enjoy this live stream from the April 2023 Analytics Tableau User Group (TUG) where I dive deep into spatial data analysis in Tableau!
In this session, I will walk you through the process of importing and visualizing spatial data in Tableau. You'll learn how to use advanced mapping techniques to create powerful and visually stunning visualizations that tell compelling stories with your data.
I cover everything from basic mapping to advanced geospatial analysis, so whether you're a seasoned pro or just getting started with Tableau, you'll walk away with a wealth of knowledge and practical tips you can apply to your own data analysis projects.
Don't miss this opportunity to learn from me and take your data visualization skills to the next level. Watch now and start unlocking the power of spatial data analysis in Tableau!
Download the workbook and data sources to follow along.
MEMBERSHIP PROGRAM
Join my exclusive membership program for data analytics and visualization professionals. The membership program provides unparalleled access to tutorials and templates, curated content, an online community, webinars, expert guest speakers and live training with me.
My program is the best platform to learn, grow, unlock your potential, and succeed in your career.
Sign up or express your interest @ andykriebel.com
May 4, 2021
How to Create a Layered Hex Map with a Spatial File
comparison
,
dual axis
,
hex in hex
,
hex map
,
how to
,
layering
,
layers
,
map
,
mapping
,
overlap
,
spatial
,
tableau
,
tip
No comments
In this tip, I show you how to use a spatial file to overlap hexagons on a map. This technique is much simpler, looks better, and is easier to maintain.
Typically when you want to create an overlapping hex map, you will use a template that has x/y coordinates for the rows and columns, hex shapes, then try to pack them together until they look just right. But then you put them into a dashboard and the sizes need to be adjusted again. What a pain!
Watch this tip to see the simple way to create layered hex maps.
RESOURCE: Hex map template via Joshua Milligan here
December 17, 2019
#TableauTipTuesday: How to Use Level of Detail Expressions to Find the Bounding Rectangle of a Line
boundaries
,
bus
,
latitude
,
level of detail
,
LOD
,
LOD calc
,
London
,
longitude
,
makepoint
,
route
,
spatial
,
Tableau Tip Tuesday
,
TfL
No comments
In this tip, I show you how to use level of detail expressions to find the boundaries of a line and turn it into a square by finding the ratio of each point on the line to the width and the height.
Note: A couple of the calculations were backwards in the video, so download the workbook to ensure you have them correct.
Note: A couple of the calculations were backwards in the video, so download the workbook to ensure you have them correct.
November 4, 2019
How Many Rats Are Near Hungry Cat?
And right after I taught this class to DS16, Lorna Eden posted the Workout Wednesday week 43 challenge. In this challenge, you had to find all casinos within X miles of a casino you click on. This required using the new DISTANCE function that came into Tableau 2019.3.1.
So, why not practice this technique more, but with rats? Instead of clicking on a casino, you can click on a rat to make it the Hungry Cat and find all rats within X miles of the cat. Silly, yes, and fun to practice too. The rats all have names too.
Lastly, I wanted to resize the dots based on the number of rats in the view. I used this blog post from The Data School, except I used an LOD instead of a table calc.
Enjoy! Find the rats near you.
September 13, 2018
Clayton Kershaw & My Learning Process
baseball
,
baseballsavant
,
clayton kershaw
,
density
,
heatmap
,
learning
,
major league baseball
,
pitcher
,
process
,
spatial
No comments
What is Learning?
According to UC Berkley, learning is a process that:
- is active - process of engaging and manipulating objects, experiences, and conversations in order to build mental models of the world (Dewey, 1938; Piaget, 1964; Vygotsky, 1986). Learners build knowledge as they explore the world around them, observe and interact with phenomena, converse and engage with others, and make connections between new ideas and prior understandings.
- builds on prior knowledge - and involves enriching, building on, and changing existing understanding, where “one’s knowledge base is a scaffold that supports the construction of all future learning” (Alexander, 1996, p. 89).
- is situated in an authentic context - provides learners with the opportunity to engage with specific ideas and concepts on a need-to-know or want-to-know basis (Greeno, 2006; Kolodner, 2006).
- requires learners’ motivation and cognitive engagement to be sustained when learning complex ideas, because considerable mental effort and persistence are necessary.
I've left a couple bits out that aren't relevant to learning in the context of data visualization, but all of the others should resonate with you if you approach learning with the correct mindset.
As an example, I am actively look for reasons to practice features in the Tableau 2018.3 beta, especially around density mapping. I was reading an article this morning about Clayton Kershaw, whom many consider the best pitcher in Major League Baseball. He also has highest base salary at $33M for 2018.
Most of the density maps I've seen have had a mapping component. In the case of baseball, and pitching in particular, the spatial zone is the strike zone. Data is easily accessible to get the coordinates of every pitch as it crosses home plate.
For this project, the learning process:
- is active in that I am building my knowledge as I explore the data set and learn the new features.
- builds on my prior knowledge of how the feature works and my knowledge of the game of baseball. However, I had never done a scatterplot of pitching before, so I had to learn new terminology in the data. This knowledge will help me be more productive and learn faster in the future.
- is situated in the authentic context of engaging with the ideas and visual concepts that I saw online and drew on paper.
- required my motivation and engagement to see the project through to fruition and the persistent to make the display visually accurate.
I hope my thought process helps you focus your learning. I love helping people get better at what they do and if I can help you speed up your learning, then we'll all be better for it.
With that in mind, here are two images I created for this project. The first is all pitches by Kershaw and the second is of his curveballs, which is known to be his most potent pitch. Once Tableau Public supports Tableau 2018.3, I'll publish them and include links on the images.
July 18, 2018
Financial Times Visual Vocabulary: Tableau Edition
alan smith
,
change over time
,
chart doctor
,
charts
,
correlation
,
deviation
,
distribution
,
financial times
,
flow
,
FT
,
magnitude
,
parts-to-whole
,
ranking
,
spatial
,
visual vocabulary
2 comments
Over the past month, I've been building all of these charts in Tableau so that everyone in the Tableau Community would have examples they could use and learn from. This has been quite the labor of love and I would like to thank the (best) team at The Information Lab for their support, reviews and feedback along the way.
There are 72 charts in total, most of which I built myself or with help of tutorials from the community. To build the violin plot, equalized cartogram, and heat map examples, I prepared the data in Alteryx and the output was shape files. The scaled cartogram was built using Tilegrams by Pitch Interactive based on this tutorial from Ken Flerlage.
While the people listed below may not have been the original creators of the charts, they are the resources I used to create the charts in my workbook.
Chart
|
Person
|
Link
|
|---|---|---|
| Diverging Stacked Bar | Steve Wexler | Data Revelations |
| Surplus/Deficit Filled Line | Jeffrey Shaffer | Data +Science |
| Violin Plot | Ben Moss | YouTube / Alteryx App |
| Sunburst Chart | Leonid Golub | Super Data Science |
| Arc Chart | Ken Flerlage | KenFlerlage.com |
| Venn Diagram | Leonid Golub | Super Data Science |
| Radar Chart | Adam McCann | Dueling Data |
| Scaled Cartogram | Ken Flerlage | KenFlerlage.com |
| Sankey Diagram | Leonid Golub | Super Data Science |
| Chord Diagram | Noah Salvaterra | DataBlick |
How to use this workbook
- Start on the Visual Vocabulary tab.
- Click on the text in any section to get to the chart types associated with that topic.
- To go back to the beginning, click on the Visual Vocabulary tab (NOTE: I'll add dashboard navigation buttons once Tableau releases that feature.)
- You should be able to swap your data out for any chart type fairly easily.
- Give credit to the creator of the chart as appropriate.
- If you want to see how that charts are built, email me and I'll we can have a chat.
Notes
- This is NOT meant to be an exhaustive list of charts that can be built with Tableau. This is based on the charts created by the Financial Times for the Visual Vocabulary.
- Actions are quite slow to respond on Tableau Public. If you download the workbook, it's much more responsive.
- There's a mobile version as well.
- Images of each set of charts can be found on Google Photos.
If you find what I've created useful, please share a link to this blog post to them. Any feedback you have is very much appreciated. Click on the gif below for the interactive version. Enjoy!
March 3, 2018
Creating Runkeeper Tile Maps with Alteryx & Tableau
In this post, I'll detail how I created the tile maps and share the workflow and visualizations. The inspiration for this project comes from Marcus Volz and his great github tutorial on how to create small multiple visualizations of your Strava runs, which I wrote about here. This was the viz that I created based on his R code:
When I visited The Information Lab France in January, we decided that we would try to replicate Marcus' process with Alteryx and Tableau because we wanted it to be an interactive visualisation, whereas Marcus' creates a static image. This process should work for Runkeeper, Strava or any fitness app that uses GPX files.
To get all of your routes from Runkeeper:
- Login to Runkeeper
- Go to "Account Settings" from the gear at top right of the screen
- Choose the Export Data option on the left
- Select the date range
- Click on Export Data
- Unzip the files
To get all of your routes from Strava:
- Login to Strava
- Select "Settings" from the main drop-down menu at top right of the screen
- Select "Download all your activities" from lower right of screen
- Wait for an email to be sent
- Click the link in email to download zipped folder containing activities
- Unzip the files
I actually don't follow either of these methods. I pay a small yearly fee for a service called Tapiriik that allows you to sync your fitness data with Dropbox.



ALTERYX WORKFLOW
Steps
- Input all of the files using a wildcard match for 2018 runs only.
- Assign a unique number to every row. In these files there's a GPS reading every second. Having a unique number makes creating the routes easier because you know the sequence.
- The next few steps are the magic part. These essentially give every route the same size as a square. We need them all to be the same size regardless of the actual geographical area covered.
- Create points for each GPS points and connect them to create a polyline. Do this for both the route itself and the boundary
- Calculate some summary stats for each run.
- Bring them all back together.
- Export as a SHP file.
TABLEAU VISUALIZATION
Once the shapefile is done, all you need to do is connect to it in Tableau. I created two visualizations. Click on the images for the interactive versions and to download the workbook.
1. Small Multiples
Like Marcus' viz, I created a view that spaces the runs based on the number of runs in the view. For example, in February, I recorded 22 runs, so I get a view with 5 rows and 5 columns. Each square has a route from the first run on the upper left to the most recent run in a Z pattern. There are additional details about each individual runs available on hover.
This view uses table calculations to determine the spacing.
2. Calendar View
The calendar is much simpler to create since it doesn't need any table calcs.
- Double click the Geometry field to get a map
- Filter to a single month
- Place Weekday on the Columns
- Week on the Rows
- Add information for tooltips
- Add total monthly mileage to the caption
- Resize the rows and columns to fit the window
LESSONS LEARNED
I'm nowhere near an expert in Alteryx. I know I can improve if I practice more. Here are five lessons learned I learned that I will be taking forward:
- Leverage the strength of your team to help you solve a problem and to help you learn.
- Alteryx makes creating and working with spatial objects incredibly simple.
- Prepping the data exactly as you need it in Tableau will make the visualization process much faster.
- Data prep processes in R and Python make for great data prep exercises in Alteryx.
- Fail fast and iterate quickly. Both Alteryx and Tableau allow you to try lots of things quickly without fear of breaking anything. Try something. If it doesn't work, try something else. Keep going until you've nailed it.
January 17, 2018
Creating Maps With Linear Geometries in Tableau
This blog post is a couple months late as Tableau added support for linear geometries in version 10.4. So what are linear geometries? Essentially the are spatial files that are represented as a single line.
For example, let's say you have a series of locations that represent train stops. In Tableau you can draw the route by connecting the dots via the line shelf. This will result in marks for every station. If the route is a linear geometry (or linestring) instead, it is represented in Tableau as a single mark, meaning the viz will load much faster.
This is useful if you each point isn't important and you care more about the path itself. To help me understand how these work I downloaded shapefiles from the US Census, github and Transport for London. Each of these was a linear spatial file already, meaning I could connect with Tableau and go.
If I had a series of points, like the train stops example, I could use Alteryx to convert them to spatial points, create the path and export as a shapefile.
With that, here are a few example I've built using linear geometries and custom Mapbox maps. Note that the maps may be slow to load in Tableau Public. I'm not sure why because they're super fast in Desktop. Enjoy!
For example, let's say you have a series of locations that represent train stops. In Tableau you can draw the route by connecting the dots via the line shelf. This will result in marks for every station. If the route is a linear geometry (or linestring) instead, it is represented in Tableau as a single mark, meaning the viz will load much faster.
This is useful if you each point isn't important and you care more about the path itself. To help me understand how these work I downloaded shapefiles from the US Census, github and Transport for London. Each of these was a linear spatial file already, meaning I could connect with Tableau and go.
If I had a series of points, like the train stops example, I could use Alteryx to convert them to spatial points, create the path and export as a shapefile.
With that, here are a few example I've built using linear geometries and custom Mapbox maps. Note that the maps may be slow to load in Tableau Public. I'm not sure why because they're super fast in Desktop. Enjoy!
Subscribe to:
Posts
(
Atom
)



