Skip to content

Commit

Permalink
Daft paper
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Jul 26, 2024
1 parent 3288881 commit c994827
Show file tree
Hide file tree
Showing 9 changed files with 2,670 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.RData
.Ruserdata
*.gpkg
*.pdf
1 change: 1 addition & 0 deletions data-raw/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.quarto/
58 changes: 58 additions & 0 deletions data-raw/test-si-to-od.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
format: gfm
---

```{bash}
#| eval: false
# Get data from the web
gh release
```


```{r}
#| eval: false
piggyback::pb_list(repo = "itsleeds/atumie")
piggyback::pb_download("zones_test.gpkg", repo = "itsleeds/atumie")
piggyback::pb_download("social_grid.gpkg", repo = "itsleeds/atumie")
piggyback::pb_upload("zones_test.gpkg")
piggyback::pb_upload("social_grid.gpkg")
# Get urls from v0.0.5 release:
url_zones = "https://github.com/Robinlovelace/simodels/releases/download/v0.0.5/zones_test.gpkg"
f_zones = basename(url_zones)
download.file(url_zones, f_zones)
url_grid = "https://github.com/Robinlovelace/simodels/releases/download/v0.0.5/social_grid.gpkg"
download.file(url_grid, basename(url_grid))
```

```{r}
url_zones = "https://github.com/Robinlovelace/simodels/releases/download/v0.0.5/zones_test.gpkg"
zones = sf::read_sf(url_zones)
url_grid = "https://github.com/Robinlovelace/simodels/releases/download/v0.0.5/social_grid.gpkg"
grid = sf::read_sf(url_grid)
```

```{r}
devtools::load_all()
od = si_to_od(zones, grid)
```

```{r}
zonesg = sf::st_sf(
sf::st_drop_geometry(zones),
geometry = zones$geom
)
gridg = sf::st_sf(
sf::st_drop_geometry(grid),
geometry = grid$geom
)
odg = si_to_od(zonesg, gridg)
gridd = gridg[!duplicated(gridg$grid_id), ]
odg = si_to_od(zonesg, gridd)
```


```{r}
od = od::points_to_od(zones, grid)
```
4 changes: 4 additions & 0 deletions paper/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.quarto/
_extensions/
*.pdf
*.tex
68 changes: 68 additions & 0 deletions paper/bibliography.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@

@article{wilson_family_1971,
title = {A family of spatial interaction models, and associated developments},
author = {Wilson, AG},
year = {1971},
date = {1971},
journal = {Environment and Planning},
pages = {1{\textendash}32},
volume = {3},
number = {January},
note = {Citation Key: wilson{\_}family{\_}1971}
}

@book{boyce_forecasting_2015,
title = {Forecasting Urban Travel: Past, Present and Future},
author = {Boyce, David E. and Williams, Huw C. W. L.},
year = {2015},
month = {02},
date = {2015-02-27},
publisher = {Edward Elgar Publishing},
note = {Citation Key: boyce{\_}forecasting{\_}2015},
langid = {en}
}

@article{simini_universal_2012,
title = {A universal model for mobility and migration patterns},
author = {Simini, Filippo and {González}, Marta C and Maritan, Amos and {Barabási}, {Albert-László}},
year = {2012},
month = {02},
date = {2012-02},
journal = {Nature},
pages = {8{\textendash}12},
doi = {10.1038/nature10856},
url = {https://doi.org/10.1038/nature10856},
note = {Citation Key: simini{\_}universal{\_}2012}
}

@article{lenormand_systematic_2016,
title = {Systematic comparison of trip distribution laws and models},
author = {Lenormand, Maxime and Bassolas, Aleix and Ramasco, {José J.}},
year = {2016},
month = {02},
date = {2016-02-01},
journal = {Journal of Transport Geography},
pages = {158--169},
volume = {51},
doi = {10.1016/j.jtrangeo.2015.12.008},
url = {https://www.sciencedirect.com/science/article/pii/S0966692315002422},
note = {Citation Key: lenormand{\_}systematic{\_}2016},
langid = {en}
}

@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}
}
Loading

0 comments on commit c994827

Please sign in to comment.