electricitymaps / bloom-contrib

Making carbon footprint data available to everyone.
https://www.bloomclimate.com
MIT License
436 stars 104 forks source link

Add lodging found on TripIt #353

Closed corradio closed 4 years ago

corradio commented 4 years ago

This PR adds support for fetching lodging activities in TripIt. It saves them as a purchase of type "hotel". It also adds versioning to the tripit integration to make sure we fetch historical lodging. Finally, I had to also make sure the hotel model runs only on the right activities.

image

madsnedergaard commented 4 years ago

I'll review this today, just need to setup TripIt and import some lodgings :)

philsturgeon commented 4 years ago

I'd be happy to give one of you lot access to my TripIt account for a bit? I've got months worth of hotels, trains, ferries, you name it.

corradio commented 4 years ago

@madsnedergaard I don't think you need to test it yourself (I've done it) However, would be great if you could look at the code to check for edge cases etc..

corradio commented 4 years ago

Sorry @madsnedergaard , I might have a merged a bit too quickly (I saw the approved message for the other PR and mistakenly thought it was for this one)

madsnedergaard commented 4 years ago

Haha no worries, only had the .0 that I think could be left out in future, but it's fine for now :)