How could i do a geobubble plot with data

2 ビュー (過去 30 日間)
Kelsey Pettrone
Kelsey Pettrone 2020 年 11 月 15 日
回答済み: Monisha Nalluru 2020 年 11 月 20 日
I want to make a geo bubble plot with the data where the user can pick obesity, smoking, alchohol, or drugs. and then it would show the countries with the largest deaths due to those things on the map. I have no idea where to even start with this.
  1 件のコメント
Adam Danz
Adam Danz 2020 年 11 月 16 日
What's the first step where you're stuck? Loading the data?

サインインしてコメントする。

回答 (1 件)

Monisha Nalluru
Monisha Nalluru 2020 年 11 月 20 日
Hi Kelsey,
Inorder to use geobubble function we need to have latitude and longitude data, which in missing in the above mentioned file.
Once you get all the required data, you can dispaly in two ways according to my understanding
  1. Create a GUI which allows users to select year and the cause of death, then plot respective geobubble plot with bubble size being number_of_death (i.e in this case you are allowing user to select year and also the reason for death)
  2. If you dont want the user to give option of selecting years, then aggregate the number of death for each reason with respect to country and based on user selection of reason display the plot.
As an example
% geobubble plot displaying death due to obsetity in the year 1990
data=readtable('RiskFactorAnalysis.csv'); %create table
newtable=data(data.Year==1990,:);
geobubble(newtable.Latitude,newtable.Longitude,newtable.Obsetity_Death_per_100000);
Hope this helps!

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by