4 Data Visualization via ggplot2
In Chapter 3, we discussed the importance of datasets being tidy. You will see in examples here why having a tidy dataset helps us immensely when plotting our data. In plotting our data, we will be able to gain valuable insights from our data that we couldn’t initially see from just looking at the raw data. We will focus on using Hadley Wickham’s ggplot2
package in doing so, which was developed to work specifically on datasets that are tidy. It provides an easy way to customize your plots and is based on data visualization theory given in The Grammar of Graphics (Wilkinson 2005).
At the most basic level, graphics/plots/charts provide a nice way for us to get a sense for how quantitative variables compare in terms of their center and their spread. The most important thing to know about graphics is that they should be created to make it obvious for your audience to see the findings you want to get across. This requires a balance of not including too much in your plots, but also including enough so that relationships and interesting findings can be easily seen. As we will see, plots/graphics also help us to identify patterns and outliers in our data. We will see that a common extension of these ideas is to compare the distribution of one quantitative variable (i.e., what the spread of a variable looks like or how the variable is distributed in terms of its values) as we go across the levels of a different categorical variable.
Needed packages
Before we proceed with this chapter, let’s load all the necessary packages.
library(ggplot2)
library(nycflights13)
library(knitr)
library(dplyr)
4.1 The Grammar of Graphics
We begin with a discussion of a theoretical framework for data visualization known as the “The Grammar of Graphics,” which serves as the basis for the ggplot2
package. Much like the way we construct sentences in any language using a linguistic grammar (nouns, verbs, subjects, objects, etc.), the theoretical framework given by Leland Wilkinson (Wilkinson 2005) allows us to specify the components of a statistical graphic.
4.1.1 Components of Grammar
In short, the grammar tells us that:
A statistical graphic is a mapping of
data
variables toaes
thetic attributes ofgeom
etric objects.
Specifically, we can break a graphic into the following three essential components:
data
: the data set comprised of variables that we map.geom
: the geometric object in question. This refers to our type of objects we can observe in our plot. For example, points, lines, bars, etc.aes
: aesthetic attributes of the geometric object that we can perceive on a graphic. For example, x/y position, color, shape, and size. Each assigned aesthetic attribute can be mapped to a variable in our data set. If not assigned, they are set to defaults.
4.1.2 Napolean’s March on Moscow
In 1812, Napoleon led a French invasion of Russia, marching on Moscow. It was one of the biggest military disasters due in large part to the Russian winter. In 1869, a French civil engineer named Charles Joseph Minard published arguably one of the greatest statistical visualizations of all-time, which summarized this march:
This was considered a revolution in statistical graphics because between the map on top and the line graph on the bottom, there are 6 dimensions of information (i.e. variables) being displayed on a 2-dimensional page. Let’s view this graphic through the lens of the Grammar of Graphics:
|
|
For example, the data variable longitude
gets mapped to the x
aes
thetic of the points geom
etric objects on the map while the annotated line-graph displays date
and temperature
variable information via its mapping to the x
and y
aes
thetic of the line geom
etric object.
4.1.3 Other Components of the Grammar
There are other components of the Grammar of Graphics we can control:
facet
: how to break up a plot into subsetsstat
istical transformations: this includes smoothing, binning values into a histogram, or just itself un-transformed as"identity"
.scales
both- convert data units to physical units the computer can display
- draw a legend and/or axes, which provide an inverse mapping to make it possible to read the original data values from the graph.
coord
inate system for x/y values: typicallycartesian
, but can also bepolar
ormap
position
adjustments
In this text, we will only focus on the first two: facet
ing (introduced in Section 4.6) and stat
istical transformations (in a limited sense, when consider Barplots in Section 4.8); the other components are left to a more advanced text. This is not a problem when producing a plot as each of these components have default settings.
There are other extra attributes that can be tweaked as well including the plot title, axes labels, and over-arching themes for the plot. In general, the Grammar of Graphics allows for customization but also a consistent framework that allows the user to easily tweak their creations as needed in order to convey a message about their data.
4.1.4 The ggplot2 Package
We next introduce Hadley Wickham’s ggplot2
package, which is an implementation of the Grammar of Graphics for R (Wickham and Chang 2016). You may have noticed that a lot of previous text in this chapter is written in computer font. This is because the various components of the Grammar of Graphics are specified using the ggplot
function, which expects at a bare minimal as arguments
- the data frame where the variables exist (the
data
argument) and - the names of the variables to be plotted (the
mapping
argument).
The names of the variables will be entered into the aes
function as arguments where aes
stands for “aesthetics”.
4.2 Five Named Graphs - The 5NG
For our purposes, we will be limiting consideration to five different types of graphs (note that in this text we use the terms “graphs”, “plots”, and “charts” interchangeably). We term these five named graphs the 5NG:
- scatter-plots
- line-graphs
- boxplots
- histograms
- barplots
With this repertoire of plots, you can visualize a wide array of data variables thrown at you. We will discuss some variations of these, but with the 5NG in your toolbox you can do big things! Something we will also stress here is that certain plots only work for categorical/logical variables and others only for quantitative variables. You’ll want to quiz yourself often as we go along on which plot makes sense a given a particular problem set-up.
4.3 5NG#1: Scatter-plots
The simplest of the 5NG are scatter-plots (also called bivariate plots); they allow you to investigate the relationship between two continuous variables. While you may already be familiar with such plots, let’s view it through the lens of the Grammar of Graphics. Specifically, we will graphically investigate the relationship between the following two continuous variables in the flights
data frame:
dep_delay
: departure delay on the horizontal “x” axis andarr_delay
: arrival delay on the vertical “y” axis
for Alaska Airlines flights leaving NYC in 2013. This requires paring down the flights
data frame to a smaller data frame all_alaska_flights
consisting of only Alaska Airlines (carrier code “AS”) flights.
data(flights)
all_alaska_flights <- flights %>%
filter(carrier == "AS")
This code snippet makes use of functions in the dplyr
package for data manipulation to achieve our goal: it takes the flights
data frame and filter
s it to only return the rows which meet the condition carrier == "AS"
(recall equality is specified with ==
and not =
). You will see many more examples using this function in Chapter 5.
Learning check
(LC4.1) Take a look at both the flights
and all_alaska_flights
data frames by running View(flights)
and View(all_alaska_flights)
in the console. In what respect do these data frames differ?
4.3.1 Scatter-plots via geom_point
We proceed to create the scatter-plot using the ggplot()
function:
ggplot(data = all_alaska_flights, aes(x = dep_delay, y = arr_delay)) +
geom_point()
You are encouraged to enter Return on your keyboard after entering the +
. As we add more and more elements, it will be nice to keep them indented as you see below. Note that this will not work if you begin the line with the +
.
Let’s break down this keeping in mind our discussion in Section 4.1:
- Within the
ggplot()
function call, we specify two of the components of the grammar:- The
data
frame to beall_alaska_flights
by settingdata = all_alaska_flights
- The
aes
thetic mapping by settingaes(x = dep_delay, y = arr_delay)
. Specificallydep_delay
maps to thex
positionarr_delay
maps to they
position
- The
- We add a layer to the
ggplot()
function call using the+
sign - The layer in question specifies the third component of the grammar: the
geom
etric object in question. In this case the geometric object arepoint
s, set by specifyinggeom_point()
In Figure 4.2 we see that a positive relationship exists between dep_delay
and arr_delay
: as departure delays increase, arrival delays tend to also increase. We also note that the majority of points fall near the point (0, 0). There is a large mass of points clustered there. (We will work more with this data set in Chapter ??, where we investigate correlation and linear regression.)
Learning check
(LC4.2) What are some practical reasons why dep_delay
and arr_delay
have a positive relationship?
(LC4.3) What variables (not necessarily in the flights
data frame) would you expect to have a negative correlation (i.e. a negative relationship) with dep_delay
? Why? Remember that we are focusing on continuous variables here.
(LC4.4) Why do you believe there is a cluster of points near (0, 0)? What does (0, 0) correspond to in terms of the Alaskan flights?
(LC4.5) What are some other features of the plot that stand out to you?
(LC4.6) Create a new scatter-plot using different variables in the all_alaska_flights
data frame by modifying the example above.
4.3.2 Over-Plotting
The large mass of points near (0, 0) can cause some confusion. This is the result of a phenomenon called over-plotting. As one may guess, this corresponds to values being plotted on top of each other over and over again. It is often difficult to know just how many values are plotted in this way when looking at a basic scatter-plot as we have here. There are two ways to address this issue:
- By adjusting the transparency of the points via the
alpha
argument - By jittering the points via
geom_jitter()
The first way of relieving over-plotting is by changing the alpha
argument to geom_point()
which controls the transparency of the points. By default, this value is set to 1
. We can change this value to a smaller fraction (greater than 0) to change the transparency of the points in the plot:
ggplot(data = all_alaska_flights, aes(x = dep_delay, y = arr_delay)) +
geom_point(alpha = 0.2)
Note how this function call is identical to the one in Section 4.3, but with geom_point()
replaced with alpha = 0.2
added.
The second way of relieving over-plotting is to jitter the points a bit. In other words, we are going to add just a bit of random noise to the points to better see them and remove some of the over-plotting. You can think of “jittering” as shaking the points a bit on the plot. Instead of using geom_point
, we use geom_jitter
to perform this shaking and specify around how much jitter to add with the width
and height
arguments. This corresponds to how hard you’d like to shake the plot in units corresponding to those for both the horizontal and vertical variables (in this case minutes).
ggplot(data = all_alaska_flights, aes(x = dep_delay, y = arr_delay)) +
geom_jitter(width = 30, height = 30)
Note how this function call is identical to the one in Section 4.3.1, but with geom_point()
replaced with geom_jitter()
. The plot in 4.4 helps us a little bit in getting a sense for the over-plotting, but with a relatively large dataset like this one (714 flights), it can be argued that changing the transparency of the points by setting alpha
proved more effective.
Learning check
(LC4.7) Why is setting the alpha
argument value useful with scatter-plots? What further information does it give you that a regular scatter-plot cannot?
(LC4.8) After viewing the Figure 4.3 above, give a range of arrival times and departure times that occur most frequently? How has that region changed compared to when you observed the same plot without the alpha = 0.2
set in Figure 4.2?
4.3.3 Summary
Scatter-plots display the relationship between two continuous variables and may be the most used plot today as they can provide an immediate way to see the trend in one variable versus another. If you try to create a scatter-plot where either one of the two variables is not quantitative however, you will get strange results. Be careful!
With medium to large datasets, you may need to play with either geom_jitter
or the alpha
argument in order to get a good feel for relationships in your data. This tweaking is often a fun part of data visualization since you’ll have the chance to see different relationships come about as you make subtle changes to your plots.
4.4 5NG#2: Line-graphs
The next of the 5NG is a line-graph. They are most frequently used when the x-axis represents time and the y-axis represents some other numerical variable; such plots are known as time series. Time represents a variable that is connected together by each day following the previous day. In other words, time has a natural ordering. Line-graphs should be avoided when there is not a clear sequential ordering to the explanatory variable, i.e. the x-variable or the predictor variable.
Our focus turns to the temp
variable in this weather
dataset. By
- Looking over the
weather
dataset by typingView(weather)
in the console. - Running
?weather
to bring up the help file.
We can see that the temp
variable corresponds to hourly temperature (in Fahrenheit) recordings at weather stations near airports in New York City. Instead of considering all hours in 2013 for all three airports in NYC, let’s focus on the hourly temperature at Newark airport (origin
code “EWR”) for the first 15 days in January 2013. The weather
data frame in the nycflights13
package contains this data, but we first need to filter it to only include those rows that correspond to Newark in the first 15 days of January.
data(weather)
early_january_weather <- weather %>%
filter(origin == "EWR" & month == 1 & day <= 15)
This is similar to the previous use of the filter
command in Section 4.3, however we now use the &
operator. The above selects only those rows in weather
where origin == "EWR"
and month = 1
and day <= 15
.
Learning check
(LC4.9) Take a look at both the weather
and early_january_weather
data frames by running View(weather)
and View(early_january_weather)
in the console. In what respect do these data frames differ?
(LC4.10) The weather data is recorded hourly. Why does the time_hour
variable correctly identify the hour of the measurement whereas the hour
variable does not?
4.4.1 Line-graphs via geom_line
We plot a line-graph of hourly temperature using geom_line()
:
ggplot(data = early_january_weather, aes(x = time_hour, y = temp)) +
geom_line()
Much as with the ggplot()
call in Section 4.3.1, we specify the components of the Grammar of Graphics:
- Within the
ggplot()
function call, we specify two of the components of the grammar:- The
data
frame to beearly_january_weather
by settingdata = early_january_weather
- The
aes
thetic mapping by settingaes(x = time_hour, y = temp)
. Specificallytime_hour
(i.e. the time variable) maps to thex
positiontemp
maps to they
position
- The
- We add a layer to the
ggplot()
function call using the+
sign - The layer in question specifies the third component of the grammar: the
geom
etric object in question. In this case the geometric object is aline
, set by specifyinggeom_line()
Learning check
(LC4.11) Why should line-graphs be avoided when there is not a clear ordering of the horizontal axis?
(LC4.12) Why are line-graphs frequently used when time is the explanatory variable?
(LC4.13) Plot a time series of a variable other than temp
for Newark Airport in the first 15 days of January 2013.
4.4.2 Summary
Line-graphs, just like scatter-plots, display the relationship between two continuous variables. However the variable on the x-axis (i.e. the explanatory variable) should have a natural ordering, like some notion of time. We can mislead our audience if that isn’t the case.
4.5 5NG#3: Histograms
Let’s consider the temp
variable in the weather
data frame once again, but now unlike with the line-graphs in Section 4.4, let’s say we don’t care about the relationship of temperature to time, but rather you care about the (statistical) distribution of temperatures. We could just produce points where each of the different values appear on something similar to a number line:
This gives us a general idea of how the values of temp
differ. We see that temperatures vary from around 11 up to 100 degrees Fahrenheit. The area between 40 and 60 degrees appears to have more points plotted than outside that range.
4.5.1 Histograms via geom_histogram
What is commonly produced instead of this strip plot is a plot known as a histogram. The histogram shows how many elements of a single numerical variable fall in specified bins. In this case, these bins may correspond to between 0-10°F, 10-20°F, etc. We produce a histogram of the hour temperatures at all three NYC airports in 2013:
ggplot(data = weather, mapping = aes(x = temp)) +
geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 1 rows containing non-finite values (stat_bin).
Note here:
- There is only one variable being mapped in
aes()
: the single continuous variabletemp
. You don’t need to compute the y-aesthetic: it gets computed automatically. - We set the
geom
etric object to begeom_histogram()
- We got a warning message of
1 rows containing non-finite values
being removed. This is due to one of the values of temperature being missing. R is alerting us that this happened.
4.5.2 Adjusting the Bins
We can adjust the number/size of the bins two ways:
- By adjusting the number of bins via the
bins
argument - By adjusting the width of the bins via the
binwidth
argument
First, we have the power to specify how many bins we would like to put the data into as an argument in the geom_histogram
function. By default, this is chosen to be 30 somewhat arbitrarily; we have received a warning above our plot that this was done.
ggplot(data = weather, mapping = aes(x = temp)) +
geom_histogram(bins = 60, color = "white")
Note the addition of the color
argument. If you’d like to be able to more easily differentiate each of the bins, you can specify the color of the outline as done above.
Second, instead of specifying the number of bins, we can also specify the width of the bins by using the binwidth
argument in the geom_histogram
function.
ggplot(data = weather, mapping = aes(x = temp)) +
geom_histogram(binwidth = 10, color = "white")
Learning check
(LC4.14) What does changing the number of bins from 30 to 60 tell us about the distribution of temperatures?
(LC4.15) Would you classify the distribution of temperatures as symmetric or skewed?
(LC4.16) What would you guess is the “center” value in this distribution? Why did you make that choice?
(LC4.17) Is this data spread out greatly from the center or is it close? Why?
4.5.3 Summary
Histograms, unlike scatter-plots and line-graphs, presents information on only a single continuous variable. In particular they are visualizations of the (statistical) distribution of values.
4.6 Facets
Before continuing the 5NG, we briefly introduce a new concept called faceting. Faceting is used when we’d like to create small multiples of the same plot over a different categorical variable. By default, all of the small multiples will have the same vertical axis.
For example, suppose we were interested in looking at how the temperature histograms we saw in Section 4.5 varied by month. This is what is meant by “the distribution of a variable over another variable”: temp
is one variable and month
is the other variable. In order to look at histograms of temp
for each month, we add a layer facet_wrap(~month)
. You can also specify how many rows you’d like the small multiple plots to be in using nrow
inside of facet_wrap
.
ggplot(data = weather, aes(x = temp)) +
geom_histogram(binwidth = 5, color = "white") +
facet_wrap(~ month, nrow = 4)
As we might expect, the temperature tends to increase as summer approaches and then decrease as winter approaches.
Learning check
(LC4.18) What other things do you notice about the faceted plot above? How does a faceted plot help us see relationships between two variables?
(LC4.19) What do the numbers 1-12 correspond to in the plot above? What about 25, 50, 75, 100?
(LC4.20) For which types of datasets would these types of faceted plots not work well in comparing relationships between variables? Give an example describing the variability of the variables and other important characteristics.
(LC4.21) Does the temp
variable in the weather
data set have a lot of variability? Why do you say that?
4.7 5NG#4: Boxplots
While using faceted histograms can provide a way to compare distributions of a continuous variable split by groups of a categorical variable as in Chapter 4.6, an alternative plot called a boxplot (also called a side-by-side boxplot) achieves the same task and is frequently preferred. The boxplot uses the information provided in the five-number summary referred to in Appendix ??. It gives a way to compare this summary information across the different levels of a categorical variable.
4.7.1 Boxplots via geom_boxplot
Let’s create a boxplot to compare the monthly temperatures as we did above with the faceted histograms.
ggplot(data = weather, aes(x = month, y = temp)) +
geom_boxplot()
Note the first warning that is given here. (The second one corresponds to missing values in the data frame and it is turned off on subsequent plots.) Observe that this plot does not look like what we were expecting. We were expecting to see the distribution of temperatures for each month (so 12 different boxplots). This gives us the overall boxplot without any other groupings. We can get around this by introducing a new function for our x
variable:
ggplot(data = weather, mapping = aes(x = factor(month), y = temp)) +
geom_boxplot()
We have introduced a new function called factor()
here. One of the things this function does is to convert a discrete value like month
(1, 2, …, 12) into a categorical variable. The “box” part of this plot represents the 25th percentile, the median (50th percentile), and the 75th percentile. The dots correspond to outliers. (The specific formulation for these outliers is discussed in Appendix ??.) The lines show how the data varies that is not in the center 50% defined by the first and third quantiles. Longer lines correspond to more variability and shorter lines correspond to less variability.
Learning check
(LC4.22) What does the dot at the bottom of the plot for May correspond to? Explain what might have occurred in May to produce this point.
(LC4.23) Which months have the highest variability in temperature? What reasons do you think this is?
(LC4.24) We looked at the distribution of a continuous variable over a categorical variable here with this boxplot. Why can’t we look at the distribution of one continuous variable over the distribution of another continuous variable? Say, temperature across pressure, for example?
(LC4.25) Boxplots provide a simple way to identify outliers. Why may outliers be easier to identify when looking at a boxplot instead of a faceted histogram?
4.7.2 Summary
Boxplots provide a way to compare and contrast the distribution of one quantitative variable across multiple levels of one categorical variable. One can easily look to see where the median falls across the different groups by looking at the center line in the box. You can also see how spread out the variable is across the different groups by looking at the width of the box and also how far out the lines stretch from the box. If the lines stretch far from the box but the box has a small width, the variability of the values closer to the center is much smaller than the variability of the outer ends of the variable. Lastly, outliers are even more easily identified when looking at a boxplot than when looking at a histogram.
4.8 5NG#5: Barplots
Both histograms and boxplots represent ways to visualize the variability of continuous variables. Another common task is to present the distribution of a categorical variable. This is a simpler task since we will be interested in how many elements from our data fall into the different categories of the categorical variable.
4.8.1 Barplots via geom_bar
Frequently, the best way to visualize these different counts (also known as frequencies) is via a barplot. Consider the distribution of airlines that flew out of New York City in 2013. Here we explore the number of flights from each airline/carrier
. This can be plotted by invoking the geom_bar
function in ggplot2
:
ggplot(data = flights, mapping = aes(x = carrier)) +
geom_bar()
To get an understanding of what the names of these airlines are corresponding to these carrier
codes, we can look at the airlines
data frame in the nycflights13
package. Note the use of the kable
function here in the knitr
package, which produces a nicely-formatted table of the values in the airlines
data frame.
data(airlines)
kable(airlines)
| carrier | name |
|---|---|
| 9E | Endeavor Air Inc. |
| AA | American Airlines Inc. |
| AS | Alaska Airlines Inc. |
| B6 | JetBlue Airways |
| DL | Delta Air Lines Inc. |
| EV | ExpressJet Airlines Inc. |
| F9 | Frontier Airlines Inc. |
| FL | AirTran Airways Corporation |
| HA | Hawaiian Airlines Inc. |
| MQ | Envoy Air |
| OO | SkyWest Airlines Inc. |
| UA | United Air Lines Inc. |
| US | US Airways Inc. |
| VX | Virgin America |
| WN | Southwest Airlines Co. |
| YV | Mesa Airlines Inc. |
Going back to our barplot, we see that United Air Lines, JetBlue Airways, and ExpressJet Airlines had the most flights depart New York City in 2013. To get the actual number of flights by each airline we can use the count
function in the dplyr
package on the carrier
variable in flights
, which we will introduce formally in Chapter 5.
flights_table <- flights %>% dplyr::count(carrier)
knitr::kable(flights_table)
| carrier | n |
|---|---|
| 9E | 18460 |
| AA | 32729 |
| AS | 714 |
| B6 | 54635 |
| DL | 48110 |
| EV | 54173 |
| F9 | 685 |
| FL | 3260 |
| HA | 342 |
| MQ | 26397 |
| OO | 32 |
| UA | 58665 |
| US | 20536 |
| VX | 5162 |
| WN | 12275 |
| YV | 601 |
Technical note: Refer to the use of ::
in both lines of code above. This is another way of ensuring the correct function is called. A count
exists in a couple different packages and sometimes you’ll receive strange errors when a different instance of a function is used. This is a great way of telling R that “I want this one!”. You specify the name of the package directly before the ::
and then the name of the function immediately after ::
.
Learning check
(LC4.26) Why are histograms inappropriate for visualizing categorical variables?
(LC4.27) What is the difference between histograms and barplots?
(LC4.28) How many Envoy Air flights departed NYC in 2013?
(LC4.29) What was the seventh highest airline in terms of departed flights from NYC in 2013? How could we better present the table to get this answer quickly.
4.8.2 Must avoid pie charts!
Unfortunately, one of the most common plots seen today for categorical data is the pie chart. While they may see harmless enough, they actually present a problem in that humans are unable to judge angles well. As Naomi Robbins describes in her book “Creating More Effective Graphs” (Robbins 2013), we overestimate angles greater than 90 degrees and we underestimate angles less than 90 degrees. In other words, it is difficult for us to determine relative size of one piece of the pie compared to another.
Let’s examine our previous barplot example on the number of flights departing NYC by airline. This time we will use a pie chart. As you review this chart, try to identify
- how much larger the portion of the pie is for ExpressJet Airlines (
EV
) compared to US Airways (US
), - what the third largest carrier is in terms of departing flights, and
- how many carriers have fewer flights than United Airlines (
UA
)?
While it is quite easy to look back at the barplot to get the answer to these questions, it’s quite difficult to get the answers correct when looking at the pie graph. Barplots can always present the information in a way that is easier for the eye to determine relative position. There may be one exception from Nathan Yau at FlowingData.com but we will leave this for the reader to decide:
Learning check
(LC4.30) Why should pie charts be avoided and replaced by barplots?
(LC4.31) What is your opinion as to why pie charts continue to be used?
4.8.3 Using barplots to compare two variables
Barplots are the go-to way to visualize the frequency of different categories of a categorical variable. They make it easy to order the counts and to compare one group’s frequency to another. Another use of barplots (unfortunately, sometimes inappropriately and confusingly) is to compare two categorical variables together. Let’s examine the distribution of outgoing flights from NYC by carrier
and airport
.
We begin by getting the names of the airports in NYC that were included in the flights
dataset. Remember from Chapter 3 that this can be done by using the inner_join
function (more in Chapter 5).
flights_namedports <- flights %>%
inner_join(airports, by = c("origin" = "faa"))
After running View(flights_namedports)
, we see that name
now corresponds to the name of the airport as referenced by the origin
variable. We will now plot carrier
as the horizontal variable. When we specify geom_bar
, it will specify count
as being the vertical variable. A new addition here is fill = name
. Look over what was produced from the plot to get an idea of what this argument gives.
Note that fill
is an aes
thetic just like x
is an aes
thetic. We need to make the name
variable to this aes
thetic. Any time you use a variable like this, you need to make sure it is wrapped inside the aes
function. This is a common error! Make note of this now so you don’t fall into this problem later.
ggplot(data = flights_namedports, mapping = aes(x = carrier, fill = name)) +
geom_bar()
This plot is what is known as a stacked barplot. While simple to make, it often leads to many problems.
Learning check
(LC4.32) What kinds of questions are not easily answered by looking at the above figure?
(LC4.33) What can you say, if anything, about the relationship between airline and airport in NYC in 2013 in regards to the number of departing flights?
Another variation on the stacked barplot is the side-by-side barplot.
ggplot(data = flights_namedports, mapping = aes(x = carrier, fill = name)) +
geom_bar(position = "dodge")
Learning check
(LC4.34) Why might the side-by-side barplot be preferable to a stacked barplot in this case?
(LC4.35) What are the disadvantages of using a side-by-side barplot, in general?
Lastly, an often preferred type of barplot is the faceted barplot. We already saw this concept of faceting and small multiples in Section 4.6. This gives us a nicer way to compare the distributions across both carrier
and airport/name
.
ggplot(data = flights_namedports, mapping = aes(x = carrier, fill = name)) +
geom_bar() +
facet_grid(name ~ .)
Note how the facet_grid
function arguments are written here. We are wanting the names of the airports vertically and the carrier
listed horizontally. As you may have guessed, this argument and other formulas of this sort in R are in y ~ x
order. We will see more examples of this in Chapter ??.
Learning check
(LC4.36) Why is the faceted barplot preferred to the side-by-side and stacked barplots in this case?
(LC4.37) What information about the different carriers at different airports is more easily seen in the faceted barplot?
4.8.4 Summary
Barplots are the preferred way of displaying categorical variables. They are easy-to-understand and to make comparisons across groups of a categorical variable. When dealing with more than one categorical variable, faceted barplots are frequently preferred over side-by-side or stacked barplots. Stacked barplots are sometimes nice to look at, but it is quite difficult to compare across the levels since the sizes of the bars are all of different sizes. Side-by-side barplots can provide an improvement on this, but the issue about comparing across groups still must be dealt with.
4.9 Conclusion
4.9.1 Resources
An excellent resource as you begin to create plots using the ggplot2
package is a cheatsheet that RStudio has put together entitled “Data Visualization with ggplot2” available
- by clicking here or
- by clicking the RStudio Menu Bar -> Help -> Cheatsheets -> “Data Visualization with
ggplot2
”
This covers more than what we’ve discussed in this chapter but provides nice visual descriptions of what each function produces.
In addition, we’ve created a mind map to help you remember which types of plots are most appropriate in a given situation by identifying the types of variables involved in the problem. It is available here and below.
4.9.2 Script of R code
An R script file of all R code used in this chapter is available here.
Review questions
Review questions have been designed using the fivethirtyeight
R package (Ismay and Chunn 2017) with links to the corresponding FiveThirtyEight.com articles in our free DataCamp course Effective Data Storytelling using the tidyverse
. The material in this chapter is covered in the chapters of the DataCamp course available below:
4.9.3 What’s to come?
In Chapter 5, we’ll further explore data by grouping our data, creating summaries based on those groupings, filtering our data to match conditions, and other manipulations with our data including defining new columns/variables. These data manipulation procedures will go hand-in-hand with the data visualizations you’ve produced here.
References
Wilkinson, Leland. 2005. The Grammar of Graphics (Statistics and Computing). Secaucus, NJ, USA: Springer-Verlag New York, Inc.
Wickham, Hadley, and Winston Chang. 2016. Ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics. https://CRAN.R-project.org/package=ggplot2.
Robbins, Naomi. 2013. Creating More Effective Graphs. Chart House.
Ismay, Chester, and Jennifer Chunn. 2017. Fivethirtyeight: Data and Code Behind the Stories and Interactives at ’Fivethirtyeight’. https://CRAN.R-project.org/package=fivethirtyeight.


