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进行更多甚至完美的融合。 但是,让我们考虑一下表格中绘制的数据具有比您可以考虑的更多的空值的情况。
Now for plotting points on the map we need these things:
现在要在地图上绘制点,我们需要这些东西:
- Latitude or Y co-ordinates 纬度或Y坐标
- Longitudes or X co-ordinates 经度或X坐标
- 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坐标,将它们添加为数据中的列。
您对下载的图片满意吗? (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,因此它只是白色背景上的黑色地图,与我的仪表板其余部分格格不入。
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。
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)
- Connect your data to Tableau. Go to map>background images. 将数据连接到Tableau。 转到地图>背景图像。
- Add your image. 添加您的图片。
- Select your column X and Y as X and Y in the dialog box. 在对话框中选择X和Y列作为X和Y。
- Fill out Top bottom left right as the following or in your case as respective dimensions of the image. 如下所示或在您的情况下,分别按图像的各个尺寸填充左上角。
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,一经查实,立即删除!