Difference between revisions of "Handprinter"

From Testiwiki
Jump to: navigation, search
(Application programming interface (API))
(API moved to Handprinter API)
Line 256: Line 256:
 
cat("See list of functions under an activity category:\n")
 
cat("See list of functions under an activity category:\n")
 
for(i in activity) olink(paste("Handprinter/Activity_category?show[search]='", i, "'", sep = ""), wiki = "op_en", text = i)
 
for(i in activity) olink(paste("Handprinter/Activity_category?show[search]='", i, "'", sep = ""), wiki = "op_en", text = i)
 
</rcode>
 
 
===Application programming interface (API)===
 
 
The first code on this page is an API that takes in user input and stores that into Opasnet base. The code below is mimicking an application (e.g. in a cell phone) that takes in user input and converts that into an output that can be used as an interface data package between the API and Opasnet. In practice, the application produces an URL that links to this page and contains parameter values for all fields of the API code.
 
 
For more about the URL formatting, see [[R-tools#Giving parameters in an URL]].
 
 
<rcode name="application" embed=1 label="Create URL for API" variables="
 
name:email|description:Your email (personal information is not revealed to third parties)|type:text|
 
category:Information about your action. Note! You must fill all fields.|
 
name:phone|description:Your phone number (with international and area code)|type:text|
 
name:actiondescription|description:Description of your action|type:text|
 
name:benefits|description:What are the benefits that will occur with your action?|type:text|
 
name:actionname|description:Give a name for your action|type:text|
 
name:actioncontext|description:What is the context of your action?|type:selection|options:
 
; - select -;
 
'Home';Home;
 
'Consumer';Consumer;
 
'Manufacturing';Manufacturing;
 
'Retail';Retail;
 
'Farming and agriculture';Farming and agriculture|
 
name:category|description:To which category does your action belong?|type:selection|options:
 
; - select -;
 
'Behavior change';Behavior change;
 
'Process change';Process change;
 
'Infrastructure change';Infrastructure change|
 
name:activity|description:To what activity does your action relate?|type:selection|options:
 
; - select -;
 
'A';Agriculture, forestry and fishing;
 
'B';Mining and quarrying|
 
name:subactivity|description:Select a sub-activity|type:selection|options:
 
;- select -;
 
'A01';Crop and animal production, hunting and related service activities;
 
'A02';Forestry and logging;
 
'A03';Fishing and aquaculture|
 
category:Subactivity|category_conditions:activity;'A'|
 
name:subactivity|description:Select a sub-activity|type:selection|options:
 
;- select -;
 
'B05';Mining of coal and lignite;
 
'B06';Extraction of crude petroleum and natural gas;
 
'B07';Mining of metal ores;
 
'B08';Other mining and quarrying;
 
'B09';Mining support service activities|
 
category:Subactivity|category_conditions:activity;'B'
 
">
 
library(OpasnetUtils)
 
library(OpasnetUtilsExt)
 
 
dat <- data.frame(
 
Email = email,
 
Phone = phone,
 
Action.name = actionname,
 
Action.context = actioncontext,
 
Category = category,
 
Benefits = benefits,
 
Quantification = quantification,
 
Description = actiondescription,
 
Activity = activity,
 
Subactivity = subactivity,
 
Result = 0
 
)
 
 
oprint(dat)
 
 
out <- paste(
 
"Handprinter?add[email]=", email,
 
"&add[phone]=", phone,
 
"&add[actionname]=", actionname,
 
"&add[actioncontext]='", actioncontext, "'",
 
"&add[category]='", category, "'",
 
"&add[actiondescription]=", actiondescription,
 
"&add[benefits]=", benefits,
 
"&add[quantification]=", quantification,
 
"&add[activity]='", activity, "'",
 
"&add[subactivity]='", subactivity, "'",
 
"#Calculations",
 
sep = ""
 
)
 
olink(out, wiki = "op_en", text = "This URL uploads the data given to the API")
 
  
 
</rcode>
 
</rcode>
Line 342: Line 261:
 
==See also==
 
==See also==
  
 +
* [[Handprinter API]]
 
* [[R-tools#Giving parameters in an URL]]
 
* [[R-tools#Giving parameters in an URL]]
 
* [http://www.handprinter.org/ Handprinter Main Page]
 
* [http://www.handprinter.org/ Handprinter Main Page]

Revision as of 17:54, 30 January 2014



What is Handprinter?

We often hear about our negative impact on the planet – our environmental footprint. But footprints are only half the picture. The other half is just coming into view.

It’s called a handprint, and it measures the positive impacts we can make, simply by changing the way we do things, at home, and at work.


Handprinter helps you know and grow your handprint.

First, it lets you calculate your environmental footprint. You enter in some simple data about things like what you eat, how often you travel, and what kind of products you buy, and Handprinter shows you your environmental impact.

Second, it offers suggestions for simple actions you can take to lower your impact on the planet – things like installing a low-flow showerhead, or carpooling to work or school. You can choose actions from our database, or come up with your own actions and add them to the collection.

And best of all, Handprinter lets you spread your ideas and actions around the world, see their progress, and measure them. When you refer your friends to Handprinter, and when their friends sign on, their handprints become part of yours. Inspire enough people, and your handprint eventually outweighs your footprint.

And with enough handprints, we can heal the planet.

Calculations

Suggest an action that could reduce the footprint of some activity. Fill in the form, then click "Add a new action".

Information about your action

Your email (personal information is not revealed to third parties):

Your phone number (with international and area code):

Give a name for your action:

What is the context of your action?:

To which category does your action belong?:

Description of your action:

What are the benefits that will occur with your action?:

To what activity does your action relate?:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Select a sub-activity:

Subactivity

Describe the activity:

+ Show code

Show actions

Click "Show actions" to browse through the list of action ideas that someone has suggested so far.

Search for this word (otherwise all actions are shown):

+ Show code

+ Show code

See also

References


Related files