Kieran  Stroman

Kieran Stroman

1591193160

Starting with Plotly-express

Data analysis and storytelling goes hand by hand in the world of analytics. There have always been a need of effective communication when it comes to convey our ideas and be persuasive. As its said — a picture is worth a million words, data visualization is also a similar thing. It expresses the insights of the data right in front of our eyes and plays a vital role when seeing the data.

Its kinda impossible that anyone working on data visualization with python has not used plotly. Plotly is one of the most widely used data visualization library on python. However, we will be talking about an extension to the plain plotly today. Yes, I am talking about plotly express.

This is a high-level visualization library for generating advanced plots on python. It is a wrapper for plotly.py that exposes a simple syntax for complex charts. We can generate complex and rich interactive plots including faceting, maps, animations, trendlines etc with a single function call. In addition to that, it also comes with inbuilt datasets, color scales, themes and just like plotly.py, plotly express is also completely free. Being an open source package, this can be used in any way that suits our need even on the commercial applications. We can also export the plots created by plotly express via Orca or edit them in jupyter lab chart editor.

Just like other simple package installations, we can PIP INSTALL PLOTLY and are good to go with it. One of the nice things about plotly.express is that it is designed to work well with pandas.DataFrame objects, a very common data structure used within statistical analysis in Python. plotly.express also has comprehensive, easy to read documentation at https://www.plotly.express/plotly_express/

Now, without delaying it much, lets start plotting some visualizations with plotly express.

#plotly #data-analysis #data-science #data-visualization #express

What is GEEK

Buddha Community

Starting with Plotly-express
Kieran  Stroman

Kieran Stroman

1591193160

Starting with Plotly-express

Data analysis and storytelling goes hand by hand in the world of analytics. There have always been a need of effective communication when it comes to convey our ideas and be persuasive. As its said — a picture is worth a million words, data visualization is also a similar thing. It expresses the insights of the data right in front of our eyes and plays a vital role when seeing the data.

Its kinda impossible that anyone working on data visualization with python has not used plotly. Plotly is one of the most widely used data visualization library on python. However, we will be talking about an extension to the plain plotly today. Yes, I am talking about plotly express.

This is a high-level visualization library for generating advanced plots on python. It is a wrapper for plotly.py that exposes a simple syntax for complex charts. We can generate complex and rich interactive plots including faceting, maps, animations, trendlines etc with a single function call. In addition to that, it also comes with inbuilt datasets, color scales, themes and just like plotly.py, plotly express is also completely free. Being an open source package, this can be used in any way that suits our need even on the commercial applications. We can also export the plots created by plotly express via Orca or edit them in jupyter lab chart editor.

Just like other simple package installations, we can PIP INSTALL PLOTLY and are good to go with it. One of the nice things about plotly.express is that it is designed to work well with pandas.DataFrame objects, a very common data structure used within statistical analysis in Python. plotly.express also has comprehensive, easy to read documentation at https://www.plotly.express/plotly_express/

Now, without delaying it much, lets start plotting some visualizations with plotly express.

#plotly #data-analysis #data-science #data-visualization #express

Carmen  Grimes

Carmen Grimes

1595494844

How to start an electric scooter facility/fleet in a university campus/IT park

Are you leading an organization that has a large campus, e.g., a large university? You are probably thinking of introducing an electric scooter/bicycle fleet on the campus, and why wouldn’t you?

Introducing micro-mobility in your campus with the help of such a fleet would help the people on the campus significantly. People would save money since they don’t need to use a car for a short distance. Your campus will see a drastic reduction in congestion, moreover, its carbon footprint will reduce.

Micro-mobility is relatively new though and you would need help. You would need to select an appropriate fleet of vehicles. The people on your campus would need to find electric scooters or electric bikes for commuting, and you need to provide a solution for this.

To be more specific, you need a short-term electric bike rental app. With such an app, you will be able to easily offer micro-mobility to the people on the campus. We at Devathon have built Autorent exactly for this.

What does Autorent do and how can it help you? How does it enable you to introduce micro-mobility on your campus? We explain these in this article, however, we will touch upon a few basics first.

Micro-mobility: What it is

micro-mobility

