473,503 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calculating some formulas from database data

I am doing a project on beetle diversity and need to calculate a few
diversity indices for a load of data i have collected. I thought that
maybe i could make a program in php to do that for, and save a bit of
time (as well as prevent calculation errors). I imagine this could be
quite a bit of programming but i have dreamweaver to help me.
Now what i have is a MySQL database full of data on beetle diversity
with the following tables:

Date - the date the sample is from
Habitat - one of 9 habitats that i am testing between (ie. grass,
stones, birch woodland, etc)
Replica - ie 'Repeats', there were two replicas for each habitat from
each date (A and B)
Trap number - from each replica there were 6 traps
Species - the species of beetle that was found in the trap (of course
there are often more than one per trap)
Number of Individuals - the number of individuals of that species
found in that trap

What i need to do is calculate Shannon-Weiner, Shannon Equitability
and Margalefs Diversity indices for each replica from each date for
each habitat (the data for the individual traps will be merged
together).
I have an idea of how to do it but what i am stumbling at is how to
create a recordset which will calculate the total number of
individuals for that species from that replica, date & habitat (I) and
calculate the number of different species for that replica, date &
habitat (S). Once i have S and I i should be able to write the formula
in php to create the indices.
Ideally this could be done in a way to allow for each repeating areas
to be assigned so that all of the indices for that habitat (for each
date and replica) could be shown on one page (to save a lot of
clicking).

Anyone know of a good way of going about this, any help will be
greatly appreciated.

Jan 30 '07 #1
2 2184


On 30 Jan, 15:55, "chris_huh" <chris....@gmail.comwrote:
I am doing a project on beetle diversity and need to calculate a few
diversity indices for a load of data i have collected. I thought that
maybe i could make a program in php to do that for, and save a bit of
time (as well as prevent calculation errors). I imagine this could be
quite a bit of programming but i have dreamweaver to help me.
Now what i have is a MySQL database full of data on beetle diversity
with the following tables:

Date - the date the sample is from
Habitat - one of 9 habitats that i am testing between (ie. grass,
stones, birch woodland, etc)
Replica - ie 'Repeats', there were two replicas for each habitat from
each date (A and B)
Trap number - from each replica there were 6 traps
Species - the species of beetle that was found in the trap (of course
there are often more than one per trap)
Number of Individuals - the number of individuals of that species
found in that trap

What i need to do is calculate Shannon-Weiner, Shannon Equitability
and Margalefs Diversity indices for each replica from each date for
each habitat (the data for the individual traps will be merged
together).
I have an idea of how to do it but what i am stumbling at is how to
create a recordset which will calculate the total number of
individuals for that species from that replica, date & habitat (I) and
calculate the number of different species for that replica, date &
habitat (S). Once i have S and I i should be able to write the formula
in php to create the indices.
Ideally this could be done in a way to allow for each repeating areas
to be assigned so that all of the indices for that habitat (for each
date and replica) could be shown on one page (to save a lot of
clicking).

Anyone know of a good way of going about this, any help will be
greatly appreciated.
Please do NOT multi-post!
Cross-post if you must but DO NOT multi-post!

See: http://www.blakjak.demon.co.uk/mul_crss.htm

Jan 30 '07 #2


On 30 Jan, 16:17, "Captain Paralytic" <paul_laut...@yahoo.comwrote:
On 30 Jan, 15:55, "chris_huh" <chris....@gmail.comwrote:
I am doing a project on beetle diversity and need to calculate a few
diversity indices for a load of data i have collected. I thought that
maybe i could make a program in php to do that for, and save a bit of
time (as well as prevent calculation errors). I imagine this could be
quite a bit of programming but i have dreamweaver to help me.
Now what i have is a MySQL database full of data on beetle diversity
with the following tables:
Date - the date the sample is from
Habitat - one of 9 habitats that i am testing between (ie. grass,
stones, birch woodland, etc)
Replica - ie 'Repeats', there were two replicas for each habitat from
each date (A and B)
Trap number - from each replica there were 6 traps
Species - the species of beetle that was found in the trap (of course
there are often more than one per trap)
Number of Individuals - the number of individuals of that species
found in that trap
What i need to do is calculate Shannon-Weiner, Shannon Equitability
and Margalefs Diversity indices for each replica from each date for
each habitat (the data for the individual traps will be merged
together).
I have an idea of how to do it but what i am stumbling at is how to
create a recordset which will calculate the total number of
individuals for that species from that replica, date & habitat (I) and
calculate the number of different species for that replica, date &
habitat (S). Once i have S and I i should be able to write the formula
in php to create the indices.
Ideally this could be done in a way to allow for each repeating areas
to be assigned so that all of the indices for that habitat (for each
date and replica) could be shown on one page (to save a lot of
clicking).
Anyone know of a good way of going about this, any help will be
greatly appreciated.Please do NOT multi-post!
Cross-post if you must but DO NOT multi-post!

See:http://www.blakjak.demon.co.uk/mul_crss.htm
Sorry, i didnt see the cross-post text box until i had pressed submit

Jan 30 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
306
by: Keith | last post by:
Say I write a little c# client and have a database. I want multiple people to use the client, which will display a datagrid, or tree control with data from the databse. The client will allow...
3
2388
by: Colin Finck | last post by:
Hello! I need to backup a MySQL database (MySQL 4.0). But it is on a shared-hosting web server and so I don't have direct server access. I also have no phpMyAdmin installed. How can I backup the...
2
1279
by: Neo Geshel | last post by:
I am looking to add additional data into a "stream" that has been extracted from a database, but before it is sent to a control (Repeater, in this case). I have found ZERO (0) articles about...
9
2402
by: dennist685 | last post by:
Walkthrough: Creating a Web Page to Display Access Database Data I've started the above walkthrough. However, near the beginning it gives the following instructions To set permissions in the...
0
1059
by: anita | last post by:
I am trying to figure out how all this fits together... My database has some articles which are personalized, ie., a user gets to see certain articles depending on the user type. When a a...
1
1744
by: Brian P. Hammer | last post by:
All - I have a project that has a bunch of formulas. I would like to store each of the formulas in a SQL and then load them and have my app execute it. The problem I see is that a Dataset would...
6
3147
by: c676228 | last post by:
Hi everyone, I never used global.asa. I am thinking of load some data in application_onstart which is read only from database(I mean the data will never be changed in any asp pages of the...
0
974
by: karthickmca6 | last post by:
how to convert database data to spread sheets 7.0,
2
1282
by: anonymoushamster | last post by:
Dropdown A is column from database Dropdown B is column from database Data in A and B must be from same row. If user click an item from A, then B is updated to display its data from...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4688
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.