The <input type="email">
defines a field
for an e-mail address. The input value is automatically validated to ensure it is a properly
formatted e-mail address.
To define an e-mail field that allows multiple e-mail addresses, add the "multiple" attribute.
Tip: Always add the  tag for best accessibility practices!
Example:
Define a field for an e-mail address (validates automatically when submitted):
<form action="/action_page.php">
Enter your email:
<input type="email" id="email" name="email">
<input type="submit">
</form>
<form action="/action_page.php">
Enter email addresses:
<input type="email" id="emails" name="emails" multiple>
<input type="submit">
</form>


JavaScript is disabled on your browser.
Skip navigation links
Package
Class
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A
B
C
D
E
F
G
H
I
L
M
N
O
P
Q
R
S
T
U
V
W
E
Editphoto(View)
- Method in class com.cmput301f18t25.healthx.
ActivityEditProblem
EditProblem(int, Problem)
- Method in class com.cmput301f18t25.healthx.
ProblemList
EditProfileTest
- Class in
com.cmput301f18t25.healthx
EditProfileTest()
- Constructor for class com.cmput301f18t25.healthx.
EditProfileTest
EditUserProfile
- Class in
com.cmput301f18t25.healthx
EditUserProfile()
- Constructor for class com.cmput301f18t25.healthx.
EditUserProfile
ElasticSearchProblemController
- Class in
com.cmput301f18t25.healthx
ElasticSearchProblemController()
- Constructor for class com.cmput301f18t25.healthx.
ElasticSearchProblemController
ElasticSearchProblemController.AddProblemTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchProblemController.DeleteProblemTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchProblemController.GetProblemsTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchProblemController.SearchProblemsFromRecordsTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchProblemController.SearchProblemsTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchProblemController.UpdateProblemTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchRecordController
- Class in
com.cmput301f18t25.healthx
ElasticSearchRecordController()
- Constructor for class com.cmput301f18t25.healthx.
ElasticSearchRecordController
ElasticSearchRecordController.AddRecordTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchRecordController.DeleteRecordTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchRecordController.GetRecordsTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchRecordController.SearchRecordsTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchRecordController.UpdateRecordTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchUserController
- Class in
com.cmput301f18t25.healthx
ElasticSearchUserController()
- Constructor for class com.cmput301f18t25.healthx.
ElasticSearchUserController
ElasticSearchUserController.AddPatientRequestCodeTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchUserController.AddPatientTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchUserController.AddRequestCodeTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchUserController.AddUserTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchUserController.CheckPatientTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchUserController.CheckPatientTaskRequestCode
- Class in
com.cmput301f18t25.healthx
ElasticSearchUserController.DeletePatientTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchUserController.DeleteRequestCodeTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchUserController.DeleteUserTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchUserController.GetPatientsTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchUserController.GetRequestCodeTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchUserController.GetUserTask
- Class in
com.cmput301f18t25.healthx
ElasticSearchUserController.UpdateUserTask
- Class in
com.cmput301f18t25.healthx
email
- Variable in class com.cmput301f18t25.healthx.
User
A
B
C
D
E
F
G
H
I
L
M
N
O
P
Q
R
S
T
U
V
W
Skip navigation links
Package
Class
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes


