I have two questions.
First, how do I get a list of points from CountryData["UnitedStates", {{"GDP"}, {1960, 2018}}]
as opposed to a graph.
Second, if I have a some data in CSV format with dates (in the form --/--/----) in one column, how do I get Mathematica to understand, when I import the data, that it must plot dates? The other column contains GDP values.
I am a beginner. I know how to import data and use ListPlot
.
CountryData["UnitedStates", {{"GDP"}, {1960, 2018}}]["Path"]
gives pairs of {date, value}. If you have CSV file like 01/02/2000,10 etc., import that asImport[file, "CSV"]
, thenMapAt[DateList[{#,{"Month","Day","Year"}}]&,imported_file,{All,1}]
and thenDateListPlot[%]
. $\endgroup$ – Alx Nov 6 at 16:00