{"id":10251,"date":"2020-06-16T09:19:56","date_gmt":"2020-06-16T01:19:56","guid":{"rendered":"https:\/\/www.finereport.com\/en\/?p=10251"},"modified":"2021-01-14T11:07:05","modified_gmt":"2021-01-14T03:07:05","slug":"bar-chart-race-a-complete-guide","status":"publish","type":"post","link":"https:\/\/frg.fineres.com\/en\/2020\/06\/16\/bar-chart-race-a-complete-guide\/","title":{"rendered":"Bar Chart Race: A Complete Guide"},"content":{"rendered":"<p>Have\u00a0such\u00a0videos\u00a0been hot recently? Its professional name is the bar chart race. You may have seen this video many times. The effect can be said to be very intuitive and shocking, but do you know how to do it?<\/p>\n<p><a href=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/01.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-10252\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/01.png\" alt=\"\" width=\"896\" height=\"442\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/01.png 896w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/01-300x148.png 300w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/01-768x379.png 768w\" sizes=\"(max-width: 896px) 100vw, 896px\" \/><\/a><\/p>\n<p>Under normal circumstances, a lot of code needs to be developed\u00a0to make a chart like this. For most people, the requirements are too high, and the cost of learning is also high. There are many tutorials made by PowerPoint or Excel, but the results are not very good. Just in time of the COVID-19, I\u00a0plan\u00a0to find the simplest way and make a guide for you!<\/p>\n<p>I tried many ways, and find two simplest ways for you. It only takes 10 minutes to make a bar chart race like this! I wish can give you some help!<\/p>\n<p><video class=\"SassMovie\" controls=\"controls\" width=\"auto\" height=\"300\"><source src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/01.mp4\" type=\"video\/mp4\" poster=\"\" \/><!--            <object data=\"https:\/\/www.finereport.com\/en\/wp-content\/themes\/Newweb\/images\/exhibition\/1.mp4\" poster=\"\">-->        <!--<embed src=\"https:\/\/www.finereport.com\/en\/wp-content\/themes\/Newweb\/images\/exhibition\/1.mp4\" poster=\"\">-->        <!--<\/object>--><\/video><\/p>\n<p>I will share two quick and easy, practical methods and public data sources in the following articles. After reading the detailed production process below, I am sure you can make it!<\/p>\n<h2><strong><b>Method 1: <a href=\"https:\/\/flourish.studio\/\">Flourish<\/a><\/b><\/strong><\/h2>\n<p>It can be said that it is the best online data visualization website. There are a lot of data visualization templates here. Our job is to find the data from the Internet, and then import the data into the template, and set the corresponding color, icon, and other information, and all is completed.<a href=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/02.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-10257\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/02.png\" alt=\"\" width=\"2462\" height=\"1436\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/02.png 2462w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/02-300x175.png 300w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/02-768x448.png 768w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/02-1024x597.png 1024w\" sizes=\"(max-width: 2462px) 100vw, 2462px\" \/><\/a><\/p>\n<p>The operation is very simple. The first step is to click on the bar chart race template we want to make in the upper right corner. Click on the &#8220;Data&#8221; column above, we can see the data is uploaded here, and then click on &#8220;upload data file&#8221; &#8221; to upload the information form we want to use.<a href=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/03.jpg\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-10258\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/03.jpg\" alt=\"\" width=\"720\" height=\"313\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/03.jpg 720w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/03-300x130.jpg 300w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>The template itself defines the format of the table. As shown in the following figure, column A is the indicator name, column B is the attribute, column C is the URL column where the icon is stored, and column D is the time change column. Follow the format when preparing the Excel data.<\/p>\n<p>After importing the data from Excel, the template will prompt you how many pieces of data have been imported.<\/p>\n<p><a href=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/04.jpg\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-10259\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/04.jpg\" alt=\"\" width=\"515\" height=\"256\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/04.jpg 515w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/04-300x149.jpg 300w\" sizes=\"(max-width: 515px) 100vw, 515px\" \/><\/a><\/p>\n<p>The second step is to optimize the chart. Click &#8220;Preview&#8221; above, and you will find that the template has automatically started to scroll according to time!<\/p>\n<p><a href=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/05.jpg\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-10260\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/05.jpg\" alt=\"\" width=\"720\" height=\"291\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/05.jpg 720w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/05-300x121.jpg 300w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>Of course, we still need to do some modifications. There is an edit zone on the right, mainly to beautify the details such as labels, colors, playback speed, ruler size, time display format, etc. After setting it according to your own style, a cool video is finished.<\/p>\n<p><a href=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/96.jpg\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-10261\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/96.jpg\" alt=\"\" width=\"318\" height=\"826\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/96.jpg 318w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/96-115x300.jpg 115w\" sizes=\"(max-width: 318px) 100vw, 318px\" \/><\/a><\/p>\n<h2><strong><b>Method 2: FineReport<\/b><\/strong><\/h2>\n<p><a href=\"https:\/\/www.finereport.com\/en\/activation\"><img loading=\"lazy\" class=\"aligncenter wp-image-9575 size-full\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2019\/07\/2020031701I.png\" alt=\"\" width=\"1720\" height=\"566\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2019\/07\/2020031701I.png 1720w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2019\/07\/2020031701I-300x99.png 300w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2019\/07\/2020031701I-768x253.png 768w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2019\/07\/2020031701I-1024x337.png 1024w\" sizes=\"(max-width: 1720px) 100vw, 1720px\" \/><\/a><\/p>\n<p>Many people who make reports may have heard of it. In fact, FineReport can also achieve such a function, and it does not need to write a bunch of code, you only need to write SQL syntax, but I think it is easy for most people.<\/p>\n<p>Take the bar chart race I mentioned above, the main idea is to set the time parameter to filter data in the SQL query syntax, the value of the time parameter will change with time, and then regularly reorganize the chart.<\/p>\n<p>First, open the FineReport10.0 <a href=\"https:\/\/www.finereport.com\/en\/features\/report-designer\">designer<\/a>, create a data link, then create a new decision report, create a data set ds1, enter the SQL syntax to query the desired data.<\/p>\n<p><a href=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/04.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-10253\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/04.png\" alt=\"\" width=\"1792\" height=\"1204\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/04.png 1792w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/04-300x202.png 300w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/04-768x516.png 768w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/04-1024x688.png 1024w\" sizes=\"(max-width: 1792px) 100vw, 1792px\" \/><\/a><\/p>\n<p>The database query syntax is as follows:<\/p>\n<blockquote><p>SELECT<\/p>\n<p>country,<\/p>\n<p>strftime(\u201c%Y-%m-%d\u201d,date) date,<\/p>\n<p>sum(confirm) confirm<\/p>\n<p>FROM datasource<\/p>\n<p>where strftime(\u2018%Y-%m-%d\u2019,date)=\u2019${datedelta(\u201c2020-01-28\u201d,mod((datetonumber(now())-datetonumber(p1))\/1000,DATEDIF(\u201c2020-01-28\u2033,today(),\u201dD\u201d)))}\u2019<\/p>\n<p>group by country,strftime(\u201c%Y-%m-%d\u201d,date)<\/p>\n<p>order by confirm<\/p><\/blockquote>\n<p><a href=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/05.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-10254\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/05.png\" alt=\"\" width=\"1800\" height=\"1200\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/05.png 1800w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/05-300x200.png 300w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/05-768x512.png 768w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/05-1024x683.png 1024w\" sizes=\"(max-width: 1800px) 100vw, 1800px\" \/><\/a><\/p>\n<p>Then click on the \u201ctemplate\u201d in the menu bar to select \u201ctemplate parameter\u201d, and create a new template parameter \u201cp1\u201d with a preset value: now.<\/p>\n<p><a href=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/06.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-10255\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/06.png\" alt=\"\" width=\"1320\" height=\"1200\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/06.png 1320w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/06-300x273.png 300w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/06-768x698.png 768w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/06-1024x931.png 1024w\" sizes=\"(max-width: 1320px) 100vw, 1320px\" \/><\/a><\/p>\n<p>Insert the bar chart: Insert-&gt;Cell Element-&gt;Insert Chart<\/p>\n<p><a href=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/08.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-10262\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/08.png\" alt=\"\" width=\"2878\" height=\"1596\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/08.png 2878w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/08-300x166.png 300w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/08-768x426.png 768w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/08-1024x568.png 1024w\" sizes=\"(max-width: 2878px) 100vw, 2878px\" \/><\/a><\/p>\n<p>We set the title as \u201cUNIQUEARRAY(ds1.select(\u201cdate\u201d))\u201d, then the title will change according to the time.<\/p>\n<p><a href=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/09.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-10263\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/09.png\" alt=\"\" width=\"502\" height=\"1454\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/09.png 502w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/09-104x300.png 104w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/09-354x1024.png 354w\" sizes=\"(max-width: 502px) 100vw, 502px\" \/><\/a><\/p>\n<p>Then select the label, click \u201cuse label\u201d, select the value for the text, and set the position outside.<\/p>\n<p><a href=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/10.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-10264\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/10.png\" alt=\"\" width=\"560\" height=\"1512\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/10.png 560w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/10-111x300.png 111w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/10-379x1024.png 379w\" sizes=\"(max-width: 560px) 100vw, 560px\" \/><\/a><\/p>\n<p>Finally, add a new timing refresh, select the interactive attribute\u00a0as the special effect, and the background detection is turned on at a time interval of 1s.<\/p>\n<p><a href=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/11.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-10265\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/11.png\" alt=\"\" width=\"558\" height=\"1504\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/11.png 558w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/11-111x300.png 111w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/11-380x1024.png 380w\" sizes=\"(max-width: 558px) 100vw, 558px\" \/><\/a><\/p>\n<p>Boom, all have done!<\/p>\n<p><a href=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/12.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-10279\" src=\"https:\/\/www.finereport.com\/en\/wp-content\/uploads\/2020\/06\/12.png\" alt=\"\" width=\"2878\" height=\"1314\" srcset=\"https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/12.png 2878w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/12-300x137.png 300w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/12-768x351.png 768w, https:\/\/frg.fineres.com\/en\/wp-content\/uploads\/2020\/06\/12-1024x468.png 1024w\" sizes=\"(max-width: 2878px) 100vw, 2878px\" \/><\/a><\/p>\n<h2><strong><b>Data Sources<\/b><\/strong><\/h2>\n<p>After reading this article, you must have the idea of doing this kind of video. Just like the sample Flourish website mentioned above, the data is labeled below from the World Bank. I found that the data of these institutions are very rich, and you can even find the population estimate of 2100.<\/p>\n<p><!--more--><\/p>\n<p>World Bank: https:\/\/data.worldbank.org.cn\/<\/p>\n<p>United Nations: https:\/\/www.un.org\/zh\/databases\/index.html<\/p>\n<p>China National Data: http:\/\/data.stats.gov.cn\/<\/p>\n<p>Oxford University Project: https:\/\/ourworldindata.org\/<\/p>\n<p>IMF International Monetary Organization: https:\/\/www.imf.org\/en\/Data<\/p>\n<p>IFS: http:\/\/www.ifs.du.edu\/ifs\/frm_MainMenu.aspx<\/p>\n<p>Organization for Economic Cooperation and Development OECD: http:\/\/oecdchina.org\/statistics\/index.html<\/p>\n<p>*TheStatistcs Portal (perfect database, payment required): https:\/\/www.statista.com\/<\/p>\n<p>GitHub collation (38.2K stars): https:\/\/github.com\/awesomedata\/awesome-public-datasets<\/p>\n<p>Google data set search: https:\/\/www.statista.com\/<\/p>\n<p>The dataset provided in Kaggle, such as Youtube related: https:\/\/www.kaggle.com\/datasnaek\/youtube-new<\/p>\n<h2><strong><b>Summary<\/b><\/strong><\/h2>\n<p>Now I believe that after you have finished the above tutorial, you must no longer feel difficult to make a data visualization video anymore. In fact, in my opinion, it is more critical to find high-quality data and find interesting information in the data. Now, since there are data sources and tools, do you have a try?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A completed guide for you to make a bar chart race, 10 minutes are enough!<\/p>\n","protected":false},"author":1,"featured_media":10252,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[854],"tags":[118],"_links":{"self":[{"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/posts\/10251"}],"collection":[{"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/comments?post=10251"}],"version-history":[{"count":17,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/posts\/10251\/revisions"}],"predecessor-version":[{"id":11373,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/posts\/10251\/revisions\/11373"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/media\/10252"}],"wp:attachment":[{"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/media?parent=10251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/categories?post=10251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/tags?post=10251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}