Skip to content

Commit

Permalink
version 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ authored and cran-robot committed May 28, 2023
1 parent ba8b2aa commit bdb00c2
Show file tree
Hide file tree
Showing 29 changed files with 991 additions and 183 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
@@ -1,7 +1,7 @@
Package: dogesr
Type: Package
Title: Work with the Doges/Dogaresse Dataset
Version: 0.2.0
Version: 0.3.0
Author: Juan Julián Merelo-Guervós
Maintainer: Juan Julián Merelo-Guervós <jjmerelo@gmail.com>
Description: Work with data on Venetian doges and dogaresse and the noble families of the Republic of Venice, and use it for social network analysis, as used in Merelo (2022) <arXiv:2209.07334>.
Expand All @@ -16,6 +16,6 @@ VignetteBuilder: knitr
RdMacros: Rdpack
RoxygenNote: 7.2.1
NeedsCompilation: no
Packaged: 2023-02-21 08:44:14 UTC; jmerelo
Packaged: 2023-05-28 10:35:59 UTC; jmerelo
Repository: CRAN
Date/Publication: 2023-02-21 09:10:02 UTC
Date/Publication: 2023-05-28 10:50:02 UTC
48 changes: 28 additions & 20 deletions MD5
@@ -1,34 +1,42 @@
09c76369df60c053a6b7a34fef5e6ea4 *DESCRIPTION
6e04fbea60d96929662d726108dd4e21 *DESCRIPTION
c983aa75df1f15c8a7a830fe096c224e *NAMESPACE
4d210d3dfd917612537f3adaedf9e7ee *NEWS.md
d92efb0a4090c7c81fb6898590f9b5ed *NEWS.md
5ca494860f345762e5ca20ebc046b926 *R/doges.R
f36ed16094b6087ce0479669daab0694 *R/doges.years.R
caa74c35eb1f53d4fd4fd235b8b02b30 *R/families.R
0206a912449d28e39501eb1d77974c4d *R/marriage.graph.R
c2dbeb1f0a8a69cc60564b35b2a2d02c *README.md
5dedc14606aa4e8f14e2ee3bbfb64ae2 *build/partial.rdb
bd1ee56536dd7dec8078b5048c9edea9 *build/vignette.rds
67b3cfeb314105f9cac8d3676e2e06ae *data/doges.rda
67937fef1a08fe9eeb3a1580facdba59 *data/families.rda
3a1c03bd199b898a984b8de910f92452 *R/marriage.graph.R
ef265897a607ae18c2547f4981f28a6c *README.md
29fe6fd08c57f358097aecf63ff18023 *build/partial.rdb
6d2a9c08ed7c19c3e1dc7d393c2c04d9 *build/vignette.rds
7e95790fa128a88770ca99dac476046f *data/doge.families.rda
0dfdd32a261427efce1497ff43c50bf8 *data/doges.marriages.rda
883614ca55eff4644a3e40dbe24cdef4 *data/doges.rda
6c21d60801f2ba759fc31d6489113df3 *data/families.rda
10aa16960c1b73d31f5227da9730ba02 *inst/REFERENCES.bib
6a25bdc08e78429c8909e1de9cad3026 *inst/doc/counting-doge-families.R
5a2585a9407c1f9fad2a9a5f146d1dd5 *inst/doc/counting-doge-families.Rmd
36d13ff711cec3c5f417aa7453eb1660 *inst/doc/counting-doge-families.html
350f5d9a9e0a5eb5a30348ae7696ae27 *inst/doc/doges-family-types.R
bc6d9fb7710e50f258fe426e01a9cd67 *inst/doc/doges-family-types.Rmd
149eac7af8f8a7808cfa732db84fb126 *inst/doc/doges-family-types.html
e04ec7a39c864f45c1912fd193b0f16a *inst/doc/doges-social-network.R
6814fabd29b861e5330444dd52ed85d0 *inst/doc/doges-social-network.Rmd
a85bd62bfd853c29092faca35ba658bb *inst/doc/doges-social-network.html
9f3f78c5216d6c37e9a2857b4ce799c1 *inst/doc/doges-family-types.Rmd
77fb6d71781b0e1428c78d77aa1e76c5 *inst/doc/doges-family-types.html
00e7cf8fdf6c27b11130a10fd93706be *inst/doc/doges-social-network.R
10fc93d4697d24d9673bdf82069d7b4f *inst/doc/doges-social-network.Rmd
4380da2f12bc7732609c4d9074db07b5 *inst/doc/doges-social-network.html
61862bef8c7d863295e3e6c0624aacd5 *inst/doc/doges-terms.R
9e70d0db982fe1ed4ee311fd75e0ea0e *inst/doc/doges-terms.Rmd
79d567c01df02d0b83961df3632019d7 *inst/doc/doges-terms.html
319729ac9e53ca644341d2e0644e40cf *inst/doges.bib
fbc534a28aac08b7b19fb24dc2818211 *inst/doc/doges-terms.html
3c1b99fa60e54953f433b178b7d87f91 *inst/doges.bib
67c172b488abd266e3c350306e43fd46 *man/doge.families.Rd
0e184505f55c8dc69ddc12ca4f08c665 *man/doges.Rd
5041838acbb727af7fc3591935f9e297 *man/doges.marriages.Rd
eb1370e88a84f107ae159e449e235c6b *man/doges.years.Rd
679c47efb6855c10052126a93203c752 *man/families.Rd
5f1068419878cbb4b2e0692c89b37ece *man/marriage.graph.Rd
f214f1277343c214e61f1b117a39115e *man/families.Rd
cc0c8409c340c8b5efce90c8bad3d62b *man/marriage.graph.Rd
1d971f3ebe61e9a030d862e2a0eb2c63 *tests/testthat.R
452c839858b824eeb76eadb1547abd01 *tests/testthat/test-dogesdata.R
9649b861ab1a5f3b92b303511e558ddf *tests/testthat/test-dogesdata.R
1c7c606abf4483566e42485c77687f41 *tests/testthat/test-dogesyearsdata.R
a858fa0b763bc9da841c99e54aba72b2 *tests/testthat/test-marriagegraph.R
bc6d9fb7710e50f258fe426e01a9cd67 *vignettes/doges-family-types.Rmd
6814fabd29b861e5330444dd52ed85d0 *vignettes/doges-social-network.Rmd
5a2585a9407c1f9fad2a9a5f146d1dd5 *vignettes/counting-doge-families.Rmd
9f3f78c5216d6c37e9a2857b4ce799c1 *vignettes/doges-family-types.Rmd
10fc93d4697d24d9673bdf82069d7b4f *vignettes/doges-social-network.Rmd
9e70d0db982fe1ed4ee311fd75e0ea0e *vignettes/doges-terms.Rmd
9 changes: 9 additions & 0 deletions NEWS.md
@@ -1,3 +1,12 @@
# doges 0.3.0

