I want to make an weather website addon page, where users (with username&password) could input snow depth for their location on choosen date.
The result will then be seen in table on snow depth page.
Please give me some proposals how to do it.
You have several variables here that I can think of
What kinf of data set are you interested in?
Yes in the table will be location, date and depth (milimetres(mm)).
soo I think:
-columns date, depth
How precise a location, depth?
For example if town A gets 3mm and town B 7k distant reports 3.1mm is it the same amount and same location?
OK. We could do precision in cm (centimetres) 1cm, 2cm, 3cm, 10cm, 55cm…
Location is always individualy displayed in its row, doesn’t mater if has same amount of snow.
That feels to me it might a little bit too much information.
Hoe do do you envision the chart? By date, location, depth?
I see i can’t put images in the forum, im new user. (ht tp://www4.slikomat.com/13/0105/4rj-snowde.jpg)
I thought some like this, where is shown the last input from user (date and depth). This will be the base of the chart.
Then if it is possible to put some calendar on page where visitors could choose the date and all measures from that choosen date will be shown.
Sorry for the delay in getting back.
I’m still not sure I understand, so please correct me if I’m off.
There will be many Locations and Each Location will have many Dates.
But, for any Location-Date there will always be only 1 Depth.
I would probably CREATE a table like
location varchar NOT NULL
measure_date DATE NOT NULL
// date is a “reserved” word and naming a column that could lead to problems later
depth INT NOT NULL
I’m not sure an id would be helpful or even needed.
If the combined Location-Date can always have only a single Depth, I would think of using those as the combined PRIMARY KEY
You would need to think of a way to standardize the Location to prevent multiples that might happen from variations or typos. eg.
And I would use the database’s date format and convert it into more readable “human” format for display to make queries using it easier and more powerful.
I wouldn’t put the “cm” into the table but only the raw number, adding the “cm” to it for display only. This would make any Math operations you might eventually want to do easier.
First Thank You for your cooperation!
No problem for the delay. I don’t have any hurry.
I think that Your thoughts are correct.
About location, we now have 5 weather stations in the network and I think that we will grow to about 20-30 stations. Soo, I am going to give the location (user, password) to each of them to input their measuring.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.