Creating New OJO Projects
Open Justice Oklahoma
2025-07-02
project-creation.RmdIntroduction
The ojo_create_project() function provides a
standardized way to create new R projects for Open Justice Oklahoma. It
sets up a project with our standard directory structure, initializes
version control, and configures common dependencies.
Basic Usage
The simplest way to create a new project is to provide a name and description:
ojo_create_project(
name = "my-new-project",
description = "A project to analyze court data"
)This will:
- Create a new GitHub repository from our template
- Clone it to your local machine
- Initialize renv for dependency management
- Set up basic README content
- Make an initial commit and push to GitHub
Function Parameters
-
name: The name of your project (required) -
description: A brief description of the project -
dir: Where to create the project (defaults to current directory) -
private: Whether the GitHub repository should be private (defaults to TRUE) -
packages: Additional R packages to install (not yet implemented)
Example with All Parameters
Here’s an example using all available parameters:
ojo_create_project(
name = "court-data-analysis",
description = "Analysis of Oklahoma court data for 2023",
dir = "~/projects",
private = TRUE
)Requirements
To use this function, you need:
- A GitHub account with access to the OpenJusticeOK organization
- SSH keys configured for GitHub