electricitymaps / bloom-contrib

Making carbon footprint data available to everyone.

Home Page:https://www.bloomclimate.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Manual Activity: Shipments

philsturgeon opened this issue · comments

For a while I've wanted shipment estimates, which is absolutely impossible to get exactly right, but I'd like users to be rewarded for buying things and sending things locally (or less).

Brighter Planet have a model for Shipments:

image

This would be a manual input for now, but I am trying to think up ways to automate it with certain integrations (looking at you @Shopify).

Hi Phil, this a topic that resonates deeply with me. What's a good starting point for building this integration?

@cameronnapoli great! Thanks for replying.

I think heading into co2eq/ is the first step, then dig through the existing model to find one that feels similar (uses a third-party API).

The North team are super friendly and welcoming on their Slack if you'd like to swing by and see what they think.

@philsturgeon That's great! I dug through the models and the model you suggested.

Is there any typing information for the activity parameter used in the models?

Is there anywhere to play around and test the model? Seems the playground is only for integrations.

I'm guessing the application UI would need to be updated for this model? (since a variety of factors affect shipment emissions: weight distance, package volume, country, etc...)

@philsturgeon @cameronnapoli As you suggest the perfect version of this requires pretty significant changes to the UI and unfortunately our focus on North and the resources we can use are limited right now. But to enable this somehow a first version of this could maybe be using Count and enable it as a Purchase. I know it's not ideal but at least we will be able to track packages and get a rough estimate. What do you think?

@sorensvejstrup I understand, and that seems like a good place to start. But what do you mean by Count?

In order to implement the way you're suggesting, I would be modifying the purchase model (purchase/index.js), correct? Also I noticed the Transaction activity formatting is specified in the README. I am guessing that specification would need to be modified to incorporate purchase with shipping, right?

@cameronnapoli it's enough to add it to purchase/footprints.yml
Sorry, I meant package_count. Is this enough to get you going?

@sorensvejstrup The changes you suggest will still require some UI changes, yes? Unless you are suggesting we make some base assumptions, like assuming the item is always shipped.

I assume weight and distance would be the factors with the greatest influence on the carbon shipping model. In that case, I could add weights (or weight approximations) to items.

@philsturgeon What do you think about adding a local vs. international option to the UI that could use a very crude average to calculate shipping costs. This is simple, but also showcases the significant impact of buying locally.

@cameronnapoli Yes, that was actually what I was thinking. Adding weight could maybe make sense though. I would however separate them from the items, not assuming that it's always shipped. Shipping could be it's own purchase, so you can search shipping and get options per weight.

@sorensvejstrup If we made Shipping its own category within Purchase, would it be simple to add a local vs international checkbox alongside the number input in purchases (for example the items in spending section have a € input to calculate according to price)?

I don't see much value in shipping calculations if they're highly inaccurate and there's no relevance to something actionable for the user.

I think doing this through purchases might make it so vague that its not entirely worth doing. It would ideally be its own type of activity, because "Meal" "Energy" "Purchase" "Trip" is not enough. Can we find a way to make it easier to grow the app with more types of model?

As I see it, shipping is very closely related to a purchase. You buy an item, it's shipped to you. The perfect solution IMO would be to ask the user after a purchase was added, if it was shipped. Unfortunately, we really don't have the resources to do this right now, so my hope was that you'd feel okay with treating it like a purchase for v0.

I ship things which are not a purchase. I just shipped a spare bicycle from the UK to the Netherlands along with an old leather jacket and some used flip flops. 😅

It could be listed as a purchase if there is the chance to enter variables, which I think purchases currently do not support? I thought this would need weight + origin + destination to be of use.

If we are just entering price I don't know if anything can be done with that information that is at all meaningful. If there's a reasonable model somebody can think of then... yay? Otherwise I dunno if it would work.

Flip flops. Thats' a very specific use case 😂 No, I was focusing on how most people use shipments — as part of a purchase of goods. Regardless, I think it's a purchase.

I understand your concern and the need for other variables that price, but as said, I don't see us prioritizing this at the moment. It is, however, something that we see great value in and would love to do, so I want to keep this issue open, so we can get back to it.