power bi可视化表_如何使用Power BI可视化数据?
power bi可視化表
什么是數據可視化? (What is Data Visualization?)
With the technological revolution, data went from expensive, difficult to find and collect to abundant, cheap, but incomprehensible. It is arduous to store, understand and analyze increasingly larger volumes of data with traditional software’s. However, as individuals or an organization, all of this data is only as good as what we can make out of it. This is where Big data comes into play. Big data is used for predictive analytics, analyzing user behavior or other data analytics processes to bring value to data. Yet, the raw details about this can remain uncertain due to lack of knowledge. Data Visualization helps tackle this issue.
隨著技術革命,數據已從昂貴,難以查找和收集的數據變為大量,廉價但難以理解的數據。 使用傳統軟件來存儲,理解和分析越來越大量的數據非常困難。 但是,對于個人或組織而言,所有這些數據僅是我們可以從中得到的。 這就是大數據發揮作用的地方。 大數據用于預測分析,分析用戶行為或其他數據分析過程,以為數據帶來價值。 但是,由于缺乏知識,有關此問題的原始細節可能仍然不確定。 數據可視化有助于解決此問題。
Data Visualization is the process of transforming data into charts, images, graphs and even videos that explain the numbers and allow us to gain insights from it.
數據可視化是將數據轉換為圖表,圖像,圖形甚至是解釋數字的視頻的過程,使我們能夠從中獲得洞察。
Tony Babel from Gif的giphyTony Babel的 GIFIt makes information more coherent and helps us create value out of it, discover new patterns, and spot trends. Let’s take an example: How do you explain the numerous rows and columns of data in an excel spreadsheet to your boss or a customer? Create a chart like a bar chart, line graph, scatter plot, etc of the same data. This gives meaning and purpose to the original raw data and now that you have a visual representation, you can start analyzing and integrating it into your business. This has empowered many businesses and users by providing clear and actionable insights to programs as it can keep you ahead of the game.
它使信息更加連貫,并幫助我們從中創造價值,發現新模式并發現趨勢。 讓我們舉個例子:您如何向老板或客戶解釋excel電子表格中大量數據的行和列? 創建相同數據的圖表,如條形圖,折線圖,散點圖等。 這為原始數據提供了意義和目的,現在您有了直觀的表示,就可以開始分析并將其集成到您的業務中。 通過為程序提供清晰且可操作的見解,這使許多企業和用戶獲得了支持,因為它可以使您領先于游戲。
什么是Power BI? (What is Power BI?)
Microsoft Power BI is a data visualization tool that allows you to quickly connect your data, prepare it, and model it as you like. It gives you the power to transform all your data into live interactive visuals, create customized real time business view dashboards, thus extracting business intelligence for enhanced decision making. You can visualize data and share insights. This tool allows you to embed your custom visualizations into your app or website, connect to hundreds of data sources like excel, google analytics, IoT devices for real time data etc. It amalgamates everything conveniently with your existing professional environment allowing you to acquire analytics and reporting capabilities. You can publish these reports, therefore allowing all the users to avail the latest information.
Microsoft Power BI是一種數據可視化工具,可讓您快速連接數據,準備數據并根據需要對其建模。 它使您能夠將所有數據轉換為實時交互式視覺效果,創建自定義的實時業務視圖儀表板,從而提取業務智能以增強決策能力。 您可以可視化數據并共享見解。 此工具可讓您將自定義可視化效果嵌入到您的應用程序或網站中,連接到數百種數據源,例如excel,google Analytics(分析),用于實時數據的IoT設備等。它與現有的專業環境將所有內容方便地合并在一起,從而使您能夠獲取分析數據并報告功能。 您可以發布這些報告,因此允許所有用戶使用最新信息。
You can read more about Power BI here.
您可以在此處閱讀有關Power BI的更多信息。
Now let’s use Power BI and create a basic visualization of our data.
現在,讓我們使用Power BI并創建數據的基本可視化。
安裝與設置 (Installation and Set up)
Listed below are a few ways to install Power BI:
下面列出了幾種安裝Power BI的方法:
You can visit the Power BI Desktop download page and choose the Download for free option.
您可以訪問Power BI Desktop下載頁面,然后選擇“免費下載”選項。
Alternatively, you can also download Power BI Desktop from the Power BI service website for free by signing in and clicking the download button on the top right corner of the screen.
另外,您也可以通過登錄并單擊屏幕右上角的下載按鈕,從Power BI服務網站免費下載Power BI Desktop。
After you install Power BI Desktop, you can now visit the Power BI service website and sign in to your account. If you have not signed up yet, you can scroll down and use your student or work email address to sign up for free.
安裝Power BI Desktop之后,您現在可以訪問Power BI服務網站并登錄到您的帳戶。 如果您尚未注冊,則可以向下滾動并使用您的學生或工作電子郵件地址免費注冊。
Image by author圖片作者Alternatively, if you do not have a student or work email address you can sign up for a Microsoft trial account by clicking here.
或者,如果您沒有學生或工作電子郵件地址,則可以單擊此處來注冊Microsoft試用帳戶。
After installing Power BI Desktop, let’s launch the application and explore the main components of the application.
安裝Power BI Desktop之后,讓我們啟動該應用程序并瀏覽該應用程序的主要組件。
Image by author圖片作者Fields: Here you can view the data you import and it’s fields.
字段 :您可以在此處查看您導入的數據及其字段。
Visualizations: This pane consists of the different visuals that you can utilize to display distinctive visualizations of your data.
可視化:此窗格由不同的可視化組成,可用于顯示數據的獨特可視化。
Publish: enables you to publish your data model to your Power BI workspace.
發布:使您可以將數據模型發布到Power BI工作區。
Get Data: allows you to import your data in the form of excel files, text/csv, xml, etc. We can also obtain data from Microsoft Azure, or other online services like google analytics, GitHub, etc.
獲取數據:允許您以excel文件,文本/ csv,xml等形式導入數據。我們還可以從Microsoft Azure或其他在線服務(例如Google Analytics(分析),GitHub等)中獲取數據。
準備資料 (Preparing data)
As mentioned before, the “Get data” option allows you to import data of various sizes from different platforms. You can download all the necessary material for this tutorial from here.
如前所述,“獲取數據”選項允許您從不同平臺導入各種大小的數據。 您可以從此處下載本教程的所有必要材料。
Open the excel file called “SalesData.xlsx”, select the In-Stock Data sheet from the left side of the window and then click on Transform Data. This should bring you to the Power Query Editor. The Power Query Editor allows you to navigate through and transform the data.
打開一個名為“ SalesData.xlsx”的excel文件,從窗口左側選擇In-Stock Data表,然后單擊Transform Data。 這將帶您進入Power Query編輯器。 使用Power Query Editor,您可以瀏覽和轉換數據。
Great! Now that we have loaded our data, let’s get to cleaning it.
大! 現在我們已經加載了數據,讓我們開始清理它。
Image by author圖片作者When we view the In-Stock data file, the first thing that we notice is that the first row in the file as well as Column 9 and 10 have null values. Values like these slow down our model’s overall performance so lets clean that up. You can delete the rows and columns by selecting the “Remove Rows” and “Remove Columns” options respectively.
當我們查看庫存數據文件時,我們注意到的第一件事是文件中的第一行以及第9列和第10列具有空值。 像這樣的值會減慢我們模型的整體性能,因此請清理它們。 您可以通過分別選擇“刪除行”和“刪除列”選項來刪除行和列。
Image by author圖片作者Once we do this, we may now notice that the first row of our data actually consists of our column name. So let’s change that by selecting the “Use first row as headers option”.
一旦這樣做,我們現在可能會注意到數據的第一行實際上是由我們的列名組成的。 因此,我們通過選擇“使用第一行作為標題選項”來進行更改。
Click “Close & Apply” in the top left corner of the home section in the Power Query Editor to make sure our changes are applied.
在Power Query編輯器中,單擊主頁部分左上角的“關閉并應用”,以確保我們的更改已應用。
You can even change the data type of a column easily by clicking on the data view icon on the left of the window.
您甚至可以通過單擊窗口左側的數據視圖圖標來輕松更改列的數據類型。
Cleaning our data can be a long and tedious process. Mentioned above are a few basic ways of dealing with data that have a few obvious anomalies but there is a lot more to it. At the end of this tutorial you will find the references that I’ve used to understand and learn Power BI and its functionalities.
清理我們的數據可能是一個漫長而乏味的過程。 上面提到的是一些處理數據的基本方法,這些數據有一些明顯的異常,但還有很多其他的異常。 在本教程的最后,您將找到我用來理解和學習Power BI及其功能的參考。
For the sake of this tutorial, I have uploaded a “ready to use” file called “PowerBI Tutorial.pbix”. Please refer to the link attached above for the same. Once that has loaded, we can get to the fun part — Visualizing our data.
為了本教程的緣故,我上傳了一個名為“ PowerBI Tutorial.pbix”的“即用型”文件。 請參考上面的鏈接。 一旦加載完成,我們就可以進入有趣的部分-可視化我們的數據。
創建報告 (Creating a report)
In this tutorial, we will learn to create a few charts and understand how you can analyze data.
在本教程中,我們將學習創建一些圖表并了解如何分析數據。
可視化效果: (Visualizations:)
Bar Charts: Now that our data has loaded we can view it in the Fields pane to the right of our screen. We can select our desired visualization from the visualization pane and go back to the fields pane to select the data that we want to analyze. Let’s start by analyzing the products in our inventory and its sales. Select the Average Inventory On Hand ($), Sales ($), and the Category fields.
條形圖:現在,我們的數據已加載,我們可以在屏幕右側的“字段”窗格中查看它。 我們可以從可視化窗格中選擇所需的可視化,然后返回到字段窗格以選擇要分析的數據。 讓我們從分析庫存及其銷售中的產品開始。 選擇平均現有庫存($),銷售($)和類別字段。
Congratulations on creating your first chart in Power BI!
恭喜您在Power BI中創建了第一個圖表!
This bar chart compares the sum of the Average Inventory and the sum of the Sales for every Category. However, a logical way of studying this would be to compare the Average value of our Inventory and the Average Sales for every category. We can do this by changing it’s values from Sum to Average in the Visualization pane.
此條形圖比較每個類別的平均庫存總和與銷售總和。 但是,一種合理的研究方法是比較每個類別的“庫存平均值”和“平均銷售額”。 我們可以通過在“可視化”窗格中將其值從“總和”更改為“平均值”來實現。
Using the same logic and fields, you can drag and drop different types of bar charts from the visualization pane and display the data in the form of a Stacked bar chart, Stacked column chart, Clustered bar chart, etc as shown below.
使用相同的邏輯和字段,可以從可視化窗格中拖放不同類型的條形圖,并以堆積條形圖,堆積條形圖,聚集條形圖等形式顯示數據,如下所示。
Image by author圖片作者Line Charts: Let’s visualize our data using a line chart. Select the line chart from the visualization pane and select the Sales field from Geo Data in the Fields pane. Drag and drop the Week ID into the Axis section of the visualization pane as shown in the video below. This shows us the sales made with respect to the week ID. Further we can gain insights on the availability of products by comparing our inventory with our sales. To do this, drag and drop the Average Inventory field onto the secondary axis section in the visualization field. You can also click on your chart, and then change it to a Area chart or a Stacked area chart from the visualization pane.
折線圖:讓我們使用折線圖可視化我們的數據。 從可視化窗格中選擇折線圖,然后從“字段”窗格中的“地理數據”中選擇“銷售”字段。 將Week ID拖放到可視化窗格的Axis部分中,如下面的視頻所示。 這向我們顯示了有關星期ID的銷售額。 此外,我們可以通過比較庫存和銷售額來獲得有關產品可用性的見解。 為此,將“平均庫存”字段拖放到可視化字段的輔助軸部分。 您也可以單擊圖表,然后從可視化窗格將其更改為“面積圖”或“堆積面積圖”。
Pie/Donut Charts: Pie charts are quite well known however when it comes to displaying a lot of data, it’s recommended that one does not use a Pie chart simply because it can be difficult to identify tiny differences between categories. For instance: clearly determining which category takes up more area.
餅圖/甜甜圈圖:餅圖是眾所周知的,但是在顯示大量數據時,建議不要僅使用餅圖,因為這樣可能很難識別類別之間的微小差異。 例如:明確確定哪個類別占用更多面積。
Image by author圖片作者To create a pie/donut chart, choose the pie/donut visualization and the appropriate categories to display data as shown below.
要創建餅圖/甜甜圈圖,請選擇餅圖/甜甜圈可視化效果和適當的類別以顯示數據,如下所示。
Maps: You can also use a map to view your sales in different places. Choose the globe icon from the visualization pane. Now select the required categories i.e. State ID and Sales. Legends are very useful when it comes to analyzing a few number of categories. Using Legends we can also view the sales of every category in the state by dragging and dropping the Category field into the Legend section as shown below.
地圖:您還可以使用地圖查看您在不同地方的銷售情況。 從可視化窗格中選擇地球圖標。 現在選擇所需的類別,即州ID和銷售。 在分析幾個類別時,圖例非常有用。 使用“圖例”,我們還可以通過將“類別”字段拖放到“圖例”部分中來查看該州每個類別的銷售額,如下所示。
KPIs: Key performance indicators (KPIs) are a measure of the company’s performance and evaluates it’s success. We can display this in Power BI using the card or gauge option from the visualization pane. While using the KPI option, we will need to drag the week ID onto the trend axis in the visualization pane in order to view the weekly trends behind the KPI value.
KPI:關鍵績效指標(KPI)是衡量公司績效并評估其成功的指標。 我們可以使用可視化窗格中的卡或量規選項在Power BI中顯示此內容。 使用KPI選項時,我們需要將星期ID拖動到可視化窗格中的趨勢軸上,以便查看KPI值后面的每周趨勢。
Deleting a chart: To delete a chart, simply click on it and press delete.
刪除圖表:要刪除圖表,只需單擊它,然后按Delete鍵。
Adding a new page: To add a new page, click on the ‘+’ icon at the bottom of the window.
添加新頁面:要添加新頁面,請單擊窗口底部的“ +”圖標。
Image by author圖片作者Now that we have learnt how to visualize our data, we can consolidate everything and make a dashboard.
現在我們已經學習了如何可視化數據,我們可以整合所有內容并創建一個儀表板。
創建儀表板 (Creating a dashboard)
To make the dashboard, copy paste all the visualizations that we have created so far onto the same page as shown below.
要制作儀表板,請將我們到目前為止創建的所有可視化內容復制粘貼到同一頁面上,如下所示。
Image by author圖片作者This basically gives us our dashboard. In order to create a mobile view of this dashboard, click on the view button and select Mobile layout. Once you’ve done that, you can drag and drop your visualizations onto the phone screen as you desire.
這基本上給了我們儀表板。 為了創建此儀表板的移動視圖,請單擊視圖按鈕,然后選擇“移動布局”。 完成此操作后,您可以根據需要將可視化內容拖放到電話屏幕上。
客制化 (Customization)
Now that our dashboard is ready, we can configure our visualizations by exploring the various options available in the Format section of the visualizations pane.
現在我們的儀表板已經準備就緒,我們可以通過瀏覽可視化窗格的“格式”部分中的各種選項來配置可視化。
Power BI中的R和Python (R and Python in Power BI)
Including Python and R in Power BI is one of the greatest things that Microsoft has done. Power BI is now a one stop place for data visualization using different libraries and machine learning packages. It allows you to reshape data without having to modify the underlying tool.
在Power BI中包含Python和R是微軟所做的最偉大的事情之一。 Power BI現在是使用不同庫和機器學習包進行數據可視化的一站式平臺。 它使您無需修改??基礎工具即可重塑數據。
將R與Power BI集成 (Integrating R with Power BI)
R is a language and environment that is used for statistical computing and graphics. We can analyze our data using R in Power BI to acquire the desired results.
R是用于統計計算和圖形的語言和環境。 我們可以使用Power BI中的R分析數據以獲取所需的結果。
Requirements: You will need to have R and R studio and other necessary packages and libraries installed in your system.
要求:您將需要在系統中安裝R和R studio以及其他必要的軟件包和庫。
Image by author圖片作者Set up: Click on File in the top left corner of your Power BI window, select “options and settings”. Go to the R scripting option under Options and make sure that the correct path to the folder holding R is listed, and that the R studio IDE is detected as shown in the image below
設置:單擊Power BI窗口左上角的“文件”,選擇“選項和設置”。 轉到“選項”下的“ R腳本”選項,并確保列出了存放R的文件夾的正確路徑,并確保檢測到R studio IDE,如下圖所示。
Using R scripts for visualizing data: R provides an amazing platform for data analysis and visualization. It allows you to visualize data even before you begin with it’s analysis. Shown below is an example of data visualization by displaying the frequency of our Sales using R scripts.
使用R腳本可視化數據: R為數據分析和可視化提供了一個了不起的平臺。 它使您甚至可以在開始分析之前就可視化數據。 下面顯示的是一個通過R腳本顯示銷售頻率的數據可視化示例。
將Python與Power BI集成 (Integrating Python with Power BI)
Python is often used for data visualization using libraries like matplotlib, Seaborn, Gleam, Plotly, etc. Power BI is a platform where we can integrate and enhance Python visualizations.
Python通常通過matplotlib,Seaborn,Gleam,Plotly等庫用于數據可視化。Power BI是一個平臺,我們可以在其中集成和增強Python可視化。
Requirements: Install Python and other necessary libraries and packages that you will require in your system
要求: 安裝Python和其他在系統中需要的必要庫和軟件包
Set up: Click on File, in the top left corner of Power BI Desktop, go to Python scripting under Options in the Options and settings section. Make sure the Python home directory is set to the location where Python is installed in your system as shown below in the image.
設置:單擊Power BI Desktop左上角的File,轉到“選項和設置”部分中“選項”下的Python腳本。 確保將Python主目錄設置為系統中安裝Python的位置,如下圖所示。
Using Python scripts for visualizing data: Python has been used for data visualization since years. Libraries like matplotlib are good for getting a sense of the data. Although, when it comes to creating aesthetically pleasing charts quickly and conveniently Python is not very useful. However, when we integrate Python and Power BI, we acquire publication-quality charts. The video below shows us an instance of displaying the sales with respect to the Week ID using Python.
使用Python腳本可視化數據:多年來,Python已用于數據可視化。 諸如matplotlib之類的庫對于了解數據很有幫助。 盡管在快速方便地創建美觀的圖表時,Python并不是很有用。 但是,當我們將Python和Power BI集成在一起時,我們獲得了具有出版質量的圖表。 以下視頻向我們展示了使用Python顯示與周ID相關的銷售情況的實例。
保存和發布 (Saving and Publishing)
Let’s get back to our dashboard. Now that we have a dashboard that is ready to publish.
讓我們回到儀表板。 現在,我們有了可以發布的儀表板。
Save your work: Go to “File” in the top left corner of the Power BI Desktop window and click on save. You can also use the ‘Ctrl + S’ shortcut key to save your work. You can also Export your work as a PDF or a Power BI template.
保存您的工作 :轉到Power BI Desktop窗口左上角的“文件”,然后單擊“保存”。 您還可以使用“ Ctrl + S”快捷鍵來保存您的工作。 您也可以將工作導出為PDF或Power BI模板。
Publishing: Go to the Publish section under File in the top left corner of the Power BI Desktop window and click on “Publish to Power BI”. Select your workspace. Click on “Open PowerBI Tutorial.pbix in Power BI” to view your report in your workspace. You can now share your report with others and edit it in your workspace as well.
發布:轉到Power BI Desktop窗口左上角“文件”下的“發布”部分,然后單擊“發布到Power BI”。 選擇您的工作區。 單擊“在Power BI中打開PowerBI Tutorial.pbix”以在工作區中查看報告。 現在,您可以與其他人共享報告,也可以在工作區中對其進行編輯。
結論 (Conclusion)
Kudos to you for getting to the end of this tutorial! You have now learnt the basics of data visualization in Power BI. In this tutorial, I have only covered a few types of visualizations but there are many more available in Power BI that you can explore. Be creative and visualize your data in your own way.
感謝您閱讀本教程的結尾! 您現在已經了解了Power BI中數據可視化的基礎。 在本教程中,我僅介紹了幾種可視化類型,但您可以在Power BI中進行探索。 發揮創意,以自己的方式可視化數據。
Thank you for reading my article, hope you enjoyed it.
感謝您閱讀我的文章,希望您喜歡它。
[1] Udemy, ‘Microsoft certified: Data Analyst Associate with Power BI’ : https://www.udemy.com/share/1035gaBEISdFxVQ3s=/
[1] Udemy,“ Microsoft認證:與Power BI關聯的數據分析師”: https ://www.udemy.com/share/1035gaBEISdFxVQ3s=/
[2] Microsoft’s Power BI documentation : https://docs.microsoft.com/en-us/power-bi/fundamentals/desktop-getting-started
[2] Microsoft的Power BI文檔: https : //docs.microsoft.com/zh-cn/power-bi/fundamentals/desktop-getting-started
翻譯自: https://towardsdatascience.com/how-to-visualize-data-using-power-bi-9ec1413e976e
power bi可視化表
總結
以上是生活随笔為你收集整理的power bi可视化表_如何使用Power BI可视化数据?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 终于!C919将在2月28日商业首飞 从
- 下一篇: 变形金刚2_变形金刚(