Skip to content

Commit

Permalink
Removing trackdown and acledexamples mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
lfagliano committed Dec 4, 2023
1 parent 6d8c079 commit 4a23826
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 111 deletions.
6 changes: 0 additions & 6 deletions .lintr

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
21 changes: 19 additions & 2 deletions vignettes/articles/acled_api.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,28 @@ As is common when executing API calls, handling large volumes of data requires s

Imagine you are interested in events from “Brazil” occurring between January 1st, 2022, and December 1st, 2022.

```{r}
```{r, eval = FALSE}
library(acledR)
library(dplyr)
#Note: This is simply an example–you will need to include your own credentials rather than the email and key placeholders that are included below.
acled_access(email = "your_email", key = "your_key")
df_br <- acled_api(country = c("Brazil"),
start_date = "2022-01-01",
end_date = "2022-12-01",
monadic = F,
acled_access = TRUE,
prompt = F)
```
```{r,echo=FALSE}
library(acledR)
library(dplyr)
#Note: This is simply an example–you will need to include your own credentials rather than the email and key placeholders that are included below.
acled_access(email = "[email protected]", key = "M3PWwg3DIdhHMuDiilp5")
acled_access(email = Sys.getenv("EMAIL_ADDRESS_EXAMPLES"), key = Sys.getenv("EXAMPLES_KEY"))
df_br <- acled_api(country = c("Brazil"),
start_date = "2022-01-01",
Expand All @@ -130,6 +145,8 @@ df_br <- acled_api(country = c("Brazil"),
prompt = F)
```



This returns a tibble that includes each ACLED event in “Brazil” during the specified period:

```{r}
Expand Down
99 changes: 0 additions & 99 deletions vignettes/articles/acled_deletions_api.Rmd

This file was deleted.

16 changes: 14 additions & 2 deletions vignettes/articles/acled_transformations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ In this section you can walk through a potential use case for the transformation

For this example, assume that you are interested in data from “South America” during the first half of 2023. **NOTE**: The email and key values below are only examples. You should provide your own credentials that you can create by using [ACLED’s website](https://apidocs.acleddata.com/get_started.html#getting-your-api-key).

```{r}
```{r, eval = False}
library(acledR)
acled_access(email = "[email protected]", key = "M3PWwg3DIdhHMuDiilp5")
acled_access(email = "your_email", key = "your_key")
df_sa <- acled_api(regions = "South America",
start_date = "2023-01-01",
Expand All @@ -132,7 +132,19 @@ df_sa <- acled_api(regions = "South America",
acled_access = TRUE,
prompt = F)
```
```{r, echo=FALSE}
library(acledR)
acled_access(email = Sys.getenv("EMAIL_ADDRESS_EXAMPLES"), key = Sys.getenv("EXAMPLES_KEY"))
df_sa <- acled_api(regions = "South America",
start_date = "2023-01-01",
end_date = "2023-06-01",
monadic = F,
acled_access = TRUE,
prompt = F)
```
Now that your data are in long format with one actor per row, you can much more easily filter the data to retain only those events involving the "Military Forces of Colombia (2022-)":

```{r}
Expand Down
7 changes: 6 additions & 1 deletion vignettes/articles/acled_update.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,14 @@ library(lubridate)
library(dplyr)
```

```{r}
```{r, eval=FALSE}
acled_access(email = "[email protected]", key = "M3PWwg3DIdhHMuDiilp5") # This is an example, you will need to input your credentials.
argen_dummy_acled_file <- acledR::acled_old_dummy # Here is our old personal ACLED dataset
```
```{r, echo=FALSE}
acled_access(email = Sys.getenv("EMAIL_ADDRESS_EXAMPLES"), key = Sys.getenv("EXAMPLES_KEY")) # This is an example, you will need to input your credentials.
argen_dummy_acled_file <- acledR::acled_old_dummy # Here is our old personal ACLED dataset
```

Expand Down
2 changes: 1 addition & 1 deletion vignettes/get_started.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Once you are registered, we encourage you to authenticate your credentials by us
acled_access(email = "[email protected]", key = "M3PWwg3DIdhHMuDiilp5") # This is an example, you will need to input your credentials.
```

```{r}
```{r,echo=FALSE}
acled_access(email = Sys.getenv("EMAIL_ADDRESS_EXAMPLES"), key = Sys.getenv("EXAMPLES_KEY"))
```

Expand Down

0 comments on commit 4a23826

Please sign in to comment.