Tag Info

New answers tagged

2

This is due to the fact that the first data point pulled (for {2014,8,14}) is used to calculate the first return value, which is on {2014,8,15}. To calculate the return for {2014,8,14} the previous day is needed. In order to get matching starting dates in a reliable way, it is best to determine the starting date, e.g. firstDate={2014, 01, 05} and than ...


0

This will find the temperature at each of the weather stations:- stations = WeatherData[{"Chicago", 3}] {"C3175", "KCGX", "C8163"} WeatherData[# , "Temperature"] & /@ stations {23.3, 14., 2.8} P.S. WeatherData["Chicago", "Temperature"] 23. Works ok, but it might be more reliable to use the nearest weather station.


0

The function you are looking for already exists. It's called DateListPlot. data = WeatherData["California", "MeanTemperature", {{2013, 1, 1}, {2014, 1, 1}, "Day"}] DateListPlot@data


1

{meanhumidity, meantemp} = WeatherData["London", #, {{2007, 1, 1}, {2007, 12, 31}, "Day"}] & /@ { "MeanHumidity", "MeanTemperature"}; plotdata = Transpose[{meanhumidity[[;; -2, 2]], meantemp[[2 ;;, 2]]}]; ListPlot[plotdata, Frame -> True, FrameLabel -> {"Mean Humidity [t-1]", "Mean Temp [t]"}]


3

You did not state that you wished to avoid making additional assignments upon a System` Symbol, therefore that is a natural approach and it is possible using Unprotect since ElementData is not Locked, and it appears to work correctly here: Unprotect[ElementData]; ElementData["Carbon", "Resonance"] = 42; ElementData["Phlebotinum", "AtomicWeight"] = 666; ...


0

The Wolfram '.wdx' format was made for this. It maintains wolfram code in a file, but only code, unlike a notebook. Read up here for more info. The first two lines stay the same, then you would export the data as so: Export["smokers.wdx", table]; This creates a file in MyDocuments (if in windows, otherwise the folder above where your notebooks are ...


3

Have you tried this link? It lets you select the country and date range. After the table is displayed, I just selected the values I wanted (highlighted yellow in the picture below), and paste it to MMA using ImportString to let MMA parse it. pasted = ImportString["paste it here"]; Short[pasted, 5] Then I did some processing to remove the {, , , ..} ...


8

Download the data (csv file) from U.S. Energy Information Administration; http://www.eia.gov/countries/country-data.cfm?fips=uk data = Import[ "/Users/hanlonr/Downloads/United_Kingdom_proved_Reserves_(1980-2014).csv"];\ ListLinePlot[data[[5 ;; -6]], Frame -> True, Axes -> False, PlotRange -> All, PlotLabel -> StringReplace[data[[1, ...


2

As @Mr.Wizard asked, "...it's time for an answer, don't you think?". I forgot about this question, but after year it occurred to me to formulate an answer following @LeonidShifin suggestions: First get some test data: testData = FinancialData["GE", "Jan. 1, 2000"][[1 ;; 10]]; dataFile = "/Users/jagra/Data.test.csv"; Export[dataFile, testData, "CSV"]; ...


1

More of a long comment... You can easily write a function that will enable your end users to Import data from your custom backend. customData[param1_]:= Import[...] customData[param1_, param2_]:= Import[...] customData[param1_, param2_, param3_]:= Import[...] Using different parameter sets in your function definition can give you all the kinds of ...


14

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 ...


18

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 ...


2

You can find entities using either GeoEntities or GeoNearest. For example: GeoEntities[$GeoLocationCity, "Airport"] Map[ {#, GeoDistance[$GeoLocation, #]}&, GeoNearest["University", $GeoLocation, 10]]


3

Answering the first part of your question, is it possible to track the public transportation in your area. This might be possible if your public transportation system provides access to real time information. For this toy example, we'll use Portland,Oregon's resources. You can obtain an AppID for trying this out http://developer.trimet.org/ For the ...


4

For what it is worth: If you formulate the query as a Wolfram Alpha query you get WolframAlpha["male elderly population in France", {{"Result", 1}, "Content"}] So, apparently this estimate dates from 2013. As to the sources used: If you enter == at the beginning of the line you get a W|A box in which you can enter the same string ("male elderly ...


3

Referring to the documentation: CountryData["France", "MaleElderlyPopulation", "Date"] (* 2013 *) The annotation (3rd argument) provides the date and general source information is provided here.



Top 50 recent answers are included