Posts by Guilherme Marques • 89 points
7 posts
-
0
votes1
answer57
viewsA: Use of Loops for Dataframe Editing [R]
I solved the problem by combining another data.frame with GDP growth information. By merging the two data.frames, I was able to generate a final data.frame with the information I needed. Below,…
ranswered Guilherme Marques 89 -
0
votes1
answer57
viewsQ: Use of Loops for Dataframe Editing [R]
I used the package wbstats to download a World Bank Governance Quality database for Latin American countries. The code below reproduces the process: LATAM <-…
rasked Guilherme Marques 89 -
0
votes1
answer612
viewsA: How to make a map of Brazil
If the idea is merely to create a map of Brazil, the following code produces it in a very simple way: library(geobr) library(ggplot2) library(cowplot) uf <- read_state(code_state = "all") no_axis…
-
1
votes2
answers251
viewsA: R - brazilmaps (border of states)
A viable option is to use the ggplot2 package and the geom_polygon function to read the data, adopting "color" as in the example below. It is possible to change the color and thickness to your…
-
2
votes3
answers174
viewsQ: A: Column average over the range of values in R
I made a distribution by quantis of the Hdis of all municipalities in Brazil. The distribution was as follows: 0% 25% 50% 75% 100% 0.418 0.599 0.665 0.718 0.862 In my dataframe, there is a column…
rasked Guilherme Marques 89 -
1
votes1
answer396
viewsQ: R - Geom_col with division per year
Expensive, I have the following database: I want to plot a chart like the one below using ggplot: I’m trying to do this with the following code, but I’m not getting a good result. ggplot(Database,…
-
4
votes1
answer60
viewsQ: A - Create control column from two other columns
Expensive, I have a very large database with the following feature: ORIENTAÇÃO VOTO Sim Sim Não Sim Sim Não Não Não I would like to create a third column in which if the values hit, 1 will appear.…
rasked Guilherme Marques 89