Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
^pkgdown$
^\.github$
^CITATION\.cff$
^fslogisticskampala\.Rcheck$
^fslogisticskampala.*\.tar\.gz$
^fslogisticskampala.*\.tgz$
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
.Rproj.user
.DS_Store
fslogisticskampala.Rcheck/
fslogisticskampala*.tar.gz
fslogisticskampala*.tgz
30 changes: 24 additions & 6 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ editor_options:
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
fig.path = "man/figures/1README-",
out.width = "100%",
message = FALSE,
warning = FALSE,
Expand All @@ -38,20 +38,21 @@ The goal of fslogisticskampala is to provide data sources on faecal sludge trans
You can install the development version of fslogisticskampala from
[GitHub](https://github.com/) with:

``` r
```{r}
# install.packages("devtools")
devtools::install_github("openwashdata/fslogisticskampala")
```

```{r}
## Run the following code in console if you don't have the packages
## install.packages(c("dplyr", "knitr", "readr", "stringr", "gt", "kableExtra"))
## install.packages(c("dplyr", "knitr", "readr", "stringr", "gt", "kableExtra". "leaflet"))
library(dplyr)
library(knitr)
library(readr)
library(stringr)
library(gt)
library(kableExtra)
library(leaflet)
```

Alternatively, you can download the individual datasets as a CSV or XLSX
Expand Down Expand Up @@ -127,8 +128,8 @@ readr::read_csv("data-raw/dictionary.csv") |>
kableExtra::scroll_box(height = "200px")
```

## Example

## Example 1
A plot showing the collection locations of the truck with number plate "AUS 119X"
```{r}
library(fslogisticskampala)
library(ggplot2)
Expand All @@ -145,9 +146,26 @@ ggplot(aus, aes(x = lon, y = lat, color = date)) +
y = "Latitude",
color = "Treatment Plant") +
theme_minimal()
# Provide some example code here
```

## Example 2
An interactive map of all collection points
```{r}
#| label: fig-map_collection_locations
#| fig-cap: "Map with collection locations and the existing treatment plants"
map = leaflet(data = trips) |>
addTiles() |>
addCircleMarkers(~lon, ~lat
,popup = ~as.character(plant)
, color = ~ifelse(plant == "Bugolobi" , "red", "blue")
, radius = 0.5
) |>
addMarkers(lng = ~c(32.6071673,32.5458844)
,lat = ~c(0.3190139,0.3472747)
,popup = ~c("Bugolobi FS treatment plant","Lubigi FS treatment plant")
)
map
```

## License

Expand Down
Loading