Categories
Mastering Development

How fix , Colone that moves at the same time ReactJs

I would like to explain my problem of the day. in the following code, I make a map and I return it, once the map perform I display 3 colone which is displayed each in turn because it has all different information then I have a button which allows to display the colones one by […]

Categories
Linux Mastering Development

Leaflet.JS, error when trying to extend the Circle class

var map = L.map(“map”).setView([51.505, -0.09], 13); L.tileLayer(“https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png”, { attribution: ‘&copy; <a href=”https://www.openstreetmap.org/copyright”>OpenStreetMap</a> contributors’, }).addTo(map); var polygon = L.polygon([ [54.069122, -4.769456], [54.069223, -4.768973], [54.069465, -4.769123], [54.069368, -4.769606], ]).addTo(map); var DraggableCircle = L.Circle.extend({ initialize: function (name, options) { this.name = name; L.setOptions(this, options); this.setRadius(2); this.setLatLng([54.069223, -4.768973]); this.on({ mousedown: function () { map.on(“mousemove”, this.moveObject); }, click: function () […]

Categories
Mastering Development

How to apply feature tools on a very large dataset?

I have a doubt about how to use feature tools on a very large dataset? I am solving the IEEE Fraud Detection Kaggle Problem https://www.kaggle.com/c/ieee-fraud-detection. Its a huge dataset. Code from my Kaggle Kernel : import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns train_transaction = pd.read_csv(‘../input/ieee-fraud-detection/train_transaction.csv’) train_identity […]

Categories
Mastering Development

Create bar graph without in JavaScript

I’m trying to implement this graph with data given below using JavaScript without using <canvas>. I got one bar can’t see the rest. I want at least 4 bars with x-axis and y-axis numbers (not necessary to be true). const g = document.getElementById(“graph”); const graphData = { title: “Wild Animals in Istanbul”, yAxis: “population”, data: […]

Categories
Mastering Development

How put(pack) JPanel with chart inside JPanel which inside JFrame?

I had method,which returns JPanel with JFreeChart with ChartActionListener,in test programm it works well,i just write setContentPane(createContent()); and program show it as full size JPanel. When i create my main Frame with JPanel in special place(i do it by NetBeans swing constructor),my JPanel could not show content. It just stay as empty JPanel. I tryed […]

Categories
Mastering Development

Using plotlyProxy to restyle single trace in multi-trace plot

I have a plot_ly() graph within a shiny app displaying about 95 traces at once over time. I would like to add interactive functionality to change the styling of one line (trace), preferably without adding or deleting any or re-rendering the plot, based on the row ID selected from the datatable. My problem is somewhat […]

Categories
Mastering Development

Combining two API responses into one object without map/loop

I’m in a situation where I have to cover for poor API entity associations on the client: Simplified example would be: /api/cars [ { “carId”: 1, “name”: “BMW” }, { “carId”: 2, “name”: “Citroen” } ] /api/carcolors [ { “color”: “blue”, “carId”: 1 }, { “color”: “red”, “carId”: 2 } ] And I would need […]

Categories
Mastering Development

How to add comparison lines to an lmplot in seaborn?

I would like to combine the following lmplots I have. More specifically, the red lines are averages for each season, and I want to place them on their respective lmplots with the other data, instead of having them separate. Here is my code (note, the axes limits aren’t working because the second lmplot is messing […]

Categories
Mastering Development

how to add legends from stat_summary and remove legends from the main plot?

I want to plot the values of df1 by two groups i.e. product and start_date and also plot a crossbar with the mean of df1(blue) and mean of df2(red) as in the attached diagram. df1 <- data.frame(product = c(“A”,”A”,”A”,”A”,”A”,”A”,”A”,”B”,”B”,”B”,”B”,”B”,”B”,”B”,”C”,”C”,”C”,”C”,”C”,”C”,”C”,”D”,”D”,”D”,”D”,”D”,”D”,”D”), start_date =as.Date(c(‘2020-02-01’, ‘2020-02-02’, ‘2020-02-03’, ‘2020-02-04’, ‘2020-02-05’, ‘2020-02-06’, ‘2020-02-07’)), value = c(15.71,17.37,19.93,14.28,15.85,10.5,8.58,5.62,5.19,5.44,4.6,7.04,6.29,3.3,20.35,27.92,23.07,12.83,22.28,21.32,31.46,34.82,23.68,29.11,14.48,25.2,16.91,27.79)) df2 <- data.frame(product = c(“A”,”A”,”A”,”A”,”A”,”A”,”B”,”B”,”B”,”B”,”B”,”B”,”C”,”C”,”C”,”C”,”C”,”C”,”D”,”D”,”D”,”D”,”D”,”D”), […]

Categories
Mastering Development

Leaflet polygon draw a weird shape

So I am using Leaflet map in my page and I have to show a polygon. I get the vertices of the shape from my Node controller and then add them to the map using the following way: function fetchAreas(){ const url=’http://localhost:1337/api/areas’; fetch(url) .then((res) => { return res.json(); }) .then((data) => { console.log(data); for(d in […]