Skip to content

caseyonit/AURE

Repository files navigation

AURE: Advanced Environmental Performance Index (EPI) Analysis

License

A comprehensive R-based tool for analyzing Environmental Performance Index (EPI) data, generating detailed reports, and providing advanced environmental analytics insights.

Features

  • Comprehensive EPI Analysis:

    • Country performance evaluation
    • Trend analysis over time
    • Regional comparisons
    • Income group analysis
  • Interactive Visualizations:

    • World maps of EPI scores
    • Correlation matrices
    • Cluster analysis
    • Time series visualizations
  • Automated Reporting:

    • HTML and PDF report generation
    • Country-specific analysis
    • Regional comparisons
    • Environmental indicator deep dives

Requirements

  • R (>= 4.0.0)
  • RStudio (recommended)
  • Required R packages:
    • tidyverse
    • rmarkdown
    • knitr
    • kableExtra
    • ggplot2
    • plotly
    • sf
    • rnaturalearth
    • countrycode
    • viridis
    • ggcorrplot
    • factoextra
    • cluster

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/AURE.git
    cd AURE
  2. Install the required R packages:

    Rscript install_deps.R

Usage

Basic Usage

# Load the required libraries
library(tidyverse)
library(rmarkdown)

# Generate a basic EPI report
source("analyze_epi.R")
analyze_epi("path/to/epi_data.csv", "epi_report.html")

Command Line Interface

# Generate a detailed EPI analysis report
Rscript detailed_epi_analysis.R epi2024_data.csv epi_report.html

Project Structure

AURE/
.
├── analyze_epi.R              # Basic EPI analysis script
├── detailed_epi_analysis.R    # Comprehensive EPI analysis script
├── detailed_epi_analysis_report.html  # Sample output
├── epi_analysis_report.pdf    # Basic analysis report
├── install_deps.R             # Dependency installer
├── LICENSE
├── R/
│   ├── advanced_analytics.R   # Advanced analysis functions
│   ├── other_helpers.R        # Helper functions
│   └── utils.R                # Utility functions
└── templates/                 # Report templates
    └── report_template.Rmd    # R Markdown template

Data Format

The input data should be in CSV format with the following columns:

  • country: Country name
  • iso: ISO country code
  • EPI: Environmental Performance Index score (0-100)
  • BDH: Biodiversity & Habitat score
  • ECS: Ecosystem Services score
  • FSH: Fisheries score
  • APO: Air Pollution score
  • AGR: Agriculture score
  • WRS: Water Resources score
  • AIR: Air Quality score
  • H2O: Drinking Water score
  • HMT: Heavy Metals score
  • WMG: Waste Management score
  • CCH: Climate Change score
  • Income Group: Country income classification

Examples

Basic Analysis

# Load and preprocess EPI data
epi_data <- read_csv("epi2024_data.csv")
summary(epi_data)

Advanced Analytics

Country Clustering

# Cluster countries based on EPI indicators
source("R/advanced_analytics.R")
clusters <- cluster_countries(epi_data, n_clusters = 4)

Correlation Analysis

# Calculate correlations between EPI indicators
cor_matrix <- cor(select(epi_data, where(is.numeric)), use = "complete.obs")
ggcorrplot(cor_matrix, type = "lower", lab = TRUE)

Generate Interactive Map

# Create an interactive world map of EPI scores
library(sf)
library(rnaturalearth)

world <- ne_countries(scale = "medium", returnclass = "sf") %>%
  left_join(epi_data, by = c("iso_a3" = "iso3c"))

ggplot(world) +
  geom_sf(aes(fill = EPI), color = "white", size = 0.1) +
  scale_fill_viridis_c("EPI Score") +
  theme_minimal()

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Create a new Pull Request

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Acknowledgments

  • Yale Center for Environmental Law & Policy and CIESIN for the EPI data
  • Tidyverse team for amazing R packages
  • RStudio for the fantastic development environment

Contact

For questions or feedback, please open an issue in the repository.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages