tableau 自定義省份_在Tableau中使用自定義圖像映射

tableau 自定義省份

We have been reading about all the ways to make our vizzes in Tableau with more creativity and appeal. During my weekly practice for creating viz as part of makeovermonday2020 community, I came across geographical data which in way required data prep. This guide is about how I used a PNG image of the country as a map background that looked better than the default using paint and excel.

我們 一直在閱讀有關使Tableau變得更具創意和吸引力的各種方法。 在我的每周實踐中,作為makeovermonday2020社區的一部分來創建Viz時,我遇到了需要準備數據的地理數據。 本指南介紹了我如何使用該國家的PNG圖像作為地圖背景,該背景看起來比使用paint和excel的默認圖像更好。

讓我們開始 (Let’s Begin)

The guide would use the data from dataworld.com but steps can be used for other dataset as well. If you would like to continue with the same dataset, you can get it here.

該指南將使用dataworld.com的數據,但步驟也可用于其他數據集。 如果您想繼續使用相同的數據集,可以在此處獲取。

準備數據 (Prep the data)

Initially, data from the source had only two fields, region and number of companies. Now for any other dataset, you might have more and even have perfect blending with Tableau inbuilt Map. However Let’s consider the case where data plotted in tableau have more nulls than you can consider.

最初,來自源的數據只有兩個字段,地區和公司數量。 現在,對于任何其他數據集,您都可以與Tableau內置Map進行更多甚至完美的融合。 但是,讓我們考慮一下表格中繪制的數據具有比您可以考慮的更多的空值的情況。

Image for post
Initial Data
初始數據

Now for plotting points on the map we need these things:

現在要在地圖上繪制點,我們需要這些東西:

  1. Latitude or Y co-ordinates

    緯度或Y坐標
  2. Longitudes or X co-ordinates

    經度或X坐標
  3. A background Image to plot the points.

    繪制點的背景圖像。

Since the locations in the data are from Scotland, I search on google for a png image of the same.

由于數據中的位置來自蘇格蘭,因此我在Google上搜索了該圖像的png圖像。

After downloading the Image, Open it into paint.

下載圖像后,將其打開到繪畫中。

Now you have to try and map all the points in the data to the image i.e. pixels. use google map for reference. Since we do not need exact location, you can be vague and keep the location relative.

現在,您必須嘗試將數據中的所有點映射到圖像(即像素)。 使用谷歌地圖作為參考。 由于我們不需要確切的位置,因此您可能會含糊其詞,并保持位置相對。

After you are done, getting x and y coordinates for each point, add these as columns in you data.

完成后,獲取每個點的x和y坐標,將它們添加為數據中的列。

Image for post
Data after Prep
制備后的數據

您對下載的圖片滿意嗎? (Are you happy with the Image you downloaded?)

Since the image I downloaded was a png, It was just black map on white background which would stand oddly out from rest of my dashboard.

由于我下載的圖片是png,因此它只是白色背景上的黑色地圖,與我的儀表板其余部分格格不入。

Image for post
The Map | Scotland
地圖| 蘇格蘭

So After I decided the color scheme of the dashboard, I used the same color as the background for this map and chose appropriate color for the landmass. You can use Paint for this.

因此,在確定儀表板的配色方案之后,我為此地圖使用了與背景相同的顏色,并為大陸選擇了合適的顏色。 您可以為此使用Paint。

Image for post
Map after coloring using paint
使用油漆著色后的地圖

If you have Photoshop and photoshopping skills, I am sure you can have better results.

如果您具有Photoshop和Photoshopping技能,我相信您可以得到更好的結果。

讓我們將其移至Tableau,好嗎 (Let’s move this to Tableau, shall we)

  1. Connect your data to Tableau. Go to map>background images.

    將數據連接到Tableau。 轉到地圖>背景圖像。
  2. Add your image.

    添加您的圖片。
  3. Select your column X and Y as X and Y in the dialog box.

    在對話框中選擇X和Y列作為X和Y。
  4. Fill out Top bottom left right as the following or in your case as respective dimensions of the image.

    如下所示或在您的情況下,分別按圖像的各個尺寸填充左上角。
