Skip to content

Commit d5a883e

Browse files
committed
total_liabilities & revenues Viz
1 parent 6926f71 commit d5a883e

4 files changed

+386
-14
lines changed
File renamed without changes.

viz_big_entities.Rmd

+13-8
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ library(purrr)
1616
library(knitr)
1717
library(DT)
1818
library(ggrepel)
19-
acfrs_city_pop_added_char <- readRDS("acfrs_city_pop_added_char.RDS")
19+
#acfrs_city_pop_added_char <- readRDS("acfrs_city_pop_added_char.RDS")
20+
# probelem with integer64
21+
acfrs_city_pop_added_char <- rio::import(here::here("acfrs_city_pop_added_char.csv"))
2022
```
2123

2224

@@ -33,7 +35,9 @@ acfrs_city_pop_added_char <- readRDS("acfrs_city_pop_added_char.RDS")
3335
mutate(
3436
tot_liabilities_mil = round(total_liabilities/1000000),
3537
tot_revenues_mil = round(revenues/1000000)) -> d1
36-
38+
```
39+
40+
```{r}
3741
d1 %>%
3842
ggplot(aes(population, tot_liabilities_mil)) +
3943
geom_point(color = "#8EA0CB", alpha = .5) +
@@ -184,8 +188,10 @@ top6_cities %>%
184188
185189
```
186190

191+
187192
## Total revenues and Total Liabitity per person in 6 largest cities
188-
```{r, echo=FALSE, include=FALSE}
193+
194+
```{r, echo=FALSE}
189195
dp %>%
190196
ggplot(aes(name, Value, fill = type)) +
191197
geom_bar(stat = "identity", position = "dodge") +
@@ -196,7 +202,7 @@ ggplot(aes(name, Value, fill = type)) +
196202
197203
labs(
198204
x = "",
199-
y = "USD",
205+
y = "USD (raw scale)",
200206
title = "Total revenues and Total Liabitity per person in 6 largest cities"
201207
) +
202208
@@ -205,7 +211,7 @@ ggplot(aes(name, Value, fill = type)) +
205211
206212
```
207213
## Total revenues and Total Liabitity per person in 6 largest cities - Comparison
208-
```{r, results= 'asis', echo=FALSE, include=FALSE}
214+
```{r, results= 'asis', echo=FALSE}
209215
top6_cities %>%
210216
pivot_longer(cols = 6:7,
211217
names_to = "type",
@@ -220,7 +226,6 @@ ggplot(aes(name, Value, fill = type)) +
220226
#average liabilities per person of all cities
221227
geom_hline(yintercept = round(mean(acfrs_city_pop_added_char$total_liabilities/ acfrs_city_pop_added_char$population)),
222228
linetype = "dashed", color = "#8EA0CB", size = 1) +
223-
224229
225230
#average revenues per person of all cities
226231
geom_hline(yintercept = round(mean(acfrs_city_pop_added_char$revenues/ acfrs_city_pop_added_char$population)),
@@ -230,8 +235,8 @@ geom_hline(yintercept = round(mean(acfrs_city_pop_added_char$revenues/ acfrs_cit
230235
231236
labs(
232237
x = "",
233-
y = "USD",
234-
title = "Total revenues and Total Liabitity per person in 6 largest cities\nComparison with average values of all cities",
238+
y = "USD (raw scale)",
239+
title = "Total revenues and Total Liabitity per person in 6 largest cities\nComparison with average values per person of all cities",
235240
236241
) +
237242

viz_big_entities.html viz_big_entities1.html

+6-6
Large diffs are not rendered by default.

viz_big_entities_feb14.html

+367
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)