Coder Social home page Coder Social logo

au-energy-scraper's Introduction

AU-ENERGY-SCRAPER

Australian energy data pipeline in rust. Inspired by OpenNEM ⚡ ♥

Strategy

Rust is the right choice to handle strict typing with explicit errors. The issue is there are so many abbreviations and poor data structures there are lots of moving parts.

I'll start off looking at simple ones first for example Current Rooftop PV Actual

NEMWEB Reports

Each report (zip archive) is uploaded every 30mins or 5mins. They shouldn't change and latest can be accessed via http url for example above.

Zip Archive

Reports are contained in zip archives and most contain one csv file.

CSV file

Each csv contains an ordered identifier C, I, D, C in first column. Heres my best guess at what they mean:

  • C: "Comment" or "Control" for comment or a control line that provides metadata.
  • I: "Information" or "Instruction". Similar to C, but specific to data structure to come
  • D: "Data" containing the actual data entries.
  • C (again): Another C line at the end of the data might indicate the end of the report or dataset.

Below is a simple example of Rooftop PV Actual:

C,NEMP.WORLD,ROOFTOP_PV_ACTUAL_MEASUREMENT,AEMO,PUBLIC,2024/03/03,20:00:03,0000000412707330,DEMAND,0000000412707330
I,ROOFTOP,ACTUAL,2,INTERVAL_DATETIME,REGIONID,POWER,QI,TYPE,LASTCHANGED
D,ROOFTOP,ACTUAL,2,"2024/03/03 19:30:00",NSW1,0,1,MEASUREMENT,"2024/03/03 19:49:13"
D,ROOFTOP,ACTUAL,2,"2024/03/03 19:30:00",QLD1,0,1,MEASUREMENT,"2024/03/03 19:49:13"
D,ROOFTOP,ACTUAL,2,"2024/03/03 19:30:00",QLDC,0,1,MEASUREMENT,"2024/03/03 19:49:13"
D,ROOFTOP,ACTUAL,2,"2024/03/03 19:30:00",QLDN,0,1,MEASUREMENT,"2024/03/03 19:49:14"
D,ROOFTOP,ACTUAL,2,"2024/03/03 19:30:00",QLDS,0,1,MEASUREMENT,"2024/03/03 19:49:14"
D,ROOFTOP,ACTUAL,2,"2024/03/03 19:30:00",SA1,6.617,1,MEASUREMENT,"2024/03/03 19:49:14"
D,ROOFTOP,ACTUAL,2,"2024/03/03 19:30:00",TAS1,0,1,MEASUREMENT,"2024/03/03 19:49:14"
D,ROOFTOP,ACTUAL,2,"2024/03/03 19:30:00",TASN,0,1,MEASUREMENT,"2024/03/03 19:49:14"
D,ROOFTOP,ACTUAL,2,"2024/03/03 19:30:00",TASS,0,1,MEASUREMENT,"2024/03/03 19:49:14"
D,ROOFTOP,ACTUAL,2,"2024/03/03 19:30:00",VIC1,0,1,MEASUREMENT,"2024/03/03 19:49:14"
C,"END OF REPORT",13

Some CSV files contain multiple pairs of Information and Data for example:

C, # Control
I, # headers
D, # some data
D, # some more data
I, # new headers
D, # different data
C, # Control

Parsing CSV file

Each Zip

au-energy-scraper's People

Contributors

ryukyi avatar

Watchers

 avatar

au-energy-scraper's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.