Powering Energy Storage Beyond Excel

Calvin Hendryx-Parker, CTO

Six Feet Up

GitHub Repository

https://github.com/sixfeetup/2023_DjangoConUS_PoweringEnergyStorage

Energy Storage Projects

Stages

  • Project/System Requirements
  • Sizing
  • Configuration
  • Build
  • Maintain

Why Excel in First Place

  • Widely known
  • Easy to bootstrap
  • Easy to adjust to business case
  • Easy collaboration and sharing
  • Handling of massive tabular data
  • Handle complex formulas and business logic
  • High precision calculations

Tables…

Why NOT Use Excel

  • No scaling
  • No reliable versioning
  • No protection of business know-how and internals
  • No fault tolerance
  • No field permissions
  • No tests

Why Django?

  • Batteries Included
  • Mature
  • Secure
  • Reliable
  • Extendable
  • Scalable
  • Testable

Our Stack

  • Django backend
  • PostgreSQL database
  • djangorestframework — DRF, Django REST-Framework
  • drf_spectacular — OpenAPI
  • django-rest-framework-simplejwt — JWT
  • django-filter — Filter classes for DRF
  • NextJS UI

Transition

  1. Evaluate
  2. Prototype
  3. Review
  4. Build
  5. Switch

Transition

Evaluate

  • Collect ALL formulas
  • Document them
  • Add examples
  • Add spreadsheet version information

Transition

Prototype

  • Using Jupyter Notebooks
  • Rapid development
  • No full stack required
  • Let customer test with real data
  • Early feedback

Transition

Build

Front-end

  • NextJS with Ant Design
  • Batteries-included front-end
  • Authentication, protected routes, API access
  • Implementation against OpenAPI specification
  • CSV & PDF exports
  • Reports

Challenges

General

  • New spreadsheet versions
  • Changes in the formulas
  • Parallel usage of Excel and Django
  • Requirement changes

Challenges

UI & UX

  • Massive amount of tabular data
  • Very long forms
  • Don’t create a web version of Excel

Conclusion

  • Use Django from beginning if you can
  • Use Excel if you have to
  • Transition to Django early

Wrap up and Questions

Resources

Find Me 😍

📩
🤝 https://linkedin.com/in/calvinhp
✖️ @calvinhp
🐘 @calvinhp@fosstodon.org
✍️ https://sixfeetup.com/blog