R Dataset / Package psych / cities

How To Create a Barplot

Webform
The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

How To Create a Stacked Barplot

Webform
The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

How To Create a Pie Chart

Webform
The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

How To Compute the Mean

Webform
The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

How To Create a Plot

Webform
The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

How to Compute the Median

Webform
The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Boxplot

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Correlation Coefficient

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Cumulative Frequency Histogram

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Dotplot

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Hollow Histogram

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Numerical Summaries

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Pie Chart

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Plot

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Regression

Stem and Leaf Plots

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.

Visual Summaries

The Drupal File ID of the selected dataset. The user may load another using the search bar on the operation's page.
Attachment Size
dataset-20432.csv 638 bytes
Dataset License
GNU General Public License v2.0
Documentation License
GNU General Public License v2.0
R Dataset Help

On this Picostat.com statistics page, you will find information about the cities data set which pertains to Distances between 11 US cities. The cities data set is found in the psych R package. You can load the cities data set in R by issuing the following command at the console data("cities"). This will load the data into a variable called cities. If R says the cities data set is not found, you can try installing the package by issuing this command install.packages("psych") and then attempt to reload the data. If you need to download R, you can go to the R project website. You can download a CSV (comma separated values) version of the cities R data set. The size of this file is about 638 bytes.

Documentation

Distances between 11 US cities

Description

Airline distances between 11 US cities may be used as an example for multidimensional scaling or cluster analysis.

Usage

data(cities)

Format

A data frame with 11 observations on the following 11 variables.

ATL

Atlana, Georgia

BOS

Boston, Massachusetts

ORD

Chicago, Illinois

DCA

Washington, District of Columbia

DEN

Denver, Colorado

LAX

Los Angeles, California

MIA

Miami, Florida

JFK

New York, New York

SEA

Seattle, Washington

SFO

San Francisco, California

MSY

New Orleans, Lousianna

Details

An 11 x11 matrix of distances between major US airports. This is a useful demonstration of multiple dimensional scaling.

city.location is a dataframe of longitude and latitude for those cities.

Note that the 2 dimensional MDS solution does not perfectly capture the data from these city distances. Boston, New York and Washington, D.C. are located slightly too far west, and Seattle and LA are slightly too far south.

Source

http://www.timeanddate.com/worldclock/distance.html

Examples

data(cities)
city.location[,1] <- -city.location[,1]
#not run
#an overlay map can be added if the package maps is available
#
#
#libary(maps)
#map("usa")
#title("MultiDimensional Scaling of US cities")
#points(city.location)plot(city.location, xlab="Dimension 1", ylab="Dimension 2",
   main ="Multidimensional scaling of US cities")
city.loc <- cmdscale(cities, k=2) #ask for a 2 dimensional solution  round(city.loc,0) 
city.loc <- -city.loc 
 city.loc <- rescale(city.loc,apply(city.location,2,mean),apply(city.location,2,sd))
points(city.loc,type="n") 
text(city.loc,labels=names(cities))
--

Dataset imported from https://www.r-project.org.

All Public Datasets File Size
Test 394 bytes
Q1 332 bytes
prova_Correlatio 593 bytes
profva
test 332 bytes
Recent Queries For This Dataset

No queries made on this dataset yet.