Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (20.0%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
R package on Nigeria and for Nigeria
Basic Info
- Host: GitHub
- Owner: ropensci
- License: gpl-3.0
- Language: R
- Default Branch: master
- Homepage: https://docs.ropensci.org/naijR/
- Size: 24.7 MB
Statistics
- Stars: 12
- Watchers: 4
- Forks: 3
- Open Issues: 14
- Releases: 17
Created about 10 years ago
· Last pushed 10 months ago
Metadata Files
Readme
Changelog
Contributing
License
Codemeta
README.Rmd
---
output: github_document
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
fig.path = "man/figures/README-",
out.width = "100%",
comment = ""
)
```
# naijR
An R package on Nigeria and for Nigeria
[](https://cran.r-project.org/package=naijR)
[](https://app.codecov.io/gh/BroVic/naijR?branch=master)
[](https://github.com/ropensci/naijR/actions)
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
[](https://github.com/ropensci/software-review/issues/600)
The goal of **naijR** is to make it easier for R users to work with data related to Nigeria.
## Usage
### Some simple operations
#### Maps
One of the useful aspects of this package is enabling users to plot country and sub-national geo-spatial maps. Currently, only vector-type graphics are supported. To find out more, read the vignette--accessible from within R as follows:
```{r vignette, eval=FALSE}
vignette('nigeria-maps', 'naijR')
```
### Administrative Regions
#### States
To create a list of all the States of the Nigerian Federation, simply call `states()`.
```{r admin, results='as-is'}
library(naijR, quietly = TRUE)
ss <- states()
head(ss)
cat(sprintf("\n...but Nigeria has %i States.", length(ss)))
```
States from a given geo-political zone can also be selected:
```{r states}
states(gpz = "ne") # i.e. North-East
```
For other capabilities of this function, see `?states()`.
#### Local Government Areas
This is a basic example that shows how to very quickly fetch the names of Local Government Areas within a given State:
```{r states-example}
lgas("Imo")
```
To list all the LGAs in Nigeria, call the same function without any parameters:
```{r lgas}
n <- length(lgas())
sprintf("Nigeria has a total of %i Local Government Areas", n)
```
Want to create a function to check how many LGAs a particular State has?
```{r lgas-func}
how_many_lgas <- function(state) {
n <- length(lgas(state))
cat(state, "State has", n, "LGAs\n")
}
how_many_lgas("Sokoto")
```
### Working with phone numbers
It is common to come across datasets where phone numbers are wrongly entered or misinterpreted by software like MS Excel. The function `fix_mobile()` helps with this.
```{r mobile}
fix_mobile("8032000000")
```
The function works on vectors; thus an entire column of a table with phone numbers can be quickly processed. Illegible or irreparable numbers are turned into missing values, e.g.
```{r mobile-vectorized-1}
(dat <- data.frame(
serialno = 1:8,
phone = c(
"123456789",
"0123456789",
"8000000001",
"9012345678",
"07098765432",
"08123456789",
"09064321987",
"O8055577889"
)
))
```
```{r mobile-vectorized-2}
fix_mobile(dat$phone)
```
## Installation
To download and install the current stable version of this package from CRAN:
```{r cran-install, eval=FALSE}
install.packages("naijR")
```
The development version can be obtained from [GitHub](https://github.com/ropensci/naijR) with:
``` {r dev-install, eval = FALSE}
# install.packages("pak") # if necessary
pak::pkg_install("ropensci/naijR")
```
Please note that this package is released with a [Contributor
Code of Conduct](https://ropensci.org/code-of-conduct/). By contributing to this project, you agree to abide by its terms.
Owner
- Name: rOpenSci
- Login: ropensci
- Kind: organization
- Email: info@ropensci.org
- Location: Berkeley, CA
- Website: https://ropensci.org/
- Twitter: rOpenSci
- Repositories: 307
- Profile: https://github.com/ropensci
CodeMeta (codemeta.json)
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"@type": "SoftwareSourceCode",
"identifier": "naijR",
"description": "A set of convenience functions as well as geographical/political data about Nigeria, aimed at simplifying work with data and information that are specific to the country.",
"name": "naijR: Operations to Ease Data Analyses Specific to Nigeria",
"codeRepository": "https://github.com/ropensci/naijR",
"issueTracker": "https://github.com/ropensci/naijR/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.6.1",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.3.2 (2023-10-31 ucrt)",
"author": [
{
"@type": "Person",
"givenName": "Victor",
"familyName": "Ordu",
"email": "victorordu@outlook.com",
"@id": "https://orcid.org/0000-0003-3716-0668"
}
],
"contributor": [
{
"@type": "Person",
"givenName": "Laura",
"familyName": "DeCicco",
"email": "ldecicco@usgs.gov"
}
],
"maintainer": [
{
"@type": "Person",
"givenName": "Victor",
"familyName": "Ordu",
"email": "victorordu@outlook.com",
"@id": "https://orcid.org/0000-0003-3716-0668"
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "ISOcodes",
"name": "ISOcodes"
},
{
"@type": "SoftwareApplication",
"identifier": "covr",
"name": "covr"
},
{
"@type": "SoftwareApplication",
"identifier": "here",
"name": "here"
},
{
"@type": "SoftwareApplication",
"identifier": "knitr",
"name": "knitr"
},
{
"@type": "SoftwareApplication",
"identifier": "purrr",
"name": "purrr"
},
{
"@type": "SoftwareApplication",
"identifier": "readxl",
"name": "readxl"
},
{
"@type": "SoftwareApplication",
"identifier": "rmarkdown",
"name": "rmarkdown"
},
{
"@type": "SoftwareApplication",
"identifier": "testthat",
"name": "testthat",
"version": ">= 3.0.0"
},
{
"@type": "SoftwareApplication",
"identifier": "usethis",
"name": "usethis"
},
{
"@type": "SoftwareApplication",
"identifier": "WikidataR",
"name": "WikidataR"
}
],
"softwareRequirements": {
"1": {
"@type": "SoftwareApplication",
"identifier": "R",
"name": "R",
"version": ">= 3.6"
},
"2": {
"@type": "SoftwareApplication",
"identifier": "RColorBrewer",
"name": "RColorBrewer",
"version": ">= 1.1.2"
},
"3": {
"@type": "SoftwareApplication",
"identifier": "cli",
"name": "cli",
"version": ">= 3.6.0"
},
"4": {
"@type": "SoftwareApplication",
"identifier": "lifecycle",
"name": "lifecycle",
"version": ">= 0.2.0"
},
"5": {
"@type": "SoftwareApplication",
"identifier": "grDevices",
"name": "grDevices"
},
"6": {
"@type": "SoftwareApplication",
"identifier": "graphics",
"name": "graphics"
},
"7": {
"@type": "SoftwareApplication",
"identifier": "mapdata",
"name": "mapdata",
"version": ">= 2.3.0"
},
"8": {
"@type": "SoftwareApplication",
"identifier": "maps",
"name": "maps",
"version": ">= 3.3.0"
},
"9": {
"@type": "SoftwareApplication",
"identifier": "rlang",
"name": "rlang",
"version": ">= 0.4.0"
},
"10": {
"@type": "SoftwareApplication",
"identifier": "sf",
"name": "sf",
"version": ">= 1.0.12"
},
"11": {
"@type": "SoftwareApplication",
"identifier": "stats",
"name": "stats"
},
"12": {
"@type": "SoftwareApplication",
"identifier": "stringi",
"name": "stringi",
"version": ">= 1.7.6"
},
"13": {
"@type": "SoftwareApplication",
"identifier": "utils",
"name": "utils"
},
"SystemRequirements": null
},
"fileSize": "1582.099KB",
"relatedLink": "https://docs.ropensci.org/naijR/",
"releaseNotes": "https://github.com/ropensci/naijR/blob/master/NEWS.md",
"contIntegration": [
"https://app.codecov.io/gh/BroVic/naijR?branch=master",
"https://github.com/ropensci/naijR/actions"
],
"developmentStatus": "https://lifecycle.r-lib.org/articles/stages.html#stable"
}
GitHub Events
Total
- Issues event: 4
- Watch event: 1
- Issue comment event: 2
- Push event: 14
- Pull request event: 5
- Create event: 2
Last Year
- Issues event: 4
- Watch event: 1
- Issue comment event: 2
- Push event: 14
- Pull request event: 5
- Create event: 2
Committers
Last synced: almost 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Victor Ordu | v****u@o****m | 516 |
| NESREA | N****A | 1 |
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 3
- Total pull requests: 2
- Average time to close issues: 30 days
- Average time to close pull requests: about 1 hour
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 0.33
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 2
- Average time to close issues: 30 days
- Average time to close pull requests: about 1 hour
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.33
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- BroVic (3)
Pull Request Authors
- BroVic (3)
Top Labels
Issue Labels
enhancement (3)
Pull Request Labels
Dependencies
DESCRIPTION
cran
- R >= 3.6 depends
- grDevices * depends
- methods * depends
- utils * depends
- RColorBrewer >= 1.1.2 imports
- lifecycle >= 0.2.0 imports
- magrittr >= 1.5 imports
- mapdata >= 2.3.0 imports
- maps >= 3.3.0 imports
- rgdal >= 1.4.4 imports
- rlang >= 0.4.0 imports
- covr * suggests
- here * suggests
- knitr * suggests
- readxl * suggests
- rmarkdown * suggests
- sp >= 1.4.2 suggests
- testthat * suggests
- usethis * suggests
.github/workflows/R-CMD-check.yaml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/upload-artifact main composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite