I don’t know this exists in Julia. Then, in this case (or for other obscure Python packages) I would use PyCall.jl, and use that Python package.
julia> using PyCall
julia> py"""
from timezonefinder import TimezoneFinder
tf = TimezoneFinder()
latitude, longitude = 52.5061, 13.358
"""
/home/pharaldsson_sym/.local/lib/python3.6/site-packages/numba/core/errors.py:149: UserWarning: Insufficiently recent colorama version found. Numba requires colorama >= 0.3.9
warnings.warn(msg)
julia> my_timezone = py"tf.timezone_at(lng=longitude, lat=latitude)"
"Europe/Berlin"
You would want to change it a bit more, e.g. to interpolate Julia variables in (and import differently, see PyCall docs, maybe use Conda):
julia> my_timezone = py"tf.timezone_at(lng=$longitude, lat=$latitude)"
and get rid of the warning, but that seems like a problem you would also need to figure out in Python anyway.
Ironically, the example from the Python docs didn’t work for me in Python3 nor 2, while it did work in Julia.
I first did (you would also need in Python):
$ pip3 install timezonefinder
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: timezonefinder in ./.local/lib/python3.6/site-packages (5.2.0)
Requirement already satisfied: numpy>=1.16 in ./.local/lib/python3.6/site-packages (from timezonefinder) (1.18.1)
I finally tried:
$ pip3 install timezonefinder[numba]
and it does something differently, and Julia keeps working but not Python, neither with pip (for Julia pip3 may be needed). I thought [numba] meant option as in use timezonefindernumba, but that’s not it so I learned something new.