so i need to develop an app using phonegap that creates a graphical display of solar wind data (exciting stuff i know...) from this website http://services.swpc.noaa.gov/text/ace-swepam.txt with a graph being made for 'ion temperature', 'bulk speed' and 'proton denisity' individually, however im clueless as to where to begin... im assuming i need to make use of the charts.js library or something similar, im assuming i can make a variable for the axis as the data will be changing over time but I'm more stuck on how to pull data from this website though to be included in my charts. Any info on this would be greatly appreciated!
Thanks,
Gerrit
Call the web service to get the data, then pass it to the charting library you're using. You'll use AJAX (XMLHTTPRequest) to get the data. There's all sorts of options out there for simplifying this (jQuery and other libraries make AJAX easy).
The service you're using is giving you the data as a text file - this can work, but you'll have to parse the data client-side which is not fun (or a good use of your phone's capabilities). Look for a service that returns the data as a JSON object, then you'll have the data in a format that can be more easily passed to the charting library.
Related
I am trying to develop a Crawler to crawl youtube.com and parse the meta information(title, description, publisher etc) and store these into Hbase/other storage systems. I understood that I have to write plugin(s) to achieve this. But I'm confused what plugins I need to write for this. I am inspecting with this four -
Parser
ParserFilter
Indexer
IndexFilter
To parse the specific metadata information for youtube page, do I need to write a custom Parser plugin or ParseFilter plugin along with using parse-html plugin?
After parsing, to store the entry in Hbase/other storage system do I require to write a IndexWriter plugin? By indexing, we generally understand indexing in Solr, ElasticSearch etc. But I don't need to index in any search engine obviously. So, how can I store them in some store say Hbase after parsing?
Thanks in advance!
Since youtube is a web page, you'll need to write an HtmlParseFilter which gives you access to the raw HTML fetched from the server, but at the moment youtube a LOT of javascript and neither parse-html or parse-tika support executing the js code, so I'll advice you to use the protocol-selenium plugin so you'll delegate the rendering of a webpage to the selenium driver and get the HTML back (after all the JS has been executed). After you write your own HtmlParseFilter you'll need to write your own IndexingFilter, in this case you'll only need to specify what info you want to send to your backend, this is totally backend-agnostic and relies only on the Nutch codebase (that's why you'll need your own IndexWriter).
I assume that you're using Nutch 1.x, in this case yes you need to write a custom IndexWriter for your backend (which is fairly easy). If you use Nutch 2.x you'll have access to several backends through Apache Gora but then you'll have some features missing (like protocol-selenium).
I think you should use something like Crawler4j for your purposes.
The real power of Nutch is utilized when you want to do a much wider search or you want to index your data directly into Solr/ES. But since you just want to download data for each URL, I would totally go with Crawler4j. It's much easier to setup and does not require complex configurations.
I have been using LabVIEW to collect measurement data, and I would like to know if it is possible for LabVIEW to communicate the results to a Google Spreadsheet. If so, where could I find resources to learn how to make LabVIEW transmit information to the Google Spreadsheet ?
Thanks!
EDIT AND FOLLOW-UP- I used Jonathan's suggestion below and experimented with the LabVIEW http Post.vi. It's very simple, all you need to do is enter the URL of the Google form (replacing the final "viewform" with "formResponse") and a string with the data you want to enter (with rough syntax = ). A big thanks for that answer, it was really helpful !
However, when I try to use this method for a Google form with more than one page, the data isn't read properly... The form is still sent but every field not present on the first page of the form remains blank on the Spreadsheet. I feel that this is somehow linked to the fact that in the Google form, the URL of all the pages after page 1 are the URL of page 1 with the final "viewform" replaced with "formResponse". Is this what is causing the error or is it something else altogether, and how can I fix it ?
I can think of two ways to do this:
You can create a form in google spreadsheets. The form appears as an html document with standard tags. From here, I would use labview's http functionality to submit data to that form using a POST request. This would be the easiest way to get data in there.
Using the Google Apps API, you can manipulate google spreadsheets and dump data in there directly. This is going to be more complicated in terms of development time, but more configurable in the long run. https://developers.google.com/google-apps/spreadsheets/#what_can_this_api_do There are .net and java code examples throughout the documentation, so it would take some work to port this to LabVIEW, but it could be done.
I'm trying to implement a jqxGrid, using sorting and paging on the server. I don't have access to the server itself. Taking an example from:
http://www.jqwidgets.com/jquery-widgets-documentation/documentation/phpintegration/php-server-side-grid-paging-and-sorting.htm
I implement the client-side and want to use a mock static file as a response. I can't manage to figure out what kind of JSON response format is meant to be returned.
How do I 'catch' and edit/format the JSON response from the server? (Where in the code?)
Is there anywhere a working example of a jqgrid with sorting done on the server, to be viewable online? (So I can observe the data structure returned).
What do you mean exactly? Do you want to edit the data itself or the view of the data? If it is the later one you can use cellsrendered. For a live demo look here. You can also change the value here since you have access to the value field but it is by column.
Yes, look here.
http://www.jqwidgets.com/jquery-widgets-documentation/
You can find there information about the datasource.
http://www.jqwidgets.com/jquery-widgets-documentation/
You can find there (right menu):
PHP Integration
ASP.NET Integration
You can find there what ever yo need (sorting filtering and so)
I'm trying to write an iOS application that'll get data from a web server and display it as I want. I want to use JSON for this purpose. But as I'm absolutely new to web apps I've got no idea how I'm going to get the url to a certain feed. Now here're the two big questions:
How do I find the url to a feed provided by a web service? Is there a standard way or is it publicly or exclusively handed to the web service subscribers?
Is the format they provide data in up to their preference (like XML or JSON)? I mean, do I choose my data parsing method according to the format the web service gives data in? So that if the feed is in XML format using NSJSONSerialization class makes no sense.
The URL to use is dependent on the web service and is usually well described in the documentation.
The type of data they return and the the structure is also usually well described in the documentation.
The common bits you'll need to know are how to get to the web-service (NSURLRequest/NSURLConnection or any of the many asynchronous wrappers that are open source and available with a bit of searching), And how to deal with the the returned data - whether it's in JSON (NSJSONSerialization, JSONKit) format or XML (NSXMLParser, libxml, or any of the many open source implementations that are available and described with a bit of searching)
I've been using amcharts (a flash component) to produce charts from within my rails application.
I'm curious.. is there a GEM or plugin that allows me to include a charting component in my web app that lets users mix from any data sets they want, and produce basic charts on their own? It would take me ages to script such a tool...
Ideally, I'd like it to read anbunch of xml (or whatever.. perhaps data right out of my database) that has multi-variable data, and the user can use the component to customize his/her own chart with several series, or however they want. A "dummbed" down version of excel, delivered over the web :)
Well you're looking for a graphic images generator ?
There is Gruff which allows that. But I personnaly don't really like the look of the graphs generated.
There is also something language agnostic : Google Charts Api. Which allows you to generate graphics by calling a specific Google url generated with your encoded datas.
So you take your datas from wherever you want (database, xml, ...), you call one of those two libraries and you get your graph.
I too had been searching for Ruby supporting charting libraries. Below are additional charting resources I've not seen mentioned in this post but I've come across in the past.
JQuery sparklines
ProtoChart
XML/SWF Charts
FusionCharts free (Also have a paid version)
Smashing Apps article on charting resources
Enjoy!