- 5
- 67 262
Sérgio Costa
Brazil
เข้าร่วมเมื่อ 26 เม.ย. 2020
Smooth lines with geom_smooth() + Facets with facet_wrap() | Professional dataviz with ggplot2 | R
5 minutes is enough to create a professional-looking and ready for publication chart. In this video i show how to add smoothing lines and the use of facet_wrap functions from ggplot2 package.
The code and files can be found on my github repository: github.com/sergiocostafh/ggplot2_dataviz
Forest sciences and biometrics in R (portuguese): mensura-r.netlify.app/
Video music: Kazukii - Dawn (th-cam.com/video/-UPBZ0AYigc/w-d-xo.html)
The code and files can be found on my github repository: github.com/sergiocostafh/ggplot2_dataviz
Forest sciences and biometrics in R (portuguese): mensura-r.netlify.app/
Video music: Kazukii - Dawn (th-cam.com/video/-UPBZ0AYigc/w-d-xo.html)
มุมมอง: 6 810
วีดีโอ
Population pyramid chart with geom_bar() | Professional dataviz with ggplot2 | R
มุมมอง 6K4 ปีที่แล้ว
*CORRECTION: I forgot to set the Y axis to absolute values and because of that the labels on the left side of the axis are read negative. To fix it, just replace the command: scale_y_continuous (breaks = seq (-10,10,1), labels = function (x) {paste(abs (x), '%')}) The corrected version of the code can be found on my github (url below).] 5 minutes is enough to create a professional-looking and...
Raster maps with geom_raster() | Professional dataviz with ggplot2 | R
มุมมอง 21K4 ปีที่แล้ว
5 minutes is enough to create a professional-looking and ready for publication chart. In this video i show how to create raster maps using geom_raster() function from ggplot2 package. For this example, we use annual precipitation data for South America from WorldClim. The code and files can be found on my github repository: github.com/sergiocostafh/ggplot2_dataviz Forest sciences and biometrics...
Plotting longitudinal data with geom_point() + geom_line() | Professional dataviz with ggplot2 | R
มุมมอง 14K4 ปีที่แล้ว
5 minutes is enough to create a professional-looking and ready for publication chart. In this video i will show how to visualize longitudinal data using geom_point() and geom_line() functions from ggplot2 package. The data used in this video is the 'Orange' dataset from 'datasets' package. The code and files can be found on my github repository: github.com/sergiocostafh/ggplot2_dataviz Forest s...
Choropleth maps with geom_sf() | Professional dataviz with ggplot2 | R
มุมมอง 19K4 ปีที่แล้ว
5 minutes is enough to create a professional-looking and ready for publication chart. In this video i will show how to create a choropleth map using geom_sf() function from ggplot2 package. The choropleth in this video was created using population density data from Brazil's municipalities. The code and files can be found on my github repository: github.com/sergiocostafh/ggplot2_dataviz Forest s...
Thank you very much... May I kindly have your email address for further contact?
fuck ggplot2, this is by far more straightforward with base R.
how did you select the extent for South America??
Hola ami me sale error en scale_fill_manual(name='',values=c('darkred','steelblue'))+ .... Error in `palette()`: ! Insufficient values in manual scale. 10 needed but only 2 provided.
how to fix "Error in `geom_sf()" in r
Show de bola
Gracias, tras una tarde buscando esto lo encontre resumido en 5 minutos.
Hola, qué sucede? climate <- crop(climate,extent(-82,-34,-60.15)) Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘crop’ for signature ‘"list"’
why when i use the geom_line its always error, its says "Each group consists of only one observation."
Genial, definitivamente muy útil!! Gracias. Thanks!!
thank you for this; I am trying to visulaise the below but I am getting straight lines connected in the same year. any idea how to fix it? world_bank_pop %>% # tibble() %>% # janitor::clean_names() %>% pivot_longer(cols = 3:20, names_to = "date_data", values_to= "num_values") %>% tibble() %>% head(100) %>% ggplot(aes(date_data, num_values, groups = country)) + # geom_line()+ geom_point()
It is a great help. Thank you. I am newbie in maps and raster... I am intending to create some with my own data (it seems hard to understand) instead of use raster maps already available in the Web. May I suggest I video for the initial steps in raster creation and adjust on a geographic map (e.g., epidemiological data)?
how could the propec scale becomes minus 2.5 till positiive 2.5 , i mean it supposed to be percentages so it couldnt be negative, is the propec for male supposed to be *minus 100? ( i asked) because i literally copy your syntax but my plot turned to be basic stack bar plot
I I mentioned this error in the description of the video and I made available the code that corrects the negative values in the scale. Check te code on my github github.com/sergiocostafh/ggplot2_dataviz/blob/master/Population%20pyramid%20chart%20with%20geom_bar().R
Ficou showwww
wow, beautiful plot. thank you
Wow! Thank you so much !
Thanks
Thanks
Amazing tutorial, helped me to make mz raster points looks great
Why mine said could not find function ggplot
Thanks :)
Fantastical tutorial, best one!
estaba buscando este video, un diez
Hi, I need to plot map of an Indian state. Would you please help me?
Yes I can help
@@prashantshekhar1012 thank U so much for replying! Can we connect(gmeet) ASAP? plz let me know your email!
It's REALLY the best video about graphics on R. i loveeee it!!! thank you sooo much !!
This is the kind of coding tutorials I would pay for.
Awesome video! Please do more step-by-step R data visualization tutorials!
Bravo!!! Lol, thanks for sharing.
Thank you for posting a technique that divides the number of males in a cohort by TOTAL population, and number of females in a cohort by TOTAL population. I have seen numerous webpages and TH-cam videos who divide male or female cohort by the total male or female population. Also, thank you for this coding demonstration. This is exactly what I needed.
Thanks bro, lu mmg mantap...
Top demais! voce foi bem em tudo até na música, pra acalmar a turma desesperada por informações! Thaks a lot
Amazing!!, Can I add geom_point on geom_sf() ?
Thank you very much! One question, when you export it as pdf, can you modify each element of the map in photo editing app (illustrator)?
You would be better off to export as svg for editing
where did you get the preciptation data from?
How can i add value for grid?
Muito bom! Me ajudou bastante esses mapas do Brasil.
Very nice code! Thanks! However, generally accepted for females - on right, males - on left. But this may vary in different scientific societies.
You are correct. At least in English-language demography publications, males are on the left and females are on the right.
Fantastic video.. please note tidyverse contains ggplot2 library so loading tidyverse is enough.
Thank you, very much. Your video allowed me to finaly understand and plot the choropleth
I don't understand how the url link works.
why viridis library not loaded in the beginning?
Great lesson) one little question: how to add a custom (not OSM) base map for aesthetic purposes?
when I run climate=raster::getData('worldclim', var='bio',res=2.5) I get error : Could not download file -- perhaps it does not exist Error in file(con, "r") : cannot open the connection In addition: Warning messages: 1: In utils::unzip(zipfile, exdir = dirname(zipfile)) : error 1 in extracting from zip file 2: In file(con, "r") : cannot open file 'C:/Users/Hi/Documents/wc2-5/bio1.hdr': No such file or directory
Qué buenos videos!!!!!!
Hello, How can i get the data you are using on this clip. Great Work.
The data is in the base package `datasets`. Just load the package and type `Orange` to see it, as shown in the video.
So many infos in one video !! Great. Thank you.
FYI the gather() and spread() from dplyr have been depreciated. Use pivot_longer() and pivot_wider() as these can accomplish the same result, with clearer syntax.
Thanks for the contribution, i accepted your pull request on github.
Brilliant video. Thanks Sergio!
Very beautiful map! there is a package called 'brazilmaps', with this package you don't need to download the shapefiles, take a look. Looking forward to more videos, good job!
trying URL 'biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/bio_2-5m_bil.zip' Content type 'application/zip' length 129319755 bytes (123.3 MB) ======= downloaded 19.6 MB Error in utils::download.file(url = aurl, destfile = fn, method = "auto", : download from 'biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/bio_2-5m_bil.zip' failed In addition: Warning messages: 1: In utils::download.file(url = aurl, destfile = fn, method = "auto", : downloaded length 20594688 != reported length 129319755 2: In utils::download.file(url = aurl, destfile = fn, method = "auto", : URL 'data.biogeo.ucdavis.edu/data/climate/worldclim/1_4/grid/cur/bio_2-5m_bil.zip': status was 'Failure when receiving data from the peer' It seems like that I could not download the data
I hit a bot of a problem with > rasdf <- as.data.frame(raster,xy=TRUE)%>%drop_na(raster) Produced the following: Error in drop_na(., raster) : could not find function "drop_na"...
load tidyverse package to enable drop_na() function
Otherwise na.omit(your dataframe)