https://www.workout-wednesday.com/2021/03/02/2021w09tab/

 

https://kubig-2022-1.tistory.com/13?category=1005117 

 

[시각화 스터디] 2021 Week 9 : Can you hide a chart in the map layers?

작성자 : 14기 임혜리 https://www.workout-wednesday.com/2021/03/02/2021w09tab/ 2021 Week 9: Can You Hide A Chart in the Map Layers? – Workout Wednesday So, I’m a little late for Mardi Gras – but t..

kubig-2022-1.tistory.com

 

Requirements

  • Same Formatting (colors – Nuriel stone palette, tooltips, etc.)

Map layers에서 모든 레이어들을 제거하고 Style을 Dark로 변환한다.

 주어진 형식대로 Tooltips을 작성하기 위해 필요한 것들을 tooltip shelf로 드래그하고 total population의 format을 million으로 변경하여 M 단위로 나타나도록 변경한다.

 

  • Dashboard Size 1000 X 800
  • # of Sheets: 1

2012년 데이터만 사용하므로 filters에 Year을 옮기고 조건을 지정해준다. 

'Country'라는 Parameter를 생성하고 데이터 타입을 string, allowable values를 List로 한다. 그리고 특정 국가가 아닌 모든 국가가 나타나도록 하는 'None'을 list of values에 추가해준다.

주어진 데이터에는 the percent of population that is urban-dwelling만 존재하므로 Population Rural이라는 calculated field를 생성한다.

Country가 'None'일 때 모든 국가가 나타나도록 하는 calculated field를 생성한다.

Country가 Country/Region과 같을 때 Country로 나타나도록 하는 calculated field를 생성한다.

그리고 바로 위에서 만든 두 가지의 calculated field를 Geographic Role의 Country/Region 형태로 바꿔준다.

 

 

  • Create a filled map of that highlights all of the countries in the dataset with region on the color shelf

All Countries를 더블 클릭하고 Marks를 map형태로 변경한다. 후에 color shelf에 Region을 드래그한다. Same Formatting을 위해 colors를 Nuriel stone palette의 색으로 변경한다. 

 

'Selected Countries' 즉 위에서 Country가 Country/Region과 같을 때 Country로 나타나도록 하는 calculated field를 marks layer에 추가한다. detail로 변경해주고 region별로 색을 다르게 하는 것은 동일하게 할 것이기 때문에 color shelf에 region을 드래그한다. 

 

 

  • When you click on a country in the map, you should only see the selected country with a donut chart that highlights the % of the population that is urban-dwelling

Add Parameter Action change parameter를 통해 Field를 All Countries로 Aggregation을 None으로 변경한다.

parameter를 통해 해당 국가를 선택하면 그 나라의 map만 나타나는 것을 확인할 수 있다.

 

해당 국가를 클릭하면 도넛 차트를 보이게 해야하므로 Selected Countries를 marks layer에 추가하여 pie차트 형식으로 바꿔준다. percentage of rural and urban dwellers를 표현하도록 해야하므로 measure values를 Angle에 추가한다. 

비율 별로 색을 다르게 하기 위해 marks의 color shelf에 measure name을 추가한다. edit color를 사용하여 주어진 형식의 색으로 변경한다.

 

도넛 차트를 만들기 위해 selected countries를 marks layer에 한 번 더 추가하고 color shelf에 selected countries를 드래그한다. label를 추가하고 percent format으로 변경하고 나머지 글씨 크기나 위치도 주어진 형식대로 변경한다.

 

https://public.tableau.com/views/WOW2021_09_Canyouhideachartinthemaplayers/Dashboard1?:language=ko-KR&:display_count=n&:origin=viz_share_link

 

#WOW2021_09_Can you hide a chart in the map layers?

#WOW2021_09_Can you hide a chart in the map layers?

public.tableau.com

 

 

https://www.workout-wednesday.com/2021/01/26/2021w04tab/

 

WOW2021 week 04 | Tableau: Can you use map layers to show profit at state and city levels – Workout Wednesday

When you publish your solution on Tableau Public make sure to take the time and include a link to the original inspiration.  Also include the hashtag #WOW2021 in your description to make it searchable!

www.workout-wednesday.com

 

Requirements

  • Dashboard Size: Generic Desktop
  • # of Sheets – up to you
  • Create a map with one (1) axis and multiple layers:
    • State
    • City

State를 클릭하고 mark 타입을 map으로 변경한다.

detail에 State와 City를 추가한다(Unkwown이라고 뜨는 마크가 사라지는 것을 볼 수 있음)

 

 

  • Color state by total profit

Profit을 color로 드래그한다. Edit colors를 통해 색 변경 진행

 

  • Size city by total profit

Profit을 size로 드래그한다. Editsizes를 통해 Sizes vary를 From Zero로 설정한다.

 

  • Color city by sign (+/-) of total profit

