Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra datasets #449

Merged
merged 36 commits into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b66c269
Update docstring for geom_point() function.
ASmirnov-HORIS Feb 16, 2021
b760969
Docstring: Update data, map and map_join parameters description.
ASmirnov-HORIS Feb 25, 2021
639b438
Updated core.py docstrings.
EArkhipova-HORIS Feb 26, 2021
7a6ba28
Minor fixes
EArkhipova-HORIS Mar 2, 2021
3003b51
Update examples in coord.py docstrings, update geom_extras.py docstrings
EArkhipova-HORIS Mar 3, 2021
f27c925
Docstrings: replace >>> to :linenos: in geom.py.
ASmirnov-HORIS Mar 12, 2021
19f7c85
Update examples in plot.py, update docstring in label.py.
EArkhipova-HORIS Mar 15, 2021
d33102b
Update docstring for the geocode() function.
ASmirnov-HORIS Mar 17, 2021
33afa10
Update docstrings in geo_data.
ASmirnov-HORIS Mar 19, 2021
b33d331
Add link to documentation page for formatting in tooltips and geom_te…
ASmirnov-HORIS Mar 24, 2021
ab0cb8c
Fix lists in docstrings notes (according to Numpydoc and rst rules).
ASmirnov-HORIS Mar 24, 2021
c8c1ced
Update links in docstrings.
ASmirnov-HORIS Mar 24, 2021
f019ead
Fix errors of the rebase conflicts resolving.
ASmirnov-HORIS Aug 20, 2021
e5b5038
Merge branch 'master' of github.com:JetBrains/lets-plot
ASmirnov-HORIS Aug 26, 2021
48361d9
Merge branch 'master' of github.com:JetBrains/lets-plot
ASmirnov-HORIS Aug 27, 2021
8013613
Move the notebook 'map_US_household_income' to the lets-plot-docs rep…
ASmirnov-HORIS Aug 30, 2021
0cb2498
Update docstrings for the stat_corr() function.
ASmirnov-HORIS Aug 30, 2021
26951f2
Update docstrings for geo_data and tilesets.
ASmirnov-HORIS Aug 31, 2021
b6ede67
Merge branch 'master' of github.com:JetBrains/lets-plot
ASmirnov-HORIS Sep 2, 2021
1744657
Merge branch 'master' into sphinx-doc
ASmirnov-HORIS Sep 2, 2021
1e7f7d5
Update examples in some docstrings (geometries).
ASmirnov-HORIS Sep 2, 2021
b1ff9c7
Tiny fix in the docstrings.
ASmirnov-HORIS Sep 10, 2021
b516830
Update links to the documentation site and remove the README_PYTHON.m…
ASmirnov-HORIS Sep 10, 2021
9c99338
Merge branch 'master' of github.com:JetBrains/lets-plot
ASmirnov-HORIS Sep 13, 2021
53d48da
Fix conflicts after merging with master.
ASmirnov-HORIS Sep 13, 2021
d44b269
Fix docstrings.
ASmirnov-HORIS Sep 13, 2021
837bf1c
Move example notebooks to the lets-plot-docs repository.
ASmirnov-HORIS Sep 20, 2021
73e520d
Tiny fix in docstrings for scales.
ASmirnov-HORIS Sep 21, 2021
cb78333
Merge branch 'master' of github.com:JetBrains/lets-plot
ASmirnov-HORIS Sep 21, 2021
3699a55
Merge branch 'master' into sphinx-doc
ASmirnov-HORIS Sep 21, 2021
a998004
Remove some markdown, images and notebooks from the docs/ directory. …
ASmirnov-HORIS Sep 23, 2021
839fac0
Merge branch 'master' of github.com:JetBrains/lets-plot
ASmirnov-HORIS Sep 24, 2021
9416a7f
Fix conflicts after merging with upstream/master.
ASmirnov-HORIS Sep 24, 2021
6f5efba
Merge branch 'master' of github.com:JetBrains/lets-plot
ASmirnov-HORIS Sep 27, 2021
83eda98
Merge branch 'master' into sphinx-doc
ASmirnov-HORIS Sep 27, 2021
f0178b3
Remove extra datasets from the docs/ directory.
ASmirnov-HORIS Sep 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
MIT License

