From 1c4c9de26af02c685d6c3f276394ba0d4c52cbe9 Mon Sep 17 00:00:00 2001 From: Robin Lovelace Date: Sat, 16 Apr 2022 14:17:30 +0100 Subject: [PATCH] Updates for #4 Former-commit-id: 45f31dbcb52aaad7003ddb8fce0fa7c023e735e4 --- .gitignore | 1 + vignettes/references.bib | 17 +++++++++++++++++ vignettes/si.Rmd | 16 +++++++++++++++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 13375ca..04a8d44 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ vignettes/crashes.Rds README_files/figure-html/ README_files/libs docs +GCCSA_2016_AUST_New.geojson diff --git a/vignettes/references.bib b/vignettes/references.bib index 661beee..d1082be 100644 --- a/vignettes/references.bib +++ b/vignettes/references.bib @@ -76,3 +76,20 @@ @article{dennett_estimating_2012 url = {http://www.bartlett.ucl.ac.uk/casa/publications/working-paper-181}, note = {Citation Key: dennett{\_}estimating{\_}2012} } + +@article{dennett_modelling_2018, + title = {Modelling population flows using spatial interaction models}, + author = {Dennett, Adam}, + year = {2018}, + month = {11}, + date = {2018-11-11}, + journal = {Australian Population Studies}, + pages = {33--58}, + volume = {2}, + number = {2}, + doi = {10.37970/aps.v2i2.38}, + url = {https://www.australianpopulationstudies.org/index.php/aps/article/view/38}, + note = {Number: 2 +Citation Key: dennett{\_}modelling{\_}2018}, + langid = {en} +} diff --git a/vignettes/si.Rmd b/vignettes/si.Rmd index 6b229a9..feb030a 100644 --- a/vignettes/si.Rmd +++ b/vignettes/si.Rmd @@ -5,6 +5,7 @@ vignette: > %\VignetteIndexEntry{Tutorial: spatial interaction models with R} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} +bibliography: references.bib --- ```{r, include = FALSE} @@ -21,4 +22,17 @@ See the package's [README](https://robinlovelace.github.io/si/) for instructions library(si) ``` -This tutorial builds on @dennett_estimating_2012's pioneering tutorial. \ No newline at end of file +This tutorial builds on @dennett_modelling_2018 (which in turn builds on @dennett_estimating_2012's pioneering [reproducible](https://github.com/adamdennett/SIModelling/blob/SIModelling-Edits/SimAus2.Rmd) tutorial on SIMs with R). +We start by importing open access data representing movement between zones in Australia (thanks to Adam Dennett for making the files accessible): + +```{r} +u1 = "https://www.dropbox.com/s/0fg80nzcxcsybii/GCCSA_2016_AUST_New.geojson?raw=1" +aus = sf::read_sf(u1) +u2 = "https://www.dropbox.com/s/wi3zxlq5pff1yda/AusMig2011.csv?raw=1" +od_migration_original = read.csv(u2) +``` + +```{r, echo=FALSE, eval=FALSE} +sf::write_sf(aus, "GCCSA_2016_AUST_New.geojson") +piggyback::pb_upload("GCCSA_2016_AUST_New.geojson") +```