Init signature:
folium.Map(
location=None,
width='100%',
height='100%',
left='0%',
top='0%',
position='relative',
tiles='OpenStreetMap',
attr=None,
min_zoom=0,
max_zoom=18,
zoom_start=10,
min_lat=-90,
max_lat=90,
min_lon=-180,
max_lon=180,
max_bounds=False,
crs='EPSG3857',
control_scale=False,
prefer_canvas=False,
no_touch=False,
disable_3d=False,
png_enabled=False,
zoom_control=True,**kwargs,)Docstring:
Create a Map with Folium and Leaflet.js
Generate a base map of given width and height with either default
tilesets or a custom tileset URL. The following tilesets are built-in
to Folium. Pass any of the following to the "tiles" keyword:
- "OpenStreetMap"
- "Mapbox Bright" (Limited levels of zoom for free tiles)
- "Mapbox Control Room" (Limited levels of zoom for free tiles)
- "Stamen" (Terrain, Toner, and Watercolor)
- "Cloudmade" (Must pass API key)
- "Mapbox" (Must pass API key)
- "CartoDB" (positron and dark_matter)
You can pass a custom tileset to Folium by passing a
:class:`xyzservices.TileProvider` or a Leaflet-style
URL to the tiles parameter: ``http://{s}.yourtiles.com/{z}/{x}/{y}.png``.
You can find a list of free tile providers here:
``http://leaflet-extras.github.io/leaflet-providers/preview/``.
Be sure to check their terms and conditions and to provide attribution
with the `attr` keyword.
Parameters
----------
location: tuple or list, default None
Latitude and Longitude of Map (Northing, Easting).
width: pixel int or percentage string (default: '100%')
Width of the map.
height: pixel int or percentage string (default: '100%')
Height of the map.
tiles: str or TileLayer or :class:`xyzservices.TileProvider`, default 'OpenStreetMap'
Map tileset to use. Can choose from a list of built-in tiles,
pass a :class:`xyzservices.TileProvider`,
pass a custom URL, pass a TileLayer object,
or pass `None` to create a map without tiles.
For more advanced tile layer options, use the `TileLayer` class.
min_zoom: int, default 0
Minimum allowed zoom level for the tile layer that is created.
max_zoom: int, default 18
Maximum allowed zoom level for the tile layer that is created.
zoom_start: int, default 10
Initial zoom level for the map.
attr: string, default None
Map tile attribution; only required if passing custom tile URL.
crs : str, default 'EPSG3857'
Defines coordinate reference systems for projecting geographical points
into pixel (screen) coordinates and back.
You can use Leaflet's values :
* EPSG3857 : The most common CRS for online maps, used by almost all
free and commercial tile providers. Uses Spherical Mercator projection.
Set in by default in Map's crs option.
* EPSG4326 : A common CRS among GIS enthusiasts.
Uses simple Equirectangular projection.
* EPSG3395 : Rarely used by some commercial tile providers.
Uses Elliptical Mercator projection.
* Simple : A simple CRS that maps longitude and latitude into
x and y directly. May be used for maps of flat surfaces
(e.g. game maps). Note that the y axis should still be inverted
(going from bottom to top).
control_scale : bool, default False
Whether to add a control scale on the map.
prefer_canvas : bool, default False
Forces Leaflet to use the Canvas back-end (if available) for
vector layers instead of SVG. This can increase performance
considerably in some cases (e.g. many thousands of circle
markers on the map).
no_touch : bool, default False
Forces Leaflet to not use touch events even if it detects them.
disable_3d : bool, default False
Forces Leaflet to not use hardware-accelerated CSS 3D
transforms for positioning (which may cause glitches in some
rare environments) even if they're supported.
zoom_control : bool, default True
Display zoom controls on the map.
**kwargs
Additional keyword arguments are passed to Leaflets Map class:
https://leafletjs.com/reference.html#map
Returns
-------
Folium Map Object
Examples
--------
>>> m = folium.Map(location=[45.523, -122.675], width=750, height=500)
>>> m = folium.Map(location=[45.523, -122.675], tiles="cartodb positron")
>>> m = folium.Map(
... location=[45.523, -122.675],
... zoom_start=2,
... tiles="https://api.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}.png?access_token=mytoken",
... attr="Mapbox attribution",
... )
File: ~/anaconda3/envs/py38/lib/python3.8/site-packages/folium/folium.py
Type: type
Subclasses:
Signature: fig.savefig(fname,*, transparent=None,**kwargs)Docstring:
Save the current figure.
Call signature::
savefig(fname, *, dpi='figure', format=None, metadata=None,
bbox_inches=None, pad_inches=0.1,
facecolor='auto', edgecolor='auto',
backend=None, **kwargs
)
The available output formats depend on the backend being used.
Parameters
----------
fname : str or path-like or binary file-like
A path, or a Python file-like object, or
possibly some backend-dependent object such as
`matplotlib.backends.backend_pdf.PdfPages`.
If *format* is set, it determines the output format, and the file
is saved as *fname*. Note that *fname* is used verbatim, and there
is no attempt to make the extension, if any, of *fname* match
*format*, and no extension is appended.
If *format* is not set, then the format is inferred from the
extension of *fname*, if there is one. If *format* is not
set and *fname* has no extension, then the file is saved with
:rc:`savefig.format` and the appropriate extension is appended to
*fname*.
Other Parameters
----------------
dpi : float or 'figure', default: :rc:`savefig.dpi`
The resolution in dots per inch. If 'figure', use the figure's
dpi value.
format : str
The file format, e.g. 'png', 'pdf', 'svg', ... The behavior when
this is unset is documented under *fname*.
metadata : dict, optional
Key/value pairs to store in the image metadata. The supported keys
and defaults depend on the image format and backend:
- 'png' with Agg backend: See the parameter ``metadata`` of
`~.FigureCanvasAgg.print_png`.
- 'pdf' with pdf backend: See the parameter ``metadata`` of
`~.backend_pdf.PdfPages`.
- 'svg' with svg backend: See the parameter ``metadata`` of
`~.FigureCanvasSVG.print_svg`.
- 'eps' and 'ps' with PS backend: Only 'Creator' is supported.
bbox_inches : str or `.Bbox`, default: :rc:`savefig.bbox`
Bounding box in inches: only the given portion of the figure is
saved. If 'tight', try to figure out the tight bbox of the figure.
pad_inches : float, default: :rc:`savefig.pad_inches`
Amount of padding around the figure when bbox_inches is 'tight'.
facecolor : color or 'auto', default: :rc:`savefig.facecolor`
The facecolor of the figure. If 'auto', use the current figure
facecolor.
edgecolor : color or 'auto', default: :rc:`savefig.edgecolor`
The edgecolor of the figure. If 'auto', use the current figure
edgecolor.
backend : str, optional
Use a non-default backend to render the file, e.g. to render a
png file with the "cairo" backend rather than the default "agg",
or a pdf file with the "pgf" backend rather than the default
"pdf". Note that the default backend is normally sufficient. See
:ref:`the-builtin-backends` for a list of valid backends for each
file format. Custom backends can be referenced as "module://...".
orientation : {'landscape', 'portrait'}
Currently only supported by the postscript backend.
papertype : str
One of 'letter', 'legal', 'executive', 'ledger', 'a0' through
'a10', 'b0' through 'b10'. Only supported for postscript
output.
transparent : bool
If *True*, the Axes patches will all be transparent; the
Figure patch will also be transparent unless *facecolor*
and/or *edgecolor* are specified via kwargs.
If *False* has no effect and the color of the Axes and
Figure patches are unchanged (unless the Figure patch
is specified via the *facecolor* and/or *edgecolor* keyword
arguments in which case those colors are used).
The transparency of these patches will be restored to their
original values upon exit of this function.
This is useful, for example, for displaying
a plot on top of a colored background on a web page.
bbox_extra_artists : list of `~matplotlib.artist.Artist`, optional
A list of extra artists that will be considered when the
tight bbox is calculated.
pil_kwargs : dict, optional
Additional keyword arguments that are passed to
`PIL.Image.Image.save` when saving the figure.
File: ~/anaconda3/envs/py38/lib/python3.8/site-packages/matplotlib/figure.py
Type: method
Make this Notebook Trusted to load map: File -> Trust Notebook
folium.CircleMarker()
- 서클마커 생성
folium.CircleMarker?
Init signature:
folium.CircleMarker(
location=None,
radius=10,
popup=None,
tooltip=None,**kwargs,)Docstring:
A circle of a fixed size with radius specified in pixels.
See :func:`folium.vector_layers.path_options` for the `Path` options.
Parameters
----------
location: tuple[float, float]
Latitude and Longitude pair (Northing, Easting)
popup: string or folium.Popup, default None
Input text or visualization for object displayed when clicking.
tooltip: str or folium.Tooltip, default None
Display a text when hovering over the object.
radius: float, default 10
Radius of the circle marker, in pixels.
**kwargs
Other valid (possibly inherited) options. See:
https://leafletjs.com/reference.html#circlemarker
File: ~/anaconda3/envs/py38/lib/python3.8/site-packages/folium/vector_layers.py
Type: type
Subclasses:
Init signature:
folium.plugins.HeatMap(
data,
name=None,
min_opacity=0.5,
max_zoom=18,
radius=25,
blur=15,
gradient=None,
overlay=True,
control=True,
show=True,**kwargs,)Docstring:
Create a Heatmap layer
Parameters
----------
data : list of points of the form [lat, lng] or [lat, lng, weight]
The points you want to plot.
You can also provide a numpy.array of shape (n,2) or (n,3).
name : string, default None
The name of the Layer, as it will appear in LayerControls.
min_opacity : default 1.
The minimum opacity the heat will start at.
max_zoom : default 18
Zoom level where the points reach maximum intensity (as intensity
scales with zoom), equals maxZoom of the map by default
radius : int, default 25
Radius of each "point" of the heatmap
blur : int, default 15
Amount of blur
gradient : dict, default None
Color gradient config. e.g. {0.4: 'blue', 0.65: 'lime', 1: 'red'}
overlay : bool, default True
Adds the layer as an optional overlay (True) or the base layer (False).
control : bool, default True
Whether the Layer will be included in LayerControls.
show: bool, default True
Whether the layer will be shown on opening (only for overlays).
File: ~/anaconda3/envs/py38/lib/python3.8/site-packages/folium/plugins/heat_map.py
Type: type
Subclasses:
folium.plugins.HeatMap(data)
<folium.plugins.heat_map.HeatMap at 0x7f1e3201e250>
m = folium.Map( scrollWheelZoom=False, location = [28,77], zoom_start=5)folium.plugins.HeatMap(data).add_to(m)m
Make this Notebook Trusted to load map: File -> Trust Notebook
m = folium.Map( scrollWheelZoom=False, location = [28,77], zoom_start=5)folium.plugins.HeatMap(data, radius=11).add_to(m)m
Make this Notebook Trusted to load map: File -> Trust Notebook