Image for post
Fill out your Left,Right,bottom and top as per dimensions of the Image. Also, It depends on the location of origin you chose while mapping the points. You might have to try out these values for exact mapping since you might chose different origin location from tableau.
根據圖片尺寸填寫左,右,下和上。 同樣,這取決于您在繪制點時選擇的原點位置。 您可能必須嘗試使用??這些值進行精確映射,因為您可能從tableau中選擇了不同的原始位置。

5. Add X and Y to the shelves and cards.

5.在架子和卡片上添加X和Y。

Tada, Your map is ready.

多田,您的地圖已經準備好。

快速簡便嗎? (Quick and Easy right?)

So I hope you are able to plot your data on the custom background map. If you are stuck or have some doubt, Feel free to drop a response or mail us.

因此,我希望您能夠在自定義背景圖上繪制數據。 如果您遇到困難或有任何疑問,請隨時回覆或給我們發送郵件。

Feel free to follow us for more updates.

請隨時關注我們以獲取更多更新。

Until next time.

直到下一次。

翻譯自: https://medium.com/thenoobengineer/using-custom-image-maps-in-tableau-dd65fe5d3498

tableau 自定義省份

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/389832.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/389832.shtml
英文地址,請注明出處:http://en.pswp.cn/news/389832.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

2055. 蠟燭之間的盤子

2055. 蠟燭之間的盤子 給你一個長桌子,桌子上盤子和蠟燭排成一列。給你一個下標從 0 開始的字符串 s ,它只包含字符 ‘’ 和 ‘|’ ,其中 ’ 表示一個 盤子 ,’|’ 表示一支 蠟燭 。 同時給你一個下標從 0 開始的二維整數數組 q…

Template、ItemsPanel、ItemContainerStyle、ItemTemplate

原文:Template、ItemsPanel、ItemContainerStyle、ItemTemplate先來看一張圖(網上下的圖,加了幾個字) 實在是有夠“亂”的,慢慢來理一下; 1、Template是指控件的樣式 在WPF中所有繼承自contentcontrol類的控件都含有此屬性,&#…

熊貓燒香分析報告_熊貓分析進行最佳探索性數據分析

熊貓燒香分析報告目錄 (Table of Contents) Introduction 介紹 Overview 總覽 Variables 變數 Interactions 互動互動 Correlations 相關性 Missing Values 缺失值 Sample 樣品 Summary 摘要 介紹 (Introduction) There are countless ways to perform exploratory data analys…

2060. 同源字符串檢測

2060. 同源字符串檢測 原字符串由小寫字母組成,可以按下述步驟編碼: 任意將其 分割 為由若干 非空 子字符串組成的一個 序列 。 任意選擇序列中的一些元素(也可能不選擇),然后將這些元素替換為元素各自的長度&#x…

vue中的data用return返回

為什么在大型項目中data需要使用return返回數據呢?答:不使用return包裹的數據會在項目的全局可見,會造成變量污染;使用return包裹后數據中變量只在當前組件中生效,不會影響其他組件。 1、在簡單的vue實例中看到的Vue實…

白褲子變粉褲子怎么辦_使用褲子構建構建數據科學的monorepo

白褲子變粉褲子怎么辦At HousingAnywhere, one of the first major obstacles we had to face when scaling the Data team was building a centralised repository that contains our ever-growing machine learning applications. Between these projects, many of them shar…

ubuntu+anaconda+tensorflow 及相關問題

配置tensorflow部分參考:https://blog.csdn.net/XUTIAN1129/article/details/78997633 裝完anaconda, source ~/.bashrc后, 可以直接 pip install tensorflow-gpu , 珍愛生命,遠離bazel。但想要c/c調用tf的時候遠離不了,還是得bazel編譯安裝t…

2022. 將一維數組轉變成二維數組

2022. 將一維數組轉變成二維數組 給你一個下標從 0 開始的一維整數數組 original 和兩個整數 m 和 n 。你需要使用 original 中 所有 元素創建一個 m 行 n 列的二維數組。 original 中下標從 0 到 n - 1 (都 包含 )的元素構成二維數組的第一行&#xf…

