Map area calculator and price calculator google api question - bubble.io

I need some help. Here is what I am trying to do. This is for a service business, mowing yards.
I am wanting to use google maps or something similar where customers can outline the property lines on the map so we know where the scope of work is to take place.
I would also like for this to measure the square footage so the customer can input this into a calculator along with other variables so they can receive a price estimate for the job. Example:
Price Calculator
Sq footagre: 1200
Service A: Yes
Service B: Yes
Times for service C: 3
So I am trying to create something where the customer can outline on a map, it measures the sq footage and the customer is able to receive a price estimate.
Thank you for all of your help!

Related

Choosing the right Stripe subscription model if pricing depends on another numerical attribute

I have little experience with payment gateways, and am trying to figure out how to synthesize the type of subscription billing that I am looking for: the monthly price gets rebalanced once a year, based on another attribute (a number that can get as high as seven or eight digits).
So, for example, the monthly subscription price as of January 1st will be a % of a user's credit card debt balance as of Dec 15th in the prior year. But the debt balance can get very high / does not have a cap.
I looked at the Stripe documentation to figure out of there's a way to do this. The only thing I could come up with is to use unit_amount in metered pricing and tying this to the credit balance. In other words, I would grab the debt balance number and use it as the unit_amount, and then apply a %. But then I need to also forward bill, so I trick the logic into shifting by a month, which seem impractical.
Alternatively, I am not sure I could do this with per seat pricing (e.g. $1 in debt = 1 seat). But I assume there's a max to the number of seats (i.e. someone cannot have, say 1m seats). I just couldn't determine this from the documentation...
That's what I was thinking, anyway. Perhaps there's a better way?
You've got a couple different options here:
At the start of the year you update the Subscription to a new price based on the calculations of the customer's credit card debt balance by specifying items[0].price_data. Setting items[0].price_data (see the api ref) allows you to create an "in-line price" that as part of the updating the Subscription, so you don't have to create one separately through a separate API request. If you haven't seen Stripe's docs on how to update the price of a Subscription you can see an example here, and you'll likely want to read about proration_behavior as well.
You have a single Price where 1 seat = $1 in debt, and you control how much you want to charge by changing the number of seats for the Subscription. I don't think Stripe has a limitation to the number of seats (as long as it's a valid integer), but they do have a limitation on the maximum amount you can charge which you can read about here. For USD the maximum charge amount is $999,999.99, so the maximum quantity would be you could specify for a $1 price is 999,999.
You could look into using metered pricing, but given that you don't want to bill at the end of the billing cycle the other two options seem better.
I think the first option (updating the price year by year) is your best one, but definitely try all of them out in test mode and take a look at how the Invoices look to see which one you like best.

What is foursquare place price options?

I am integrating foursquare place api.
They provide place price as numeric value (1~4)
This is their official doc
I want to know exact price value.
For example, for 1 Cheap => 1$ ~ 100$
They have no explain about this.
Where can I get this info?
Thanks
The price value is a relative allocation. The algorithm scraped menu prices and does a comparison of nearby places (simplest way to explain it). So there isn't an actual dollar amount assigned to any tier.

How to score different Ads based on data of sequential steps in a sales funnel?

we run an eCommerce store and constantly create & test new Facebook Ads. Now I am looking for a good way to create a scoring for these ads. Basically it is a very simple problem, but I can't get my head around it.
For each Facebook Ad, I have this data:
Budget Spent
Impressions
Clicks
Product Page Visited
Purchases
The most important event obviously is the purchase. So in a perfect world with huge amount of data per ad I would simply calculate the cost per purchase (= Budget Spent / Purchases) and know, which is my best ad. But here comes the problem..
On each ad we don't have much data. So let's say we have:
AD 1
50€ Budget Spent
10.000 Impressions
200 Clicks
50 Product Page Visits
2 Purchases
= 25€ per purchase
AD 2
50€ Budget Spent
10.000 Impressions
400 Clicks
130 Product Page Visits
1 Purchases
= 50€ per purchase
Simply based on the cost per purchase, I would choose AD1. But when I am looking at the data of the previous steps (clicks and product-page-visits), AD2 looks more promising.
How can I create a score value, that tells me which ad will likely generate the better cost per purchase in the long run, considering also the values of the previous steps?
That score value should take into account the data of the previous steps. So if we have less purchase-data, it should strongly rely on the previous data and if we have much purchase-data, it should rely less on previous data (and more on the actual cost per purchase).
I think of something like:
Use the click-rate as the base score (because we have much data for this)
then modify that score with the values of the following steps but in a weighted-way. So the more data we have on the following steps, the more the score moves toward that values.
Thanks in advance for your help!
Best Regards
Patrick

