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.mzph.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//删除节点信…