Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Feature / Iceland #140

Closed
Pantkowsky opened this issue Nov 19, 2016 · 31 comments
Closed

Add Feature / Iceland #140

Pantkowsky opened this issue Nov 19, 2016 · 31 comments

Comments

@Pantkowsky
Copy link
Contributor

No description provided.

@Pantkowsky
Copy link
Contributor Author

Pantkowsky commented Nov 19, 2016

@birkir
Copy link

birkir commented Dec 28, 2016

Realtime energy transmission [1], something like this should do the trick (sorry, am more comfortable with js):

async getTotalPowerFlow() {
  const req = await fetch('http://amper.landsnet.is/MapData/api/measurements');
  const data = await req.json();
  return data.find(item => item.key === 'TOTAL_POWER_FLOW').MW;
}

We don't share power with other countries.

(2015) [2]

  • Hydro: 13.781 GW (73,3%)
  • Thermal: 5.003 GW (26,6%)
  • Wind: 11 GW (0,05%)
  • Gas: 3.9 GW (0,02%)

(2014) [3]

  • Hydro: 12.872 GW (71,03%)
  • Thermal: 5.238 GW (28,91%)
  • Wind: 8.127 MW (0,04%)
  • Gas: 2,4 GW (0,01%)

[1] http://landsnet.is/english/transmissionandmarket/systemoperations/currentpower/
[2] http://www.orkustofnun.is/media/upprunaabyrgdir/Sto%CC%88dlud-yfirly%CC%81sing-fyrir-2015.pdf
[3] http://www.orkustofnun.is/orkustofnun/frettir/nr/1645

@corradio
Copy link
Member

Hello @birkir

Sorry for the late reply. It seems like the data source you have given does not discriminate between production types. Am I right or did I misunderstand something?

Thanks,

Olivier

@birkir
Copy link

birkir commented Jan 12, 2017

You are right, I thought using constant ratios of production types times the total power flow would give an estimate, but after some thinking, that's not a good idea.

On the other hand, Iceland is really small and there are only 17 power stations [1] in total, which we have all the data on flow, so if I map each power station to production type we have it real, realtime.

On the realtime map the gear/cog icons represent a power station feeding electricity into the grid.

[1] http://www.landsvirkjun.com/company/powerstations/

@corradio
Copy link
Member

Sounds good. Would you be able to write such a parser? I can provide the necessary help but the script itself, in python, should be fairly simple. See for example the parser for EE: https://github.com/corradio/electricitymap/blob/master/feeder/parsers/EE.py
That's the only thing needed!

@birkir
Copy link

birkir commented Jan 12, 2017

Allright, I'll convert my js code to python over the weekend, posting this as a reference for that work.

edit: Updated the code, you can now paste it in the javascript console on http://landsnet.is to get a result and review it.

var stations = [
  { key: 'KRAFLA_F', type: 'geo' },
  { key: 'FLJOTSDA', type: 'hydro' },
  { key: 'LAXA_F', type: 'hydro' },
  { key: 'LAGARF', type: 'hydro' },
  { key: 'BLANDA_F', type: 'hydro' },
  { key: 'MJOLKA', type: 'hydro' },
  { key: 'SULTAR_F', type: 'hydro' },
  { key: 'HRAUN_F', type: 'hydro' },
  { key: 'SIG_F', type: 'hydro' },
  { key: 'VAF', type: 'hydro' },
  { key: 'BURF_F', type: 'hydro' },
  { key: 'KOLVID', type: 'geo' },
  { key: 'IRAFOS_F', type: 'hydro' },
  { key: 'LJOSIF_F', type: 'hydro' },
  { key: 'X_NESJAV', type: 'geo' },
  { key: 'REY', type: 'geo' },
  { key: 'SVA', type: 'geo' },
  { key: 'BUDAR_O', type: 'hydro' }
];

fetch('http://amper.landsnet.is/MapData/api/measurements')
.then(res => res.json())
.then(data => {
  const powerflow = data.find(item => item.key === 'TOTAL_POWER_FLOW');
  const datetime = new Date(powerflow.time);
  const production = {};
  const consumption = {
    unknown: powerflow.MW,
  };
  stations.forEach(({ key, type }) => {
    const items = data.filter(item => item.substation === key && item.MW >= 0);
    const mw = Number(items.map(st => st.MW).reduce((a, b) => a + b, 0)) || 0;
    production[type] = (production[type] || 0) + mw;
  });

  const result = {
    countryCode: 'IS',
    source: 'landsnet.is',
    datetime,
    production,
    consumption,
  };

  console.log(result);
});

@birkir
Copy link

birkir commented Jan 12, 2017

See update above, but is it correct to assume that the consuming is about ~85% of the production?

@corradio
Copy link
Member

I'd rather not return any consumption data because that 85% can vary. So I'd suggest only return production mix for now.

@birkir
Copy link

birkir commented Jan 12, 2017

Ok, I actually calculated 85% from total power flow (through the power grid) divided by the sum of production (hydro, geothermal), just asking if that's normal or not, I thought it should be as close to 100% as possible.