Choose Photo Album:
Summer Party -- Fun at the lake house (Created August 12, 2009)
Kate's Birthday -- Cake and presents (Created May 13, 2009)
Dance Recital -- First one of the year (Created February 6, 2009)


Attempts to use Sci-Kit learn to run both logistics and linear regression proved unfruitful (see Jupyter Notebooks under Resources > Github Code. For the binary logistics regression, using occurence of injury as the outcome, resulted in a gross over-fitting of the model due to the rare occurence of injury in comparision to the volume of daily data. A model, such as a Firth Regression, is need in this case to penalize the maximum liklihood ratio, however, is not available in Sci-Kit learn. R does have package (logistf), but did not have time in the scope of the project.
Under the injury group comparison tab, there are interesting notes about the differences in Catapult data between injury and non-injured players.


XFBURN(1) User Commands XFBURN(1) NAME xfburn - Simple CD/DVD burning tool DESCRIPTION Usage: xfburn [OPTION...] Help Options: -?, --help Show help options --help-all Show all help options --help-gtk Show GTK+ Options Application Options: -i, --burn-image Open the burn image dialog. The filename of the image can option‐ ally be specified as a parameter -b, --blank Open the blank disc dialog. -d, --data-composition Start a data composition. Optionally followed by files/directories to be added to the composition. -V, --version Display program version and exit -m, --main Show main program even when other action is specified on the com‐ mand line. --display=DISPLAY X display to use built with GTK+-2.12.11, linked with GTK+-2.12.11. xfburn This is xfburn versioJuly32008or Xfce 4.4.2 XFBURN(1)


The assignment for this rotation was to create circut boards using soldering. We were given kits and had to follow instructions and get the kit to work using soldering. I'm not really sure how to accurately explain what soldering is, but basically you melt a wire with a really hot pen-like thing, which was really fun. You had to solder the wires to the board, and you had to place each piece from the kit very precisely. I was able to get two kits to work, which was really cool. To connect with the whole idea of getting a circut board to work, we also made some simple electronic circuts. I was able to successfully create a few of those. There were so many options of wwhat you could make using a sinple bread board and little pieces and wires. It was tough to get the hang of at first, but as soon as I got it, it was something that I really enjoyed.
Type in text here
Type Something About The Pictures (Images 1 and 2) | Type Something About The Pictures (Images 3 and 4)
More text here.
Type it here


MENU
Advertisement 1
asdkhsdjfkhsadkjfvhdsfhsdahbfdsajl
Advertisement 2
asdkhsdjfkhsadkjfvhdsfhsdahbfdsajl
Advertisement 3
asdkhsdjfkhsadkjfvhdsfhsdahbfdsajl
Advertisement 4
asdkhsdjfkhsadkjfvhdsfhsdahbfdsajl
Advertisement 1
asdkhsdjfkhsadkjfvhdsfhsdahbfdsajl
Advertisement 2
asdkhsdjfkhsadkjfvhdsfhsdahbfdsajl
Advertisement 3
asdkhsdjfkhsadkjfvhdsfhsdahbfdsajl
Advertisement 4
asdkhsdjfkhsadkjfvhdsfhsdahbfdsajl


A simple example of a series connection of a resistor, an inductor and a capacitor as depicted in Fig. 1 should be explained in the following. For various frequencies, the voltage drops across the resistor, the inductor and the capacitor should be determined.
The voltage drop across the resistor
and the inductor
and the capacitor
add up to the total voltage
as illustrated in the phasor diagram of Fig. 2.
Due to the series connection of the resistor, inductor and capacitor, the three currents are all equal:


The HTTPTest Tool sends different tests requests to multiple environments. For example, you are hosting a website with a blog and a private section. For testing purposes you deployed a version available under test.example.com and the real site under example.com. You need to test the correct behaviour of the different instances and their configuration.
The following URLs needs to be tested:
GET http://test.example.com/blog HTTP/1.1
GET http://test.example.com/private HTTP/1.1
GET https://test.example.com/private HTTP/1.1
GET https://test.example.com/blog HTTP/1.1
GET http://example.com/blog HTTP/1.1
GET http://example.com/private HTTP/1.1
GET https://example.com/private HTTP/1.1
GET https://example.com/blog HTTP/1.1
The following configuration would describe the test run.
environments:
- name: test
base_url: http://test.example.com
- name: public
base_url: http://example.com
- name: test-ssl
base_url: https://test.example.com
- name: public-ssl
base_url: https://example.com
tests:
- name: test_blog
uri: /blog
asserts:
assert_status_code_is: 200
assert_body_contains: "My Blog"
- name: test_private
uri: /private
asserts:
assert_status_code_is: 301
assert_body_contains: "Login"
The configuration can be written in YAML or JSON format.
The environment's name
.
base_url
gets prepended to the uri
in the test definition.
Environment specific values in URI's can be set per environment as variables:
For environment A
:
variables:
KEY: 1234
For environment B
:
variables:
KEY: 5678
uri
in test:
uri: /api/key/{% verbatim %}{{KEY}}{% endverbatim %}
The array tests contains the definition of test cases.
The name
must start with test_
.
The path to send the request to.
Default: GET
If POST
, you can define the data (JSON format) in the key data
. If the data is recognized as URL (starting with http
), the data is loaded from this URL. The data is sent with Content-Type application/xml
if the string starts with <
.
With the key skip
the entire request or all requests to an environment will be skipped. A value is optional and can contain any reason.
ssl_verify
disables SSL certificate check.
Value in seconds. Default is 10 seconds. timeout
must be less than 20s.
Custom headers as key/value to send with the request.
headers:
MY-1HEADER: value1
MY-2HEADER: value2
Expects the response status code
assert_status_code_is: 200
Expects the response status code is not
assert_status_code_is_not: 500
Expects a response header is set
assert_header_is_set: My-Header
Expects a response header is not set
assert_header_is_not_set: My-Header
Expects a response header contains a string in the value
assert_header_value_contains:
My-Header: Hello
Expects the body contains a string
assert_body_contains: Hello World
Expects the response is parseable as JSON. The word ˋnullˋ is also treat at valid JSON.
assert_is_json
Expects the response is not parseable as JSON.
assert_is_not_json


This package is dedicated to the manipulation of XML data by means of the SimpleXmlWrapper. It contains the SimpleXmlWrapper implementation and related classes and containers.


Hopestone Construction Services
We are a registered construction company providing services (e.g. Planning and Design, Building Construction, Renovation, Electrical, Electronics, Plumbing, Mechanical and other services)
{% extends 'layout.html'%} {% block body%}
We are a registered construction company providing services (e.g. Planning and Design, Building Construction, Renovation, Electrical, Electronics, Plumbing, Mechanical and other services)


A small Event Emitter written in typescript with performance and ease of use in mind, it weighs ~838 B (minified and gzipped).
You will need a Map and Promise polyfill for older browsers. If you install @okikio/emitter via npm you are most likely going to need rollup or esbuild. You can use polyfill.io, or another source to create a polyfill. The minimum feature requirement for a polyfill are Maps and Promises e.g. https://polyfill.io/v3/polyfill.min.js?features=Promise,Map.
You can try out @okikio/emitter using Gitpod:
By default Gitpod will start the dev script for you, but if you need to restart the dev script you can do so by typing into the terminal.
pnpm test-dev --filter "@okikio/emitter"
Once Gitpod has booted up, go to ./tests/test.ts and start tweaking and testing to your hearts content.
import { EventEmitter } from"@okikio/emitter";import { EventEmitter } from"https://unpkg.com/@okikio/emitter/lib/api.es.js";import { EventEmitter } from"https://cdn.jsdelivr.net/npm/@okikio/emitter/lib/api.es.js";// Orimport { EventEmitter } from"https://cdn.skypack.dev/@okikio/emitter";// Via script<EMAIL_ADDRESS>Do note, on the web you need to do this, if you installed it via the script tag:const { EventEmitter } = window.emitter;
The EventEmitter class is what runs the show for the @okikio/emitter library. To use it properly you need to create a new instance of EventEmitter, the instance of EventEmitter is what allows for event emitting, and listening.
EventEmitter allows for an easy way to manage events. It inherits properties/methods from @okikio/manager.
// You need to first initialize a new Event Emitterconstemitter = newEventEmitter();// Then listen for an eventemitter.on("new-event", () => {console.log("A new event occured");});// Then emit or fire the eventsetTimeout(() => {// Eg. after 3 seconds fire the `new-event` listeneremitter.emit("new-event"); //= A new event occured}, 3000);
/** * Adds a listener for a given event * * @param{EventInput}events * @param{ListenerCallback | object}callback * @param{object}scope * @returns EventEmitter * @memberofEventEmitter */EventEmitter.prototype.on(events: EventInput, callback?: ListenerCallback | object, scope?: object);/** * Call all listeners within an event * * @param{(string | Array<any>)}events * @param{...any}args * @returns EventEmitter * @memberofEventEmitter */EventEmitter.prototype.emit(events: string | Array<any>, ...args: any);// Example:importEventEmitterfrom"@okikio/emitter";constemitter = newEventEmitter();lettest = false;letobj = { bool:false };letcounter = 0;leton = emitter.on("test",function (key, value) {test = [key, value];// `this` comes from `obj`, since it was set as the scope of this listenerconsole.log(this.bool); //= false },obj// Binds the callback to the `obj` scope)// You can chain methods.on(// You can listen for multiple events at the same time"test test1 test2", // You can also use arrays ["test", "test1", "test2"]function (key, value) {test = [value, key];counter++;console.log(this.bool); //= undefined }// You can also bind all event listener callbacks to the same scope, in this example I didn't);on.emit("test", 1, "true");console.log(test); //= [1, "true"]on.emit("test test1 test2", // You can also use arrays ["test", "test1", "test2"]1, "true");console.log(test); //= ["true", 1]console.log(counter); //= 3counter = 0;letfn = function (i = 1) {returnfunction (key, value) {test = [key, value];counter += i;console.log(this.bool); //= false };};// You can also use an object to listen for eventsemitter.on( {play1:fn(),play2:fn(2),play3:fn(4) },obj// Bind all callbacks to the `obj` scope);// You can emit multiple events back to backon.emit("play1 play2 play3 play1", "true", 1) .emit(["play1", "play2", "play3"], 1, "true");console.log(test); //= [1, "true"]console.log(counter); //= 15
EventEmitter.prototype.off(events: EventInput, callback?: ListenerCallback | object, scope?: object);/** * Removes a listener from a given event, or completely removes an event * * @param{EventInput}events * @param{ListenerCallback | object}[callback] * @param{object}[scope] * @returns EventEmitter * @memberofEventEmitter */// Example:importEventEmitterfrom"@okikio/emitter";constemitter = newEventEmitter();/* `EventEmitter.prototype.off(...)` literally does the opposite of what `EventEmitter.prototype.on(...)` does, `EventEmitter.prototype.off(...)` removes Events and Event Listeners*/letcounter = 0, fn, scope = { bool:false };leton = emitter.on(// You can listen for multiple events at the same time"test test1 test2", // You can also use arrays ["test", "test1", "test2"]fn = function () {counter++; },scope);// To remove an entire Event, or multiple Eventsemitter.off("test1 test2");// To remove a specific listener you need the scope (if you didn't put anything as the scope when listening for an Event then you don't need a scope) and callbackemitter.off("test", fn, scope);on.emit("test test1 test2"); // Nothing happens, there are no Events or listeners, so, it can't emit anythingconsole.log(counter); //= 0
/** * Adds a one time event listener for an event * * @param{EventInput}events * @param{ListenerCallback | object}callback * @param{object}scope * @returns EventEmitter * @memberofEventEmitter */EventEmitter.prototype.once(events: EventInput, callback?: ListenerCallback | object, scope?: object);// Example:importEventEmitterfrom"@okikio/emitter";constemitter = newEventEmitter();/** * `EventEmitter#once(...)` supports everything `EventEmitter#on(...)` supports * except the event listeners can only be fired once * */lettest: boolean | any = false;letobj = { bool:false };letcounter = 0;leton: EventEmitter = emitter.once("test test1 test2",function (key, value) {test = [key, value];counter++;// `this` comes from `obj`, since it was set as the scope of this listenerconsole.log(this.bool); //= false },obj);on.emit("test test1 test2", 1, "true");console.log(test); //= [1, "true"]console.log(counter); //= 3// Since event listeners registered using the `once` method can only be emitted once\// The second `emit` actually does nothingon.emit("test test1 test2", 1, "true");console.log(test); //= [1, "true"]console.log(counter); //= 3// The "test" event has no listeners registered since, they have already been removedconsole.log(on.get("test").size) //= 0
@okikio/emitter
A small Event Emitter written in typescript with performance and ease of use in mind, it weighs ~838 B (minified and gzipped).
You will need a Map and Promise polyfill for older browsers. If you install
@okikio/emitter
via npm you are most likely going to need rollup or esbuild. You can use polyfill.io, or another source to create a polyfill. The minimum feature requirement for a polyfill are Maps and Promises e.g. https://polyfill.io/v3/polyfill.min.js?features=Promise,Map.You can try out
@okikio/emitter
using Gitpod:By default Gitpod will start the dev script for you, but if you need to restart the dev script you can do so by typing into the terminal.
Once Gitpod has booted up, go to ./tests/test.ts and start tweaking and testing to your hearts content.
Table of Contents
Installation
You can install @okikio/emitter from npm via
npm i @okikio/emitter
,pnpm i @okikio/emitter
oryarn add @okikio/emitter
.You can use
@okikio/emitter
on the web via:Once installed it can be used like this:
Getting started
The
EventEmitter
class is what runs the show for the@okikio/emitter
library. To use it properly you need to create a new instance ofEventEmitter
, the instance ofEventEmitter
is what allows for event emitting, and listening.EventEmitter
allows for an easy way to manage events. It inherits properties/methods from @okikio/manager.API Documentation
You can also go through the API documentation, for a more detailed documentation of the API.
API
EventEmitter#on(events, callback, scope) & EventEmitter#emit(events, ...args)
EventEmitter#off(events, callback, scope)
EventEmitter#once(events, callback, scope)
Contributing
If there is something I missed, a mistake, or a feature you would like added please create an issue or a pull request and I'll try to get to it.
Note: all contributions must be done on the
beta
branch, using the Conventional Commits style.The
native
initiative uses Conventional Commits as the style of commit, we also use the Commitizen CLI to make commits easier.Licence
See the LICENSE file for license rights and limitations (MIT).


The Great Muffin Experiment, No. 7 (Jump to the Recipe)
When I started this project, I wanted to go "all in" on what some people think of as the most annoying part of online recipes: the verbiage before you get to the recipe. That's because, despite there being a recipe at the bottom of each of these posts, the point isn't about the recipe; it's about the lessons I'm learning each time I piece one together. None of these recipes are polished at all. It's an experiment! And this week is no exception — I'm not at all thrilled with how this batch of muffins turned out.
I wanted to try to make a muffin that was "almond forward," as someone snooty might say. I used almond flour and almond butter and almond extract. And amaranth flour too, for more nuttiness. They were very, very dense. The flavor was great, don't get me wrong. Ground almonds and eggs are two-thirds of the way to marzipan — one of my most favorite foods. And I suppose I could say that the consistency of these were marzipan-y. Except I help back on the sweetener, so they're missing that final element. They didn't rise very well — like I said, dense. And as the batter was so thick, they didn't have a very nice shape to them either — cooking in almost precisely the same blob as the raw batter filled the muffin tin.
I have to find time to return to some of these recipes that don't quite work out perfectly. And I want to write about troubleshooting recipes. There are some blog posts online that purport to help, but they address problems bakers might have made, not problems in the recipe itself. So notes for next time on these almond muffins: more baking powder? Some baking soda? Some oil (not just almond butter)? Some regular flour (not just almond)? A different sweetener? (I used monk fruit, and I have another whole blog post to write on sugar substitutes in muffins).
Honestly, this week has just been a little crazy, what with the Thanksgiving holiday and a houseguest — my mom, who helped me make brandy snaps for the first time. That's another post I have to write, along with some reflections on holiday baking in general.
Almond Flour, Almond Butter, Amaranth Muffins
This is based on the recipe for almond flour muffins on Olive and Mango.
Prep time: 10 minutes · Cooking time: 20 minutes · Servings: 12 · Calories: 153
Ingredients:
- 1 3/4 cup almond flour
- 1/2 cup amaranth flour
- 2 tsp baking powder
- 1/4 tsp salt
- 1/4 cup almond butter
- 1/4 cup kefir
- 1 tsp almond extract
- 2 eggs
- 1 tbs monk sugar, dissolved in 1/3 cup water
Instructions:
- Preheat oven to 350 and line muffin tins with paper liners.
- In a medium bowl, whisk together the dry ingredients (flours, baking powder, salt).
- In a large bowl, combine the wet ingredients. Whisk until blended.
- Pour the dry mixture into the dry mixture and stir just until combined.
- Fill muffin papers about three-quarters full.
- Bake for 15-18 minutes.
- Allow to cool for a couple of minutes, then remove from muffin tins and transfer to a wire rack to cool completely.


threejs
webgl - depth texture
Stores render target depth in a texture attachment.
Created by
@mattdesl
.
Your browser does not support
WEBGL_depth_texture
.
This demo will not work.


Pro-Beijing politician Junius Ho stabbed in chest in Hong Kong
Firebrand politician has become one of the most loathed establishment figures among democracy protesters.
A firebrand pro-Beijing politician in Hong Kong was wounded in a knife attack on Wednesday, the latest tit-for-tat political violence to break out in a city engulfed by months of pro-democracy protests.
Video posted online showed the moment the attack took place.
More:
A man holding a bouquet of flowers approached Junius Ho on Wednesday morning as the politician was campaigning with party members in his constituency of Tuen Mun, a town on the outskirts of Hong Kong near the border with China.
The man gave Ho the flowers, asked to take a picture and then pulled a knife from his bag before striking his victim in the chest.
Ho and his aides quickly subdued the man who could be heard shouting in Cantonese: "Junius Ho, you scum!"
Police said three people were wounded in the incident, including the attacker.
A police source, who declined to be named, told AFP that Ho received a stab wound to the left side of his chest and the attacker was arrested.
Ho, 57, was conscious when he got into the ambulance.
Controversial figure
Alongside Hong Kong's leader Carrie Lam and police chief Stephen Lo, Ho has become one of the most loathed establishment figures among democracy protesters.
He has long been one of the most stridently pro-Beijing politicians in the city.
But he shot to notoriety on 21 July after he was filmed shaking hands with a group of men in the town of Yuen Long who went on to beat protesters with sticks and poles, hospitalising 40 people.
He has delivered multiple speeches supporting Hong Kong's police force and echoing Beijing's condemnations of protesters, often using incendiary language.
Last month he accused a prominent opposition legislator of "eating foreign sausage" because she was married to a British journalist.
After the Yuen Long attack, Ho's office was ransacked by protesters and the graves of his parents were also vandalised.
Hong Kong has been upended by nearly five months of huge and increasingly violent protests calling for greater democratic freedoms and police accountability.
Beijing and the city's leadership have taken a hard line against the protests, refusing concessions.
With no political solution in sight, street fights have broken out on both sides of the ideological divide with growing frequency.
Pro-China supporters have attacked opponents throughout the summer, often in targeted assaults against prominent government critics and opposition politicians.
Eight pro-democracy figures have been attacked, including protest organiser Jimmy Sham who was hospitalised last month by men wielding hammers.
On Sunday, a man with a knife attacked democracy protesters including a local politician who had his ear bitten off.
But the violence is far from one-sided.
Crowds of pro-democracy protesters have also routinely beaten their ideological opponents, usually in spontaneous mob violence during rallies.
On Saturday, a man was beaten unconscious and stripped naked in the district of Mongkok.
Beijing has shown no willingness to meet the demonstrators' demands and activists show no sign of leaving the streets with 22 consecutive weekends of unrest.


- searchMap(View) - Method in class com.c301t3.c301t3app.addingTaskLocal
-
- SelectedTaskActivity - Class in com.c301t3.c301t3app
-
This class is to handle the event a user wants more details and to bid on the tasks.
- SelectedTaskActivity() - Constructor for class com.c301t3.c301t3app.SelectedTaskActivity
-
- serverGetAllTasks() - Static method in class com.c301t3.c301t3app.ElasticsearchController
-
- serverTaskQuery(String...) - Static method in class com.c301t3.c301t3app.ElasticsearchController
-
- serverTasksByAssignee(String...) - Static method in class com.c301t3.c301t3app.ElasticsearchController
-
- serverTasksByOwner(String...) - Static method in class com.c301t3.c301t3app.ElasticsearchController
-
- serverUserQuery(String) - Static method in class com.c301t3.c301t3app.ElasticsearchController
-
Send username query into here to return the user if it exists in server
- serverUserQueryByID(String) - Static method in class com.c301t3.c301t3app.ElasticsearchController
-
Send the id into here to return the user if it exists on the server
- setAddress(String) - Method in class com.c301t3.c301t3app.UserAccount
-
Set the address of the user
- setAssignee(String) - Method in class com.c301t3.c301t3app.Task
-
Setter for Assignee Name
- setBids(ArrayList<Bid>) - Method in class com.c301t3.c301t3app.Task
-
Method that overwrites the bids of the Task.
- setDescription(String) - Method in class com.c301t3.c301t3app.Task
-
Method that sets/edits description of Tasks.
- setEmailAdd(String) - Method in class com.c301t3.c301t3app.UserAccount
-
Set the email of the user
- setFirstName(String) - Method in class com.c301t3.c301t3app.UserAccount
-
Set the firstName of the user
- setId(String) - Method in class com.c301t3.c301t3app.Task
-
Setter for id
- setID(String) - Method in class com.c301t3.c301t3app.UserAccount
-
Set the uniqueID of the user
- setLastName(String) - Method in class com.c301t3.c301t3app.UserAccount
-
set the lastName of the user
- setLatitude(double) - Method in class com.c301t3.c301t3app.Task
-
Method that sets/edits latitude of Tasks.
- setLongitude(double) - Method in class com.c301t3.c301t3app.Task
-
Method that sets/edits longitude of Tasks.
- setName(String) - Method in class com.c301t3.c301t3app.Task
-
Method that sets/edits name of Tasks.
- setOnItemClickListener(TasksRequestedAdapter.OnItemClickListener) - Method in class com.c301t3.c301t3app.TasksRequestedAdapter
-
- setOnLongClickListener(View.OnLongClickListener) - Method in class com.c301t3.c301t3app.TasksRequestedAdapter
-
- setOwner(String) - Method in class com.c301t3.c301t3app.Task
-
Setter for owner ID
- setOwnerName(String) - Method in class com.c301t3.c301t3app.Task
-
Setter for Owner Name
- setPassword(String) - Method in class com.c301t3.c301t3app.UserAccount
-
Set the password of the user
- setPhoneNum(String) - Method in class com.c301t3.c301t3app.UserAccount
-
Set the phonenumber of the user
- setPicture(Bitmap) - Method in class com.c301t3.c301t3app.Task
-
Method that sets/edits picture of Tasks.
- setPosition(int) - Method in class com.c301t3.c301t3app.TasksRequestedAdapter
-
- setPrice(float) - Method in class com.c301t3.c301t3app.Task
-
Method that sets/edits the price of Tasks.
- setStatus(TaskStatus) - Method in class com.c301t3.c301t3app.Task
-
Method that sets/edits description of Tasks.
- setTask(int, Task) - Method in class com.c301t3.c301t3app.TaskList
-
Set the task at index i
- setTasks(ArrayList<Task>) - Method in class com.c301t3.c301t3app.TaskPasser
-
Set tasks to the ArrayList passed, t
- setUp() - Method in class com.c301t3.c301t3app.UserProfileTests
-
- setUser(UserAccount) - Static method in class com.c301t3.c301t3app.ApplicationController
-
Sets the current user account on log in (for SimpleLoginActivity)
- setUsername(String) - Method in class com.c301t3.c301t3app.UserAccount
-
Set the username of the user
- SimpleLoginActivity - Class in com.c301t3.c301t3app
-
Created by kiefer on 2018-03-08.
- SimpleLoginActivity() - Constructor for class com.c301t3.c301t3app.SimpleLoginActivity
-
- SimpleLoginActivityTests - Class in com.c301t3.c301t3app
-
- SimpleLoginActivityTests() - Constructor for class com.c301t3.c301t3app.SimpleLoginActivityTests
-
- SplashActivity - Class in com.c301t3.c301t3app
-
Splash Activity, the load screen for when the app is loading
- SplashActivity() - Constructor for class com.c301t3.c301t3app.SplashActivity
-
- SplashActivityTest - Class in com.c301t3.c301t3app
-
- SplashActivityTest() - Constructor for class com.c301t3.c301t3app.SplashActivityTest
-


Bike Map
City Where Bike was Stolen
Search Radius in Miles
Brand of Bike
Click Here
Click to See Map of Stolen Bikes


Have you checked {{ thing }}?
That wasn't it, suggest something else.
Share this troubleshooting suggestion.


Obviously, when someone’s wrong on the internet, you’ve gotta do something about it. In this case, an individual on StackOverflow mentionned that using maps for membership testing was slower than simply iterating over an array, for $n$ small enough.
Their argument was that the cost of hashing the value was higher than doing a lookup in an array, for most practical sizes. In their words, practical size meant until over a million values.
Now you might be wondering why I’m not directly linking to the comment in question. The reason is that I can’t find it anymore. I only remember the comment troubled me enough to make me shout “Someone’s wrong on the internet!”
But I had doubts; their argument could have made sense. I mean, maybe the cost of hashing is greater than iterating and comparing for $n$ smaller than $something$.
All in all, finding the comment (and telling the wrongdoer they’re wrong!) doesn’t matter. What matters is The Truth. In this post, we explore the truth using the Go Programming Language, the greatest language of all (no hyperbole here).
TL;DR
Obviously this individual was wrong. Verified for $n>1$, membership testing on a map is always faster than on an slice. This means, in all cases you should not use a slice instead of a map.
<insert fancy graph here>
update: the tests that follow assume sets of string
types. The same tests with int
types reveal that slices are slightly faster until $n \approx 30$.
Problem
Membership testing consists of asking a datastructure whether it contains a value or not. Of the many ways to implement this, two are discussed here:
Map
Use a map[value]bool
, then check if a value is in the map:
func isMapMember(m map[string]bool, key string) bool {
_, ok := m[key]
return ok
}
Slice
Use a []value
, then iterate over all the values to check if one of them is in
the slice:
func isSliceMember(s []string, key string) bool {
for _, entry := range s {
if key == entry {
return true
}
}
return false
}
Question
Which one of them is fastest?
Hypothesis
My hypothesis is that using a slice will be faster. I like trying to prove I’m wrong.
Prediction
If my hypothesis is indeed right, there will be a $n$ for which using a slice will be faster than using a map. This will mean the individual was right. For many use cases, membership testing will be done on sets that contain a few values.
Testing
I can think of 3 4 dimensions that might affect the results.
- $n$, the size of the set being tested. The claim here is that for $n$ small enough, a slice will be faster.
- $valSize$, the size of the individual values stored in the set. As $valSize$ increase, it is possible that the structures will perform differently than with smaller $valSize$.
- Whether or not the entry is in the set. It could be that map are faster at determining non-membership. Or slices. Who knows!
- update: the type of the values held in the set.
Methodology
Taking into consideration the above dimensions, we will benchmark the two methods of testing for membership.
- For a set of $n$ unique entries, take a random entry that is in the set. Measure how much time it takes to assert that this entry is a member of the set.
- For a set of $n$ unique entries, take a random entry that is not in the set. Measure how much time it takes to assert that this entry is not a member of the set.
The first step is to create a set of $n$ unique entries, each randomly generated strings of length $valSize$. The actual benchmarking code separates those in two funcs, so to run one type of benchmark at a time.
func makeRandomSet(n, valSize int) (map[string]bool, []string) {
mapset := make(map[string]bool, n)
sliceset := make([]string, 0, n)
for len(mapset) != n {
str := makeRandomString(valSize)
if _, ok := mapset[str]; !ok {
mapset[str] = true
sliceset = append(sliceset, str)
}
}
return mapset, sliceset
}
Then, we have two paths: asserting membership, asserting non-membership.
Membership
Take a sample from the set:
func sampleInSlice(sliceset []string) {
randIdx := rand.Intn(len(sliceset))
return sliceset[randIdx]
}
Sampling in the map
is done the same way, but you first need to extract the map keys into a slice. For benchmarking purposes, this function actually returns a slice of unique samples, and then measure how much time it takes to assert the membership of each.
We will use this helper to benchmark maps:
func benchMapMembers(b *testing.B, size int, keySize int) {
m := makeRandomMap(size, keySize)
samples := sampleFromMap(m, b.N)
var member string
var ok bool
b.ResetTimer()
for i := 0; i < b.N; i++ {
member = samples[i]
ok = isMapMember(m, member)
}
_ = ok
}
And this one to benchmark slices:
func benchSliceMembers(b *testing.B, size int, keySize int) {
s := makeRandomSlice(size, keySize)
samples := sampleFromSlice(s, b.N)
var member string
var ok bool
b.ResetTimer()
for i := 0; i < b.N; i++ {
member = samples[i]
ok = isSliceMember(s, member)
}
_ = ok
}
Non-membership
Find entries that aren’t in the set:
func sampleNotInMap(mapset map[string]bool, valSize int) (sample string) {
for {
str := makeRandomString(valSize)
if !mapset[str] {
return str
}
}
}
Sampling in the slice
is done the same way. Then we also create benchmark helpers that are quite similar to the membership helpers.
For maps:
func benchMapNotMembers(b *testing.B, size int, keySize int) {
m := makeRandomMap(size, keySize)
samples := sampleNotInMap(m, b.N, keySize)
var member string
var ok bool
b.ResetTimer()
for i := 0; i < b.N; i++ {
member = samples[i]
ok = isMapMember(m, member)
}
_ = ok
}
For slices:
func benchSliceMembers(b *testing.B, size int, keySize int) {
s := makeRandomSlice(size, keySize)
samples := sampleFromSlice(s, b.N)
var member string
var ok bool
b.ResetTimer()
for i := 0; i < b.N; i++ {
member = samples[i]
ok = isSliceMember(s, member)
}
_ = ok
}
Faceoff!
We run the membership helpers using a series of benchmarks, with $n$ in $(2,3,4,5,6,7,8,9,10, 100, 1000, 10000, 100000, 1000000)$ and $valSize$ in $(10, 100)$.
func BenchmarkMap_2key_10bytes(b *testing.B) { benchMapMembers(b, 2, 10) }
func BenchmarkMap_3key_10bytes(b *testing.B) { benchMapMembers(b, 3, 10) }
...
func BenchmarkMap_1000000key_100bytes(b *testing.B) { benchMapMembers(b, 1000000, 100) }
func BenchmarkSlice_2key_10bytes(b *testing.B) { benchSliceMembers(b, 2, 10) }
func BenchmarkSlice_3key_10bytes(b *testing.B) { benchSliceMembers(b, 3, 10) }
...
func BenchmarkSlice_1000000key_100bytes(b *testing.B) { benchSliceMembers(b, 1000000, 100) }
Testing for non-membership is much more expensive than testing for membership, since we need to create random strings that aren’t in the original set. This is very time consuming to setup, so I’ve limited this part of the test to a few values, and assume that the behavior of non-membership will be consistent with the membership ones. This is an acceptable assumption given that the experiment I did measure suggest that they are indeed.
 The above combinations run is just short of 600s (584s).
func BenchmarkMapNot_10key_10bytes(b *testing.B) { benchMapNotMembers(b, 10, 10) }
func BenchmarkMapNot_1000key_10bytes(b *testing.B) { benchMapNotMembers(b, 1000, 10) }
func BenchmarkMapNot_1000000key_10bytes(b *testing.B) { benchMapNotMembers(b, 1000000, 10) }
func BenchmarkSliceNot_10key_10bytes(b *testing.B) { benchSliceNotMembers(b, 10, 10) }
func BenchmarkSliceNot_10000key_10bytes(b *testing.B) { benchSliceNotMembers(b, 10000, 10) }
func BenchmarkSliceNot_1000000key_10bytes(b *testing.B) { benchSliceNotMembers(b, 1000000, 10) }
Results
The code to run the benchmarks yourself is on github. The results of running this benchmark on my Mac follow.
Membership
| $n$ | $valSize$ | Measurements (slice) | Measurements (map) | ns/op (slice) | ns/op (map) |
|---|---|---|---|---|---|
| 2 | 10 | 100000000 | 100000000 | 17.0 | 14.4 |
| 3 | 10 | 100000000 | 100000000 | 23.6 | 18.8 |
| 4 | 10 | 100000000 | 100000000 | 28.6 | 22.5 |
| 5 | 10 | 50000000 | 100000000 | 33.5 | 26.3 |
| 6 | 10 | 50000000 | 100000000 | 40.8 | 30.1 |
| 7 | 10 | 50000000 | 50000000 | 45.4 | 33.5 |
| 8 | 10 | 50000000 | 50000000 | 52.4 | 36.0 |
| 9 | 10 | 50000000 | 50000000 | 54.2 | 36.6 |
| 10 | 10 | 50000000 | 50000000 | 60.4 | 38.1 |
| 100 | 10 | 5000000 | 50000000 | 492 | 39.3 |
| 1000 | 10 | 500000 | 50000000 | 4829 | 39.3 |
| 10000 | 10 | 50000 | 50000000 | 48172 | 48.4 |
| 100000 | 10 | 5000 | 50000000 | 480773 | 77.0 |
| 1000000 | 10 | 500 | 20000000 | 4853658 | 149 |
| 2 | 100 | 100000000 | 100000000 | 16.9 | 12.4 |
| 3 | 100 | 100000000 | 100000000 | 23.9 | 15.9 |
| 4 | 100 | 100000000 | 100000000 | 29.4 | 18.0 |
| 5 | 100 | 50000000 | 100000000 | 36.2 | 20.8 |
| 6 | 100 | 50000000 | 100000000 | 42.0 | 22.6 |
| 7 | 100 | 50000000 | 100000000 | 45.4 | 24.6 |
| 8 | 100 | 50000000 | 100000000 | 50.9 | 26.8 |
| 9 | 100 | 50000000 | 50000000 | 56.5 | 67.7 |
| 10 | 100 | 50000000 | 50000000 | 61.3 | 68.0 |
| 100 | 100 | 5000000 | 50000000 | 518 | 68.8 |
| 1000 | 100 | 500000 | 50000000 | 4940 | 70.2 |
| 10000 | 100 | 50000 | 20000000 | 49396 | 81.0 |
| 100000 | 100 | 5000 | 10000000 | 608481 | 172 |
| 1000000 | 100 | 200 | 10000000 | 6361138 | 199 |
Non-membership
| $n$ | $valSize$ | Measurements (slice) | Measurements (map) | ns/op (slice) | ns/op (map) |
|---|---|---|---|---|---|
| 10 | 10 | 20000000 | 50000000 | 97.7 | 36.5 |
| 10000 | 10 | 20000 | 50000000 | 85053 | 36.9 |
| 1000000 | 10 | 200 | 20000000 | 9101328 | 123 |
The results are clear, my hypothesis was wrong. For $n > 1$, membership testing is always faster using a map.
So clearly, someone was wrong on the Internet!!!!
Update
The above was written considering string
as the type held by the set. It turns out that for sets of int
, slices are slightly faster than maps until $n \approx 30$.
Integer membership
| $n$ | Measurements (slice) | Measurements (map) | ns/op (slice) | ns/op (map) |
|---|---|---|---|---|
| 2 | 200000000 | 100000000 | 9.02 | 11.3 |
| 3 | 100000000 | 100000000 | 11.1 | 14.0 |
| 4 | 100000000 | 100000000 | 12.3 | 16.0 |
| 5 | 100000000 | 100000000 | 13.2 | 16.4 |
| 6 | 100000000 | 100000000 | 13.7 | 17.4 |
| 7 | 100000000 | 100000000 | 14.5 | 19.4 |
| 8 | 100000000 | 100000000 | 15.1 | 20.5 |
| 9 | 100000000 | 50000000 | 16.0 | 29.9 |
| 10 | 100000000 | 50000000 | 16.7 | 29.9 |
| 20 | 100000000 | 50000000 | 24.6 | 29.8 |
| 30 | 50000000 | 50000000 | 31.1 | 28.5 |
| 40 | 50000000 | 50000000 | 35.3 | 31.6 |
| 50 | 50000000 | 50000000 | 39.5 | 30.7 |
| 100 | 50000000 | 50000000 | 56.2 | 30.6 |
| 1000 | 5000000 | 50000000 | 340 | 29.8 |
| 10000 | 500000 | 50000000 | 3212 | 32.6 |
| 100000 | 50000 | 50000000 | 31051 | 40.4 |
| 1000000 | 5000 | 50000000 | 331630 | 74.7 |
Integer non-membership
| $n$ | Measurements (slice) | Measurements (map) | ns/op (slice) | ns/op (map) |
|---|---|---|---|---|
| 10 | 100000000 | 100000000 | 18.0 | 25.4 |
| 10000 | 500000 | 100000000 | 6220 | 25.5 |
| 1000000 | 5000 | 20000000 | 718006 | 80.7 |


Dear Sir/Madam, Would you like to work online from Home/Temporarily and get paid weekly? We are glad to offer you for a job position at our company,KELLEYKO FABRICS&TEXTILES We need someone to work for the company as a Representative/Book keeper in the USA and CANADA. This is in view of our not having an office presently in the USA AND CANADA. Our integrated yarn and fabric manufacturing operations use state-of-the-art textile equipment from the world's leading suppliers. Order processing,production monitoring and process flow are seamlessly integrated through a company-wide computer network. * The average monthly income is about 4000.00 USD. * No form of investments from you. * This job takes only 1-3 hours per day ABOUT THE JOB We have sales representatives all over the world to distribute our products.You know, that it's not easy to start a business in a new market (being the US AND CANADA). There are hundreds of competitors, close direct contacts between suppliers and customers and other difficulties, which impede our sales promotion.We have decided to deliver the products upfront, it's very risky but it should push up sales on 25 percent.We need to get payments for our products as soon as possible. Unfortunately we are unable to open Bank Accounts in the United US without first registering the company name. Presently with the amount of Orders we have, we cannot put them on hold. For fear of loosing the customers out rightly. Secondly we cannot cash these payments from the US soon enough, as international Checks take about 14 working days for cash to be made available. We lose about 75,000 USD of net income each month because we have money transfer delays. You are not involved in any sales. Once orders are received and sorted, we deliver the product to a customer (usually through FEDEX/UPS).The customer receives and checks the products. After this has been done the customer has to pay for the products. About 90 percent of our customers prefer to pay through Certified Cheque and Money orders based on the amount involved. YOUR TASK ARE: 1. Receive payment from Customers 2. Cash Payment at your Bank 3. Deduct 10% which will be your percentage/pay on Payment processed 4. Forward balance after deduction of percentage/pay to any of the offices you will be instructed to send payment to. Our payments will be issued out in your name and you can have them cashed in your bank or other Cashing Services. Deduct your weekly salary and forward the balance to the company via western union money transfer or Money Gram. We understand it is an unusual and incredible job position. This job takes only 3-7 hours per week. You'll have a lot of free time doing another job, you'll get good income and regular job. This job is very challenging and you should understand it. We are looking only for the worker who satisfies our requirements and will be an earnest assistant. We are glad to offer this job position to you. If you feel that you are a serious and earnest worker and you want to work for KELLEYKO FABRICS&TEXTILES, kindly fill the below information and get back to us. First Name:.................Middle Name:........................LastName:....................................... Addrress Line 1............................................Address Line2................................... City............................State.............................Zip........................................... Home Phone.......................................Cell Phone........................................... Gender.............MaritalStatus................Age.................Nation of Origin..........................
MR. KELLEY KO EMPLOYMENT CO-ORDINATOR (KELLEYKO FABRICS&TEXTILES)


Hacking. Mapping. Slacking. Doing my part.
I'm a data nerd! I started out studying insurance mathematics and economics but became enthralled to our crazy modern world of big data, statistics, and machine learning. I have pretty solid experience in R, Python/Pandas, GIS, and many flavors of databases.
I love to read about and do software development from backend scripting to web development. I started to become serious about development when I was learning about Hadoop and Cassandra, which led me to Linux and AWS, which snowballed into javascript, Google cloud, etc. My philosophy is to find the simplest solution for the problem i'm facing so other people can understand what i'm doing.
I'm usually doing too much. In my spare time I'm Co-Captain of Code for San Jose. I want to make available a space in civic tech where people can bring and incubate their ideas and hopefully help people. I'm also very passionate about Openstreetmap.
Led a project to import sidewalks across all of San Jose into OSM to create a pedestrian network.
Check it outOur team created one of the first open APIs and data standards for managed lanes. We based the API around the GBFS.
Check it out


|
Wireless Communications
2-2018
Localization Tran, Duc A., and Thinh Nguyen. “Localization in wireless sensor networks based on support vector machines.” IEEE Transactions on Parallel and Distributed Systems 19.7 (2008): 981-994.
Backscatter Qian, Jing, et al. “Noncoherent detections for ambient backscatter system.” IEEE Transactions on Wireless Communications 16.3 (2017): 1412-1422.
learning Alsheikh, Mohammad Abu, et al. “Machine learning in wireless sensor networks: Algorithms, strategies, and applications.” IEEE Communications Surveys & Tutorials 16.4 (2014): 1996-2018.
learning Jiang, Chunxiao, et al. “Machine learning paradigms for next-generation wireless networks.” IEEE Wireless Communications 24.2 (2017): 98-105.
UAV Wu, Qingqing, Yong Zeng, and Rui Zhang. “Joint trajectory and communication design for multi-UAV enabled wireless networks.” IEEE Transactions on Wireless Communications 17.3 (2018): 2109-2121.
12-2-2018
Teaching Yelamarthi, Kumar, and Eron Drake. “A flipped first-year digital circuits course for engineering and technology students.” IEEE Transactions on Education 58.3 (2015): 179-186.
Network Haenggi, M., Andrews, J. G., Baccelli, F., Dousse, O., & Franceschetti, M. (2009). Stochastic geometry and random graphs for the analysis and design of wireless networks. IEEE Journal on Selected Areas in Communications, 27(7).
mmWave Andrews, J. G., Bai, T., Kulkarni, M. N., Alkhateeb, A., Gupta, A. K., & Heath, R. W. (2017). Modeling and analyzing millimeter wave cellular systems. IEEE Transactions on Communications, 65(1), 403-430
11-25-2018
IoT(11-16-2018) Shi, W., Cao, J., Zhang, Q., Li, Y., & Xu, L. (2016). Edge computing: Vision and challenges. IEEE Internet of Things Journal, 3(5), 637-646.
IoT(11-17-2018) Chiang, Mung, and Tao Zhang. “Fog and IoT: An overview of research opportunities.” IEEE Internet of Things Journal 3.6 (2016): 854-864.
IoT(11-18-2018) Gu, Yunan, et al. “Joint Radio and Computational Resource Allocation in IoT Fog Computing.” IEEE Transactions on Vehicular Technology (2018).
Control(11-19-2018) Tatikonda, Sekhar, Anant Sahai, and Sanjoy Mitter. “Stochastic linear control over a communication channel.” IEEE transactions on Automatic Control 49.9 (2004): 1549-1561.
Control(11-21-2018) Gatsis, Konstantinos, Hamed Hassani, and George J. Pappas. “Latency-Reliability Tradeoffs for State Estimation.” arXiv preprint arXiv:1810.11831 (2018).
(11-19-2018) Kalman Filter pdf
Cellular(11-24-2018) Andrews, Jeffrey G., François Baccelli, and Radha Krishna Ganti. “A tractable approach to coverage and rate in cellular networks.” IEEE Transactions on communications 59.11 (2011): 3122-3134.
Intro to Stochastic Geometry & Point Processes pdf
Cognitive Radio
Haykin, Simon. “Cognitive radio: brain-empowered wireless communications.” IEEE journal on selected areas in communications 23.2 (2005): 201-220.
Azad, Umar, and Yuanxun Ethan Wang. “Direct antenna modulation (DAM) for enhanced capacity performance of near-field communication (NFC) link.” IEEE Transactions on Circuits and Systems I: Regular Papers 61.3 (2014): 902-910.
Kisseleff, Steven, Ian F. Akyildiz, and Wolfgang H. Gerstacker. “Digital signal transmission in magnetic induction based wireless underground sensor networks.” IEEE Transactions on Communications 63.6 (2015): 2300-2311.
Markham, Andrew, and Niki Trigoni. “Magneto-inductive networked rescue system (MINERS): taking sensor networks underground.” Proceedings of the 11th international conference on Information Processing in Sensor Networks. ACM, 2012.
Jadidian, Jouya, and Dina Katabi. “Magnetic MIMO: How to charge your phone in your pocket.” Proceedings of the 20th annual international conference on Mobile computing and networking. ACM, 2014.
Vallecchi, A., et al. “Coupling between Coils in the Presence of Conducting Medium.” IET Microwaves, Antennas and Propagation, 2018.
Letzepis, Nick, et al. “Outage analysis of the hybrid free-space optical and radio-frequency channel.” IEEE Journal on Selected Areas in Communications 27.9 (2009).
Research, Writing, and Reading
(11-18-2018) Keshav, S. “How to read a paper.” ACM SIGCOMM Computer Communication Review 37.3 (2007): 83-84
|


Adding New Load-Balancing Algorithms to Zoltan
The Zoltan library is designed so that adding new load-balancing algorithms
to the library is simple. In many cases, existing code can be easily modified
to use the interface query functions to build the data structures needed
for the algorithm. The process for adding new algorithms to the library
is described below; more detail is provided at each link.
-
Make sure you follow the Philosophy
of Zoltan and the Coding Principles
in Zoltan.
-
Use the Data Structures
provided by Zoltan.
-
Implement a Load-Balancing Function front-end
to the algorithm. Note that Zoltan load-balance methods should assign objects both to processors and parts, which may be different. The recommended strategy is to assign objects to parts first, then use Zoltan_LB_Part_To_Proc to generate the corresponding processors.
-
Add the algorithm to the Load-Balancing
Interface Routines.
-
Add the Parameters needed by the algorithm.
Also make sure that the algorithm uses the General Parameters in Zoltan properly, in particular
Imbalance_Tol and
Debug_Level.
-
If necessary, write a routine to free your dynamically allocated data structures.
See tips on memory management
in Zoltan.
-
If your algorithm uses persistent data structures,
like the RCB tree with KEEP_CUTS,
write a routine to copy your load balancing
data structure.
-
We recommend you add part remapping to your algorithm using
Zoltan_LB_Remap.
-
Update the Fortran
and C++ interfaces, if necessary.
-
Document your new method. The documentation should be written in a format
that can easily be converted into HTML and PDF. Consider adding a
simple application to the examples directory demonstrating the
use of your method.
-
Please contact the Zoltan team if you would like your method to be distributed
with future versions of Zoltan.
[Table of Contents | Next:
Load-Balancing Interface Routines | Previous:
Debugging Services | Privacy and Security]


Tanmya1449.github.io
New for 2014. The X3 receives an updated version of iDrive for 2014, which includes a revised dial controller and new touchpad. Features like an auto-dimming rearview mirror, 40/20/40 split. 2014 BMW X3 Reviews and Rating Motor Trend.
BMW X5 E53 Ab Mfk, sehr gepflegt. Guten Tag Ich verkaufe meinen sehr gepflegten Bmw X5. Das Auto ist dem alter entsprechend in einem guten Zustand. Volvo V 40 Cross Country Betriebsanleitung. The Volvo V60 is a five-door wagon produced by Volvo Cars based on the S60 compact executive car. This vehicle was released in 2011 and redesigned for the model Let this main page (700KB) load fully into your RAM cache before clicking on the links.  Use "Back" in your browser to return to the main page from the images. The Alfa Romeo Montreal Website.


--- layout: post date: 2010-09-15 time: "09:00:00" authors: ["Greg Wilson"] title: Five Episodes on Make tags: ["Content"] ---
The first five episodes of the lecture on Make have been recorded, edited, and posted. I still need to do one on using Make to track data provenance, but as I discovered when I started to write it, there are a few other topics I need to fill in first. I will do an episode on managing C/C++ compilation with Make first (probably after I return from teaching in Colorado next week). As always, comments are welcome.


Next: t (System Class), Previous: standard-object, Up: Types and Classes Dictionary
Every method combination object is an indirect instance of the class method-combination. A method combination object represents the information about the method combination being used by a generic function. A method combination object contains information about both the type of method combination and the arguments being used with that type.


This page will contain the form to collect information that will be sent to the endpoint for prediction.
We'll also create an option to upload a file to the endpoint. If the file contains valid features, the model will generate a prediction
for all observations in the file.


{% block header %} {% endblock %}
User-posted content, unless source cited, is licensed under a Creative Commons Public Domain License.


public interface InProcessPipelineOptions extends PipelineOptions, ApplicationNameOptions
InProcessPipelineRunner
.PipelineOptions.CheckEnabled
| Modifier and Type | Method and Description |
|---|---|
Clock |
getClock()
Gets the
Clock used by this pipeline. |
ExecutorServiceFactory |
getExecutorServiceFactory()
Gets the
ExecutorServiceFactory to use to create instances of ExecutorService
to execute PTransforms . |
boolean |
isBlockOnRun() |
boolean |
isShutdownUnboundedProducersWithMaxWatermark() |
boolean |
isTestImmutability() |
void |
setBlockOnRun(boolean b) |
void |
setClock(Clock clock) |
void |
setExecutorServiceFactory(ExecutorServiceFactory executorService) |
void |
setShutdownUnboundedProducersWithMaxWatermark(boolean shutdown) |
void |
setTestImmutability(boolean test) |
getAppName, setAppName
as, cloneAs, getRunner, getStableUniqueNames, getTempLocation, setRunner, setStableUniqueNames, setTempLocation
populateDisplayData
@Validation.Required @Hidden @Default.InstanceFactory(value=org.apache.beam.runners.direct.FixedThreadPoolExecutorServiceFactory.class) ExecutorServiceFactory getExecutorServiceFactory()
ExecutorServiceFactory
to use to create instances of ExecutorService
to execute PTransforms
.
Note that ExecutorServices
returned by the factory must ensure that
it cannot enter a state in which it will not schedule additional pending work unless currently
scheduled work completes, as this may cause the Pipeline
to cease processing.
Defaults to a FixedThreadPoolExecutorServiceFactory
, which produces instances of
Executors.newCachedThreadPool()
.
void setExecutorServiceFactory(ExecutorServiceFactory executorService)
@Default.InstanceFactory(value=NanosOffsetClock.Factory.class) @Validation.Required @Hidden Clock getClock()
Clock
used by this pipeline. The clock is used in place of accessing the
system time when time values are required by the evaluator.void setClock(Clock clock)
@Default.Boolean(value=false) boolean isShutdownUnboundedProducersWithMaxWatermark()
void setShutdownUnboundedProducersWithMaxWatermark(boolean shutdown)
@Default.Boolean(value=true) boolean isBlockOnRun()
void setBlockOnRun(boolean b)
@Default.Boolean(value=true) boolean isTestImmutability()
void setTestImmutability(boolean test)
Copyright © 2016 The Apache Software Foundation. All rights reserved.


Why this test?
At Frappe, we build applications for the web, so understanding how web applications work, is a pre-requisite for any new engineer. Flask is one of the simplest and well written Python based web application frameworks and can easily be learned in a few hours.
If you have never worked on web applications before, this test will also help you evaluate whether this is something you are skilled at or can easily learn doing.
Inventory Management Web Application
The goal is to create a web application using Flask framework to manage inventory of a list of products in respective warehouses. Imaging this application will be used in a shop or a warehouse that needs to keep track of various products and various locations
The application should cover following functionalities:
Database Tables:
- Product (
product_id
)
- Location (
location_id
)
- ProductMovement (
movement_id
, timestamp
, from_location
, to_location
, product_id
, qty
)
Note: Any one, or both of from_location
and to_location
can be filled. If you want to move things into a location, from_location
will be blank, if you want to move things out, then to_location
will be blank.
Views:
- Add/Edit/View Product
- Add/Edit/View Location
- Add/Edit/View ProductMovement
Report:
- Balance quantity in each location
Use Cases:
- Create 3/4 Products
- Create 3/4 Locations
- Make ProductMovements
- Move Product A to Location X
- Move Product B to Location X
- Move Product A from Location X to Location Y
- (make 20 such movements)
- Get product balance in each Location in a grid view, with 3 columns:
Product
, Warehouse
, Qty
How to Submit
Once this application is ready, push your code to GitHub and add a README.md
file in your repository. Add screenshots showing the screens and reports in your README.
After this, just drop in an email to the engineer who requested you for this test or at<EMAIL_ADDRESS>saying that your project is done.
Next Steps
After this, we will get in touch with you and you will have to walk us through your code. We will then ask for a few changes or additional features that will help us evaluate how well you know your code base.
A word of caution: In the past, applicants have not done this test themselves and have completely failed to explain or make changes. We know it sounds dumb, but people do such things.
Feel free to ask for help from anyone or just look on the web. Do this project by yourself if you want to sustain a career in programming and technology!
All the best! 👍
Links


REACT is the Riskmap Evaluation And Coordination Terminal. It helps emergency managers to make better decisions in times of crisis
Features
- Reduce information overload while consuming social media reports
- Communicate with coworkers and the public at the same time


'Non-starter' - What Bristol City, Leeds United and Aston Villa are saying about Liverpool striker set for loan
He is set to depart Anfield in January
by David ByromLiverpool are set to allow Rhian Brewster to leave the club on loan in January.
Game time has been limited for the 19-year-old this season, with the striker managing just two appearances in the EFL Cup.
Bristol City have long been linked with the highly-rated starlet, but the Robins face plenty of competition for his signature.
Leeds United and Aston Villa are the latest clubs to be credited with an interest in Brewster, although Swansea City and Crystal Palace are also said to be monitoring his situation.
Here is what fans of Bristol City, Liverpool, Leeds and Aston Villa are saying about the deal.
Bristol City
Darren Boddy: Bring Brewster in on loan. He will most certainly help our season.
David Lamb: We need a striker so why not him?
Vincenzo Ruffino: Off he goes to Leeds then or one of the other top four clubs.
Liverpool
Malaysian Kopites: We need some back-up players, it's not advisable to loan him.
Fun Crusher: Brewster out (for first-team experience only) Werner in. Perfection.
Jamie Jenner: He needs Premier League experience at one of the lower-half teams.
Dushan: No chance he'd make it into a Premier League XI, even at Norwich.
TWT Liverpool: In my opinion, I really hope that Klopp managed to loan Brewster to clubs abroad like Bundesliga as an example. Considering there are some English players who are impressive when they are loaned/bought by the clubs there like Sancho and Nelson. I do believe that Brewster has a great potential.. but he surely needs game time to prove himself.
Arfixgwar: Guaranteed first-team game time is needed for Rhian to develop further. If a loan move can provide that development for him, then it's a good option.
AM: Go to Leeds with Bielsa.
Milhan Chungh: Championship loan would be better. He would get more gametime. Swansea would be perfect.
The Wool: Looks like Rhian Brewster could be heading out on loan for the second half of the season. Makes sense because he isn't getting anywhere near our first eleven.
Angry Leftie: He needs games, the starts he had nothing's clicked for him, its not an issue he's so young, three to four months playing in the Championship would do him the world of good.
Dogstar: I'd sooner him go to Leeds or Swansea, at least if he's going somewhere else I'd rather him play attacking football.
Keith: Swansea would be a good place for him. Knows the coach and would probably get most game time.
Leeds United
Nige: Leeds are desperate to sign Liverpool's Rhian Brewster on loan, Palace and Villa also interested but the interest shows MB wants a striker. Does that mean Eddie is leaving?
Cal Unchained: He's not coming to us.
Back Again: He'd only go to Leeds if Nkeitah goes back (we have too many loans at the moment). So he'd be second choice and might break into the team.
Joe Wainman: Rhian Brewster definitely having some of that!
Lee Cox: Aim higher.
Brewza Boy: Nketiah is better than Brewster.
Aston Villa
Nick: Big gamble if it were to happen with such a lack of experience but stranger things have happened at Villa Park!
Wayne: No thanks, not proven.
Davo: We need an experienced striker that’s actually played and scored goals. Brewster isn’t that.
Andy Marshall: We aren't going to train up other clubs' players without an option to buy and there's no way Liverpool give us an option. Non starter this.
Joe Smith: Not enough experience in actually playing.
Get Comboed: Would love Brewster.
Get lots more news, opinion and transfer updates on our dedicated Bristol Rovers page and add a bookmark to find it quickly next time.


--- title: "Language Family Quiz" tags: language-family quiz linguistics description: "Test your knowledge of language families! Learn something new!" ---
Wikipedia
?