Acess to wolfram alpha datasets or something similar - wolframalpha

Wolfram alpha has datasets and functions for quite a variety of topics. I'm wondering if there is a way to programatically access/browse its knowledge graph other than the wolfram alpha search interface?
On another note, what is the closest open source project to wolfram alpha that has all sorts of different entities connected together like wolfram alpha does.

Generally, this is referred to as a query API. Check out Wolfram|Alpha Webservice API Reference.
Another project that I know of is Freebase.

Related

Cytoscape - AOP Xplorer Interaction

I am very vey new at this area. I am trying to be a toxicologist and write my phD thesis on hERG inhibition and long QT syndrome. I have alot of data in terms of literature and shaped it in my mind regarding how to visualize it as an AOP. However, when it comes to do it, my lecturer recommended me to use AOP Xplorer but i couldnt understand how to do it.
Is it possible to visualize my own AOP with regards to my topic via AOP Xplorer (i think so but i need some documents & trainings to understand it)
Could you please give me a hand to understand it properly?
My regards,
It looks like you should be able to visualize your own AOP using AOP Xplorer. If you go to: https://github.com/DataSciBurgoon/aop_networks they have a number of sample networks (look for .sif files). If you construct your data similarly, you should be able to read it in. I've never used that app, however, so your mileage may vary...
-- scooter

Computing the complex eigenvectors of a sparse matrix in Java

I am trying to compute the eigenvalues and eigenvectors of a potentially large and sparse non-symmetrical NxN matrix (N > 10^6). I would not need all of them, but maybe the first of them. Ideally, I'd like to do so from Java but could move to C, C++ or Python if required.
My matrix can potentially have both complex eigenvalues and eigenvectors. For example, see the results for this Wolfram Alpha sample.
I found several ways to do this using a number of Java libraries and wrote some evaluation code for them:
Commons-Math: EigenDecomposition
JAMA: EigenvalueDecomposition
MTJ: EVD
COLT: EigenvalueDecomposition
But the problem I am facing is that these libraries do not return (or at least I found no way to get) the complex valued eigenvectors. Most of them do return the complex valued eigenvalues, but not complex eigenvectors. They typically provide the latter in the form of a "vector of reals" or "real matrix" having columns as each eigenvector.
I do as a matter of fact need the eigenvalues in complex form, if any.
Now, I recently started looking into Spectra (C++) which seems to support my use case. But would like to first ask and maybe discard a misunderstanding on my side or something I may have skipped from Java land because I'd like to keep using a single platform/language as far as it's possible.
Is there anything I should be looking into? Also, If I end up moving away from Java for this task, any other alternatives to Spectra I could be looking into? Thanks!
Just in case anyone stumbles upon this, I finally went the C++ way because none of the Java libraries provided the complex eigenvectors as I needed.
I have ended up implementing most of the stuff I need with C++ using Spectra and Eigen. Then I have built a series of native wrapper classes using SWIG.
For everyone in the future with the same question: there is a library for Java called Jeigen that can do this. It is actually a Java wrapper for the Eigen C++ library that the original poster already mentioned in his own answer.
You can find Jeigen here.

How can I custom limit the extent of an ArcGIS basemap?

I am writing web application based on ArcGIS API for javascript. So far I managed to create empty map using this tutorial and write some code which visualizes some data.
The basemaps which ArcGIS offer are quite nice and I would like to use them, but they represent whole world and what I need is basemap of just a single country. What's the best/easiest way to do it? I tried using ArcGIS Online to edit basemap but the don't offer good options for cutting single country.
I found some links out there but they aren't solving my problem (or my knowledge is to small to understand them), for example https://developers.arcgis.com/javascript/latest/sample-code/basemap-custom/index.html
If you like the look and feel of the Esri basemaps, you don't want to make your own. That's certainly technically possible, but requires a greater command of ArcMap and publishing services -- and isn't what you're really looking for. And basemap tiles shouldn't be edited, even ones you publish yourself, since the difficulty of doing that well is just not worth the effort.
Instead, you can restrict the JavaScript map to prevent panning outside your area of interest. Whenever the user moves to an extent that exceeds allowed values, the code automatically resets the extent to the allowed limit, and they can't move outside it. (You can similarly restrict zoom levels so they won't even be able to zoom out further than the view of your area of interest.)
For code details, see existing answers on Restricting base map on specific extent in ArcGIS API for JavaScript 3? (GIS.StackExchange)

