Skip to content

Update image links #1

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions _posts/2014-07-30-travel-hampi-bengaluru-allepy-part-1.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rickshaw took us to Hampi. The first thing one notices while riding into Hampi
[gopuram](http://en.wikipedia.org/wiki/Gopuram) of the [Virupaksha Temple](http://en.wikipedia.org/wiki/Virupaksha_Temple).
This is also one of the few temples in Hampi that is still actively used in worship.

![/assets/images/hampi-bengaluru-allepy/virupaksha.JPG]('The Virupaksha Temple'%}
![The Virupaksha temple](/assets/images/hampi-bengaluru-allepy/virupaksha.JPG)

We checked into a hotel which was a 5 minute walk from the Virupaksha temple, which charged us Rs. 800
per night. Since Hampi is a favorite for foreign tourists, one can find many cafes and restaurants here
Expand All @@ -32,16 +32,16 @@ planned for the day's sightseeing.
We started out toward the Vitthal temple, taking the huge road that was once the Hampi Bazaar.
Along the way, we saw the monolithic Nandi statue on the left, and [Matanga hill](http://hampi.in/matunga-hill) on the right.

![/assets/images/hampi-bengaluru-allepy/nandi.JPG]('The Nandi Statue')
![/assets/images/hampi-bengaluru-allepy/entrance.JPG]('Entrance At The Far End Of Hapmi Bazaar.')
![The Nandi Statue](/assets/images/hampi-bengaluru-allepy/nandi.JPG
![Entrance At The Far End Of Hapmi Bazaar.](/assets/images/hampi-bengaluru-allepy/entrance.JPG

A flight of steps lead to a grand entrance which opens at the Achyutraya Temple. This temple was build by the successor of King Krishnadevaraya, Achyuta Deva Raya, and is a temple to Lord Venkateshwara, but its ruins are popularly reffered to by the name of its patron.

![/assets//images/hampi-bengaluru-allepy/achyutraya_temple.JPG][Achyutraya Temple]
![Achyutraya Temple](/assets/images/hampi-bengaluru-allepy/achyutraya_temple.JPG)

After walking over some huge rocks by the river, we reached the King's Balance, a stone weighing scale where the King would be weighed against gold, which would then be given away to the priests. We then (finally) reached the Vitthal Temple.

![/assets//images/hampi-bengaluru-allepy/vitthal_front.JPG][The Sun Chariot With The Vitthal Temple In The Background]
![The Sun Chariot With The Vitthal Temple In The Background](/assets/images/hampi-bengaluru-allepy/vitthal_front.JPG)

The Vithhal Temple is probably one of the grandest in Hampi and possibly in all of India. It is housed inside
a massive complex with ornately carved walls, entrances and pillars. The complex houses five mantapas, 4 in
Expand All @@ -54,7 +54,7 @@ so the sound is fairly diminished now.

The central mantap houses an inner temple, where the actual idols were kept and worshipped. The original idols of Vitthal and Rukumai were taken to Pandharpur in Maharashtra during the invasion of Vijaynagar. One unique feature of the Vitthal temple is that the place where one performs ['pradakshina'](http://en.wikipedia.org/wiki/Parikrama) is underground.

![/assets//images/hampi-bengaluru-allepy/underground_parikrama.JPG][The Underground Pradakshina Path]
![The Underground Pradakshina Path](/assets/images/hampi-bengaluru-allepy/underground_parikrama.JPG)

There are tiny inlets for light in the roof, which reflects off a stream of water on the floor, which in turn provides
illumination for the entire chamber.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ One thing that puzzled me when I started off with regression was the purpose of

The logistic graph generally looks like this:

![/assets//images/glm/logistic.gif][Generic Graph of Logistic Regression.]
![Generic Graph of Logistic Regression](/assets/images/glm/logistic.gif)

#### Normal Regression

Expand All @@ -56,7 +56,7 @@ Normally distributed data is symmetric about the center and its mean is equal to

A normal regression graph generally looks like this:

![/assets//images/glm/normal.png][Generic Graph of Normal Regression]
![Generic Graph of Normal Regression](/assets/images/glm/normal.png)

#### Poisson Regression

Expand All @@ -68,7 +68,7 @@ The meaning of the co-efficient in the case of poisson is "for increase 1 of _x_

A poisson graph looks something like this:

![/assets//images/glm/poisson.png][Graph of Poisson Regression]
![Graph of Poisson Regression](/assets/images/glm/poisson.png)

#### Probit Regression

Expand All @@ -82,7 +82,7 @@ The coefficient of _x_ is interpreted as "one unit change in _x_ leads to a chan

Looking at the graph of probit, one can see the similarities between logit and probit:

![/assets//images/glm/probit.png][label]
![label](/assets/images/glm/probit.png)

## Finding the coefficients of a GLM

Expand Down
18 changes: 9 additions & 9 deletions _posts/2014-09-28-travel-hampi-bengaluru-allepy-part-2.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,42 @@ The day started at 5 am, and we proceeded to Matanga Hill to watch the sunrise,

As we started climbing the hill, a Naga Yogi waiting at the bottom of the hill asked us to register with the police station before going up the hill. We told him the station was closed, so he guided us up the hill. Along the way he told us that he had converted to a Naga Yogi after a stint at a multinational bank and now lived in a cave up the hill (wow), performing his sadhu duties in the temple town (which blew us away). The climb turned out to be pretty trecherous, with steep cliffs and a very narrow path leading uphill. He guided us to the rooftop of the Veerbhadra Temple present at the top of Matanga Hill, where the sunrise can be experienced best, and set off on his own after inviting us to his cave for tea once we we were done seeing the sunrise.

![/assets//images/hampi-bengaluru-allepy/matanga_sunrise.JPG][Sunrise from Matanga Hill]
![Sunrise from Matanga Hill](/assets/images/hampi-bengaluru-allepy/matanga_sunrise.JPG)

![/assets//images/hampi-bengaluru-allepy/matanga_view.JPG][View of Achutarya Temple from Matanga Hill]
![View of Achutarya Temple from Matanga Hill](/assets/images/hampi-bengaluru-allepy/matanga_view.JPG)

After seeing the sunrise and having some great black tea in our guide's cave, we started our descent, which took around 40 mins, mainly because of the jagged structure of the rocks. A fantastic breakfast of idli and tea awaited us at the bottom. Breakfast food carts are spread thorughout Hampi and serve cheap, tasty and filling food.

We then proceeded to our cycle tour, which would take us through the outer parts of Hampi; first stopping at the [Kadalekalu Ganesha](http://hampi.in/kadalekalu-ganesha) (Kadalekalu because the statue's belly resembles a Bengal Gram) temple, which houses a massive statue of Ganpati, the Hindu god of wisdom. The statue is now in ruins, after being destroyed by the Deccan Muslim rulers, who thought there was a hidden treasure inside the stomach of the statue, because of its size.

![/assets//images/hampi-bengaluru-allepy/ganpati_kk.JPG][Kadalekalu Ganesha statue]
![Kadalekalu Ganesha statue](/assets/images/hampi-bengaluru-allepy/ganpati_kk.JPG)

Then we proceeded to the statue of Narsimha and Laxmi. This was a huge monolith of a statue once upon a time, but it was destroyed by the invading army. A lot of it has been restored but it appears nowhere near its former glory. Right next to this is the partially submerged Shivalinga, which happens to be the 2nd largest in the country.

![/assets//images/hampi-bengaluru-allepy/narsimha.JPG][The partially restored statue of Narsimha and Laxmi]
![The partially restored statue of Narsimha and Laxmi](/assets/images/hampi-bengaluru-allepy/narsimha.JPG)

We then cycled towards the underground Shiva temple, which was pretty mind-blowing. The temple's roof is on ground level and the rest of the structure underground, the inner mantapas are kept full of water. Then cycling towards the Lotus Palace we came across the Mohammedan Watch Tower, which was a structure made for the Muslim troops in King Krishnadevaraya's army. This structure sports typical Persian architecture, the only structure of its kind in Hampi.

The Lotus Palace is where the two Queens of King Krishnadevaraya stayed. The main palace has a state-of-the-art water cooling system, with pipes of water circulating around the entire palace to keep the occupants cool during the summer.

![/assets//images/hampi-bengaluru-allepy/lotus_mahal.JPG][The Lotus Mahal!!]
![The Lotus Mahal!!!](/assets/images/hampi-bengaluru-allepy/lotus_mahal.JPG)

Behind this was a massive stable for the royal elephants, which housed all 11 of them. The Lotus Mahal (palace) consisted of two palaces, called Water Palace and the Queen's Palace, both of which are now in ruins.

![/assets//images/hampi-bengaluru-allepy/elephant_house.JPG][Elephant Stable]
![Elephant Stable](/assets/images/hampi-bengaluru-allepy/elephant_house.JPG)

We cycled to the King's enclosure, which had a whole lot of podiums and open spaces for conducting festivities. Dusshera was celebrated with great pomp here. There was an especially large podium for the King to be seated on so that he could watch all the proceedings from a vantage point.

![/assets//images/hampi-bengaluru-allepy/enclosure.JPG][The King's Enclosure and his podium]
![s Enclosure and his podium](/assets/images/hampi-bengaluru-allepy/enclosure.JPG)

![/assets//images/hampi-bengaluru-allepy/bath.JPG][The Queens Bath]
![The Queens Bath](/assets/images/hampi-bengaluru-allepy/bath.JPG)


The Queen's bath was just a few minutes cycle ride from here and that is where we went next. This was a huge tank for the Queen to take a bath in, made in Indo-Arabic architecture.

The cycle ride back to the center of Hampi (and our hotel) was long but extremely plesant. The route was lush green with many streams and small waterfalls.

![/assets//images/hampi-bengaluru-allepy/cycle_ride.JPG][The cycle ride back to Hampi]
![The cycle ride back to Hampi](/assets/images/hampi-bengaluru-allepy/cycle_ride.JPG)

Upon returning we had some late lunch at a South Indian restaurant (Venkateshwara Restaurant), and left for Hospet to catch our bus to Bangalore, which left from there at night.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ df = Daru::DataFrame.from_csv 'music_data.tsv', col_sep: "\t"

```

![/assets//images/daru1/create_music_df.png][Create a DataFrame from a TSV file.]
![Create a DataFrame from a TSV file.](/assets/images/daru1/create_music_df.png)

As you can see the *timestamp* field is in a somewhat non-Ruby format which is pretty difficult for the default Time class to understand, so we destructively map time zone information (IST in this case) and then change every *timestamp* string field into a Ruby _Time_ object, so that operations on time can be easily performed.

Expand All @@ -173,7 +173,7 @@ Notice the syntax for referencing a particular vector. Use 'row' for referencing
df.timestamp.recode! { |ts| ts += "+5:30"}

```
![/assets//images/daru1/dmap_vector.png][Destructively map a given vector.]
![Destructively map a given vector.](/assets/images/daru1/dmap_vector.png)

``` ruby

Expand All @@ -185,15 +185,15 @@ end

```

![/assets//images/daru1/df_row_map.png][Map all rows of a DataFrame.]
![Map all rows of a DataFrame.](/assets/images/daru1/df_row_map.png)

#### Basic Querying

A bunch of rows can be selected by specifying a range:

`df.row[900..923]`

![/assets//images/daru1/range_row_access.png][Accessing rows with a range]
![Accessing rows with a range](/assets/images/daru1/range_row_access.png)

#### Data Analysis

Expand All @@ -205,13 +205,13 @@ Lets dive deeper by actually trying to extract something useful from the data th
artists = df.group_by(:artname).size
```

![/assets//images/daru1/get_max_artists.png][Create a vector of artist names vs number of times they appear.]
![Create a vector of artist names vs number of times they appear.](/assets/images/daru1/get_max_artists.png)

To get the maximum value out of these, use `#max_index`. This will return a Vector which has the max:

`count.max_index`

![/assets//images/daru1/artists_max.png][Obtain the most heard artist.]
![Obtain the most heard artist.](/assets/images/daru1/artists_max.png)

#### Plotting

Expand All @@ -230,7 +230,7 @@ top_ten.plot type: :bar do |plt|
end
```

![/assets//images/daru1/plot_top_ten.png][Top ten artists plotted.]
![Top ten artists plotted.](/assets/images/daru1/plot_top_ten.png)

More examples can be found in [the notebooks section of the daru README](https://github.com/v0dro/daru#notebooks).

Expand Down
22 changes: 11 additions & 11 deletions _posts/2015-02-24-data-analysis-in-ruby-part-2.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ df.sort([:a,:d],
)
```

![/assets//images/daru2/sorted_df.png][Hierarchically sorted DataFrame]
![Hierarchically sorted DataFrame](/assets/images/daru2/sorted_df.png)

Vector objects also have a similar sorting method implemented. Check the docs for more details. Indexing is preserved while sorting of both DataFrame and Vector.

Expand All @@ -141,7 +141,7 @@ df.plot type: :line, x: :a, y: :b do |p,d|
d.color "green"
end
```
![/assets//images/daru2/line_graph.png][Line Graph From DataFrame]
![Line Graph From DataFrame](/assets/images/daru2/line_graph.png)

As you can see, the `#plot` function exposes the `Nyaplot::Plot` and `Nyaplot::Diagram` objects to user after populating them with the relevant data. So the new interface lets experienced users utilize the full power of nyaplot but keeps basic plotting very simple to use for new users or for quick and dirty visualization needs. Unfortunately for now, until a viable solution to interfacing with nyaplot is found, you will need to use the nyaplot API directly.

Expand Down Expand Up @@ -172,7 +172,7 @@ To calculate the mean of numeric vectors:
df.mean
```

![/assets//images/daru2/df_mean.png][Calculate Mean of Numeric Vectors]
![Calculate Mean of Numeric Vectors](/assets/images/daru2/df_mean.png)

Apart from that you can use the `#describe` method to calculate many statistical features of numeric Vectors in one shot and see a summary of statistics for numerical vectors in the DataFrame that is returned. For example,

Expand All @@ -181,7 +181,7 @@ Apart from that you can use the `#describe` method to calculate many statistical
df.describe
```

![/assets//images/daru2/df_describe.png][Describe Multiple Statistics in One Shot]
![Describe Multiple Statistics in One Shot](/assets/images/daru2/df_describe.png)

The covariance and correlation coeffiecients between the numeric vectors can also be found with `#cov` and `#corr`

Expand Down Expand Up @@ -237,7 +237,7 @@ df_mi = Daru::DataFrame.new([
vector_arry2], order: order_mi, index: multi_index)
```

![/assets//images/daru2/multi_index_table.png][DataFrame with hierarchical indexing]
![DataFrame with hierarchical indexing](/assets/images/daru2/multi_index_table.png)

Selecting a top level index from the hierarchy will select all the rows under that name, and return a new DataFrame with just that much data and indexes.

Expand All @@ -246,15 +246,15 @@ Selecting a top level index from the hierarchy will select all the rows under th
df_mi.row[:a]
```

![/assets//images/daru2/multi_index_partial.png][Partial Selection Of Multi Indexed DataFrame]
![Partial Selection Of Multi Indexed DataFrame](/assets/images/daru2/multi_index_partial.png)

Alternatively passing the entire tuple will return just that row as a `Daru::Vector`, indexed according to the column index.

``` ruby

df_mi.row[:a, :one,:bar]
```
![/assets//images/daru2/multi_index_exact.png][Selecting A Single Row From A Multi Indexed DataFrame]
![Selecting A Single Row From A Multi Indexed DataFrame](/assets/images/daru2/multi_index_exact.png)

Hierachical indexing is especially useful when aggregating or splitting data, or generating data summaries as we'll see in the following examples.

Expand Down Expand Up @@ -340,7 +340,7 @@ The `Daru::Core::GroupBy` object contains a bunch of methods for creating summar

grouped.mean
```
![/assets//images/daru2/group_by_mean.png][Aggregating by Mean After Grouping]
![Aggregating by Mean After Grouping](/assets/images/daru2/group_by_mean.png)

A hierarchichally indexed DataFrame is returned. Check the `GroupBy` docs for more aggregation methods.

Expand All @@ -350,7 +350,7 @@ You can generate an excel-style pivot table with the `#pivot_table` function. Th

To demonstrate with an example, consider [this CSV file on sales data](https://github.com/v0dro/daru/blob/master/spec/fixtures/sales-funnel.csv).

![/assets//images/daru2/pivot_table_data.png][Data For Pivot Table Demo]
![Data For Pivot Table Demo](/assets/images/daru2/pivot_table_data.png)

To look at the data from the point of view of the manager and rep:

Expand All @@ -359,7 +359,7 @@ To look at the data from the point of view of the manager and rep:
sales.pivot_table index: [:manager, :rep]
```

![/assets//images/daru2/pivot_table_index.png][Data Pivoted on Index Only.]
![Data Pivoted on Index Only.](/assets/images/daru2/pivot_table_index.png)

You can see that the pivot table has summarized the data and grouped it according to the manager and representative.

Expand All @@ -370,7 +370,7 @@ To see the sales broken down by the products:
sales.pivot_table(index: [:manager,:rep], values: :price, vectors: [:product], agg: :sum)
```

![/assets//images/daru2/pivoted_data.png][Data Pivoted to Reflect Sales]
![Data Pivoted to Reflect Sales](/assets/images/daru2/pivoted_data.png)

## Compatibility with statsample

Expand Down
10 changes: 5 additions & 5 deletions _posts/2015-07-31-analysis-of-time-series-in-daru.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ rng = Distribution::Normal.rng
index = Daru::DateTimeIndex.date_range(:start => '2012-4-2', :periods => 1000, :freq => 'D')
vector = Daru::Vector.new(1000.times.map {rng.call}, index: index)
```
![/assets//images/daru_time_series/simple_vector.png][A Simple Vector indexed on DateTimeIndex]
![A Simple Vector indexed on DateTimeIndex](/assets/images/daru_time_series/simple_vector.png)

In the above code, the `DateTimeIndex.date_range` function is creating a `DateTimeIndex` starting from a particular date and spanning for 1000 periods, with a frequency of 1 day between period. For a complete coverage of DateTimeIndex see [this]() notebook. For an introduction to the date offsets used by daru see [this blog post](http://v0dro.github.io/blog/2015/07/27/date-offsets-in-daru/).

Expand Down Expand Up @@ -72,7 +72,7 @@ rolling = vector.rolling_mean 60

rolling.tail
```
![/assets//images/daru_time_series/rolling_mean.png][Rolling Mean Tail]
![Rolling Mean Tail](/assets/images/daru_time_series/rolling_mean.png)


This time series can be very easily plotted with its rolling mean by using the [GnuplotRB](https://github.com/dilcom/gnuplotrb) gem:
Expand All @@ -86,7 +86,7 @@ GnuplotRB::Plot.new(
[rolling, with: 'lines', title: 'Rolling Mean'])
```

![/assets//images/daru_time_series/cumsum_rolling_line_graph.png][Line Graph of Rolling mean and cumsum]
![Line Graph of Rolling mean and cumsum](/assets/images/daru_time_series/cumsum_rolling_line_graph.png)

These methods are also available on DataFrame, which results in calling them on each of numeric vectors:

Expand All @@ -103,7 +103,7 @@ df = Daru::DataFrame.new({
c: 1000.times.map { rng.call }
}, index: index)
```
![/assets//images/daru_time_series/dataframe.png][DateTime indexed DataFrame]
![DateTime indexed DataFrame](/assets/images/daru_time_series/dataframe.png)


In a manner similar to that done with Vectors above, we can easily plot each Vector of the DataFrame with GNU plot:
Expand All @@ -124,7 +124,7 @@ r_sum.each_vector_with_index do |vec,n|
end
GnuplotRB::Multiplot.new(*plots, layout: [3,1], title: 'Rolling sums')
```
![/assets//images/daru_time_series/dataframe_plot.png][Plotting the DataFrame]
![Plotting the DataFrame](/assets/images/daru_time_series/dataframe_plot.png)

## Usage with statsample-timeseries

Expand Down
2 changes: 1 addition & 1 deletion _posts/2016-07-13-my-tryst-with-python.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ while all_elements_have_not_been_checked
```

This GIF from [Wikipedia](https://en.wikipedia.org/wiki/Insertion_sort) explains it pretty well:
![/assets//images/tryst_with_python/insertion_sort.gif][Insertion sort]
![Insertion sort](/assets/images/tryst_with_python/insertion_sort.gif)

Here's my python script. Python experts are welcome to suggest edits to make it faster/smaller.
``` python
Expand Down
Loading