Coder Social home page Coder Social logo

agile2stl's Introduction

agile2stl

Octopus Agile prices to 3D STL file

This is a little project, inspired by Greg Jackson of Octopus Energy who challenged the community to produce a 3D printed visualisation of historical Octopus Agile electricity tariff prices.

2020 example STL in slicer

There are two Python 3 scripts here, one fetches the required pricing data from the Octopus APIs and writes it to a CSV formatted file. The other script reads this CSV pricing file and builds a 3D model, writing the output in STL format ready for slicing for a 3D printer.

For either script, the options '-h' or '--help' will show the command line options help.

Fetching the Agile data

To fetch all of 2020's price data for MPAN region A:

python3 fetch_agile.py -y 2020 -r A agile_2020.txt

Creating the STL file

To create the STL from the price data:

python3 agile2stl.py agile_2020.txt agile_2020.stl

Note that when you run this there will be an error shown, unfortunately that is from the STL library, but it appears harmless with current Python 3 versions.

Dependancies

The agile2stl.py script requires the following Python libraries, which should be readily available with your Python distribution. The Ubuntu/Debian package names are given in brackets.

  • numpy (python3-numpy)
  • numpy-stl (python3-stl)
  • matplotlib (python3-matplotlib)

agile2stl's People

Contributors

jonathanperkins avatar

Watchers

 avatar

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.