But only production is allright with me 👍

@corradio
Copy link
Member

corradio commented Jan 15, 2017

@birkir how is it going? Need help? I'm quite excited about getting Iceland on the map!!

@brunolajoie
Copy link
Contributor

brunolajoie commented Feb 4, 2017

Hello @birkir thanks a lot for your help!

I'm noticing a mismatch between power capacities and power production from the API, would you happen to know what it could be?

For instance, the BURF_F hydro power plant has a capacity of 6*45=270MW http://www.landsvirkjun.com/Company/PowerStations/BurfellPowerStation

But on http://amper.landsnet.is/MapData/api/measurements we have 6 values for each turbine, summing up to 394MW right now (04/02/17 19h28 GMT+1)

(excel comparison here https://docs.google.com/spreadsheets/d/1k7KZFy8ZQrtfFNSNRGTgTr5nA6Anzl5T_HKnjn2ZKkw/edit?usp=sharing)

Given that the capacity figures have been double checked in various websites, i'm rather confident that the issue comes from the amper.landsnet.is API, but don't know why

@corradio
Copy link
Member

corradio commented Feb 4, 2017

Realtime transmission map seen here:
http://landsnet.is/english/transmissionandmarket/systemoperations/
Potential contact:

Íris Baldursdóttir
System Operations
Gylfaflöt 9, 112 Reykjavík
[email protected]
Tel: (+354) 563 9446

@corradio
Copy link
Member

corradio commented Feb 5, 2017

Sent an email to Iris

@kristjanbb
Copy link

Hey @brunolajoie

The issue isn't with the API being incorrect, but the interpretation is incorrect. These numbers do not represent power from plants, but rather these numbers almost all (others data points being total and intersects) represent transmission lines connecting adjacent substations.

You can see how the data is used here: http://landsnet.is/raforkukerfid/kerfisstjornun/aflflutningurnuna/ (note that the english version doesn't show correct data at all and has been broken for a while).

For example Burfell is the almost octopus with 7 transmission lines near the center. As you see summing the lines is rather meaningless since much of the power is just flowing through the substation. This data has few more annoying flaws like even though it's all edges (transmission lines) it only list one of the node (power stations) seemingly at random. Hence the 7th feeding line for Burfell isn't account for.

I'm afraid that this API just isn't very good for getting separate numbers for geothermal / hydro power.

I see two workarounds. One method I speculate works by getting a fairly good approximation for the much fewer geothermal stations and subtract it from the total to get the hydro power.

Another workaround is to fix up the data more. Make sure that all lines are accounted for with correct direction for every node. For example if the 7th line to Burfell had been account for and feeding line "Sigoldulina 3" (SIG_F key SI3) had been subtracted you probably get correct number for Burfell.

Finally check that the sum of geo + hydro adds up to the given total.

@corradio
Copy link
Member

corradio commented Mar 3, 2017

Thanks @kristjanbb for the clarification.
Do you know if / how we can get a real-time API in order to show Iceland on our map? Is there an equivalent API representing production instead of exchanges between stations?

@brunolajoie
Copy link
Contributor

Ahhhh that why! Thanks for the clarification! As for your two workaround options:

  • Your suggested option 1 is unfortunately not a viable option for us, we prefer a lack of data than estimated data, in order to keep pushing TSO to disclose their their data.
  • Unfortunately, we lack a bit of time to go deeper into option 2 by ourselve right now. If you are willing to help build a valid parser and contribute to extend the map, do not hesitate! We can help with the coding part.
    Thanks,

Bruno

@birkir
Copy link

birkir commented Mar 3, 2017

Hi guys, I have not found the time to convert it to python, and make adjustments based on peoples great answers in this thread!

If we can decide on going for option two (which is pretty much the same as I did in JS, with small adjustments), we should go forward with it.

edit I now see thats you have made the parser already, hats off to you. We can also press LANDSNET to give us better data.

@kristjanbb
Copy link

No sorry @corradio I don't know of any other API public, but I did send an inquiry to Landsnet about this. They might not have all the information reliably broken down since they run the high voltage transmission grid, not production.

@corradio
Copy link
Member

@kristjanbb did you get any reply?

@kristjanbb
Copy link

@corradio nothing useful, just that they would forward it to the right people.

@corradio
Copy link
Member

corradio commented May 21, 2017 via email

@kristjanbb
Copy link

@corradio Chance of reply? I doubt it, probably buried in pile of dead suggestions now.

Nudge them? Absolutely. There is [email protected], that probably ends in worlds slowest support desk, but doesn't hurt. On Landsnet contact page one can pretty much reach anyone directly via email, but who do you want to contact? You can reach the technical people directly, but they probably don't have the authority to add this functionality. Then your best bet is to sell this idea to management directly, but I'm not confortable with acting as a spoke person of this site to sell this idea.

Finally you can try and ping the producers (Landsvirkjun, 76% of production, Orkuveita Reykjavíkur, RARIK, and Hitaveita Suðurnesja). In fact I'm not even sure if Landsnet (a distributor and not a producer) has the exact breakdown to start with?

@corradio
Copy link
Member

I'll try to nudge them.

@corradio
Copy link
Member

There's quite a few interesting data here:

@alixunderplatz
Copy link
Collaborator

Hey everyone,

please tell me what you think about these two approaches/options to feature Iceland:

We know that generation consists of hydro, geothermal, a tiny amount of wind, and an even more negligible amount of oil.
According to IEA, these were the figures in GWh for 2015:

hydro: 13781 (1.57 GW on average)
geothermal: 5003 (0.57 GW on average)
wind: 11 (1.25 Megawatt on average)
oil: 4 (0.45 Megawatt on average)

Some more recent figures on energy generation and installed capacity for the last year 2017 (in GWh):
hydro: 14059 (1.60 GW on average)
geothermal: 5170 (0.59 GW on average)
wind: 8.13 (0.93 Megawatt on average)
oil: 2.1 (0.24 Megawatt on average)

Installed capacity as per 2017
hydro: 1984 MW
geothermal: 708 MW
wind: 3 MW
oil: 72 MW

19.240 GWh were generated in 2017, which leads to a yearly average generation (or load) of 2200 MW, just as a reference.


To summarize everything from all the work above that is applicable:

  • we know the grid load
  • there is no interconnector with another zone, so electricity is of domestic origin
  • We know a website for wind generation (we could use it but would be nearly invisible) - I hadn't yet checked whether the data is for all turbines or just two)

It's just that the shares between geothermal and hydro are unknown.

Option 1

From what we've seen on the electricitymap, all countries using geothermal power have these plants running as "baseload supply" with a very high capacity factor over the entire year.
Hydro is mostly used to cover peaks and to react to changes in demand due to its flexibility and storage capability. Geothermal may change its output during the day too, but this is probably performed in a very, very limited range only.

This made me think of a solution where we'd use a "fixed average generation" for geothermal and use hydro to fill the gap to match the load. This would allow for changes in generation shares to be considered in the carbon intensity of the mix. Just like for the NL, where only wind and solar are given.

Option 2

Setting a fixed carbon intensity for the electicity mix based on the shares of 73% vs. 27% of hydro vs. geothermal.
This results in an intensity of about 28 g/kWh using the IPCC median values, but wouldn't show any changes to the carbon intensity (= the bit of wind energy as only possible influence on it).


I'm collecting some data over the next days to get a visual idea of the load profile, which is updated every 5 minutes.

@jarek
Copy link
Collaborator

jarek commented May 2, 2018

Before others go doing the math: the "MW on the lines" data currently available in the API is only a placeholder.

For instance, in southwest peninsula, the line from Reykjanes, Rauðamelslína (RM1) currently reports 100 MW, and the line from Svartsengi, Svartsengislína (SM1) also reports 100 MW. They feed into Fitjalína (MF1) which also reports 100 MW, and then send power to Reykjavík area via Suðurnesjalína (SN1) which also reports 100 MW. These are improbable values: to begin with, Svartsengi's capacity is 75 MW according to Wikipedia, and there is nothing before Fitjalína to eat up 100 MW - majority of that power is sent at least to the Alcan plant via the Suðurnesjalína.

As another example, currently 230 MW is entering Rangárvellir and only 104 MW is leaving (on the RA2/BECROMAL and DA1 lines).

So I am guessing that the values are only placeholders to indicate direction and speed of the flow for the map - or at least the values that are exactly 100 MW and -100 MW, 200 and -200 MW are.

(I had hoped that we can just solve the flow equations, especially as there are only 5 geothermal plants and 3 of them are very easy to isolate, but unfortunately the data is just not there :/ )

Essentially only the values actually indicated on the HTML map are likely to be correct, which leaves us with the entire southwest unsolved.


Without reliable data or a substantial known non-dispatchable portion (more than the 0.1% wind...) I would suggest just leaving it as unknown. We won't help anyone in Iceland use electricity when it's substantially greener (it's always basically the same), and if they want to be green on the map all the time, they should publish actual data.

@alixunderplatz
Copy link
Collaborator

@jarek good that you mentioned this here! 👍
I also assume these are placeholders for direction and speed.

Many of the 95 values will also show "30 MW" all the time and then all of a sudden they change to something like 4.xx, always starting with a 4.


On my way to get some general data on grid load, I found an interesting study which you can download here:
http://energy.mit.edu/publication/electricity-security-supply-iceland/

Looks like they used grid data for 2014 and applied some of the cuts of the "SNIÐ" option of the map (see page 40 of 75 of the document (page 9 of second part)) to perform some grid calculations.

Consider this as just some "secondary info" as well, nothing that could be used.

@jarek
Copy link
Collaborator

jarek commented May 15, 2018

Closing due to no usable data currently available. Please comment or reopen if more data becomes available.

@jarek jarek closed this as completed May 15, 2018
@alixunderplatz
Copy link
Collaborator

@jarek Here's the load profile from the beginning of May when I collected some data:

image

As assumed above, the average load/generation is around 2200 MW through the year and should not show any significant "ups and downs" in the load curve. Same can be observed in the graph.

A constant ratio of hydro vs. geothermal or a fixed geothermal (600 MW) and "gap filling" hydro could be applied to this. Second option would consider the better flexibility of hydro to cover these demand drops and increases that you can observe (due to industry demand, I guess).

@alixunderplatz
Copy link
Collaborator

... a final comment from me on this issue^^

image

@SNPerkin
Copy link
Contributor

Hey @alixunderplatz and @corradio, really cool project.

You've clearly made some effort trying to get data for Iceland over the last few years, particularly with the amper API and trying to 'reverse engineer' some kind of real-time data. It is a shame to not have Iceland on the map!

The reason that there isn't any Landsnet data on the ENTSO-E transparency portal is primarily due to Landsnet not being a part of the pan-European electricity market (despite being an ENTSO-E member).

Let me see if I can make some of the data available.

Kind regards,

Samuel

VIKTORVAV99 pushed a commit to VIKTORVAV99/electricitymap-contrib that referenced this issue Jan 13, 2023
madsnedergaard added a commit that referenced this issue Jan 30, 2023
* Adds .vscode files and a symlink

* Adds temporary dev-easement-rule-disablements

* Makes magic-numbers rule more chill

* fixes magic number

* Removes unused disable-comments

* Moves testing utils and setup to separate folder

* Groups utils in one folder

* Restructures app

* Fixes imports

* capacitor scripts

* Moves files around

* Fixes paths to get tests passing

* Fixes linting paths after renaming tests

* Updates VSCode settings to include file nesting

* block all crawlers (#11)

* block all crawlers

* add no index meta

* initial map setup (#13)

* remove cz (#12)

* add tailwind classname package (#10)

* update pnpm lock

* Adds error overlay to display runtime errors (#16)

* Moves integration tests over and makes them work again (#15)

Co-authored-by: Tony <[email protected]>

* Adds basic layout (#17)

* Adds deploy script (#14)

* Tonyvanswet/ele 1338 UI header component (#20)

* Adds some mockdata with new structure (#22)

* add mockdata

* fix

* LeftPanel UI (#18)

* Replaces tailwindcss-classnames with clsx.
See https://linear.app/electricitymaps/issue/ELE-1331#comment-5816d8f5

* Ensures tailwind autocomplete stil lworks

* Adds missing dependency

* Updates outer wrapper styles

* Adds initial work on the left panel container

* Fixes shadows

* Adds fixed to main

* Uses proper HTML tags

* Removes clsx usage

* Adds state with atom and initial timecontroller UI (#21)

* Adds libraries

* atom logic

* change line width to 80

* Update api calls

* adds initial ui for timecontroller

* Jotai usage documentation

* Readme

* incorporate feedback

* Update .prettierrc.json

* lint

* Update README.md

Co-authored-by: Tony <[email protected]>

* Tonyvanswet/ele 1371 map UI basic geometries and colors (#19)

* initial map setup

* get map rendering

* crop antartica with very magical numbers

* gray map and many eslint errors

* add mockdata

* fix

* map with types

* use v6 api

* basic map

* Update web/src/hooks/theme.ts

Co-authored-by: Mads Nedergaard <[email protected]>

* Update web/src/api/getState.ts

Co-authored-by: Mads Nedergaard <[email protected]>

* Update web/src/features/map/map-utils/generateTopos.ts

Co-authored-by: Mads Nedergaard <[email protected]>

Co-authored-by: Markus Killendahl <[email protected]>
Co-authored-by: Mads Nedergaard <[email protected]>

* add all the flags (#24)

* Zone Details: Header part 1 (#23)

* add all the flags

* Add zoneFlag with hardcoded return

* Change leftpanel styling

* Add initial zoneHeader

* Works for countries

* Disable eslint

* Disables the annoying import-organize

* Lints everything with 90 char line-width (#29)

* Updates prettierignore

* Removes unused overwrite

* Ensures script uses prettierignore lisr

* Disable the horrible "auto-removing imports"

* Ignores config json files

* Formats everything with printwidth 90

* Updated map logic (#27)

* WIP

* WIP 2

* setup types

* Fix test

* Remove unused things

* Disables the annoying import-organize

* Split theme types

* Color on all effects

Co-authored-by: Mads Nedergaard <[email protected]>

* Zone Details Header: Part 2 (#25)

Co-authored-by: Mads Nedergaard <[email protected]>

* Sets up basics for dark-mode (#28)

* Adds translations (#31)

* add locales

* add translation logic

* use translation hook in timecontroller

* Adds v6 to mockserver (#30)

* Updates script to create paths and use v6

* Removes mock data for v4 and v5

* Adds mock data for v6

* Updates mockserver to work with v6

* Style toggle group

* inject dependencies in toggle

* style and refactor timeslider

* Change header to be fixed positioned

* Remove error and loading handling on map. It should ideally always be drawn.

* Close left panel

* Add timeaxis

* refactor timecontroller

* add helpers

* remove magic number rule

* add clock icon in html file

* install react spinners

* change tailwind config. Should confirm best practice.

* add slider thumb custom icon

* Basic map interactivity: Hover (#33)

* Ensure atom returns typed value

* Timeslider (#35)

* remove unused config

* change tailwind config

* use brand green

* remove ternary operator

* incorporate feedback

* Fixed layout problems with Header (#36)

* Makes header not-fixed and adjusts link font size

* Makes time controller fixed (instead of absolute)

* Basic map interactivity II: Click & Selected (#34)

* Ranking panel (#32)

* add locales

* add translation logic

* use translation hook in timecontroller

* Copied files from #26

* working prototype

* ensure timecontroller is on top

* ranking rows

* refined ranking panel

* remmove undefined

* Adds onClick handler

* Applies curly rule

* Update web/src/features/panels/ranking-panel/ZoneList.tsx

Co-authored-by: Mads Nedergaard <[email protected]>

* Creates and uses an InternalLink component that preserves state

* remove ref and update hover

Co-authored-by: tonypls <[email protected]>
Co-authored-by: Mads Nedergaard <[email protected]>

* add arrows (#41)

* Set up icons and replaces existing usage (#37)

* Documents icon usage

* Adds react-icon and documents usage

* Replaces icons with new approach

* Tonyvanswet/ele 1375 UI set up prodcon and aggregate toggle (#38)

* start toggle

* reusable toggle

* toggle with translations

* update enums

* Exchanges: map rendering (#40)

* add arrows

* add exchange types

* added key

* add scales helper

* add custom layer

* add exchange logic

* add to map

* Update web/src/features/exchanges/ExchangeArrow.tsx

Co-authored-by: Viktor Andersson <[email protected]>

* Update web/src/features/map/Map.tsx

Co-authored-by: Viktor Andersson <[email protected]>

* Update web/src/features/map/Map.tsx

Co-authored-by: Viktor Andersson <[email protected]>

Co-authored-by: Viktor Andersson <[email protected]>

* Fixes locales path

* start on buttons and tooltips (#39)

* start toggle

* reusable toggle

* toggle with translations

* update enums

* start on buttons and tooltips

* darkmode + zoom controls

* add zoom toggles

* zoom darkmode

* map controls ready for review

* Remove theme check

* Update web/src/features/map/Map.tsx

Co-authored-by: Mads Nedergaard <[email protected]>

Co-authored-by: Mads Nedergaard <[email protected]>

* Adds translation scripts (#43)

* Tonyvanswet/ele 1378 UI basic tooltip component (#44)

* start toggle

* reusable toggle

* toggle with translations

* update enums

* start on buttons and tooltips

* darkmode + zoom controls

* add zoom toggles

* zoom darkmode

* map controls ready for review

* tooltip follows cursor in country

* empty tooltip

* tidy

* A bunch of minor improvements (#46)

* Adds LoadingOverlay (#47)

* Add initial area charts (#48)

* install d3

* modify types

* tweak timeaxis

* set up helpers

* add chart components

* install currency lib

* add two additional graphs

* Charts v2: Refactor with hooks (#49)

* install d3

* modify types

* tweak timeaxis

* set up helpers

* add chart components

* install currency lib

* add two additional graphs

* change usegetzone hook to no params

* refactor pricechart

* refactor carbonchart

* refactor breakdown chart

* extend types

* change areagraph data format

* set it up

* feedback

* Allows ts-ignore comments with descriptions

Co-authored-by: Mads Nedergaard <[email protected]>

* Adds new Flag component (#50)

* some theme colors and improve darkmode (#52)

* no user select for buttons / controllers (#56)

* less fruits, more clickable map (#55)

* Tonyvanswet/zone tooltip data (#51)

Co-authored-by: Mads Nedergaard <[email protected]>

* Changes title component to incapsulate logic and use real data (#54)

* Adds new Flag component

* Updates flag props

* Changes title component to incapsulate logic

* Changes gauges to use 0-1 scale instead of 1-100.
As our data comes in this way and the charts needs it like this anyway.

* Changes CountryTag to only show on subzone

* Adds new TimeDisplay that uses atom directly

* Adds comment (and waits with implementation)

* Hooks ZoneHeader up with more data

* Sets default selected datetime as latest

* Bumps version

* Removes flags

* Charts v3: Emission mode (#53)

* install d3

* modify types

* tweak timeaxis

* set up helpers

* add chart components

* install currency lib

* add two additional graphs

* change usegetzone hook to no params

* refactor pricechart

* refactor carbonchart

* refactor breakdown chart

* extend types

* change areagraph data format

* set it up

* feedback

* Adds emission chart

* Set up display by emissions

* fix typos

* incorporate feedback

* fixes Markus' fix

* Fixes merge conflict mistake

* Fixes merge conflict issue

* bump

* tidy up and some branch feedback (#58)

* Tonyvanswet/ele 1479 make language selector work (#57)

* start on language selector

* language select

* Refactor charts further and adds storybook (#59)

* Adds basic setup

* Adds default sample stories

* Adds example MDX

* install d3

* modify types

* tweak timeaxis

* set up helpers

* add chart components

* install currency lib

* add two additional graphs

* change usegetzone hook to no params

* refactor pricechart

* refactor carbonchart

* refactor breakdown chart

* extend types

* change areagraph data format

* set it up

* feedback

* Adds emission chart

* Set up display by emissions

* fix typos

* WIP

* WIP 2

* WIP

* Fix merge conflicts probably

* Remove timeaverage as param

* Add on hover effect to breakdown chart

* Support storage

* Add storage story

* Fix import

* reset datetimes correctly

* Incorporate feedback

Co-authored-by: Mads Nedergaard <[email protected]>

* onboarding modal (#60)

* onboarding modal

* remove dialog package

* use local storage atom

* Update web/src/components/modals/OnboardingModal.tsx

Co-authored-by: Viktor Andersson <[email protected]>

* Update web/src/components/modals/OnboardingModal.tsx

Co-authored-by: Viktor Andersson <[email protected]>

* Update web/src/components/modals/OnboardingModal.tsx

Co-authored-by: Viktor Andersson <[email protected]>

* Update web/src/components/modals/OnboardingModal.tsx

Co-authored-by: Viktor Andersson <[email protected]>

* updates from merge

Co-authored-by: Viktor Andersson <[email protected]>

* Tonyvanswet/fix easy todos (#62)

* some TODO tidying

* get exchanges working again

* Update Map.tsx

* Tonyvanswet/fix todos part2 (#63)

* some TODO tidying

* get exchanges working again

* small fixes

* update theme type

* Get e2e tests working (#64)

* Ensure maptooltip does not remount and call api

* stash

* test passes

* Restructure mockserver

* remove stories

* remove

* Bar Breakdown Chart (#65)

Co-authored-by: Markus Killendahl <[email protected]>

* Fixes tooltip issue + broken bar breakdown chart (#69)

* Fixes tooltip issue

* Reverts change in data from hook

* FAQ Panel (#68)

* Tonyvanswet/ele 1370 set up new version logic (#61)

* start on toast

* new version toast

* new version with longer toast and descriptive refetch intervals

* check if prod before displaying new version toast

* prettier

* Tonyvanswet/update ranking panel style (#71)

* Adds outer panel

* Adds FAQ content

* Adds Tailwind plugins and animations

* Adds Poppins font

* Updates panel styling to handle scrolling and fixed containers

* Accepts FAQ in filename

* update styles based on feedback

* update after merge

* update scroll bar style and finish ranknig panel

* Adds dark mode hover styling

Co-authored-by: Mads Nedergaard <[email protected]>

* Dark-mode of bar-breakdown + chart titles + minor adjustments (#70)

Co-authored-by: Tony <[email protected]>

* Updates to handle new v6 data structure (#72)

* Updates to handle new v6 data structure

* Updates mock data

* Adds correct steps in CO2 scale (#73)

I assume the stuff was done to avoid magic numbers, but we removed that rule

* Small screen tweaks (#75)

* Tonyvanswet/ele 1508 carbon intensity legend (#74)

* start legend

* legendary

* move styling to legend container

* move styling to legend container actually saved this time

* rename legend container

* Adds areagraph tooltips (#67)

* Add shared tooltip component

* store zonedetails in meta

* share function from maptooltip

* add simple tooltips to charts

* Update locales

* Remove boiler story

* add keys to zonedetails

* add helper components

* add helper methods

* add breakdown tooltip

* add stories

* add other tooltips

* fix some bugs

* set up emission chart tooltip

* handle different size of tooltip placement

* log statement

* make tooltip more responsive

* style fixes

* Remove duplicate question mark

* add a debug file

* add a unit test

* clean up

* Sets Vite up to build index.html using a template (#77)

* Finalise Ranking Panel (#78)

* Tonyvanswet/ele 1368 set up solar and wind layer (#80)

* borked wind layer

* sort of works

* add todo on moment

* removed moment, kinda working

* remove moment from packages

* Removes cleanup function which is not allowed on useCallback

* Fixes hour offset (no clue why though...)

* Removes unused import

* Deletes unused hooks

* Removes react-transition-group

* Removes another cleanup-function

* Replaces fade-in transition with tailwind

* Updates data-fetching logic:
- use correct dates
- type data response
- retry with prev. timestamp if it 404s

* Uses data type

* Uses singleton pattern for Windy instance + types

* Update web/src/api/getWeatherData.ts

* Removes commented-out code

* Moves scales to different files

Co-authored-by: Markus Killendahl <[email protected]>
Co-authored-by: Mads Nedergaard <[email protected]>

* Set up mobile tooltips (#83)

* update spring bottom sheet

* add mobile styling

* remove comment

* use tailwind numbers

* Add zone detail states (#79)

* Add empty bar breakdown chart

* add more states and refactor

* add contributor list and source

* ensure graphs are not rendered when no data

* remove boilerplate story

* feedback

* Merge conflict and remove warning

* Refactors Map to avoid excessive rendering (#81)

* Changes tooltip to read from global state

* Creates new MapWrapper to split components out

* Moves map-related atoms inside feature-folder

* Moves shared map types to its own file

* Moves state to global atoms

* Refactor the onMouseMove handler for readability

* Reads isMoving from atom

* Makes panel open when clicking a country

* Reemoves types that can now be inferred + minor tweaks

* Hides tooltip when dragging map (like before)

* handle conflicts

Co-authored-by: Markus Killendahl <[email protected]>

* Fix SE-SE4 not being hoverable (#84)

* add empty zone to geometries

* add comment

* use zoneid as featureid

* format

Co-authored-by: Markus Killendahl <[email protected]>

* starting to work through errors and warnings (#86)

* Add geometry and zone-config scripts (#85)

* WIP

* executable through ts-node

* Update script

* reintroduce eslint rules

* add eslint rules back

* use current config folder

* use current config

* Add tooltip to barbreakdown chart and style zonedetails a bit (#87)

* Add tooltip functionality

* style zonedetails

* rename variable

* Adds solar layer 🌞 (#90)

Co-authored-by: tonypls <[email protected]>

* Adds loading indicators on weather buttons (#89)

* fixes atom name usage

* Changes layer orders

* Removes vite-plugin-html and uses a plain index HTML (#94)

* Removes variable usage from index file.
Also stops Prettier from breaking long lines

* Removes package

* Switches to variable font for Inter

* BreakdownChartTooltip bugfixes (#93)

* Disable test coverage

* test passes

* returns 0 instead of ? for existing zero production

* fix darkmode and positioning

* refactor tooltip calculations

* tidy left panel (#88)

* Tonyvanswet/ele 1366 set up proper sentry process (#91)

* add sentry

* further sentry updates

* sentry routes

* add sentry auth

* Update index.html

* Update main.tsx

* update project name

* Adds colorblind-mode (#92)

* excludes subzones (#95)

* fix style (#96)

* extra space (#97)

* add tooltips (#99)

* add dark mode bg for overlay (#100)

* 🎁 Update bottom sheet snap points (#102)

* reduce snapsshots

* align text and datedisplay

* solar and wind legends (#103)

* solar and wind legends

* hide legends on small screens

* tidy legends

* 🎁 Display estimated and aggregated badges (#98)

* display badges

* add height

* 🎁 Improve tooltip interactivity on mobile (#101)

* add x button on areagraphtooltip

* remove hover layer effect on mobile

* add a bit more styling

* works on larger devices

* change top padding to come from styles and add z index to go above timecontroller

* ensure overlay above timecontroller

* add none pointer events to prevent flickering

* close tooltip when zoneclicked

Co-authored-by: tonypls <[email protected]>

* Adds custom events (#108)

* Mobile modals part I: The base (#104)

* Mobile modals part II: Settings (#105)

* Mobile modals part III: Info (#106)

* use latest inter (#109)

* Updates Sentry project name + check for env vars

* Tonyvanswet/add alaska translation (#110)

* add zone name for Alaska

* add alaska and prevent long zone overflow

* onboarding modal for mobile (#113)

* onboarding modal for mobile

* Adds padding below titles and switches font

* Adds shadow to modal buttons

* Makes modal buttons overlap modal on mobile.
This gives more space for content

* Positions modal closer to middle of screen on desktop

* Makes modal less high on mobile + increases shadow

* Constraints logo size on first slide

* Ensures TimeController is always rendered.
Otherwise the loading spinner shows again.

* Adds comment to timecontroller

Co-authored-by: Mads Nedergaard <[email protected]>

* Fix broken refresh on app (#115)

* Fixes tooltip crash (#118)

* Fixes issue when adblocker is used + adds types (#117)

* Disables ts-checking on Windy and .stories.*

* Rearranges and updates images and icons (#114)

* fly to places (#116)

* fly to places

* Update web/src/features/map/Map.tsx

* update from feedback

* update initial view

Co-authored-by: Mads Nedergaard <[email protected]>

* disclaimer (#111)

* disclaimer

* update disclaimer

* change title width for difference screen sizes

* Adds a tiny bit of padding on mobile

Co-authored-by: Mads Nedergaard <[email protected]>

* Updates scripts (#112)

* Mobile modals part IV: FAQ (#107)

* Changes atoms to only use localStorage (#119)

* Tonyvanswet/ele 1538 enable center on callerlocation (#120)

Co-authored-by: Mads Nedergaard <[email protected]>

* allow toggle between production and consumption (#121)

* Fixes skip-onboarding

* Disables PWA and unregister SW temporarily

* touchable tooltips for toggle component (#122)

* Renames web

* Renames web-old to web while merging

* Reverts web folder renaming

* Merges locales

* Updates generated config files

* Adds scripts to ensure we generate new zone config

* co2 scale ++ (#126)

* co2 scale ++

* testing gray map

* remove test code, prevent rotate and tilt

* Update web/src/hooks/colors.ts

Co-authored-by: Viktor Andersson <[email protected]>

Co-authored-by: Viktor Andersson <[email protected]>

* capitalize tooltip (#127)

* add get our data link (#123)

* add get our data link

* update from feedback, remove message css

* Update web/src/features/charts/ChartTitle.tsx

Co-authored-by: Viktor Andersson <[email protected]>

Co-authored-by: Mads Nedergaard <[email protected]>
Co-authored-by: Viktor Andersson <[email protected]>

* unhover zone when clicked

* fix jobs link (#132)

* filter breakdown chart exchanges for selected aggregate (#133)

* feedback from Rasmus (#124)

* correct emmsions tooltip (#130)

* hardcode center location for FJ US-AK and RU-FE, and Offset center (#136)

* Updates error boundary message (#128)

* time controller german translation (#131)

* Generates index files for all paths! (#135)

* Tonyvanswet/ele 1572 fly on zone click either get it to move (#137)

* hardcode center location for FJ US-AK and RU-FE, and Offset center

* update world json

* Ensures index-generating script runs on deploy

* Fixes bug

* Bumps version

* Fixes minor design feedback

* Use manual chunking to split large chunks (#139)

* show production / consumption in carbon tooltip (#134)

* show production / consumption in carbon tooltip

* Update web/src/features/charts/tooltips/CarbonChartTooltip.tsx

Co-authored-by: Mads Nedergaard <[email protected]>

* more readable conditional

Co-authored-by: Mads Nedergaard <[email protected]>

* check for zonedata before getting exchanges (#142)

* Tonyvanswet/ele 1581 exchanges are still shown when in (#143)

* Tonyvanswet/ele 1579 better message for no data tooltip (#141)

* add spacing for units (#140)

Co-authored-by: Mads Nedergaard <[email protected]>

* Styling tweaks + Deselect zone when going back to map on mobile (#138)

Co-authored-by: Tony <[email protected]>

* Adds tooltip to LowCarbon Gauge in panel (#144)

Co-authored-by: tonypls <[email protected]>

* Improves no-data tooltip (#147)

Co-authored-by: tonypls <[email protected]>

* Adds overlay to breakdown chart (#148)

* Round map to 4 decimals (#151)

* Use @turf/helpers (#150)

* Tvs rj/ux peerprogramming (#152)

* UX feedback merged with master

* use same font size for gauges in zoneheader and maptooltip

* merge classnames

* feedback + max width

* make things no selectable on mobile + enable touch zoom but disable r… (#153)

* make things no selectable on mobile + enable touch zoom but disable rotation

* tap hightlight comment

* Deployment improvements (#149)

* unhover other zones on click (#154)

* Adds comment about missing info in type

* Fixes incorrect script

* version bump

* fix fully renewable header (#159)

* Minor fixes (#158)

* Allows robots in

* Bumps version

* Adds missing translation

* version bump

* Tonyvanswet/ele 1621 deploy mobile apps (#156)

* make things no selectable on mobile + enable touch zoom but disable rotation

* tap hightlight comment

* unhover other zones on click

* app icons + android / ios specific changes

* disable pitch

* safe area time controlloer

* safe area left panel

* bump versions

* Moves all Storybook stories next to their components (#145)

* Unifies CO2 Intensity display (#146)

* Squares and gauges now uses translations (#161)

* Fixes /zone/WHATEVZ breaking the app + disables chunking for now (#160)

* TimeController improvements (#162)

Co-authored-by: Tony <[email protected]>

* Fixes multiple bugs (#164)

* Jl/license (#155)

Co-authored-by: Viktor Andersson <[email protected]>
Co-authored-by: Mads Nedergaard <[email protected]>

* Change div to picture to fix webp exchange arrows (#169)

* Tvs/i os build (#170)

* Disables transition of numbers (#171)

* Tvs/fixcharts ios 14 (#172)

* Fixes New Version Available + Reduces Sentry transaction amount (#173)

Co-authored-by: Tony <[email protected]>

* Removes console log

* More minor tweaks (#165)

* Updates configs after master merge

* Fixes search params

* Temporarily disables IN-NO

* Sets correct theme color

* Enables CI again (#163)

* Bumps version

* Tvs/sensible bounds (#174)

* adjust view bounds

* disable pitch and rotate even when no data

* Tvs/release candidate (#176)

* adjust view bounds

* disable pitch and rotate even when no data

* prepare for mobile app release

* prettify

* bump version

* stop replace all errors (#177)

* Remove unneeded fields from config files (#167)

* Replaces map with a fallback shown for users on old ios versions (#175)

* comment out atom dev tools (#178)

* Fix invalid href lang + add preconnects (#180)

* include new tracking events (#179)

* delete web-old

* Fixes link

* Removes new workflows for new

* Updates ignores

* Removes clsx

* Removes license from boilerplate

* Ignores vscode

* Removes vscode symlink

* Deletes deploy script

* Removes boilerplate leftover

* bring back site links to mobile app

* prettify

---------

Co-authored-by: tonypls <[email protected]>
Co-authored-by: Markus Killendahl <[email protected]>
Co-authored-by: Viktor Andersson <[email protected]>
Co-authored-by: lav-julien <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants