Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

ggplot how to plot pie charts on USA map with state's id

$
0
0

I would like to plot pie charts of different fuel type for each state on USA map.my data includes fuel types and their amount and each state id. I want to know how to plot pie on map for each state with state id?

Thanks,

data <- data.frame(region= c(AL, AR, AZ, CA, IA),                   gas= c(25, 45, 45, 60, 75),                  coal= c(45, 50, 45, 20, 15),                   wind= c(30, 5, 10, 20, 10),                   solar= c(10, 10, 10, 10, 10))

Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>