File:Service fee percentages.png

From Dreamwidth Notes
Jump to: navigation, search
Service_fee_percentages.png(800 × 500 pixels, file size: 65 KB, MIME type: image/png)

Fee percentages from different levels of service from PayPal and Google.

There is probably a more efficient way to do this code, but for the moment:

paypal_fee = .30   
paypal_rate_0_3k = .027
paypal_rate_3k_10k = .025
paypal_rate_10k_100k = .022
paypal_rate_100k_plus = .019

paypal_colors = c("dodgerblue4", "dodgerblue3", "dodgerblue2", "dodgerblue");
google_color = "forestgreen";

google_fee = .20
google_rate = .02

service_fee <- function( x, rate = .027, fee = .30 ) { 
	return (fee + x * rate) }
service_percent <- function( x, rate = .027, fee = .30 ) { 
	return (service_fee(x, rate, fee) / x) }

services <- c( "PayPal to 3k", "PayPal 3k-10k", "PayPal 10k-100k", "PayPal 100k+", "Google Checkout" );
small_increments = seq(.50,20,0.01);

rate_matrix <- cbind( 
service_percent(small_increments, paypal_rate_0_3k, paypal_fee) * 100,
service_percent(small_increments, paypal_rate_3k_10k, paypal_fee) * 100,
service_percent(small_increments, paypal_rate_10k_100k, paypal_fee) * 100,
service_percent(small_increments, paypal_rate_100k_plus, paypal_fee) * 100,
service_percent(small_increments, google_rate, google_fee) * 100
)

rownames(rate_matrix) <- small_increments;
colnames(rate_matrix) <- services;

large_increments = c(1:20)

points_matrix <- cbind(
service_percent(large_increments, paypal_rate_0_3k, paypal_fee) * 100,
service_percent(large_increments, paypal_rate_3k_10k, paypal_fee) * 100,
service_percent(large_increments, paypal_rate_10k_100k, paypal_fee) * 100,
service_percent(large_increments, paypal_rate_100k_plus, paypal_fee) * 100,
service_percent(large_increments, google_rate, google_fee) * 100
)

rownames(points_matrix) <- large_increments;
colnames(points_matrix) <- services;

png(filename="service_fee_percentages.png", width=800, height=500, pointsize=16)

plot( small_increments, rate_matrix[,1], ylab="% taken up by service fees", xlab="Amount paid in $", 
  main="% Taken By Service", type="l", ylim=c(0,35), xlim=c(0,20), col = paypal_colors[1]);
axis(1, 1:20)
lines( small_increments, rate_matrix[,2], col = paypal_colors[2] )
lines( small_increments, rate_matrix[,3], col = paypal_colors[3] )
lines( small_increments, rate_matrix[,4], col = paypal_colors[4] )
lines( small_increments, rate_matrix[,5], col = google_color )

points( large_increments, points_matrix[,1], pch=20, cex=.8, col = paypal_colors[1] )
points( large_increments, points_matrix[,2], pch=20, cex=.8, col = paypal_colors[2] )
points( large_increments, points_matrix[,3], pch=20, cex=.8, col = paypal_colors[3] )
points( large_increments, points_matrix[,4], pch=20, cex=.8, col = paypal_colors[4] )
points( large_increments, points_matrix[,5], pch=15, cex=.8, col = google_color )

legend(x = "topright", legend = services, xjust = 0.5, fill = c(paypal_colors, google_color), ncol = 2, inset = .01, title="Services" );

dev.off()

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current23:34, 19 January 2009Thumbnail for version as of 23:34, 19 January 2009800 × 500 (65 KB)Foxfirefey (Talk | contribs)Fee percentages from different levels of service from PayPal and Google. There is probably a more efficient way to do this code, but for the moment: <pre>paypal_fee = .30 paypal_rate_0_3k = .027 paypal_rate_3k_10k = .025 paypal_rate_10k_100k = .022 p
  • You cannot overwrite this file.

There are no pages that link to this file.