You are probably thinking about micro-mobility relatively recently, aren’t you? A few relevant insights about it could help you to better appreciate its importance.

Micro-mobility is a new trend in transportation, and it uses vehicles that are considerably smaller than cars. Electric scooters (e-scooters) and electric bikes (e-bikes) are the most popular forms of micro-mobility, however, there are also e-unicycles and e-skateboards.

You might have already seen e-scooters, which are kick scooters that come with a motor. Thanks to its motor, an e-scooter can achieve a speed of up to 20 km/h. On the other hand, e-bikes are popular in China and Japan, and they come with a motor, and you can reach a speed of 40 km/h.

You obviously can’t use these vehicles for very long commutes, however, what if you need to travel a short distance? Even if you have a reasonable public transport facility in the city, it might not cover the route you need to take. Take the example of a large university campus. Such a campus is often at a considerable distance from the central business district of the city where it’s located. While public transport facilities may serve the central business district, they wouldn’t serve this large campus. Currently, many people drive their cars even for short distances.

As you know, that brings its own set of challenges. Vehicular traffic adds significantly to pollution, moreover, finding a parking spot can be hard in crowded urban districts.

Well, you can reduce your carbon footprint if you use an electric car. However, electric cars are still new, and many countries are still building the necessary infrastructure for them. Your large campus might not have the necessary infrastructure for them either. Presently, electric cars don’t represent a viable option in most geographies.

As a result, you need to buy and maintain a car even if your commute is short. In addition to dealing with parking problems, you need to spend significantly on your car.

All of these factors have combined to make people sit up and think seriously about cars. Many people are now seriously considering whether a car is really the best option even if they have to commute only a short distance.

This is where micro-mobility enters the picture. When you commute a short distance regularly, e-scooters or e-bikes are viable options. You limit your carbon footprints and you cut costs!

Businesses have seen this shift in thinking, and e-scooter companies like Lime and Bird have entered this field in a big way. They let you rent e-scooters by the minute. On the other hand, start-ups like Jump and Lyft have entered the e-bike market.

Think of your campus now! The people there might need to travel short distances within the campus, and e-scooters can really help them.

How micro-mobility can benefit you

benefits-micromobility

What advantages can you get from micro-mobility? Let’s take a deeper look into this question.

Micro-mobility can offer several advantages to the people on your campus, e.g.:

  • Affordability: Shared e-scooters are cheaper than other mass transportation options. Remember that the people on your campus will use them on a shared basis, and they will pay for their short commutes only. Well, depending on your operating model, you might even let them use shared e-scooters or e-bikes for free!
  • Convenience: Users don’t need to worry about finding parking spots for shared e-scooters since these are small. They can easily travel from point A to point B on your campus with the help of these e-scooters.
  • Environmentally sustainable: Shared e-scooters reduce the carbon footprint, moreover, they decongest the roads. Statistics from the pilot programs in cities like Portland and Denver showimpressive gains around this key aspect.
  • Safety: This one’s obvious, isn’t it? When people on your campus use small e-scooters or e-bikes instead of cars, the problem of overspeeding will disappear. you will see fewer accidents.

#android app #autorent #ios app #mobile app development #app like bird #app like bounce #app like lime #autorent #bird scooter business model #bird scooter rental #bird scooter rental cost #bird scooter rental price #clone app like bird #clone app like bounce #clone app like lime #electric rental scooters #electric scooter company #electric scooter rental business #how do you start a moped #how to start a moped #how to start a scooter rental business #how to start an electric company #how to start electric scooterrental business #lime scooter business model #scooter franchise #scooter rental business #scooter rental business for sale #scooter rental business insurance #scooters franchise cost #white label app like bird #white label app like bounce #white label app like lime

Art  Lind

Art Lind

1603069200

Visualization with Plotly.Express: Comprehensive guide

I frequently come up with an ideal visualization and then struggle to code it. It would be to the point, expressive, and easy to interpret, but it’s impossible to create. When I found Plotly it made plotting, well, much easier.

Plotly.Express, first introduced in version 4.0.0 is a high-level abstraction to Plotly API optimized to work perfectly with data frames. It’s very good, though not flawless. I see the biggest gap in the number of examples or links to the API documentation. That’s why I have decided to use my experience with the library to write a guide.

