Klimatbyran / klimatkollen

https://www.klimatkollen.se
MIT License
44 stars 48 forks source link

Retrieve data directly from Trafas API and do calculations on our end #348

Open elvbom opened 7 months ago

elvbom commented 7 months ago

Currently, we get data on the rate of increase of the share of newly registered rechargeable cars in the municipalities from an Excel file (/data/solutions/cars/sources/kpi1_calculations.xlsx) based on statistics from Trafa. However, Trafa has an API we can use and then perform calculations on the data. This is better as it makes it easier to keep the information updated.

Steps to go through:

For questions, please contact @elvbom who can explain in detail if needed

LudwikJaniuk commented 7 months ago

I propose to update the title to "Retrieve electric car data directly from Trafas API"

Braggedtooth commented 6 months ago

I will be working on this at the hackathon.

LudwikJaniuk commented 6 months ago

@Braggedtooth This was not a trivial issue, so kudos for picking it up during the hackathon. Did you manage to get some parts done? And would you like to continue your efforts in the future? We are here to help if you got stuck on some part of it.

Braggedtooth commented 6 months ago

@Braggedtooth This was not a trivial issue, so kudos for picking it up during the hackathon. Did you manage to get some parts done? And would you like to continue your efforts in the future? We are here to help if you got stuck on some part of it.

Indeed, although i ended up working on something else during the hackathon i do plan to continue working on this issue. So far after diving into the specifics of the API, I am planning to first develop a wrapper for the API. However, before proceeding, I'd like to understand if the project might benefit from other aspects of the Trafa API data beyond electric car statistics. This will help in determining whether a comprehensive implementation is necessary or if a more focused approach is preferable. I would also appreciate a more detailed insights on the data and functionality we aim to implement.

Braggedtooth commented 6 months ago

Here is my progress so far, please have a look. @LudwikJaniuk @elvbom https://github.com/Braggedtooth/klimatkollen/blob/fix-%23348/data/trafa/index.ts

Let me know if this is on the right path.

LudwikJaniuk commented 6 months ago

I'll have a look this evening unless someone else beats me to it!

LudwikJaniuk commented 5 months ago

To update the status, @Braggedtooth and I had a call last month and discussed some ways to move forward.