total profit의 부호에 따라 city의 색을 다르게 하기 위해서는 calculated field를 생성해야 한다.

생성된 변수를 discrete로 타입을 변경한 후 city의 color에 드래그하면 -1,1 값에 따라 색이 다르게 나타난다. Edit colors를 통해 색 지정 가능, Opacity의 퍼센트를 조정하여 투명도를 변경할 수도 있다. 

 

  • Mind those dynamic tooltips

주어진 tooltips으로 변경하기 위해 두 가지의 calculated field를 만든다.

tooltip에 사용될 변수들을 드래그 한후 Edit Tooltip을 클릭한다. 기존 내용을 지우고 주어진 형식으로 변경한다.

이때 calcaulated field를 연속적으로 배열하는데 조건에 맞지 않는 값을 NULL로 인식되어 표현되고 있지 않음을 확인할 수 있다. 

 

  • Ensure when you hover on the state, there’s no interactivity

Marks 내의 State의 오른쪽 마우스를 클릭하여 Disable Selection을 클릭한다.

 

  • Create a bar chart of profit by city, sorted ascending

새로운 시트를 추가하여 행에 Cities 열에 Sum(Profit)을 지정한다. 그 후 profit을 color에 드래그한다. 

Sort를 클릭하여 Sort by를 Field로 변경하고 Feild Name을 Profit으로 지정한다. Sort order는 ascending 클릭

 

 

 

  • And a hover action on the bar chart relating to the map and ensure NO ACTION on the map.

 

  • Match all other formatting and layout

Map Layers의 washout 기능을 100%로 설정하여 관심있는 State외의 나머지 정보는 안보이도록 설정한다.

 

You will need to make use of State abbreviation. You can use the below calculation if you need it

//State Abbreviation
CASE [State]
WHEN “Alabama” THEN “AL”
WHEN “Alaska” THEN “AK”
WHEN “Arkansas” THEN “AR”
WHEN “Arizona” THEN “AZ”
WHEN “California” THEN “CA”
WHEN “Colorado” THEN “CO”
WHEN “Connecticut” THEN “CT”
WHEN “Delaware” THEN “DE”
WHEN “District of Columbia” THEN “DC”
WHEN “Florida” THEN “FL”
WHEN “Georgia” THEN “GA”
WHEN “Idaho” THEN “ID”
WHEN “Illinois” THEN “IL”
WHEN “Indiana” THEN “IN”
WHEN “Iowa” THEN “IA”
WHEN “Kansas” THEN “KS”
WHEN “Kentucky” THEN “KY”
WHEN “Louisiana” THEN “LA”
WHEN “Maine” THEN “ME”
WHEN “Maryland” THEN “MD”
WHEN “Massachusetts” THEN “MA”
WHEN “Michigan” THEN “MI”
WHEN “Minnesota” THEN “MN”
WHEN “Mississippi” THEN “MS”
WHEN “Missouri” THEN “MO”
WHEN “Montana” THEN “MT”
WHEN “Nebraska” THEN “NE”
WHEN “Nevada” THEN “NV”
WHEN “New Hampshire” THEN “NH”
WHEN “New Jersey” THEN “NJ”
WHEN “New Mexico” THEN “NM”
WHEN “New York” THEN “NY”
WHEN “North Carolina” THEN “NC”
WHEN “North Dakota” THEN “ND”
WHEN “Ohio” THEN “OH”
WHEN “Oklahoma” THEN “OK”
WHEN “Oregon” THEN “OR”
WHEN “Pennsylvania” THEN “PA”
WHEN “Rhode Island” THEN “RI”
WHEN “South Carolina” THEN “SC”
WHEN “South Dakota” THEN “SD”
WHEN “Tennessee” THEN “TN”
WHEN “Texas” THEN “TX”
WHEN “Utah” THEN “UT”
WHEN “Vermont” THEN “VT”
WHEN “Virginia” THEN “VA”
WHEN “Washington” THEN “WA”
WHEN “West Virginia” THEN “WV”
WHEN “Wisconsin” THEN “WI”
WHEN “Wyoming” THEN “WY”
END

 

> calculated field 'State Abbreviation'를 만들고 city와 state abbreviation을 모두 포함하는 'Cities'라는 calculated field를 하나 더 생성한다. 

 

  • Dashboard

앞에서 만든 sheet1,2를 알맞은 위치에 두고 크기를 조정한다. 대시보드의 Title을 지정할 수 있으며 Objects의 Floating을 활용하여 텍스트나 범례를 sheet위에 위치시킬 수 있다.

 

 

https://public.tableau.com/views/WOW2021_04_Canyouusemaplayerstooverlaycitiesontopofstates/Dashboard1?:language=ko-KR&:display_count=n&:origin=viz_share_link 

 

 

+ Recent posts