MS Access 2003 - Calculating an average based on qty sold/per site with supply %

Here is another question I have about being able to calculate this scenario in Access, or even at all for that matter:
I have a query that find the TOP 5 items sold in a given timeframe, and it groups by site. I use this to create a comparative chart between the site for ppt presentations. I do a lot of these but I have a problem with the presentation that I foresee they will have a problem with and it makes for bad metrics:
Some stores are bigger than others, and get much more supply. So a straight aggregate total of just qty of toping selling items, and comparing the locations is stacking the deck a little.
So if Site A gets 80% of the supply, and sells 500, Site B gets 15% supply and sell 75, and site C get 5% supply and sells 50 items, then Site C actually has the best sales for their size. I have exactly what I need in terms in the first chart (from my queries and such) to show the aggregate total, but what do I need to represent the idea mentioned above.
The factors that I have that go into this are:
ItemID - group by
Item - group by
qty sold - sum/descending (which is the variable that determines the Top 5)
Store/Location - Group By
and then I run a seperate query to get the total deliveries (supply) to each site
I realize that this may just be a lack of mathmatical understanding on my part, but can anyone help with this?
thanks
The first issue that I see isn't about SQL savvy; it's how to serve your data customer. What does he or she want to see? Metrics is a term with a holy ring, and for good reason: it's supposed to be what is used for the big business decisions, and it's scary easy to measure the wrong thing.
So I'd make sure I know what my customer wants. If you can't model it on a spreadsheet, you won't be able to develop your reporting effectively.
Every deck of cards is loaded. You have to know how they want it loaded.

Manager game: How to calculate market values?

Usually players in a soccer manager game have market values. The managers sell their players in accordance with these market values. They think: "Oh, the player is worth 3,000,00 so I'll try to sell him for 3,500,000".
All players have three basic qualities:
strength value (1-99)
maximal strength they can ever attain (1-99)
motivation (1-5)
current age (16-40)
Based on these values, I calculate the market values at the moment. But I would like to calculate the market values dynamically according to the player transfers in the last period of time. How could I do this?
I have the above named qualities and the player transfers of the last period of time available for calculation.
How could I calculate it? Do I have to group the last transferred players by the qualities and simply take the average transfer price?
I hope you can help me.
Note: players=items/goods, managers=users
My suggestion: define a distance function that takes two players stats and return a distance value. Now that you have a distance between the two (that corresponds to the similarity between them) you can use the K-means algorithm to find clusters of similar players.
For each cluster you can take a number of values that can help you calculate the so called 'market price' (like the average or median value).
Here's a very simple example of how you could compute the distance function between two players:
float distance(Player player1, Player player2){
float distance = 0.0;
distance += abs(player1.strength - player2.strength) / strengthRange;
distance += abs(player1.maxStrength - player2.maxStrength) / maxStrength;
distance += abs(player1.motivation - player2.motivation) / motivationRange;
distance += abs(player1.age - player2.age) / ageRange;
return distance;
}
Now that you have the distance function you can apply the k-means algorithm:
Assign each player randomly to a cluster.
Now compute the centroid of each cluster. In your case the centroid coordinates will be (strength, maxStrength, motivation, age). To compute the centroid strength coordinate, for example, just average the strengths for the all players in the cluster.
Now assign each player to the nearest centroid. Note that in this step some players may have its cluster changed.
Repeat steps 2 and 3 until you have convergence or, in other words, until no player have its cluster changed in step 3.
Now that you have the clusters, you can calculate the average price fore similar players.
One thing that you could do is look at recent transfers of similar(1) players. Say all transfers within 2-5 game weeks of similar players and then take the average (or median or some other calculated value) of their sale price.
(1) You will have to define similiar in some way, i.e a defender with +-10 in defence, +-3 in passing and +-2 years of age. More factors give more precise results.
Or you could use a little Economics 101 and try to define the supply and demand for that specific player based on:
Number of players in the league with similar capabilities (you could use the clustering method mentioned before) and number of those players "available" for transfer
Number of teams that own the players with similar capabilities and number of teams that are in need for such players
Now with these number you could calculate the supply (available players for transfer) and demand (teams in need for those players) and use that to modify your base price (which can be your last transfer price or a base price for a player) up or down (ie more demand than supply will tend to push the prices up and vice versa)
After that it becomes negotiation game where you can take a look at some of the Game Theory literature to solve the actual exchange price.
Hope this at least give you a different look into it.

Resources