To run the chart and exercises, please use the Plotly Express — Comprehensive Guide.ipynb notebook on Github. All the code in this article is in python.

Table of contents:

Installing Plotly Express

Plotly.Express is a regular part of the Plotly python package, so the easiest is to install it all.

## pip 
pip install plotly

## anaconda
conda install -c anaconda plotly

Plotly Express also requires pandas to be installed, otherwise, you will get this error when you try to import it.

[In]: import plotly.express as px
[Out]: ImportError: Plotly express requires pandas to be installed.

There are additional requirements if you want to use the plotly in Jupyter notebooks. For Jupyter Lab you need jupyterlab-plotly. In a regular notebook, I had to install nbformat (conda install -c anaconda nbformat)

#plotly #python #charts #plotly-express #visualization

Alec  Nikolaus

Alec Nikolaus

1596730200

An Intro to Customizing Charts in Plotly Express

Plotly Express is probably my new favorite data viz tool in python, especially after learning how to take control of it to make it look even nicer. Here, I’ll walk you through the basics to help you on your way to mastering making pretty charts with Plotly Express.

Before we start, we have to have some data to play with! For this, I used this video game sales data from Kaggle. I dropped all null values just for this article, but do keep in mind that you should generally avoid doing that in practice!

import pandas as pd

#Importing the initial dataframe
df1 = pd.read_csv("data/vgsales.csv").dropna()
df1.Year = df1.Year.astype("int")
#First Modified Dataframe
df2 = df1.groupby("Genre").sum().drop(columns = ["Year", "Rank"]).sort_values(by = "Global_Sales").reset_index()
#Second modified Dataframe
top_genres = ["Platform", "Role-Playing", "Shooter", "Sports", "Action"]
df3 = df1[df1.Genre.isin(top_genres)].groupby(["Genre", "Year"]).sum().drop(columns="Rank").reset_index()

Great! Now, on to the fun part. If you haven’t already installed the package, there are instructions on how to install the current version here. If you have it, great! All you need to run is import plotly.express as px and you can follow along!

We’ll be using a (dreaded) pie chart, a bar graph, and a line chart throughout this article. The code for each are as follows:

#Percentage of how many games are in each category
px.pie(df1, names = "Genre")

#Total lifetime global profit per genre
px.bar(df2, x = "Genre", y = "Global_Sales") 
#Global profit over time for top 5 genres 
px.line(df3, "Year", "Global_Sales"

Image for post

Image for post

Image for post

Now… as you can see here these are all quite bland or even impossible to read. Plus, there aren’t even any titles and the axis names are just the variables used! Fortunately, both issues are quite easy to fix!

#python #plotly-express #plotly #data-visualization #data-science

Upload and Store Images in MySQL using Node.Js, Express, Express-FileUpload & Handlebars

Today we are going to explore the basic usage of Express-FileUpload. In addition to this, I will show you how you can save/update a user record with a profile image that you can upload.

Source Files:
https://raddy.co.uk/blog/upload-and-store-images-in-mysql-using-node-js-express-express-fileupload-express-handlebars/

Chapters:
0:00 Introduction:
1:16 NPM Project Setup
3:54 Creating Express Server
5:51 Setting up Layouts & Routes
9:46 Express Upload Form
21:50 User Card
33:40 Database
52:05 Ending

Credit:
Icons www.flaticon.com
Cat photo by Cédric VT on Unsplash
Upload Icon by Gregor Cresnar www.flaticon.com

CONNECT with RaddyTheBrand
Website: https://www.raddy.co.uk
GitHub: https://www.github.com/RaddyTheBrand
Instagram: https://www.instagram.com/RaddyTheBrand
Twitter: https://www.twitter.com/RaddyTheBrand
Newsletter: https://www.raddy.co.uk/newsletter

DONATE to RaddyTheBrand
BuyMeACoffee: https://www.buymeacoffee.com/RaddyTheBrand
PayPal: https://bit.ly/3tAuElv

#node.js #express #express-fileupload #express-handlebars #mysql #upload and store images