VizWiz

Launch, grow, and unlock your career in data
Showing posts with label tile map. Show all posts

July 26, 2021

#MakeoverMonday 2021 Week 30 - America's Racial Breakdown by State

No comments

Makeover Monday week 30 looked at this viz from Visual Capitalist showing the percentage of each race in each State in America.

In the video below, you'll see my recreate the tiled treemap before creating a tiled bar chart. Thanks for watching!

Click here to view the interactive version on Tableau Public.



November 19, 2020

Pregnancy, Birth, and Abortion Rates in America

No comments

With Amy Coney Barrett being sped through the confirmation process of the US Senate before the 2020 Election (as hypocritical as it was) to become the 9th justice on the Supreme Court, there is now a conservative stranglehold on the judicial branch of government.

Justice Barrett deflected all questions about her stance on abortion during the confirmation process and it has raised lots of speculation that Roe v. Wade will be overturned. Yeah, you know, because the government should control a woman's body, yet there is nothing similar for men. Like, why doesn't a man get castrated if he accidentally impregnates a woman? Blasphemy they say; hypocritical I say.

I wonder if any of the anti-abortion Justice or Congresspeople have ever considered their stance if their daughter had an unplanned pregnancy. What is she got raped and pregnant? I bet their tune would change.

Anyway, my political and social views aside, this made me think about abortion rates in America. Since Roe v. Wade, abortion rates in the US have plummeted.


What the data tells us is that Roe v. Wade has actually led to a REDUCTION in abortions. It also shows us the shift towards women waiting later in their lives to have children. 

All of the data comes from the Guttmacher Institute (I'd highly recommend you read their insights), which I have compiled and prepared. You can download the data here.

The view I wished that the Guttmacher Institute had was a way to view regional trends, State trends and comparisons to U.S. and All Ages data. I decided to create a tile map showing the trends over time, which also allows you to include or exclude the US and All Ages totals. It's an interesting data set to explore. Start with your own age and where you live. What's the situation there?

This was a fun visualization to build and I would like to thank Seffana Mohamed-Ajaz for her feedback and suggestions of some minor tweaks.

Click on the gif below to interact with the visualization. There's an important story to tell and important rights of women to ensure are retained.

October 29, 2020

How to Create Time Series Tile Grid Maps

No comments

Unlike traditional maps, tile grid maps allow you to allocate equal space to each geographical area. We've probably all seen hex maps of the United States. Tile Grid Maps are similar, except they are squares with each block being the same shape and size.

In this video, I show you first how to create the tile grid map, then how to overlay time series data. I then show you three different visualization types for the time series. You could easily create bar charts as well.

Enjoy!

March 3, 2018

Creating Runkeeper Tile Maps with Alteryx & Tableau

No comments
A couple weeks ago, I demoed how to create tile maps of Runkeeper runs using Alteryx and Tableau. You can watch the recording here; I was the final speaker if you need to fast forward.

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:

  1. Login to Runkeeper
  2. Go to "Account Settings" from the gear at top right of the screen
  3. Choose the Export Data option on the left
  4. Select the date range
  5. Click on Export Data
  6. Unzip the files

To get all of your routes from Strava:

  1. Login to Strava
  2. Select "Settings" from the main drop-down menu at top right of the screen
  3. Select "Download all your activities" from lower right of screen
  4. Wait for an email to be sent
  5. Click the link in email to download zipped folder containing activities
  6. 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

    Since all of my files are in one place, this makes getting them all into Alteryx with a single input easy using a wildcard input. I've documented my workflow and you can download it here.


    Steps

    1. Input all of the files using a wildcard match for 2018 runs only.
    2. 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.
    3. 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.
    4. Create points for each GPS points and connect them to create a polyline. Do this for both the route itself and the boundary
    5. Calculate some summary stats for each run.
    6. Bring them all back together.
    7. 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.

    1. Double click the Geometry field to get a map
    2. Filter to a single month
    3. Place Weekday on the Columns
    4. Week on the Rows
    5. Add information for tooltips
    6. Add total monthly mileage to the caption
    7. 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:
    1. Leverage the strength of your team to help you solve a problem and to help you learn.
    2. Alteryx makes creating and working with spatial objects incredibly simple.
    3. Prepping the data exactly as you need it in Tableau will make the visualization process much faster.
    4. Data prep processes in R and Python make for great data prep exercises in Alteryx.
    5. 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 15, 2018

    Makeover Monday: U.S. Household Income Distribution by State

    No comments
    The viz this week comes from the Visual Capitalist. I used this data set for the final interviews for DS8 last week; it was quite impressive what people brand new to Tableau can create in just a week.


    What works well?

    • The ordering of the states by the highest income level from smallest to largest is easy to see.
    • The colors are all pretty distinct from each other (as I'm not color blind).
    • The colors seem like an intentional choice to go from red (low) to green (high) with steps of color in between.
    • The labels help add context to the stacked bars and they aren't distracting.
    • Including the data source

    What could be improved?

    • There's no indication as to which year this represents.
    • As it's not interactive, you can't sort by a different income level, therefore it's not easy to compare different states without reading the labels, which is slow.
    • Are there region differences? I can't tell from this view.

    What I did:

    • To be able to see regional trends, I included a tile map.
    • I used bars that represent the change since 2009 so that we could see which income groups grew and shrank the most.
    • I included context in the tooltips that show each income level for 2016 and the change since 2009 for the selected income level.
    • I added some annotations to aid understanding (thanks Eva for the idea).

    November 3, 2017

    Using Alteryx & Tableau to Visualize London Crimes by the Square Mile

    4 comments
    At the Data School, more often than not when Alteryx needs to be taught, I bring in people way better than me. Last week though, I wanted to give teaching spatial analytics a go. I'd been practicing with some exercises, felt like I was improving, and wanted to test my learning by teaching. If you don't know me, then it's important to understand that I am a massive believer that teaching a topic is the best way to learn it.

    One of the exercises we went through was taking two data sources, one with shapes and one with points, and creating a grid map. This requires the following as my workflow below demonstrates:

    1. Import shape files for each London borough
    2. Create 1x1 mile grids within each Borough (which turned out really cool because Alteryx accounts for the edges of each Borough)
    3. Import the London crimes data
    4. Create spatial points from the latitude and longitude fields
    5. Use the spatial match tool to determine the Borough in which each crime occurred
    6. Summarize the crimes
    7. Export as shape files
    8. Import into Tableau



    Practical exercises make concepts stick and this one worked for me. From this point, I created a simple interactive Tableau dashboard so people can find the areas near them with the most crimes.

    June 22, 2017

    Makeover Monday: Tiled Heatmap of U.S. Air Quality Levels

    No comments
    Yesterday I was at Exasol HQ trying to help them with their hackathon. I wasn't able to access their data for the hackathon, so I decided to do some testing for them with this week's Makeover Monday data set.

    I was very interested in looking at state-level air quality and built lots of heatmaps and originally built them in a single worksheet using table calcs to sort out which states go in which columns and rows.


    This didn't work for me, though, because it only helped me see the states alphabetically. It's much more intuitive if they are displayed geographically. An idea popped into my head...

    I wonder if I can combine a heatmap that looks at daily max reading by state across all years with a tile map.


    I quickly went to Matt Chambers' great post for how build tile maps added the secondary data source, blended it by state and replaced my crazy table calcs with a simple tile map view. What a fun exercise! I learned a ton and feel like I created a much more intuitive view. Does anyone recall every seeing a tiled heat map? Have I come up with a new chart type???

    Click on the image for the interactive version. Note that the viz might be slow to load as it's displaying about 460,000 marks.