This article notes that there was indeed a pirate interested in science, one who wrote books on meteorology and ocean currents, who dined with the likes of Samuel Pepys, visited the Galapagos islands and described many plants and animals in a best selling book.
This polymath was of course the famous buccaneer / pirate / slave trader / travelling / writer / scientist / alleged relative William Dampier.
The dates were very different, as Dampier sailed around the world in the late 17C / early 18th while the film overlaps with Queen Victoria and Charles Darwin, so must be roughly mid 19C - that is, very roughly. This film definitely lives in its own parallel universe.
But there is one thing would worry the Pirate Captain himself, which is the beard issue (or "beard-gate" as no doubt it would be called).
The Pirate Captain was most proud of his beard ("luxurious" he described it) but as can be seen by the picture below that was something that Dampier lacked:
an old friend.
Picture from: The Independent