Connecting to Online Data via Web URL in Power BI: A Guide Using Worldometer Website

 

Connecting to Online Data via Web URL in Power BI: A Guide Using Worldometer Website

Introduction

In the modern era of business intelligence, real-time data is a game-changer. Whether you're analyzing health trends, global population changes, or environmental statistics, having the latest data directly integrated into your reports is essential. Power BI offers the capability to connect directly to online data using Web URLs, enabling the creation of dynamic dashboards that update with live information.

One of the richest sources of live, global data is Worldometer. It provides continuously updated statistics across a wide range of topics — from population and government spending to COVID-19 cases and emissions.


Getting Started with Worldometer

Before connecting it to Power BI, let’s first explore how to navigate Worldometer:

🔹 Step 1: Open the Website

🔹 Step 2: Explore Available Data Sections

Worldometer offers various categories of data. On the homepage or via the top navigation bar, you can explore topics such as:

  • World Population

  • Coronavirus (COVID-19)

  • Government Spending

  • Environment

  • Energy Consumption

  • Food Production

  • Health

You can click on any of these sections to open a dedicated page with live updating tables and charts.


Advantages of Using Web URL to Connect Data in Power BI

  • 🔁 Live updates every time you refresh your Power BI dataset.

  • 📥 No manual downloading of files or data.

  • 📊 Real-time dashboards that reflect current global situations.

  • ⚙️ Seamless refresh scheduling for automated insights.

  • 🌐 Great for education, analytics, and policy insights.


Connecting Power BI to Live Coronavirus Data from Worldometer

Now that we’ve chosen the Coronavirus (COVID-19) data, let’s dive into the steps to pull this data into Power BI for live analysis.


🌐 Step 1: Open the COVID-19 Page on Worldometer

  1. Go to the Worldometer homepage:
    👉 https://www.worldometers.info/

  2. Click on the Coronavirus section or directly open:
    👉 https://www.worldometers.info/coronavirus/

You’ll see a live-updating table showing country-wise COVID-19 cases, deaths, recoveries, and more.


📊 Step 2: Open Power BI and Connect via Web

  1. Open Power BI Desktop.

  2. Click on HomeGet Data → Choose Web.

  3. In the URL box, enter:

  4. Click OK.

Step 3: Use the Navigator Pane

After a few seconds, Power BI will analyze the webpage and display a list of HTML tables found on it.

  1. You’ll see a window named Navigator.

  2. Look for the table that contains country-wise COVID-19 statistics. This is usually named "Table 0" or "Table 1".

  3. Click Table 0 (preview it to verify it includes columns like Country, Total Cases, Deaths, etc.).

  4. Click Transform Data to open the Power Query Editor.


🛠️ Step 4: Data Preprocessing & Transformation in Power Query

Once inside the Power Query Editor, follow these essential transformation steps:


🔹 4.1 Remove Unwanted Rows

  • Remove any empty rows or rows with text like "World", "Europe", etc. if you're only interested in countries.

  • Use the filter icon in the “Country” column to deselect such entries.


🔹 4.2 Rename Columns

Rename columns for clarity:

Old NameNew Name
Country,OtherCountry
Tot Cases/1M popCases per Million
1st CaseDate of First Case

Use the "Transform" tab → "Rename".


🔹 4.3 Change Data Types

Change the data types for appropriate columns:

  • Text for Country

  • Whole Number for Total Cases, Deaths, Recovered

  • Decimal Number for columns like Cases per Million

Use: Transform → Data Type dropdown


🔹 4.4 Remove Special Characters and Clean Data

Columns often contain characters like , (commas), +, or N/A.

For numeric columns:

  1. Use Transform → Replace Values

  2. Replace , with blank

  3. Replace + with blank

  4. Replace N/A or empty with 0

  5. Then change the column type to Whole Number or Decimal Number

Repeat for columns like:

  • Total Cases

  • Total Deaths

  • Active Cases

  • Total Tests, etc.


🔹 4.5 Remove Unwanted Columns (Optional)

If some columns are not needed for your analysis, right-click the column header → Remove.


✅ Step 5: Load the Cleaned Data into Power BI

Once transformation is complete:

  1. Click Home → Close & Apply to load the data into Power BI.

  2. Power BI now imports the cleaned data and makes it available for creating visuals.

Columns Used:

  • Country/Other

  • Total Cases

  • Total Deaths

  • Total Recovered

  • Tot Cases/1M pop

  • Deaths/1M pop

  • Population


🔍 Research Questions and Visualization Guide Using Power BI

Let’s formulate meaningful research questions and walk through graphical representation steps using Power BI visuals, with clear instructions on x-axis, y-axis, fields, and filters.


📌 Research Question 1:

Which countries have the highest number of total COVID-19 cases?

➤ Visual Type: Bar Chart (Clustered Column Chart)

➤ Steps:

  1. X-axis: Country

  2. Y-axis: Total Cases

  3. Sort by: Total Cases (Descending)

  4. Filters:

    • Optional: Top N filter → Show only Top 10 Countries

    • Remove countries with null or 0 values in Total Cases

🎯 Insight:

This helps to identify the global COVID-19 hotspots.


📌 Research Question 2:

What is the relationship between population and total cases per million?

➤ Visual Type: Scatter Plot (Bubble Chart)