Copyright © 2019-2020, JetBrains s.r.o.
Copyright (c) 2019 JetBrains

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ You can use this API to embed charts into Kotlin/JVM and Kotlin/JS applications
[![JetBrains Plugins](https://img.shields.io/jetbrains/plugin/v/14379-lets-plot-in-sciview.svg)](https://plugins.jetbrains.com/plugin/14379-lets-plot-in-sciview)
[![JetBrains plugins](https://img.shields.io/jetbrains/plugin/d/14379-lets-plot-in-sciview.svg)](https://plugins.jetbrains.com/plugin/14379-lets-plot-in-sciview)

*Scientific mode* in PyCharm and in IntelliJ IDEA provides support for interactive scientific computing and data visualization.
*Scientific mode* in PyCharm, DataSpell and in IntelliJ IDEA provides support for interactive scientific computing and data visualization.

[*Lets-Plot in SciView*](https://plugins.jetbrains.com/plugin/14379-lets-plot-in-sciview) plugin adds
support for interactive plotting to IntelliJ-based IDEs with the *Scientific mode* enabled.
Expand Down

This file was deleted.

511 changes: 511 additions & 0 deletions docs/examples/jupyter-notebooks-dev/coord_flip.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions future_changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [2.1.1] - 2021-??-??

### Added
- `coord_flip()`, see [example notebook](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks-dev/coord_flip.ipynb).
- Date-time formatting support:
- tooltip format() should understand date-time format pattern [[#387](https://github.com/JetBrains/lets-plot/issues/387)];
- scale_x_datetime should apply date-time formatting to the breaks [[#392](https://github.com/JetBrains/lets-plot/issues/392)].
Expand Down
5 changes: 5 additions & 0 deletions gis/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ plugins {
}

kotlin {
sourceSets.all {
languageSettings.optIn('kotlinx.coroutines.ObsoleteCoroutinesApi')
languageSettings.optIn('io.ktor.util.KtorExperimentalAPI')
}

jvm()
js() {
browser {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ actual class TileWebSocketBuilder
actual constructor(
private val myUrl: String
) : SocketBuilder {
@ObsoleteCoroutinesApi
@KtorExperimentalAPI
override fun build(handler: SocketHandler): Socket {
val client = HttpClient(Js) {
install(WebSockets)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import kotlinx.coroutines.ObsoleteCoroutinesApi
actual class TileWebSocketBuilder actual constructor(
private val myUrl: String
) : SocketBuilder {
@ObsoleteCoroutinesApi
@KtorExperimentalAPI
override fun build(handler: SocketHandler): Socket {
val client = HttpClient(CIO) {
install(WebSockets)
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ org.gradle.warning.mode=all
# With defaults (https://docs.gradle.org/current/userguide/build_environment.html#sec:configuring_jvm_memory)
# Task :python-extension:compileKotlinNative --> OutOfMemoryError
org.gradle.jvmargs=-Xmx2g

kotlin.mpp.stability.nowarn=true
16 changes: 0 additions & 16 deletions livemap-demo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,3 @@ idea {
}
}
}

/*
* Copyright (c) 2019. JetBrains s.r.o.
* Use of this source code is governed by the MIT license that can be found in the LICENSE file.
*/

// Workaround for Idea/Gradle bug: https://youtrack.jetbrains.com/issue/KT-24463
// MPP: Run does not add resource directory to classpath [Cannot get resource when using common module]
//
// JavaFX Scene mapping requires stylesheet resource URI
task copyProcessedResources(type: Copy) {
from "${project.buildDir}/processedResources"
into "${project.buildDir}/classes/kotlin"
}

build.dependsOn += copyProcessedResources
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ import kotlin.random.Random
class LiveMap {
fun plotSpecList(): List<MutableMap<String, Any>> {
return listOf(
georeference(),
// georeference(),
// blankPoint(),
// blankMap(),
// barWithNanValuesInData(),
//pieWithNullValuesInData(),
//barWithNullValuesInData()
barWithNanValuesInData(),
// pieWithNanValuesInData(),
// pieWithNullValuesInData(),
// barWithNullValuesInData()
// multiLayerTooltips()
// mapJoinBar(),
// antiMeridian(),
Expand Down Expand Up @@ -161,28 +162,18 @@ class LiveMap {
return parsePlotSpec(spec)
}

private fun pieWithNanValuesInData(): MutableMap<String, Any> {
private fun blankMap(): MutableMap<String, Any> {
val spec = """{
"kind": "plot",
"layers": [
{
"geom": "livemap",
"data": {
"x": [0, 0, 0, 10, 10, 10, 20, 20, 20],
"y": [0, 0, 0, 10, 10, 10, 20, 20, 20],
"z": [1, 2, 4, 44, null, 30, 123, 543, 231],
"c": ['A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C']
},
"mapping": {
"x": "x",
"y": "y",
"sym_y": "z",
"fill": "c"
},
"display_mode": "pie",
"data": {},
"mapping": {},
"tiles": {
"kind": "vector_lets_plot",
"url": "wss:https://tiles.datalore.jetbrains.com",
"url": "wss:https://tiles.datalore.jetbrains.com",
"theme": null,
"attribution": "Map: <a href=\"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/JetBrains/lets-plot\">\u00a9 Lets-Plot</a>, map data: <a href=\"https://www.openstreetmap.org/copyright\">\u00a9 OpenStreetMap contributors</a>."
},
Expand All @@ -196,14 +187,25 @@ class LiveMap {
return parsePlotSpec(spec)
}

private fun blankMap(): MutableMap<String, Any> {
private fun barWithNanValuesInData(): MutableMap<String, Any> {
val spec = """{
"kind": "plot",
"layers": [
{
"geom": "livemap",
"data": {},
"mapping": {},
"data": {
"x": [0, 0, 0, 10, 10, 10, 20, 20, 20],
"y": [0, 0, 0, 10, 10, 10, 20, 20, 20],
"z": [100, 200, 400, 144, null, 230, 123, 543, -231],
"c": ['A', 'B', 'C', 'A', 'B', 'C', 'A', 'B', 'C']
},
"mapping": {
"x": "x",
"y": "y",
"sym_y": "z",
"fill": "c"
},
"display_mode": "bar",
"tiles": {
"kind": "vector_lets_plot",
"url": "wss:https://tiles.datalore.jetbrains.com",
Expand All @@ -220,8 +222,7 @@ class LiveMap {

return parsePlotSpec(spec)
}

private fun barWithNanValuesInData(): MutableMap<String, Any> {
private fun pieWithNanValuesInData(): MutableMap<String, Any> {
val spec = """{
"kind": "plot",
"layers": [
Expand All @@ -239,7 +240,7 @@ class LiveMap {
"sym_y": "z",
"fill": "c"
},
"display_mode": "bar",
"display_mode": "pie",
"tiles": {
"kind": "vector_lets_plot",
"url": "wss:https://tiles.datalore.jetbrains.com",
Expand Down Expand Up @@ -868,21 +869,24 @@ class LiveMap {

fun fourPointsTwoLayers(): MutableMap<String, Any> {
val spec = """{
"data":{
"x":[29.777834, 29.778033],
"y":[59.991666, 59.988106],
"lonlat":["29.777834,59.991666", "29.778033,59.988106"],
"label":["one", "two"]
},

"kind":"plot",
"layers":[
{
"geom":"livemap",
"data":{
"x":[29.777834, 29.778033],
"y":[59.991666, 59.988106],
"lonlat":["29.777834,59.991666", "29.778033,59.988106"],
"label":["one", "two"]
},
"mapping":{
"x":"x",
"y":"y",
"color":"label"
},
"location": {"type": "coordinates", "data": [29.7, 60.02]},
"zoom": 10,
"display_mode":"point",
"tiles":{ "kind":"raster_zxy", "url":"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"},
"shape":19,
Expand All @@ -891,9 +895,9 @@ class LiveMap {
{
"geom":"point",
"data":{
"lon":[29.703667, 29.72339],
"lat":[60.01668, 60.008983],
"label":["three", "four"]
"lon":[29.703667, 29.72339, 29.75339, 29.77339, 29.79339, 29.81339],
"lat":[60.01668, 60.008983, 60.012983, 60.022983, 60.032983, 60.042983],
"label":["three", "four", "five", "six", "seve", "eight"]
},
"mapping":{
"x":"lon",
Expand Down
8 changes: 2 additions & 6 deletions livemap/src/commonMain/kotlin/jetbrains/livemap/LiveMap.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import jetbrains.datalore.vis.canvas.CanvasControlUtil.setAnimationHandler
import jetbrains.datalore.vis.canvas.DeltaTime
import jetbrains.livemap.Diagnostics.LiveMapDiagnostics
import jetbrains.livemap.api.LayersBuilder
import jetbrains.livemap.chart.ChartElementRenderingSystem
import jetbrains.livemap.chart.ChartElementScaleSystem
import jetbrains.livemap.chart.GrowingPathEffect
import jetbrains.livemap.config.DevParams
Expand Down Expand Up @@ -66,10 +65,7 @@ import jetbrains.livemap.geocoding.MapLocationInitializationSystem
import jetbrains.livemap.geometry.ScaleUpdateSystem
import jetbrains.livemap.geometry.WorldGeometry2ScreenUpdateSystem
import jetbrains.livemap.makegeometrywidget.MakeGeometryWidgetSystem
import jetbrains.livemap.mapengine.LayerEntitiesComponent
import jetbrains.livemap.mapengine.LiveMapContext
import jetbrains.livemap.mapengine.MapProjection
import jetbrains.livemap.mapengine.MapRenderContext
import jetbrains.livemap.mapengine.*
import jetbrains.livemap.mapengine.basemap.*
import jetbrains.livemap.mapengine.basemap.raster.RasterTileLayerComponent
import jetbrains.livemap.mapengine.basemap.vector.debug.DebugDataSystem
Expand Down Expand Up @@ -272,7 +268,7 @@ class LiveMap(
maxZoom = viewport.maxZoom,
componentManager
),
ChartElementRenderingSystem(componentManager),
RenderingSystem(componentManager),

BusyStateSystem(componentManager, myUiService),

Expand Down
10 changes: 6 additions & 4 deletions livemap/src/commonMain/kotlin/jetbrains/livemap/api/Bars.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ import jetbrains.datalore.base.typedGeometry.Vec
import jetbrains.datalore.base.typedGeometry.explicitVec
import jetbrains.datalore.base.values.Color
import jetbrains.livemap.Client
import jetbrains.livemap.chart.BarChart
import jetbrains.livemap.chart.ChartElementComponent
import jetbrains.livemap.chart.Renderers
import jetbrains.livemap.chart.SymbolComponent
import jetbrains.livemap.core.ecs.EcsEntity
import jetbrains.livemap.core.ecs.addComponents
import jetbrains.livemap.core.rendering.layers.LayerGroup
import jetbrains.livemap.mapengine.LayerEntitiesComponent
import jetbrains.livemap.mapengine.RenderableComponent
import jetbrains.livemap.mapengine.placement.ScreenDimensionComponent
import jetbrains.livemap.mapengine.placement.ScreenLoopComponent
import jetbrains.livemap.mapengine.placement.ScreenOriginComponent
import jetbrains.livemap.mapengine.placement.WorldOriginComponent
import jetbrains.livemap.searching.IndexComponent
import jetbrains.livemap.searching.LocatorComponent
import jetbrains.livemap.searching.PieLocatorHelper
import kotlin.math.abs
import kotlin.math.sign

Expand Down Expand Up @@ -112,8 +112,11 @@ class BarsFactory(
if (it.layerIndex != null) {
+ IndexComponent(it.layerIndex!!, 0)
}
+ LocatorComponent(BarChart.Locator())
+ RenderableComponent().apply {
renderer = BarChart.Renderer()
}
+ ChartElementComponent().apply {
renderer = Renderers.BarRenderer()
scalable = [email protected]
strokeColor = it.strokeColor
strokeWidth = it.strokeWidth
Expand All @@ -128,7 +131,6 @@ class BarsFactory(
+ ScreenDimensionComponent()
+ ScreenLoopComponent()
+ ScreenOriginComponent()
+ LocatorComponent(PieLocatorHelper())
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion livemap/src/commonMain/kotlin/jetbrains/livemap/api/Lines.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import jetbrains.livemap.geocoding.NeedLocationComponent
import jetbrains.livemap.geometry.WorldGeometryComponent
import jetbrains.livemap.mapengine.LayerEntitiesComponent
import jetbrains.livemap.mapengine.MapProjection
import jetbrains.livemap.mapengine.RenderableComponent
import jetbrains.livemap.mapengine.placement.ScreenLoopComponent
import jetbrains.livemap.mapengine.placement.ScreenOriginComponent
import jetbrains.livemap.mapengine.placement.WorldDimensionComponent
Expand Down Expand Up @@ -86,8 +87,10 @@ class LineBuilder(
val line = createLineGeometry(worldPoint, horizontal, mapProjection.mapRect)
val bbox = createLineBBox(worldPoint, strokeWidth, horizontal, mapProjection.mapRect)

+ ChartElementComponent().apply {
+ RenderableComponent().apply {
renderer = PathRenderer()
}
+ ChartElementComponent().apply {
scalable = [email protected]
strokeColor = [email protected]
strokeWidth = [email protected]
Expand Down
Loading