Section 1 .windows.net
Day 3 - Time-Series Data and Dashboard Design in TableauThis lesson covers:Sets and Parameters Pt. 2; Select Dimension/Measure; Creating DashboardsCreate a dashboard to view migration and population projections by County or LDDContents TOC \o "1-3" \h \z \u Section 1 PAGEREF _Toc55516241 \h 2Getting Started – Loading Population Projections Data PAGEREF _Toc55516242 \h 2Getting Started – Saving our Workbook PAGEREF _Toc55516243 \h 5Getting Started – Preparing our Data PAGEREF _Toc55516244 \h 8Getting Started – Understanding our Data PAGEREF _Toc55516245 \h 12Section 2 PAGEREF _Toc55516246 \h 14Formatting our Projections Chart PAGEREF _Toc55516247 \h 14Creating a Zoomable Chart PAGEREF _Toc55516248 \h 17Section 3 PAGEREF _Toc55516249 \h 23Adding Components to our Dashboard PAGEREF _Toc55516250 \h 23Section 1Reference the “County Outflow and Population Projections Part 1” Tableau workbook for this section.If using Tableau public, that file will be made available to you for the training at HERE.Getting Started – Loading Population Projections DataOpen the Tableau workbook entitled “County Outflow and Population Projections Start”. It’s the same file as we finished on yesterday “2017-2018 County Outflow Migration Data Part 5”If you’re using Tableau Public, you can find a version of the file HERE.Navigate to the Data Source sheet -> Under Connections select Add -> Text File.If using Tableau Public: you’ll need to re-connect to the data in the Day 2 folder titled “County Outflow 17-18”We will use this base file and join it to the “Population Projections” data in the Day 3 folder so that we can create a Migrations and Population Projections Dashboard.Next to “County Outflow 17-18.csv” select the dropdown menu -> +New Data Source.In the New Data Source window, select Text File.In the Windows explorer, navigate to where you downloaded the course materials, and select the file entitled “Population Projection”.“Population Projection” data should load to the Data Connection pane.DETOUR: We could join our two files – Below are the Steps for joining Population Projections with our Migrations DataI don’t recommend this because we do not need to join the datasets to create our intended visualization.It would be a one-to-many join, where data from one of the Migrations data rows would populate many of the Projections data rows, because of the year variable.We won’t cover this during the course, but I included instructions on how to join data for your pleasure.Navigate to the Data Source sheet -> Under Connections select Add -> Text File.In the Windows explorer, navigate to where you downloaded the course materials, and select the file entitled “Population Projection”.Population Projection should appear under Connections. Double-click “County Outflow 17-18.csv” in the Data Connections Pane.Under Files select “Population Projection” and drag it to the Data Connections pane.A Venn Diagram to join the data should appear.The Venn Diagram won’t necessarily appear in Tableau Public.In the Data Source under “County Outflow 17-18.csv”, where it says Add new join clause, select “Y1 State + County FIPS” in the dropdown.In the Data Source under “Population Projection.csv”, where it says Add new join clause, select “State + County FIPS” in the dropdown.Press the red x in the top-right corner to exit out of the join selection window.Getting Started – Saving our WorkbookFor Tableau Desktop UsersUnder “Connection” in the top-right corner, select “Extract”Your workbook will now refreshIn the top-left menu, select File -> Save As, and either save your workbook as a “Tableau Workbook” or a “Tableau Packaged Workbook”Packaged workbooks save the extract with the Tableau file. Its best to use this file type when sharing your data with other people so the data connection is maintained.Workbooks save the extract in a separate location. Its best to use this file type when your workbook is saved in the same file location. The data connection has to be refreshed when the file or data source (extract) is moved.Extracts allow our data to load faster, but are a static query (snapshot of data). Live connections automatically refresh data in real time.If you save your file as a workbook, you’ll be prompted to save the data extract as a hyper file. Save the file in an easy-to-reference location.If you save your file as a packaged workbook, Tableau will prompt you to save the extract.Save your workbook as “2017-2018 County Outflow Migration Data” or another convenient name.For Tableau Public UsersTableau Public doesn’t allow you to create an extract of your data, and only allows you to save the view of the data. However, we can still save our work to our Tableau Public page.You’ll want to save your file to Tableau Public AFTER you’ve created some visualizations.Go to any sheet in your workbook.In the top-left corner, select File -> Save to Tableau Public As.You’ll then be prompted to sign into your Tableau Public account.Save your workbook as “2017-2018 County Outflow Migration Data” or another convenient name when prompted.Your visualization should now open in the browser.Select “Edit Details” to edit the file’s information as desired.Navigate back to your profile page. Here you can set the access settings for your visualization.Hide your visualization by clicking the “eye” symbol.Download your visualization by clicking the “box and down-arrow” symbol.Getting Started – Preparing our DataNow that we’ve loaded our Population Projections data, open a new sheet and entitle it “Projections Chart”.In the Data Pane, make sure the “Population Projection” and NOT the “County Outflow 17-18” data is selected.First, we need to create sets that filter down County and Economic Development District to the selected parameter.Create a calculated field by selecting the drop-down menu next to the search bar in the data pane, or right-click empty space in the data pane.Title your field “County State”. Enter the following text -> Apply -> Ok.[County Name] +", "+ [State Abbreviation]Right-click “County State” -> Create -> Set -> entitle the set “County State Set” -> select the Condition tab -> By Formula -> and enter the following formula -> Ok. Right-click the “Economic Development District” dimension -> Create -> Set -> entitle the set “Economic Development District Set” -> select the Condition tab -> By Formula -> and enter the following formula -> Ok.We’re now going to create a calculated field that rotates between the two sets and the two dimensions, “County State” and “Economic Development District”Create a new calculated field entitled “Geography Selection”Select the dropdown to the left of the Data Pane search bar or right-click the Data Pane -> Create Calculated Field.Title the field “Geography Selection” -> Enter the following formula -> Apply -> Ok.IF [County State Parameter] = "All" THEN [Economic Development District]ELSE [County State] ENDDrag “Geography Selection” to the Rows card.Drag “Geography Selection” to the Rows card. We could skip these steps and instead use “County State” and a calculated field to select between sets that change between a filter that selects all of an EDD’s counties or a single county, based on the selection. This would show us projections data by county in the EDD.Now we’ll create our calculated field to rotate between sets.Create a new calculated field entitled “Geography Set”Select the dropdown to the left of the Data Pane search bar or right-click the Data Pane -> Create Calculated Field.Title the field “Geography Set” -> Enter the following formula -> Apply -> Ok.CASE [Geography Selection]WHEN [Economic Development District] THEN [Economic Development District Set]WHEN [County State] THEN [County State Set] ENDDrag “Geography Set” to the Filters card -> Select “True” -> Apply -> Ok.Now our data should filter to the selected EDD or County.We can test this by clicking between the two in the “EDD to County Drilldown” dashboard.Ctrl-select “Year” and “Population” => Select the Show Me pane -> lines(continuous).“Year” should populate the Columns mark, “SUM(Population)” should populate the Rows mark, and “Geography Selection” should move to the Colors mark.Getting Started – Understanding our DataNow that we’ve prepared our data, let’s take a moment to better understand the Population Projections dataset.DimensionsCensus CBSACBSA in which population group was located. Joined from a geography lookup file.County StateVariable we created that joins County and State to match with our existing parameter.County State SetVariable we created to filter “County State” according to our existing parameter.Economic Development DistrictVariable that identifies a county’s Economic Development District. Joined from a geography lookup file.Economic Development District SetVariable we created to filter “Economic Development District” according to our existing parameter.Geography SelectionVariable that selects between “County State” and “Economic Development District” according to the parameter selection.Geography SetVariable that selects between the “County State” and “Economic Development District” sets according to Geography Selection.Metropolitan/Micropolitan Statistical AreaDelineates whether a county’s population is located in a CBSA Metro/Micro/Non-CBSA area. Joined from a geography lookup file.State AbbreviationState name in which county is located postal code abbreviation format. Joined from a geography lookup file.State NameState name in which county is located. Joined from a geography lookup file.YearYear of projected population. Ranges from 2020 to 2100 in 5 year increments.Why is this a dimension and not a measure? No reason – we can right-click this field -> Convert to Measure and it will operate the same.We’ll have to convert the data type from integer -> date to use it in later formulas.MeasuresCountyCounty FIPS number. Could also be classified as a dimension.StateState FIPS number. Could also be classified as a dimension.State + County FIPSConcatenation of County and State FIPS numbers to form a unique identifier. Could also be classified as a dimension.Population“Middle of the Road” county-level population projection for every 5 years.Our data is pretty simple, especially compared to the “County Outflow…” data.Here are some use-cases for our data:We can analyze 5-year to 5-year population change or calculate percentage change for a geography.We could also pull the population projection for a singular county or geography for a singular year.We could compare population in a singular year for multiple geographies.In this case, we’ll be analyzing population change for a singular county or EDD and we’ll be using a drilldown tooltip that enlarges the data we scroll over.Section 2Reference the “County Outflow and Population Projections Part 2” Tableau workbook for this section.If using Tableau public, that file will be made available to you for the training at HERE.Formatting our Projections ChartRight-click the “Population” Y-axis on the left-side of the sheet -> Edit Axis.In the Edit Axis window, replace Title with “Projected Population” -> select Tick Marks tab -> set Minor Tick Marks to “Fixed”. Exit out the window. Right-click the “Population Projection” Y-axis -> Format.In the Format pane, under Scale, select Ticks -> make the color “black -> select Numbers -> Number (standard).Navigate to the Format Lines tab -> for the Sheet tab, set all lines as “none”. Click the small ‘x’ to close the formatting window.Right-click the “Year” field in the Data Pane -> Change Data Type -> Date (from Number(whole)).Right-click the “Year” X-axis -> select Edit Axis.Under Range -> Select Fixed -> Set Fixed Start to “1/1/2020” and Fixed End to “1/1/2100”.Remember to set the “Year” field to a Date data type (Step 6).Under Major Tick Marks, select Fixed and set the Tick Interval to 20. Our data now displays in 20 “Years”. Under Minor Tick Marks, select Fixed and set the tick Interval to 5 “Years” This will make it easier to display on our dashboard. Drag “County State” to the Color mark.If you only see one, go return to the dashboard and unselect the single county/parish by double clicking it.Next we’ll take steps to create a zoom in feature for our data.Creating a Zoomable ChartCreate a new sheet and title it “Projections Zoomed”.Drag “Geography Set” to the Filters mark -> Select “True” -> Ok -> Ctrl-select “Year” and “Population” -> Select the Show Me pane -> lines (continuous).You can also Alt-select instead of Ctrl-select.Our chart should look identical to “Projections Chart” before formatting.Right-click the “Population” Y-axis -> Format.I retitled my axis to “Population Projection” but this is optional.For the “year” x-axis, I set my ticks to every 5 years.In the Format pane, under Scale, select Ticks -> make the color “black -> select Numbers -> Number (standard).Navigate to the Format Lines icon -> for the Sheet tab, set all lines as “none”.Now we’ll create some Level of Detail expressions to create the zoom feature.Right-click “Geography Set: True” -> Add to Context. This ensures our set will operate before any level of detail expression.Right-Click “Year” -> Create -> Set -> title it “Zoom Year Set” -> Select any year (I chose 1/1/2020) -> Ok.Create a new calculated field entitled “Zoom Year”Select the dropdown to the left of the Data Pane search bar or right-click the Data Pane -> Create Calculated Field.Title the field “Zoom Year” -> Enter the following formula -> Apply -> Ok.{FIXED : MAX(IIF([Zoom Year Set], [Year], NULL))}This field gives us the year selected in “Year Zoom Set” and works by checking the “Year”, and if “Year” is in the set it will return the set value (“Year”) using the Max function. Min would work equally as well since we have only one value in the set.Create a new calculated field entitled “Zoom Year Include”Select the dropdown to the left of the Data Pane search bar or right-click the Data Pane -> Create Calculated Field.Title the field “Zoom Year Include” -> Enter the following formula -> Apply -> Ok.IF ABS(DATEDIFF('year', [Year], [Zoom Year]))<=20 THEN "Include"ELSE "Exclude" ENDThis formula includes any range of years that are within “20”.We could replace “20” with a parameter that the user or designer could set.Now drag “Zoom Year Include” to the Filters mark -> Select “Include”. The x-axis will now zoom to a 20-year period.Navigate back to the “Projections Chart” sheet.Select Worksheet -> Actions.Select Add Action -> Change Set Values.See Day 2 Step by Step Instructions for creating the other Actions in the Actions window.Title the Action “Line Zoom” -> Set Run Action on to “Hover” -> Target Set Data Source to “Population Projection”, Running the action will “Assign values to set” -> Target Set Set to “Zoom Year Set”, Clearing the selection will to “Keep Set Values” -> Ok.In the Actions window -> Ok.Select the Tooltip mark in the Marks card.Delete all text and replace it with the following:Insert -> “County State” -> Insert -> Sheets -> “Projections Zoomed”. Replace the filter “All Fields” with “<County State>”, by placing the cursor where “All Fields” is -> Insert -> “<County State>” and changing the maxwidth and maxheight to 500.<County State><Sheet name="Projections Zoomed" maxwidth="500" maxheight="500" filter="<County State>">Optionally, also insert the “SUM(Population)” and “Year” fields into the Tooltip.I made a special field that selects the year from “Year”.You can do so too using the following formula:left(str([Year]),4)Title the newly created field “Year Last 4 Digits”, drag it to the Tooltip. Open the Tooltip mark -> add in this text below “<County State>”.<SUM(Population)> persons in <ATTR(Year Last 4 Digits)>The tooltip should now display when the selection is hovered over.Section 3Reference the “County Outflow and Population Projections Part 3” Tableau workbook for this section.If using Tableau public, that file will be made available to you for the training at HERE.Adding Components to our DashboardSelect the “EDD to County Drilldown” dashboard and right-click the sheet -> duplicate.Re-title it “Migrations and Population Projection”In the bottom corner under Objects, select Show Dashboard Title.Right-click the dashboard title -> Edit title.In the window -> Insert -> “<Parameters.Economic Development District>” and add a separating space between “Economic Development District” and “<Sheet Name>”. Click OK. Drag a horizontal to the right of the current horizontal object but left of the object containing the parameter. A grey bar between the parameter object and the map should display.Drag the “Projections Chart” sheet to the right horizontal object (2).Now select the empty space underneath the “Economic Development District” parameter and the “County State” legend to select the container.A series of blue slashes indicates you selected the container.You can also select the parameter or legend -> Select the More Options dropdown menu (down arrow) -> Select container vertical to select the container. Drag the container containing the parameter and the legend above the two horizontal objects containing our sheets. The grey bar should go across the full sheet. Select the top vertical container by selecting either the parameter or legend -> Select the More Options dropdown menu (down arrow) -> Select container vertical to select the container.Once the container is selected, a blue box should encompass the parameter and the legend.Select the More Options dropdown menu (down arrow) -> Select Distribute Contents Evenly.With the vertical layout container still selected -> drag its border up so that its smaller.Select the “County State” legend -> Drag it to the right of parameter.Now we have a Migrations and Population Projection dashboard that is interactive!All that is left is adding in formatting to make our visualization more appealing.Right-click the parameter “Economic Development District” -> Format Parameters.In the Format Parameters pane, select Alignment -> Center. Edit the font or shading as desired.I recommend not doing Shading or Border in this section.Right-click the “County State” legend -> Format Legends.In the Format Legends, select Alignment -> Center. Edit the font or shading as desired.I recommend not doing Shading or Border in this section.Tableau does not automatically filter the values in the legend. Drag the cursor bar next to a value to enlarge the space next to it. Tableau does this automatically for all values in it.We can’t center the values like this. To do that, navigate to the Dashboard Pane, select the Layout Tab.Here you can show or hide the title (regardless of object type – sheet, parameter, legend, etc.)Add a border around the complete object (how you should do it)Add a background to the whole objectChange the outer padding (I usually set mine to 0). This shrinks the entire view in the object.Change the inner padding. This shrinks the view inside the object.We can select inner padding -> uncheck All Sides Equal -> Increase the value of left inner padding to make our legend appear centered A value of ~75 centers the legend, but then you need to edit the title as well to center it.To remove navigation options from the map (other than the parameter) -> Select the map -> In the Menu, select Map -> Map Options.Unselect all the boxes. Repeat this for both maps.You can navigate between the map selections by selecting a county on either map.We now have a map that displays migrations and population projections for a county or EDD, and can navigate between the two views! ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- the nature of science section 1 answers
- 14th amendment section 1 summary
- 14th amendment section 1 meaning
- article 1 section 1 constitution
- chapter 15 section 1 pages 532 537
- section 1 5 salary
- section 1 reinforcments
- article ii section 1 of the constitution
- section 1 chapter 2 science
- 14th amendment section 1 explained
- 14th amendment section 1 text
- economics section 1 assessment answers