Author Topic: So, I've got a database ... now what?  (Read 2311 times)

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 150
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
So, I've got a database ... now what?
« on: April 27, 2016, 08:59:04 PM »
I've decided to use the SQL Driver to send all my data to an online database. I'm not really sure what I'm doing here, but it's fun to play with.

Anyway, I've left the upload times at the default values - wind 30 seconds, data rate multiplier 1 and upload period 5 minutes. Is this sufficient, or should I change the settings? Bandwidth usage isn't a problem for me.

The main reasons for setting up the database are to try to import my six years of data from Weather Display and to use Murry Conroe's excellent day / month / summary scripts, which I really miss from Weather Display.

When I have the data stored in the database, what else can I do with it? I am very much a SQL novice, but I'm keen to learn. What other scripts and stuff do people use that I can adapt, copy or steal?

ALAN

mcrossley

  • Gale
  • ****
  • Posts: 273
  • Sorry, I'm not a WeatherCat user!
    • ICHESHIR25
    • Wilmslow Astro Weather
  • Station Details: Davis VP2 + home brew
Re: So, I've got a database ... now what?
« Reply #1 on: April 27, 2016, 09:34:39 PM »
You are limited by your imagination (and SQL skills  ::) ).
Quite a bit of my site is driven from SQL, for instance my "Top 10's" could be adapted to pretty much any SQL database.
http://weather.wilmslowastro.com/top10s.php
Mark

Alan Rowley

  • Strong Breeze
  • ***
  • Posts: 150
  • It is far better to wear out than to rust away.
    • D3696
    • INOTTING15
    • Selston Weather
  • Station Details: Weather station: Davis Vantage Pro2. Software: WeatherCat. Computer: Mac Mini, High Sierra OS
Re: So, I've got a database ... now what?
« Reply #2 on: April 27, 2016, 09:40:19 PM »
That looks very impressive Mark. My SQL skills are virtually zero, I'm afraid. I know how to set-up a database, send basic commands and browse it, but that's about all. Looks like I've got much to learn.

Felix

  • Gale
  • ****
  • Posts: 439
  • Station Details: Davis VP-2 Plus, FARS, WeatherLink IP. Sharx cams.
Re: So, I've got a database ... now what?
« Reply #3 on: April 28, 2016, 10:09:35 AM »
Alan, you might want to take a look at the open source site GitHub (http://github.com/) to see if someone has already coded what you are looking for. I suspect on a search on weather and SQL will bring up enough hits to keep you busy for awhile.


Last time I was on the site, a keyword search on WeatherCat brought up a few hits. I keep hoping a gifted developer will upload an entire turn-key template for a world-class website built around WeatherCat. Mr. van der Kuil comes to mind since his website is incredibly detailed, his templates are downloadable and he answers support questions quickly. Putting his products on GitHub...the world's largest open source site...would get him a lot more exposure. Especially if he uploaded a soup-to-nuts template to get folks with no coding experience whatsoever started initially. 

xairbusdriver

  • Storm
  • *****
  • Posts: 3126
    • EW7115 (E7115)
    • KTNGERMA20
    • Mid-South Weather
  • Station Details: Davis VP2 wireless + remote Anemometer/2014 Mac min - 10.15.7/WC 3.0.5
Re: So, I've got a database ... now what?
« Reply #4 on: April 28, 2016, 10:58:04 PM »
I assume the SQL Driver you're talking about is a part of WC. I have absolutely no experience using it, so I assume it also sets up the tables that it uploads the data to. Unless that function or the documentation tells you the structure of those tables, you'll probably need to look at them.

First thing I'd do would be to download PHPMyAdmin: https://www.phpmyadmin.net/downloads/
Your ISP probably has a version of it in your cPanel. I'd suggest you download it for local use as you develop summaries/charts/displays/etc. It runs in your browser, BTW.  It's also free.

Second thing I'd suggest is one or two of the free video SQL courses online. SQL itself is quite simple, it's not a programming "language", but you'll have to write the data requests in very strict formats in order to use it efficiently.

You can use any programming language you want to manipulate the data. I think PHP is about the easiest to learn/use. It's already on your Mac and I can't imagine any ISP not having a new version available. If your going the online video way, you'll find many courses that combine PHP and SQL.

As with any project it is critical to know where you are going before you start the journey. It's especially important when there are very few limits as to where that journey might end. Of course, there are tens of thousands of PHP and other language scripts and apps that you may well be able to use. But if you have no experience with modifying those scripts, you will be stuck with what the author did, until he does something else... Or you find another script. With a hard coded app, you choices are even more limited.

That's why I suggest PHP, it was designed to work with HTML from the start. As a matter of fact the "h" stood for 'home' page! ;) and it also makes creating/reading/writing/SQL commands easy and then creating the displays of that data, including any mathematical messaging!
THERE ARE TWO TYPES OF COUNTRIES
Those that use metric = #1 Measurement system
And the United States = The Banana system