22

I think this looks like a bug, though I have no authority to declare it. In particular, this looks like a hot mess: That's the following: tz = Entity["TimeZone", "America/Chicago"] With[{t = DateObject[{2007, 11, 4, 1, 0, 0}, TimeZone -> tz]}, {t, UnixTime[t]}] { DateObject[{2007, 11, 4, 1, 0, 0}, "Instant", "...


9

Count[Friday][DayName /@ Tuples[{Range[1920, 2019], Range[12], {13}}]] Array[Boole[Friday == DayName[{#, #2, 13}]] &, {100, 12}, {1920, 1}, Plus] Total[Array[Boole[Friday == DayName[{1919 + #, #2, 13}]] &, {100, 12}], 2] Count[Friday]@ Flatten@Table[DayName[{y, m, 13}], {y, 1920, 2019}, {m, 1, 12}] (i = 0; Do[i += Boole[Friday == DayName[{y, m, 13}]],...


8

start = DateObject[{1920, 1, 1}]; end = DateObject[{2020, 1, 1}]; blackFridayQ[date_] := DateValue[date, "Day"] == 13 DateRange[start, end, Friday] // Select[blackFridayQ] // Length 173


7

The repository function FromIsoTimeStamp will correctly parse the Zulu and offset parts of ISO dates. For example: isoDateString = "2017-04-28T01:50:52.000Z"; ResourceFunction["FromISOTimestamp"][isoDateString] Correctly returns a GMT date as desired.


7

I have noticed this problem too. First, the OP's version. Denominator@Rationalize@ DateDifference[{2018, 12, 31}, {2019, #, 1}, "Month"][[1]] & /@ Range@12 {31, 28, 28, 30, 30, 30, 30, 31, 30, 30, 30, 30} This was my solution. dateDifference[from_, to_, u:"Month"] := DateDifference[from + {0, 0, 1}, to + {0, 0, 1}, u] ...


6

Here's one approach using a docked cell: SetOptions[EvaluationNotebook[], DockedCells -> Cell[BoxData[ ToBoxes[Dynamic[ Column[{NotebookFileName[], DateString[ Information[EvaluationNotebook[], "FileModificationTime"]]}], UpdateInterval -> 60]]]]] The content updates once a minute. You could set this globally ...


6

You can Map the DateObject[] function onto each member of your watchdates list like in Map[DateObject, {{2020, 6, 26}, {2020, 6, 25}}] which yields a list of DateObjects. There is also a shorter symbolic form for Map DateObject /@ {{2020, 6, 26}, {2020, 6, 25}} Is this what you had in mind?


6

If you check the definition of bifurcation diagram carefully, you'll notice the last element of sol[[i]] isn't enough to generate the diagram, and we need a few more points. Also, you don't need so many points for defining r1. A quick fix: r1 = Table[i, {i, 0.1, 4, 0.001}]; sol = Table[ RecurrenceTable[{x1[t + 1] == r1[[i]] (1 - x1[t]) x1[t], x1[0] == 0.2}...


6

If you insist on Table: Table[ i, {i, Today, DatePlus[Today, Quantity[5, "Days"]], Quantity[1, "Days"]} ] But as Rohit mentioned in their comment, you don't need Table at all. This is literally what DateRange is for: DateRange[Today, DatePlus[Today, Quantity[5, "Days"]]] Both produce the same result: {DateObject[{2020, 12, ...


6

You could define a function, to be used by "SortBy", that determines the ordering. E.g.: assoc = <|Wednesday -> 122150, Thursday -> 119450, Friday -> 124350, Saturday -> 92000, Sunday -> 85800, Monday -> 107900, Tuesday -> 116500|> by[day_] = Switch[day, Sunday, 1, Monday, 2, Tuesday, 3, Wednesday, 4, ...


6

dayNameToISOWeekDay = DateValue[DayRound[{2021, 1}, #], "ISOWeekDay"] &; KeySortBy[dayNameToISOWeekDay] @ assoc <|Monday -> 107900, Tuesday -> 116500, Wednesday -> 122150, Thursday -> 119450, Friday -> 124350, Saturday -> 92000, Sunday -> 85800|> Update: To have the week start from Sunday: isoWeekDay = ...


5

I see related information from here. interval = 0.001; results = Reverse[Transpose[ Table[logisticValues = Table[Nest[a # (1 - #) &, RandomReal[], 2000], {1000}]; intervals = Table[i, {i, 0, 1 - interval, interval}]; result = BinCounts[logisticValues, {0, 1, interval}]/1000; Log[result + 0.001], {a, 2.9, 4, 0.001}]]]; ...


5

Gather[list1, #[[;;2]] == Reverse @ #2[[;;2]] &] /. {x_} :> x {{{1, 35, 3}, {35, 1, 9}}, {{1, 896, 1}, {896, 1, -6}}, {{2, 3, 999}, {3, 2, 88}}, {1, 212, 5}, {1, 243, 1}, {1, 903, 3}, {1, 914, 1}, {1, 925, 2}} If input list is a list of triples, you can also use Most[#] in place of #[[;; 2]] &. We can also construct a graph on list1 using ...


5

Could use Prolog {p1, p2, p3, p4} = AbsoluteTime /@ {{2020, 3, 7}, {2020, 3, 25}, {2020, 4, 3}, {2020, 4, 26}}; {ymin, ymax} = Through[{Min, Max}[data1[[2, 1]]]]; range = ymax - ymin; {ymin, ymax} += {-range, range}/10; plot = DateListPlot[data1, FrameTicks -> {{Automatic, Automatic}, {dticks1, dticks1}}, FrameTicksStyle -> {{Automatic, ...


5

This is certainly a bug: All pairs {a:(_String|_List), b_?(NumberQ[N@#]&)} that appear anywhere in epilog/prolog are replaced with {AbsoluteTime[a], b}. An example that shows various cases that trigger the mysterious behavior as well as possible work-arounds: epilog2 = Inset[Framed[ Grid[{{"FOO", 1.5}, {"FOO", BAR[1.5]}, ...


5

Your data goes beyond March 25, 2021: TimeSeries[data]["LastDate"] 2022 is probably a typo. So, we replace it with 2021: data2 = data /. DateObject[{2022, a__}, b__] :> DateObject[{2021, a}, b]; DateListPlot[data2, DateTicksFormat -> {"MonthNameShort", " ", "Day", " ", "Hour", ":&...


5

First an input dataset with a structure described in OP: dates = Join @@ Table[DateRange[DateList[{2021, 1, i, 8, 30}], DateList[{2021, 1, i, 17, 30}], Quantity[5, "Minutes"]], {i, 1, 4}]; SeedRandom[1] data = Transpose[{dates, Accumulate[RandomReal[{-1, 3/2}, Length@dates]]}]; DateListPlot[data, ImageSize -> 600] Use GroupBy to get a ...


4

The issue is that at 100, Map automatically compiles the function, and your function is quite large. AbsoluteTiming[ASXSPI1000000b[[#[[1]] ;; #[[2]]]] & /@ iSydneyRTHCleaned[[;; 100]];] SetSystemOptions["CompileOptions"->"MapCompileLength"->101]; AbsoluteTiming[t1 = ASXSPI1000000b[[#[[1]] ;; #[[2]]]] & /@ iSydneyRTHCleaned[[...


4

You did not form the callout properly. Here is a way that works. data = {0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 7, 7, 7}; es = EventSeries[data, Automatic]; rescaleTS = Table[ {DatePlus[ DateObject["January 1, 2020"], {i - 1, "Month"}], Normal[es][[i]][[2]]}, {i, 1, es["PathLength"]}]; vals = ...


4

data = {{Interval[{"Mar 20, 1990", "Jul 11, 2008"}]}, {Interval[{"Sep 17, 1990", "Mar 14, 2005"}]}}; 1. You can pre-process input data to replace {Interval[{a, b}]} with {Interval[{a,b}], Style[a, Red], Style[b, Blue]} and use the option Spacings as follows: data2 = data /. { i : Interval[{a_, b_}]} :> {i, ...


4

There are many different styles to solve this problem. I like this one with compiled function: ff = Compile[{{r, _Real}}, ({r, #} &) /@ Union[Drop[NestList[r # (1 - #) &, .1, 300], 100]]]; mm = Flatten[Table[ff[r], {r, 0.1, 4, 0.001}], 1]; ListPlot[mm, PlotStyle -> AbsolutePointSize[.00015], Axes -> True, FrameLabel -> ...


4

Thanks @m_goldberg! I ended up slightly modifying your code to find answer a halloween-themed question my 8 year old daughter had. "When will there be a Friday the 13th that happens on the full moon in October?" friday13thfullmoon[year_Integer] := Select[DayName[#] === Friday && DateValue[#, "Month"] === 10 && ...


3

The best option as of version 12.2 is FromISOTimstamp from the Wolfram Function Repository.


3

Assume you imported the data in time and date. Then we need to assemble these two in a form that suits the DateObject: dat= MapThread[(#1 <> " " <> #2) &, {time, date}]; Then we map DateObject with the necessary options onto every element of the list dat: dates = DateObject[{#, {"Hour", "Minute", "Second&...


3

Update: Using a single DateListPlot with multiple data sets: minmax = {-5, 10} + MinMax@data1; DateListPlot[Join[{data1}, {data1}, Thread[{#, 0}] & /@ dateintervals], Joined -> {True, False, True, True}, FrameTicks -> {{Automatic, Automatic}, {dticks1, dticks1}}, FrameTicksStyle -> {{Automatic, Automatic}, {Automatic, FontOpacity -> ...


2

Setting a PlotRange works for me: DateListPlot[ {RandomFunction[BinomialProcess[1/3], {0, 50}], RandomFunction[BinomialProcess[1/3], {40, 90}]}, PlotRange -> {{30, 90}, Automatic} ]


2

You may use TimeObject to interpret the strings as times and use TimeSeries to obtain an interpolation. The option ResamplingMethod allows you to specify an interpolation method. f = TimeSeries[Transpose[{ TimeObject /@ f1[[All, 1]], f1[[All, 2 ;; 8]] }], ResamplingMethod -> {"Interpolation", InterpolationOrder -> 3} ]; times = ...


2

colorRule = Association[{{0, 0} -> Red, {1, 0} -> Blue, {0, 1} -> Green, {1, 1} -> Black}]; Wrap each xy pair with List and map colorRule on the last column to get a list of colors to be used as PlotStyle option setting: colors = (colorRule /@ data[[All, -1]]); ListPlot[List /@ data[[All, ;; 2]], PlotStyle -> colors, BaseStyle ->...


2

Assuming there is no change expected over the weekends or holidays: dataFC = Table[{ DatePlus[Last[data][[1]], {n, "BusinessDay"}], TimeSeriesForecast[dataFit, n] }, {n, 1, 30}];


2

Try this: SmoothHistogram3D[data, Ticks -> { {#, DateString[#, {"Day", "/", "Month", "/", "YearShort", " ", "Hour24Short", ":", "MinuteShort"}]} & /@ FindDivisions[MinMax@data[[All, 1]], 5], Automatic, Automatic} ] Look at the documentation of ...


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