In the book The Long Winter, Laura tells of the Hard Winter, which gripped the US prairie regions, took place in the winter of the years 1880 to 1881. That winter, the Ingalls family and the town of De Smet struggled with near starvation as the trains were unable to get through to the town to bring much needed supplies to the new town.
While Laura’s view is a slightly romanticized version of that winter (for instance, it leaves out the fact that another couple was living with the Ingalls family during that winter), it is considered fairly accurate to the depiction of the hardships endured during that winter.
If you want to learn more about that winter, beyond what Laura writes specifically in the books, the book The Beautiful Snow recounts the story of that winter through newspaper accounts and other records of the time.