Fixes:
* Improves documentation, some errors in code, grammar fixes
* Adds family to the two doges that didn't have one. Used the name of the doge.

Changes:
* Adds `doge.families` which is a table of all families that had a doge, and how many doges there were.

# dogesr 0.2.0

Fixes:
Expand Down
11 changes: 2 additions & 9 deletions R/marriage.graph.R
@@ -1,5 +1,4 @@
globalVariables(c("data.doges"))
library(igraph)
globalVariables(c("doges.marriages.sn"))

#' Convert doges data into a social graph
#'
Expand All @@ -9,11 +8,5 @@ library(igraph)
#

marriage.graph <- function() {
doges.marriages.df <- data.frame(data.doges$Family.doge,data.doges$Family.dogaressa)
doges.marriages.df <- doges.marriages.df[ (doges.marriages.df$data.doges.Family.doge != '' ) & (doges.marriages.df$data.doges.Family.dogaressa != ''),]
doges.mothers.df <- data.frame(data.doges$Family.doge,data.doges$Family.mother)
doges.mothers.df <- doges.mothers.df[ (doges.mothers.df$data.doges.Family.doge != '' ) & (doges.mothers.df$data.doges.Family.mother != ''),]
all.links <- data.frame(doge.or.father = c(doges.marriages.df$data.doges.Family.doge,doges.mothers.df$data.doges.Family.doge),
dogaressa.or.mother = c(doges.marriages.df$data.doges.Family.dogaressa,doges.mothers.df$data.doges.Family.mother))
return(graph.data.frame(all.links,directed=F))
return(doges.marriages.sn)
}
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -46,6 +46,7 @@ This package includes a couple of vignettes. Once installed, write `vignette("do
* `vignette("doges-family-types")` for how to use the family types data set
* `vignette("doges-terms")` to analyze the amount of time the doges lived/ruled using data provided in this package.
* `vignette("doges-social-network")` to get the marriage social network of doges and parents, and make some initial exploration.
* `vignette("counting-doge-families")` to work with a table of the families doges belonged to and how many times they actually "made doge"

## Work with data

Expand Down
Binary file modified build/partial.rdb
Binary file not shown.
Binary file modified build/vignette.rds
Binary file not shown.
Binary file added data/doge.families.rda
Binary file not shown.
Binary file added data/doges.marriages.rda
Binary file not shown.
Binary file modified data/doges.rda
Binary file not shown.
Binary file modified data/families.rda
Binary file not shown.
19 changes: 19 additions & 0 deletions inst/doc/counting-doge-families.R
@@ -0,0 +1,19 @@
## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)

## ----load,warning=FALSE,message=FALSE-----------------------------------------
# library("dogesr") # If you have already installed this package
devtools::load_all(".") # Comment this, uncomment above if you have installed this package
data("doge.families")

## ----table--------------------------------------------------------------------
knitr::kable(head(doge.families[order(-doge.families$n),],n=10),row.names=F,col.names=c("Doge family","Number of doges"))

## ----family types-------------------------------------------------------------
data("families")
doge.families$type <- unname(family.types[doge.families$Family.doge])
knitr::kable(head(doge.families[order(-doge.families$n),],n=20) %>% select(1,3),row.names=F,col.names=c("Doge family","Family type"))

59 changes: 59 additions & 0 deletions inst/doc/counting-doge-families.Rmd
@@ -0,0 +1,59 @@
---
title: "Using `dogesr` to find out about the doges families"
author: "JJ Merelo"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Using `dogesr` to find out about the doges families}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
bibliography: ../inst/doges.bib
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

## Introduction

Only men belonging to one of the Venetian noble families could actually become doge after the *Serrata*; however, even if the number of noble families was initially small, it was eventually expanded to include several hundred noble families [@lane2019enlargement]. Not all of them, however, were able to include one of their own in the list of doges; on the other hand, the same serrata brought about informal mechanisms that guaranteed a fast turnover in the job of doge, so that many families would get the chance [@histories:jj]

Using data from `dogesr` [@dogesr], we will, in this vignette, have a look at these families, who they were, and how many of them were there.

## Set up

We load the dataset needed, called `doge.families`.

```{r load,warning=FALSE,message=FALSE}
# library("dogesr") # If you have already installed this package
devtools::load_all(".") # Comment this, uncomment above if you have installed this package
data("doge.families")
```

This will import the data from the `dogesr` package into the `doge.families` *tibble*.

## Ranking families

Here's the ranking of the families with the highest number of doges; the Contarinis and Morosinis, right on top.

```{r table}
knitr::kable(head(doge.families[order(-doge.families$n),],n=10),row.names=F,col.names=c("Doge family","Number of doges"))
```


Which types of families are these? We can use data from the rest of the packages to find out:

```{r family types}
data("families")
doge.families$type <- unname(family.types[doge.families$Family.doge])
knitr::kable(head(doge.families[order(-doge.families$n),],n=20) %>% select(1,3),row.names=F,col.names=c("Doge family","Family type"))
```

## Conclusions

Having a list of doges' family names is convenient and allows you to create visualizations and perform analysis easily, combining it with other datasets.

## References

0 comments on commit bdb00c2

Please sign in to comment.