支持向量機SVM算法原理及應用(R)

支持向量機SVM算法原理及應用(R) 2016年08月17日 16:37:25 閱讀數:22292更多 個人分類: 數據挖掘實戰應用版權聲明:本文為博主原創文章,轉載請注明來源。 https://blog.csdn.net/csqazwsxedc/article/detai…

mad離群值_全部關于離群值

mad離群值An outlier is a data point in a data set that is distant from all other observations. A data point that lies outside the overall distribution of the dataset. Or in a layman term, we can say, an outlier is something that behaves differently from th…

2057. 值相等的最小索引

2057. 值相等的最小索引 給你一個下標從 0 開始的整數數組 nums ,返回 nums 中滿足 i mod 10 nums[i] 的最小下標 i ;如果不存在這樣的下標,返回 -1 。 x mod y 表示 x 除以 y 的 余數 。 示例 1:輸入:nums [0,1,2…

SpringBoot中各配置文件的優先級及加載順序

我們在寫程序的時候會碰到各種環境(開發、測試、生產),因而,在我們切換環境的時候,我們需要手工切換配置文件的內容。這大大的加大了運維人員的負擔,同時會帶來一定的安全隱患。 為此,為了能更合理地重寫各屬性的值&am…

青年報告_了解青年的情緒

青年報告Youth-led media is any effort created, planned, implemented, and reflected upon by young people in the form of media, including websites, newspapers, television shows, and publications. Such platforms connect writers, artists, and photographers in …

post提交參數過多時,取消Tomcat對 post長度限制

1.Tomcat 默認的post參數的最大大小為2M, 當超過時將會出錯,可以配置maxPostSize參數來改變大小。 從 apache-tomcat-7.0.63 開始,參數 maxPostSize 的含義就變了: 如果將值設置為 0,表示 POST 最大值為 0,…

2048. 下一個更大的數值平衡數

2048. 下一個更大的數值平衡數 如果整數 x 滿足:對于每個數位 d ,這個數位 恰好 在 x 中出現 d 次。那么整數 x 就是一個 數值平衡數 。 給你一個整數 n ,請你返回 嚴格大于 n 的 最小數值平衡數 。 示例 1:輸入:n …

bzoj1222: [HNOI2001]產品加工

一開始以為是費用流。。然后搞不出來&#xff0c;路牌是DP&#xff0c;想一想 f[i][j]表示加工到第i個產品&#xff0c;然后A用時j&#xff0c;B用時的最小值 那么f[i][j]max(f[i-1][j-a[i]],f[i-1][j]b[i],f[i-1][j-c[i]]c[i]) 滾掉一維美滋滋 #include<cstdio> #includ…

map(平均平均精度_客戶的平均平均精度

map(平均平均精度Disclaimer: this was created for my clients because it’s rather challenging to explain such a complex metric in simple words, so don’t expect to see much of math or equations here. And remember that I try to keep it simple.免責聲明 &#…

Sublime Text 2搭建Go開發環境,代碼提示+補全+調試

本文在已安裝Go環境的前提下繼續。 1、安裝Sublime Text 2 2、安裝Package Control。 運行Sublime&#xff0c;按下 Ctrl&#xff08;在Tab鍵上邊&#xff09;&#xff0c;然后輸入以下內容&#xff1a; import urllib2,os,hashlib; h 7183a2d3e96f11eeadd761d777e62404 e330…

629. K個逆序對數組

629. K個逆序對數組 給出兩個整數 n 和 k&#xff0c;找出所有包含從 1 到 n 的數字&#xff0c;且恰好擁有 k 個逆序對的不同的數組的個數。 逆序對的定義如下&#xff1a;對于數組的第i個和第 j個元素&#xff0c;如果滿i < j且 a[i] > a[j]&#xff0c;則其為一個逆…

zookeeper、hbase常見命令

a) Zookeeper&#xff1a;幫助命令-help i. ls /查看zk下根節點目錄 ii. create /zk_test my_data//在測試集群沒有創建成功 iii. get /zk_test my_data//獲取節點信息 iv. set / zk_test my_data//更改節點相關信息 v. delete /zk_test//刪除節點信…