This ebook is contributed by Ayesha Ejaz
Google is more powerful and user-friendly than most people realize. Here you will find some articles on google.
<img src="http://chart.apis.google.com/chart?cht=p3&chd=s:hW&chs=250x100&chl=Google|Yahoo">View your page in a brower. It would display the following chart. Simple, isn't it.
| Parameter | Explanation | Example |
|---|---|---|
| chs | chart size in pixels. width x height | chs=200x150 |
| cht | chart type
|
cht=v |
| chd | chart data | chd=s:data |
Recently, I came across a very odd problem. I had a list of 5000 organization. I have to create a small searchable database with the information in the list and links to those organizations. The list did not contain URLs of the listed organizations. Finding every link manually was out of the question so I decided to write a script which would search and fetch the URLs from the web. Suddenly, I realized that Google already does this for us with "I'm Feeling Lucky" button. So a simple link solved my problem:
print 'http://www. google .com/search/?btnI=' . urlencode("I'm Feeling Lucky") . '&q=' . urlencode('organization name');
Note: remove spaces before and after google in the link.
It is easier to learn and reproduce from examples than from instructions. So here are some examples using google charts:
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=p3" is for specifying 3D pie chart
"chd=t: data1,data2...." is for specifying data
"chco=F778A1,ADDFFF" is for specifying the colours of chart
"chtt=Male%20Students%20Enrolled%20For%20Bachelor" is for specifying chart title
"chts=F6358A,20" is for specifying font size and colour of chart title
"chs=550x300" is for specifying chart size
"chl=AGRI|ARTS|BIO|Buis.A" is for specifying label for pie chart
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=p3" is for specifying 3D pie chart
"chd=t: data1,data2...." is for specifying data
"chco=92BF23,cc0000" is for specifying chart colours
"chtt=Female%20Students%20Enrolled%20For%20Bachelo" is for specifying chart title
"chts=92BF23,20" is for specifying font size and colour of chart title
"chs=550x300" is for specifying chart size
"chl=AGRI|ARTS|BIO|Buis.A" is for specifying label for pie chart
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=pc" is for specifying pie chart
"chd=t: data1,data2...." is for specifying data
"chco=FDEEF4,B93B8F" is for specifying chart's colour
"chtt=Male%20Students%20Enrolled%20For%20Bachelors" is for specifying chart title
"chts=B93B8F,20" is for specifying font size and colour of chart title
"chs=550x300" is for specifying chart size
"chl=CHEM|CMRC|I.T|D.S|ENG|LAW|MHS|NRSNG|PHRM|P.A|ST|SST|VET|BSC.PAS" is for specifying pie chart label
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=p3" is for specifying pie chart
"chd=t: data1,data2...." is for specifying data
"chco=7F462C,E77471" is for specifying chart's colour
"chtt=Female%20Students%20Enrolled%20For%20Bachelors" is for specifying chart title
"chts=C85A17,20" is for specifying font size and colour of chart title
"chs=550x300" is for specifying chart size
"chl=CHEM|CMRC|I.T|D.S|ENG|LAW|MHS|NRSNG|PHRM|P.A|ST|SST|VET|BSC.PAS" is for specifying pie chart label
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=p3" is for specifying 3D pie chart.
"chd=t: data1,data2...." is for specifying data
"chco=E55B3C,CFECEC" is for specifying chart colour
"chtt=Males%20Enrolled%20For%20Master%20Degree" is for specifying chart title
"chts=E55B3C,20" is for specifying size and colour of chart title
"chs=550x300" is for specifying chart size
"chl=AGRI|ARTS|BIO|Buis.A" is for specifying chart label
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=pc" is for specifying pie chart.
"chd=t: data1,data2...." is for specifying data
"chco=C48189,7F5A58,F9A7B0" is for specifying chart colour
"chts=C48189,20" is for specifying size and colour of chart title
"chtt=Females%20Enrolled%20For%20Master%20Degree" is for specifying chart title
"chs=550x300" is for specifying chart size
"chl=AGRI|ARTS|BIO|Buis.A" is for specifying chart label
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=p3" is for specifying 3D pie chart.
"chd=t: data1,data2...." is for specifying data
"chco=FF0000,151B8D,00FFFF" is for specifying chart colour
"chtt=Females%20Enrolled%20For%20Master%20Degree" is for specifying chart title
"chts=FF0000,20" is for specifying size and colour of chart title
"chs=550x300" is for specifying chart size
"chl=AGRI|ARTS|BIO|Buis.A|CHEM|CMRC|I.T|D.S|ENG|LAW|MHS|NRSNG|PHRM|P.A|ST|SST|VET|BSC.PAS" is for specifying chart label
Following are some bar chart examples using google charts. Simply modify the and reuse for yourself.
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=bvg" is for specifying bar chart
"chbh=a" is used for automatically resizing bars so that they fit within the chart size.
"chg=10,30,3,3,10,20" is for specifying grid lines "chd=t: data1,data2...." is for specifying data
"chdl=MALE|FEMALE" is for specifying legend
"chco=7D2252,52F3FF" is for specifying chart's colour
"chtt=%20Students%20Enrolled%20For%20Bachelors" is for specifying chart title
"chts=52F3FF,20" is for specifying font size and colour of chart title
"chs=650x400" is for specifying chart size
"chxt=x,y" is for specifying chart axis
"chxl=0:|CHEM|CMRC|I.T|D.S|ENG|LAW|MHS|NRSNG|PHRM|P.A|ST|SST|VET|BSC.PAS" is for specifying x axis label
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=bvs" is for specifying bar chart.
"chd=t: data1,data2...." is for specifying data
"chco=153E7E,FDD017" is for specifying chart colour
"chtt=%20Students%20Enrolled%20For%20Ph.D" is for specifying chart title
"chts=153E7E,20" is for specifying chart title's colour and font size
"chs=650x400" is for specifying chart size in pixels
"chdl=MALE|FEMALE" is for specifying legend
"chxt=x,y" is for specifying chart axis
"chxl=0:|D.S|ENG|LAW|MH|NRSN|PHR|P.A|ST|SST|VET|B.PAS" is for specifying label of x axis
Following are some line graphs created using google charts. Simply modify the URLs and you can reuse them for your data.
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=lc" is for specifying line chart
"chd=t: data1,data2...." is for specifying data
"chdl=MALE|FEMALE" is for specifying legend
"chco=7D2252,52F3FF" is for specifying chart colours
"chtt=%20Students%20Enrolled%20For%20Bachelors" is for specifying chart title
"chts=52F3FF,20" is for specifying size and colour of chart title
"chs=650x400" is for specifying chart size
"chxt=x,y" is for specifying chart axis
"chxl=0:|CHEM|CMRC|I.T|D.S|ENG|LAW|MHS|NRSNG|PHRM|P.A|ST|SST|VET|BSC.PAS" is for specifying x axis label
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=ls" is for specifying line chart.Line charts of type ls are also known as sparklines
"chd=t: data1,data2...." is for specifying data
"chdl=MALE|FEMALE" is for specifying legend
"chco=667C26,99C68E" is for specifying chart colour
"chtt=%20Students%20Enrolled%20For%20Bachelors" is for specifying chart title
"chts=667C26,20" is for specifying size and colour of chart title
"chs=650x400" is for specifying chart size
"chxt=x,y" is for specifying chart axis
"chxl=0:|CHEM|CMRC|I.T|D.S|ENG|LAW|MHS|NRSNG|PHRM|P.A|ST|SST|VET|BSC.PAS" is for specifying x axis label
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=bvs" is for specifying Vertical bar chart, with stacked bars.
"chd=t: data1,data2...." is for specifying data
"chdl=MALE|FEMALE" is for specifying legend
"chbh=a" is is used for automatically resizing bars so that they fit within the chart size.
"chtt=Enrolment%20For%20Master%20Degree" is for specifying chart title
"chts=827839,20" is for specifying size and colour of chart title
"chs=550x300" is for specifying chart size
"chxt=x,y" is for specifying chart axis
"chxl=0:|AGRI|ARTS|BIO|Buis.A" is for specifying x axis label
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=pc" is for specifying pie chart.
"chd=t: data1,data2...." is for specifying data
"chco=F660AB,57FEFF,CFECEC,E55B3C" is for specifying colour of chart
"chtt=Males%20Enrolled%20For%20Master%20Degree" is for specifying chart title
"chts=E55B3C,20" is for specifying size and colour of chart title
"chs=550x300" is for specifying chart size
"chl=AGRI|ARTS|BIO|Buis.A|CHEM|CMRC|I.T|D.S|ENG|LAW|MHS|NRSNG|PHRM|P.A|ST|SST|VET|BSC.PAS" is for specifying chart label
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=lc" is for specifying line chart.
"chd=t: data1,data2...." is for specifying data
"chco=F433FF,ADDFFF" is for specifying chart colours
"chtt=%20Students%20Enrolled%20For%20Ph.D" is for specifying chart title
"chls=data set 1 line thickness,length of line segment,length of blank segment|
....
data set n line thickness,length of line segment,length of blank segment" is for specifying line chart style
e.g "chls=3,6,3|4,6,4" was used in the above chart to specify line style
"chg=10,40,3,3,10,20" is for specifying grid lines
"chts=F433FF,20" is for specifying chart title's colour and font size
"chs=550x300" is for specifying chart size in pixels
"chdl=MALE|FEMALE" is for specifying legend
"chxt=x,y" is for specifying chart axis
"chxl=0:|AGRI|ARTS|BIO|B.A|CHEM|CMRC|I.T" is for specifying label of x axis
"http://chart.apis.google.com/chart?" is the Chart API's location
"&" separates parameters
"cht=bvg" is for specifying bar chart.
"chbh=a" is used for automatically resizing bars so that they fit within the chart size.
"chd=t: data1,data2...." is for specifying data
"chco=F6358A,98AFC7" is for specifying colour of chart
"chtt=%20Students%20Enrolled%20For%20PGD" is for specifying chart title
"chm=D,F6358A,1,0,5,1" is for specifying line and bar chart line styles
"chts=98AFC7,20" is for specifying chart title's colour and font size
"chs=550x300" is for specifying chart size in pixels
"chdl=MALE|FEMALE" is for specifying chart legend
"chxt=x,y" is for specifying chart axis
"chxl=0:|D.S|ENG|LAW|MH|NRSN|PHR|P.A|ST|SST|VET|B.PAS" is for specifying label of x axis