➤ Steps:

  1. X-axis: Population

  2. Y-axis: Tot Cases/1M pop

  3. Size: Total Cases

  4. Legend/Category: Country

  5. Add Data Labels for a few significant countries (optional)

🎯 Insight:

Shows if highly populated countries necessarily have higher cases per million, or if smaller nations have disproportionately high infection rates.


📌 Research Question 3:

Which countries have the highest death rate per million population?

➤ Visual Type: Bar Chart (Horizontal)

➤ Steps:

  1. Y-axis: Country

  2. X-axis: Deaths/1M pop

  3. Filters:

    • Remove rows with null or zero death rate

    • Optional: Top N → Top 10 countries by Deaths/1M pop

🎯 Insight:

Identifies countries with the worst fatality rates, normalized by population.


📌 Research Question 4:

Which countries have managed the best recovery rate?

➤ Visual Type: Bar Chart (Stacked or Clustered)

➤ Additional Step: Create New Column in Power Query or Power BI


Recovery Rate = [Total Recovered] / [Total Cases]

Steps:

  1. X-axis: Country

  2. Y-axis: Recovery Rate

  3. Filters:

    • Only include countries with at least 1000 cases for significance

    • Sort descending

🎯 Insight:

Displays which countries are managing effective recoveries relative to infections.


📌 Research Question 5:

What is the distribution of total deaths vs. total recovered across countries?

➤ Visual Type: 100% Stacked Bar Chart

➤ Steps:

  1. Axis: Country

  2. Values:

    • Total Deaths

    • Total Recovered

  3. Use “100% stacked bar” to show proportional representation.

🎯 Insight:

Understand whether a country has higher recovery or death dominance in its outcome stats.


📌 Research Question 6:

Is there any correlation between population size and COVID-19 death counts?

➤ Visual Type: Scatter Plot

➤ Steps:

  1. X-axis: Population

  2. Y-axis: Total Deaths

  3. Size: Total Cases

  4. Optional: Add a trend line (Enable in Analytics tab)

Insight:

Reveals correlation (or lack thereof) between population size and COVID fatality impact.


Optional Metrics to Create  Power Query

  1. Death Rate:

Death Rate = [Total Deaths] / [Total Cases]

2.    Recovery Rate:
Recovery Rate = [Total Recovered] / [Total Cases]

3.    Active Cases (if not present):
Active Cases = [Total Cases] - [Total Deaths] - [Total Recovered]

RQ7: Which countries have the highest number of active cases?

Note: Since “Active Cases” isn't in the dataset, we use Power Query to calculate it.

🧾 Power Query Steps:

  • Add Column → Custom Column:

= [Total Cases] - [Total Deaths] - [Total Recovered]

Rename to: Active Cases

 Visual: Column Chart

  • Axis: Country

  • Values: Active Cases

  • Sort: Descending

RQ8: Which countries report zero COVID-19 deaths?

🧾 Power Query Steps:

  • Filter → Total Deaths = 0

📊 Visual: Table or Bar Chart

  • Fields: Country, Total Cases, Total Recovered

  • Sort: By Total Cases descending


📌 RQ9: Compare Total Recovered vs Total Deaths across countries

📊 Visual: Clustered Bar Chart

  • Axis: Country

  • Values: Total Recovered, Total Deaths

  • Legend: Measure type

RQ10: Which countries have more deaths than recovered cases?

🧾 Power Query Steps:

  • Add Column → Custom Column:

= if [Total Deaths] > [Total Recovered] then "Critical" else "Normal"


  • Filter → Critical

📊 Visual: Table

  • Fields: Country, Total Deaths, Total Recovered


📌 RQ11: What is the ranking of countries based on total cases?

🧾 Power Query Steps:

  • Sort by Total Cases (Descending)

  • Add Column → Index Column (starting from 1)

  • Rename → Case Rank

📊 Visual: Table

  • Fields: Case Rank, Country, Total Cases, Total Deaths


📌 RQ12: Compare total cases, deaths, and recoveries in the top 10 countries

🧾 Power Query Steps:

  • Sort by Total Cases

  • Keep Top 10 Rows

📊 Visual: Clustered Column Chart

  • Axis: Country

  • Values: Total Cases, Total Deaths, Total Recovered


📌 RQ13: Display population distribution by country (Top 10)

🧾 Power Query Steps:

  • Sort by Population

  • Keep Top 10 Rows

📊 Visual: Pie Chart

  • Values: Population

  • Legend: Country


📌 RQ14: Identify countries with 100% recovery (i.e., no active cases)

🧾 Power Query Steps:

  • Add Column → Custom Column:

= if [Total Cases] = [Total Recovered] then "Fully Recovered" else "Ongoing"

  • Filter → Fully Recovered

📊 Visual: Table

  • Fields: Country, Total Cases, Total Recovered


📌 RQ15: Create a world map to show spread by country

📊 Visual: Filled Map or Bubble Map

  • Location: Country

  • Size: Total Cases or Total Deaths

  • Tooltips: Add Population, Total Recovered, etc.

Ensure map visuals are enabled and country names are recognized as geographic locations.


📌 RQ16: Analyze Deaths per Million vs Cases per Million

📊 Visual: Scatter Chart

  • X-axis: Tot Cases/1M pop

  • Y-axis: Deaths/1M pop

  • Details: Country

  • Tooltips: Population, Total Cases









टिप्पणी पोस्ट करा

0 टिप्पण्या