55

I'm posting this as a second answer, as it's really a completely different approach. It's also been substantially expanded as of April 25, 2012. While this still doesn't specifically address the question of adding a region, it does plot the countries separately. Of course, each country could be viewed as a region in itself. Our objective is to make a ...


42

a=Most@Sort[StarData[ EntityClass["Star", "StarNearest10"], {"Name", "DistanceFromSun"}], #1[[2]] < #2[[2]] &] (*{{"Proxima Centauri", Quantity[4.2181, "LightYears"]}, {"Rigel Kentaurus A", Quantity[4.38982, "LightYears"]}, {"Rigel Kentaurus B", Quantity[4.4001, "LightYears"]}, {"Barnard's Star", Quantity[5.9339, "...


40

There is a Mathematica package exactly for this at the OEIS wiki. Somewhat related: there's also a package for formatting data into the OEIS format. WolframAlpha also has some of this information, though I'm not sure how to get the $n^{\mathrm{th}}$ term of the sequence. In[1] := WolframAlpha["A004001", {{"TermsPod:IntegerSequence", 1}, "ComputableData"}] ...


38

It took me quite a while, but finally, here's a visualization of the perigee of Flamsteed's comet: I should first note two things: first, some of the needed data for computing the orbit of comet C/1683 O1 was missing in AstronomicalData["CometC1683O1", "Properties"], and I had to pull information from external sources to supplement the information available;...


38

Well, let me try to answer the OP's question. And thanks MMA.SE, for reopening this interesting question! DATA To answer this question, you have to get the data using Mathematica's FinancialData function. This was the only thing originally done by the OP! First step: define which stocks will be included in the portfolio: Portfolio = {"AAPL", "BA", "IBM",...


30

data: latlong = {{32.6123, -117.041}, {40.6973, -111.9}, {34.0276, -118.046}, {40.8231, -111.986}, {34.0446, -117.94}, {33.7389, -118.024}, {34.122, -118.088}, {37.3881, -122.252}, {44.9325, -122.966}, {32.6029, -117.154}, {44.7165, -123.062}, {37.8475, -122.47}, {32.6833, -117.098}, {44.4881, -122.797}, {37.5687, -122.254}, {45.1645, -122.788}, {47.6077,...


29

This is not a direct response to the question but rather a response to Istvan's comment to FJRA answer. As Istvan points out, the 3D globe has "artefacts like excess polygon-parts". An alternative approach is to use ParametricPlot3D together with a 2D map as a texture. Here's the result. SeedRandom[4]; countries = Table[{ColorData["DarkTerrain"][Random[]], ...


28

You can "preload" all the data to your computer so that it doesn't have to look it up each time. An added advantage is that it'll also be available when you're offline. This is covered in this support article on wolfram.com. In your case, you would do: ChemicalData[All,"Preload"] RebuildPacletData[] and you should be all set. Note that it will take a while ...


28

Preload all chemical data: ChemicalData[All, "Preload"]; RebuildPacletData[]; (* the latter should not really be necessary *) Get all names: cd = ChemicalData[]; Get their molecular formulae: l = ChemicalData[#, "MolecularFormulaString"] & /@ cd; By counting the Cs, Os and Hs in the tattooed diagram we know we have to find $\rm{C_{19}H_{28}O_{2}}$. ...


28

There are system options available that should restore the old behavior for most of the currated data paclet: SetSystemOptions[SystemOptions["DataOptions"] /. True -> False] {"DataOptions" -> {"ReturnEntities" -> False, "ReturnQuantities" -> False, "UseDataWrappers" -> False}} Note that this prevents these paclets from returning Entity,...


27

There is nice way to to put your data on rotatable 3D globe. Your data: centers = {{32.6123, -117.041}, {40.6973, -111.9}, {34.0276, \ -118.046}, {40.8231, -111.986}, {34.0446, -117.94}, {33.7389, \ -118.024}, {34.122, -118.088}, {37.3881, -122.252}, {44.9325, \ -122.966}, {32.6029, -117.154}, {44.7165, -123.062}, {37.8475, \ -122.47}, {32.6833, -117.098}, {...


27

Update: Template Notebook I finally got around to finishing my curated data template notebook. You can see it here Currently it only supports single-type data paclets, but a template for multi-type curated data is in the works and I'll test that with my accumulated Stack Exchange data. In the meantime, I took some arbitrary airline safety data and turned ...


26

The following is a little involved, but it calculates the "minimum displacement" evolution by choosing the least total displacement alternatives from the permutations generated by the "AutomorphismGroup" of the graph: {n, edges, coords1, perms} = GraphData["PappusGraph", {"VertexCount", "EdgeList", "...


24

In the example code, CountryData[#, "AntarcticNations"] is a built in predicate that returns True or False. You need something similar for your countries. Perhaps, myCountries={ "Germany","Hungary","Mexico","Austria", "Bosnia","Turkey","SouthKorea","China"}; Graphics[{If[MemberQ[myCountries,#],Orange,LightBrown], CountryData[#,"SchematicPolygon"]}&...


23

You can use your ContourPlot, you just need to wrap coordinates with GeoPosition, note that you have to flip order. (if x is longitude and y is latitude, because GeoPosition assumes first is latitude and so on.) cp is Graphics[GraphicsComplex[coordinates, primitives]...], it is convenient to use this form. We can apply GeoPosition in one place and reduce ...


22

A bit of a hack, could do with some polishing, but the basic idea will work: OEISData[str_] := StringSplit[#, ","] & /@ Select[StringSplit[Import["http://oeis.org/search?q=" <> str]], StringMatchQ[#, __ ~~ ","] &]; OEISData["A004001"][[9]] If you just want the numbers, it could be even easier to just import from http://oeis.org/...


22

You can get some nice vector playing cards from this site, licensed under GNU LGPL (read more here). Download this folder to your computer and then try the following: (* replace with your download dir *) files = Flatten@With[{dir = "~/Downloads/Chrome/mma/SVG_and_EPS_Vector_Playing_Cards_Version_1.3/EPS_Vector_Playing_Cards_Version_1.3/52-Individual-Vector-...


21

The discussion in this answer pertains to older versions of Mathematica which had low-resolution bitmaps of country flags. In my current version (11), the flags now are very detailed vector graphics, making the below superfluous. Introduction Your (paraphrased) question was "Why do some of the CountryData flags render so badly?". I take the liberty to ...


21

One key function you might need is the (undocumented) function Graphics`Mesh`InPolygonQ[], which tests if a point is inside a given polygon. With it, and a few other tweaks, here's my version of weatherMap[]: weatherMap[region_String, property_String, res_Integer: 25, opts___] := Module[{fmin, cmax, coords, pts, minLong, maxLong, minLat, maxLat, ...


21

apple = Interpreter["Company"]["Apple"]["Image"] Interpreter["Company"]["GE"]["Image"] Also works for the continent and respects colours: Interpreter["Company"]["Siemens"]["Image"] Update Interpreter["Company"]["Wolfram"]["Image"] For Apple addicts: ImageFilter[Max[Flatten[#]] - Min[Flatten[#]] &, ImagePad[Last@MapThread[ImageMultiply, {...


20

After downloading and unpacking the stanford Part-Of-Speech tagger that @PlatoManiac mentioned it is easy to call it with JLink: $POSTaggerPath = "/some/where/stanford-postagger-2013-11-12/"; << JLink` AddToClassPath[$POSTaggerPath]; tagString[str_String] := JavaBlock[ Module[{tagger}, LoadJavaClass["edu.stanford.nlp.tagger.maxent.MaxentTagger"]...


20

portf = {"AAPL", "BA", "IBM", "BMW.DE", "DIS", "R", "PEP", "BRBY.L", "AXP", "BTI"}; prices = FinancialData[#, "Price", {{2004}, {2011}, "Month"}] & /@ portf; Returns are often calculated as the difference of the logarithms of the prices: Differences[Log@#] &[prices[[1, All, 2]]] This works because $\log(\text{price}_{new})-\log(\text{price}_{old})...


19

Stars RA and Dec for stars can be fetched via StarData["Sirius", {"RightAscension", "Declination"}] (* -> {6 h, 45 m, 9.3 s, -16 degrees, -42 arc minutes, -47.2 arc seconds} *) Although one can specify a particular date and time for these coordinates, the result Mathematica gives does not actually depend on the date or time at all - an indication that ...


18

It is a nice application for the Graph[] features in Mma. We can calculate quickly all possible decays for all known isotopes, and then let VertexComponent[] look for the chains ending in {"Iridium191", "Iridium193"}. g = Graph@Union@Flatten[Thread[DirectedEdge @@ ##] & /@ Select[{#, IsotopeData[#, "DaughterNuclides"]} & /@ IsotopeData[], #[...


18

Not super high quality, but this might do for some purposes: cards = Join[ Table[ToString[k], {k, 2, 10}], {"Jack", "Queen", "King", "Ace"}]; suits = {"hearts", "diamonds", "clubs", "spades"}; deck = Flatten[Outer[#2 <> " of " <> #1 &, suits, cards]]; images = Table[ WolframAlpha[card, {{"Image", 1}, "Content"}], {card, deck}]; Grid[...


18

This is a matter of rules ordering for CountryData definitions. You have to do something like this: Unprotect[CountryData]; CountryData[c_String, "MyProperty"] := 0; (*actually call to another function*) DownValues[CountryData] = RotateRight[DownValues[CountryData]]; Protect[CountryData]; This reorders the definitions so that yours is at the top (or close ...


18

All the information is there, but to adjust the sphere radius I had to do a replacement as follows: spaceFilledPlot[latticeType_] := LatticeData[latticeType, "Image"] /. Sphere[pt_, r_] :> {Opacity[.5], Sphere[pt, LatticeData[latticeType, "PackingRadius"]]} spaceFilledPlot["FaceCenteredCubic"] I added the opacity for better visibility of the ...


18

This is a long comment for Nick Lariviere's answer. You can use Trace to see how lengthy the entity and quantity logic is. Version 9: Tuples@{Range@112, {"Symbol", "Group"}} // First ElementData @@ % // Trace; % // ByteCount 78336 TreeForm[%%, VertexLabeling -> False, ImageSize -> 800, AspectRatio -> 2] Version 10: ... % // ByteCount ...


17

Here's a start. latLngs={{32.6123,-117.041},{40.6973,-111.9},{34.0276,-118.046}, {40.8231,-111.986},{34.0446,-117.94},{33.7389,-118.024}, {34.122,-118.088},{37.3881,-122.252},{44.9325,-122.966}, {32.6029,-117.154},{44.7165,-123.062},{37.8475,-122.47}, {32.6833,-117.098},{44.4881,-122.797},{37.5687,-122.254}, {45.1645,-122.788},{47.6077,-122.692},{...


17

I separated this project into two parts. The first is to compute the coordinates of the Geohash location. (*Grab the user's geographical location. The location is based on IP address, so it may not be completely accurate. It's usually good enough to get your graticute. You can replace home with with known coordinates in the form {hx, hy} if you like.*) home ...


Only top voted, non community-wiki answers of a minimum length are eligible