✍️
BR Writing Samples
  • Product documentation sample
    • Product Manual: Task Tracker Application
    • Installation Guide: Project Management Software
    • Release Notes: Project Management Software v2.5
    • User Story: Tracking Project Progress
    • Epic: Enhance User Onboarding Experience for EcoTrack
    • User Story: Integrate Data Analytics Dashboard in EcoTrack
  • Sample blogs
    • Cloud Computing: Transforming the Future
    • The Impact of Blockchain on Various Industries
    • Embracing DevOps: The Future of Software Development
    • The Journey of AI Technology: From Concept to Reality
    • GraphQL vs. REST APIs: A Technical Writer's Guide
  • Technical/API documentation samples
    • EcoTrack SDK Documentation
    • Inventory Management API
    • User Management API
    • Payment Processing API
    • BRConnect API Integration Guide
    • EcoTrack SDK Guide: Creating Environmental Reports
    • Installation Guide for FrankTech Suite (following DITA standards)
    • Help Article - Exporting Environmental Data from EcoTrack
    • Troubleshooting Guide - How to Resolve EcoTrack Software Login Issues
    • Enhancing Supply Chain Visibility with BR Yard Management Solutions
    • Work Item Models API Documentation
Powered by GitBook
On this page
  • Prerequisites
  • Step 1: Initializing the SDK
  • Step 2: Configuring Environmental Tracking
  • Step 3: Logging Environmental Data
  • Logging Carbon Emissions
  • Logging Renewable Energy Usage
  • Step 4: Generating Reports
  • Step 5: Viewing Reports
  • Conclusion
  1. Technical/API documentation samples

EcoTrack SDK Guide: Creating Environmental Reports

This guide will help you create environmental reports using the EcoTrack SDK. Environmental reports include carbon emission logs, renewable energy usage, and other sustainability metrics.

Prerequisites

Before you start, ensure you have the following:

  • EcoTrack SDK installed in your Unity project

  • API Key for the EcoTrack service

Step 1: Initializing the SDK

First, initialize the EcoTrack SDK in your main script. This setup is necessary to access EcoTrack features.

using EcoTrack;

public class EcoTrackInitializer : MonoBehaviour
{
    void Start()
    {
        EcoTrackManager.Initialize("YOUR_API_KEY");
    }
}

Step 2: Configuring Environmental Tracking

Configure the SDK to start tracking environmental metrics. Set the update intervals and enable tracking features.

EcoTrackManager.SetUpdateInterval(60); // Update every 60 seconds
EcoTrackManager.EnableCarbonTracking(true);
EcoTrackManager.EnableEnergyTracking(true);

Step 3: Logging Environmental Data

Log carbon emissions and energy usage within your application. This data will be used to generate reports.

Logging Carbon Emissions

EcoTrackManager.LogCarbonEmission(activity: "vehicle_use", amount: 75.3);

Logging Renewable Energy Usage

EcoTrackManager.LogEnergyUsage(source: "wind", amount: 150.0);

Step 4: Generating Reports

Use the tracked data to generate comprehensive environmental reports. Customize the report parameters as needed.

SustainabilityReport report = EcoTrackManager.GenerateReport(startDate, endDate);
report.SaveAsPDF("environmental_report.pdf");

Step 5: Viewing Reports

Access and view the generated reports. These reports can be shared with stakeholders to demonstrate environmental impact and sustainability efforts.

void ViewReport()
{
    SustainabilityReport report = EcoTrackManager.GenerateReport(startDate, endDate);
    string reportPath = report.GetPath();
    // Code to open and view the report
}

Conclusion

By following these steps, you can effectively create and manage environmental reports using the EcoTrack SDK. For more advanced features and customization options, refer to the API Reference.

PreviousBRConnect API Integration GuideNextInstallation Guide for FrankTech Suite (following DITA standards)

For further assistance, visit our or contact us at support@ecotrack.com.

support page