This is an example drupal module which provides a "RESTful" space weather service. It is used to provide data for the JavaFx Planetary Kp barchart.
If you are unfamiliar with the process of developing a drupal module, you might want to first read the article "Creating modules - a tutorial:Drupal 6.x".
This article discusses the code to retrieve Planetary Kp data from a drupal webservice. Previously in Part 1 was a discussion of Planetary Kp data itself. Part 2 was a discussion of the code to create a bargraph to display the data.
A couple classes are defined to represent the data to be retrieved. The first is called SpaceWeatherData which is a container for the time series data. Class variables start and end are used to store the start and end times of the data retrieved. The variable dataType is used to represent the type of data contained is in this case equal to "Kp".
The variable vals is an array containing TimeSeriesData
In the previous article in this series, a Planetary Kp bar chart graph was presented and there was brief description of the Kp index.
The Planetary Kp bar chart displays time-series data. A Planetary Kp data item consists of a date-time and an index value -- nothing more, nothing less. On this chart, we want to display data for an interval of 4 days with a bar for each 3 hour period. Here a Barchart.Series is defined for each 3 hour interval:
Below is a simple test JavaFX applet that confirms that JavaFx applets can indeed run within a drupal page. I'm hesitant to admit that I had more difficulty with this than I should have -- it is fairly easy to get wrong and difficult to figure out why it doesn't work.
Here is my approach:
The solar map module that creates active region maps (see http://www.raben.com/maps ) had some incompatibilites with current Drupal release. In the process of debugging the problem I decided to make the solar map generator interactive. You may now select a date from Jan 2, 1996 to present and see what regions were visible on the Sun on that date. (Note that the Drupal date popup module that I used annoyingly requires that you actually click on date rather than just typing it in).
For example select June 1, 2000 and you'll see quite a few more regions listed than you do now at solar minimum.
