Coder Social home page Coder Social logo

mrsimpson / energy Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 5.17 MB

A calculator for cost of energy (gas)

Home Page: https://gaspreis.no-panic.org

License: Apache License 2.0

JavaScript 0.67% HTML 2.05% Vue 82.23% TypeScript 15.04%
energy energy-consumption gas vue

energy's People

Contributors

jschirrmacher avatar mrsimpson avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

energy's Issues

Basic interaction analysis

In order to know how and whether someone is using the app at all, we should do some very basic anonymous tracking.

For

  • Visits
  • User input changes

We shall do everything in order to avoid a need for consent

  • No Cookie
  • No storage of personal data (anonymize the IP)

Visualize cost from 2021 to 2024

  • 2021 per user input
  • 2022 with 2021 consumption - single governmental payment
  • 2023 based on the "80% @ 0,12€" + (20% - reduction) * 2023 max price
  • 2024 without the governmental support

Add license

Which should be the license to use the code?

Should it be MIT or Apache-2 or something completely different? I currently prefer Apache-2.

Explanation components

Adding explanations with the necessary long texts may break the layout.
image
A simple Info-icon with a tooltip as a component could help (NIcon & NTooltip)

Improve readability

Our app is very text-intensive. We should make the text a bit better to read.

Rounding problem in price field

When using the "+" button, I get a rounding problem in the price field.
This is due to dividing and multiplying with 100 to get cents instead of euros.

Chart calculations is wrong

  • The subsidization is not limited to 80%
  • savings don't affect the subsidized amount when not exceeding the 80%

Use script setup

Using <script setup> would simplify our code and make it easier to read. So, I propose using this component definition method.

Introductory text

We should have some intro text on the page to make clear about the "why" of this calculator.

Show diagrams

Bar diagrams should show

  • price in 2021 - for reference
  • price in 2022 - with and without public endorsement
  • price in 2023 - with and without gas price break, with and without savings

Imprint page

We should have an imprint page.

Es bleibt festzuhalten, dass aufgrund des Telemediengesetzes (§ 5 TMG) und des Medienstaatsvertrags (§ 18 MStV) jede für die Öffentlichkeit bestimmte Website eine Anbieterkennzeichnung benötigt – egal, ob Onlineshop, journalistische News-Site, Firmenwebseite, Nischen-Blog, Onlinedienstleistung oder halbprivate Internetseite.

Improve bar charts

The bar charts could be a little easier to read if 2023 would have to separate bars: one containing only the gas price and the subsidization (just like 2022), and another one containing same data with the own savings incorporated. It would better illustrate the effect of the savings, and especially how it would affect the own costs and the subsidization.

WDYT @mrsimpson ?

Re-arrange inputs

Result from UX-review (Maren)

  • Group contract related data (prices) and consumption (consumption + reduction)
  • Move consumption on top of the result so that the contract-related stuff can be hidden
  • Allow input of September-payment (and probably default it to 1/12 of the 2022 total gross price, since the gas company probably increased the rates in 2022 anyway)

Navigation

we should have something like a navigation in order to enable things like #35

Synchronization of work

When working on the same code but kind of in a different time zone, we should agree about how to synchronize our work.

How do you think about creating issues for all enhancements we want to implement, and assign ourselves to those we are currently working on?

Don't limit the subsidization exceeding 20%

As per the official proposal, the discount is not actually a discount limited referring the 2023 consumed quantity, but it's only based on the previous' year consumption

Das Kontingent beträgt 80 Prozent des Verbrauchs, der der Abschlagszahlung aus September 2022 zugrunde gelegt wurde. Der erhaltene Betrag muss nicht zurückgezahlt werden, selbst wenn der tatsächliche Verbrauch in der Jahresendabrechnung von der angenommenen Menge abweicht. Daher bleibt der volle Energiesparanreiz bestehen und jede eingesparte kWh reduziert den Rechnungsbetrag um den im Versorgungsvertrag vereinbarten Arbeitspreis.
Der monatliche Betrag der Gas- und Wärmepreisbremse für Kunden, die einen Arbeitspreis oberhalb des Garantiepreises haben, errechnet sich wie folgt:
Rabatt = (individueller Arbeitspreis – Garantiepreis) * Kontingent / #Abschläge

SEO

As we'd like our app to be discovered by Google, we should invest some effort into SEO

Style chart

  • Coloring / styling: Eigenanteil solid reddish, savings solid greenish, subsidization dashed, grey
  • Formatting of numbers (€, thousands-separation with blank or dot)

FavIcon

We need an own favicon.ico, currently it is the default vue.js icon

Email input

We'd like to have users provide their email so that we can stay in touch with them.
As we don't have a real backend yet, a simple solution would be to just provide an email-input and track the submit event (which just stored the email provided in local storage so we can hide the form).

Since an email-address is gdpr-protected data, we have to inform the user that by entering it, an implicit agreement to the data protection terms is given.

Relates to #15

Sidebar issues

After the last changes, at first, I didn't recognized that there are more input fields in a kind of sidebar on the left. This sidebar is hidden by default, presumably b/c it will use less space on mobile devices. On a notebook (even on the 13" I currently use) this is not really necessary. Instead, the layout seems a little bit funny due to the fact that a comparatively narrow white content is placed more or less on the left side of the screen. The button to show the side bar is comparatively small (though, it is extends to the left, so I should have seen it at first, I agree).

Bildschirmfoto 2022-11-15 um 06 13 17

So, how about making the side bar visible by default on larger screens?

And, how about using tabs instead of a side bar on smaller devices?

Warnings from plugin-vue when it tries to resolve xml tags

@vite/plugin-vue tries to resolve the xml+svg paragraph icon as vue template tags. This obviously fails and creates warnings in the dev console of the browser.

I already tried to configure the plugin-vue to exclude xml files but to no avail. Now, I don't have any idea, how to resolve that.

Actually, the implementation of the menu doesn't really looks like how vue components should be implemented IMO. How about using simple <router-link>s with an icon instead of the menu? We don't currently need the features of the <n-menu>, and I think it will never be necessary.

Proposals for savings

As a user, I want so select from some saving proposals, which will be taken into account for 2023

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.