Skip to content

JeiRaju/PTENemrepo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ NEM12 Data Processor

This Python script is designed to efficiently parse, transform, and process NEM12 CSV files into structured and analyzable formats using pandas. It supports multi-interval energy readings and prepares output files for deeper inspection and analysis.


πŸ“Œ Project Purpose

The NEM12 Data Processor streamlines the extraction of energy meter data from NEM12-formatted CSVsβ€”standard files used by electricity retailers in Australia. It processes multiple interval data types like E1, Q1, B1, and K1, and outputs clean, timestamped CSVs ready for analysis or integration into data pipelines.


βš™οΈ How It Works

  1. Reads NEM12 CSV input containing interval records.
  2. Parses and categorizes data by NMI suffix (E1, Q1, B1, K1).
  3. Dynamically constructs timestamped dataframes based on the interval duration (e.g., 5, 10, 15, 30 minutes).
  4. Outputs intermediate CSVs for each reading type.
  5. Merges all dataframes into:
    • Individual interval-specific datasets (e.g., inspectionE1.csv)
    • A consolidated dataset (finalResult.csv) combining all readings on a common timestamp.

πŸ› οΈ Features

  • βœ… Parses NEM12 CSV files with 200, 300, and 900 markers
  • βœ… Extracts interval readings (E1, Q1, B1, K1)
  • βœ… Supports multiple interval durations (5, 10, 15, 30 minutes)
  • βœ… Automatically generates timestamps
  • βœ… Merges and cleans dataframes
  • βœ… Outputs clean CSVs ready for analysis
  • βœ… Deletes intermediate files after processing

πŸ“ File Structure

.
β”œβ”€β”€ NEM12processor.py                # Main script
β”œβ”€β”€ /Nem12/
β”‚   └── /samples/
β”‚       └── Copy 1.csv              # Input file (NEM12 format)
β”œβ”€β”€ /output/
β”‚   β”œβ”€β”€ inspectionE1.csv
β”‚   β”œβ”€β”€ inspectionQ1.csv
β”‚   β”œβ”€β”€ inspectionB1.csv
β”‚   β”œβ”€β”€ inspectionK1.csv
β”‚   └── finalResult.csv            # Final combined dataset
β”œβ”€β”€ README.md                       # Project documentation
└── LICENSE                         # MIT License file

βš™οΈ Requirements

  • Python 3.7+
  • pandas

Install dependencies:

pip install pandas

πŸ“Š Output Sample

## πŸ“Š Output Example

| timestamp           | E1 reading | Q1 reading | B1 reading | K1 reading |
|---------------------|------------|------------|------------|------------|
| 2024-01-01 00:00:00 | 123.45     | 456.78     | NaN        | 321.65     |
| 2024-01-01 00:30:00 | 124.10     | 458.22     | NaN        | 322.12     |

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages