Black Lives Matter. Please consider donating to Black Girls Code today.

Hide zero values in bar plot

Hello

I have the following dataset

> tweets_location
            state   n
1      california 104
2           texas  35
3        new york  25
4    pennsylvania  22
5         florida  17
6        illinois  12
7        michigan   9
8  north carolina   8
9         georgia   7
10     new mexico   7
11        arizona   6
12      minnesota   6
13       colorado   5
14         nevada   5
15     washington   5
16        indiana   4
17     new jersey   4
18         oregon   4
19        alabama   3
20       kentucky   3
21       nebraska   3
22           ohio   3
23      tennessee   3
24       virginia   3
25          other  43

Can you please advise on why am i seeing states with 0 values? how can i therefore hide them and sort the bars from highers to lowest?

fig = plot_ly(tweets_location, x = ~ state, y = ~ n ,type = "bar")
fig