What is an RNA (or DNA) property?

I've come across the terms "RNA" and "RNA property" in programming documentation before. Can someone explain to me what these terms mean?
Are these general programming terms that apply to many languages, or are these non-general terms? It's difficult to avoid getting search results related to biology for this, and the programming vocab sites I've been to don't have them. All I see anywhere are acronyms and no place to figure out exactly what they are because everyone who's anyone apparently already knows...
Here are some examples:
"RNA architecture"
"RNA/DNA"
Panel properties Properties were discussed in section Properties, but
we did not explain how to display custom properties in a panel. This
script does exactly that. An RNA property is displayed with the syntax
layout.prop(ob, 'myRnaInt')
DNA and RNA are terms used by the Blender devs and community to refer to their system of serializing Blender state data, which is as old as Blender itself. Each .blend file includes a DNA structure, which details pretty much everything about the blend and about the version and exact copy of Blender last used to work on it. This makes Blender files highly backward-compatible, as they allow any future version of Blender to configure itself the same way an older version would have been to work with older files, and to digest the files in an extremely normalized way that can be extended version-to-version without changing the file structure.
RNA is a newer concept; think of it as a DTO for DNA. It allows pieces and sub-trees of DNA to be passed around within Blender and between Blender and its plugins (the primary language for these being Python), and is the primary way that this is done.
A short primer: http://www.blendernation.com/2008/12/01/blender-dna-rna-and-backward-compatibility/
It's specific.
For example the Blender software uses those akronyms:
Blender uses a unique internal format called DNA to store and reference 3D assets. The name is an analogy to the biological term,..
[..]
RNA is a current development that comprises an important behind-the-scenes component of the 2.5 changes..
from Mastering Blender - Tony Mullen
I have no experience of this myself but judging from a very quick search (thanks google) it appears that RNA refers to an API for the Python programming language. DNA appears to be closely related (as you would expect). I have not seen it referred to in any other language. (This may be wrong but it seems to be to Python, what jQuery is to javascript).

Creating an MKPolygon from the intersection of 2 or more MKPolygon objects

Does anyone know if this is possible. I'm trying to create a pretty complex polygon, and was wondering if there's any way to take 2 or more objects that are MKPolygon's and create a new MKPolygon from it.
Thanks!
MKPolygon and it's ancestors are pretty simplistic. About the most you can do with ease is to make a large mkpolygon and start filling in inner polygon "holes" or rings to create more complex shapes.
That being said, if you're talking about real geometric math, unions, intersections, and more complex functions, you may want to use a geo-specific framework (or treat your lat/long as x/y double floats and just use regular textbook geometry functions to build 2d polys)
Michael Weisman has a good geo/GIS lib called ShapeKit, geared towards iOS specifically. It acts as a front end to GEOS and PROJ.4, two extremely powerful libraries. This is probably your best, safest bet.
Another option that you may want to explore, if you don't have to compute the polygons on the device, ... Serve up your polygons from a GIS powered database server. I have a few modifications to shapekit that let you import binary WKB polygons from mysql or elsewhere ... You've got fast powerful functions there to offload processing power if needed. Or you could even bring them straight from a Esri shapefile to iOS if that's where your coming from... I did a proof of concept of that on GitHub too.
I have written a solution for this. Check out MKPolygon-GPC. Its an Objective-C wrapper around Alan's the GPC lib.