├── Highress_VIEW.ME.jpg
├── README.md
├── REAM_ME.txt
├── _config.yml
├── data-analysis project - 1 - bird_migration_cartopy
├── Dependencies.Cartopy
│ ├── Cartopy-0.14.0-cp35-cp35m-win_amd64.whl
│ └── Shapely-1.5.17-cp35-cp35m-win_amd64.whl
├── READ_ME.txt
├── bird_migration_cartographic.py
├── bird_migration_daily_mean_speed.py
├── bird_migration_date.time.py
├── bird_migration_speed.py
├── bird_migration_trajectories_lat.long.py
├── bird_tracking.csv
├── code.jpegs_bird_migration
│ ├── bird_migration_cartographic.JPG
│ ├── bird_migration_daily_mean_speed.JPG
│ ├── bird_migration_date.time.JPG
│ ├── bird_migration_speed.JPG
│ └── bird_migration_trajectories_lat.long.JPG
└── figures_bird_migration
│ ├── figure_1_Eric's_trajectory.png
│ ├── figure_2_bird_trajectories.png
│ ├── figure_3_speed.png
│ ├── figure_4_time_stamp.png
│ ├── figure_5_mean.avg.speed_perday.png
│ └── figure_6_bird_cartographic.png
├── data-analysis project - 2 - social_network_analysis
├── READ_ME.txt
├── adj_allVillageRelationships_vilno_1.csv
├── adj_allVillageRelationships_vilno_2.csv
├── code.jpegs_social_network_analysis
│ ├── descriptive_statistics_of_empirical_social_networks.JPG
│ ├── social_net_analysis_networkx_basic_manipulation.JPG
│ ├── social_net_analysis_networkx_karate_kid_club.JPG
│ ├── social_network_analysis_Erdos-Renyi_bernoulli.JPG
│ ├── social_network_analysis_largest_connected_component.JPG
│ └── social_network_analysis_plot_degree_distribution.JPG
├── descriptive_statistics_of_empirical_social_networks.py
├── figures_social_network_analysis
│ ├── figure_10_G1_LCC_village_1.png
│ ├── figure_11_G2_LCC_village_2.png
│ ├── figure_1_karate_club_graph_networkx.png
│ ├── figure_2_bernoulli_error_ep2x_erdf_n_20_p_0.2.png
│ ├── figure_3_bernoulli_correct_!ep2x_erdf_n_20_p_0.2.png
│ ├── figure_4_bernoulli_erdf_n_50_p_0.08.png
│ ├── figure_5_bernoulli_erdf_n_10_p_1.png
│ ├── figure_6_Degree Distribution_n_500_p_0.08.png
│ ├── figure_7_Degree Distribution_n_500_p_0.08_G123.png
│ ├── figure_8_1.2_extra graph.png
│ └── figure_9_descriptive_statistics_of_empirical_social_networks.png
├── social_net_analysis_networkx_basic_manipulation.py
├── social_net_analysis_networkx_karate_kid_club.py
├── social_network_analysis_Erdos-Renyi_bernoulli.py
├── social_network_analysis_largest_connected_component.py
└── social_network_analysis_plot_degree_distribution.py
├── data-analysis project - 3 - DNA_Translation
├── Capture.PNG
├── DNA_seq_altered.txt
├── DNA_sequence_original.txt
├── READ_ME.txt
├── amino_acid__seq_altered.txt
├── amino_acid_sequence_original.txt
├── code.jpegs_DNA_translation
│ └── code_dna_seq.JPG
├── dna_seq.py
└── figures_DNA_translation
│ ├── dna_seq_with_formatting.JPG
│ └── dna_seq_without_formatting.JPG
├── data-analysis project - 4 - kNN_algorithm
├── READ_ME.txt
├── code.jpegs_kNN_algorithm
│ ├── kKK_predict+synthetic_points.JPG
│ ├── kNN_distance_algorithm.JPG
│ ├── kNN_majority_vote+nearest_neighbour.JPG
│ ├── kNN_prediction_grids.JPG
│ └── kNN_scikitlearn_vS_organic_on_IRIS.JPG
├── figures_kNN_algorithm
│ ├── figure_1_points_in_space.png
│ ├── figure_2_kNN.png
│ ├── figure_3_prediction_grid.png
│ ├── figure_4_kNN_IRIS_dataset.png
│ └── figure_5_Iris_type_comparison.png
├── kKK_predict+synthetic_points.py
├── kNN
│ ├── Kernel_Machine.svg.png
│ └── KnnClassification.svg.png
├── kNN_distance_algorithm.py
├── kNN_majority_vote+nearest_neighbour.py
├── kNN_prediction_grids.py
└── kNN_scikitlearn_vS_organic_on_IRIS.py
├── data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru
├── Books
│ ├── English
│ │ └── shakespeare
│ │ │ ├── A Midsummer Night's Dream.txt
│ │ │ ├── Hamlet.txt
│ │ │ ├── Macbeth.txt
│ │ │ ├── Othello.txt
│ │ │ ├── Richard III.txt
│ │ │ ├── Romeo and Juliet.txt
│ │ │ └── The Merchant of Venice.txt
│ ├── French
│ │ ├── chevalier
│ │ │ ├── L'enfer et le paradis de l'autre monde.txt
│ │ │ ├── L'åle de sable.txt
│ │ │ ├── La capitaine.txt
│ │ │ ├── La fille des indiens rouges.txt
│ │ │ ├── La fille du pirate.txt
│ │ │ ├── Le chasseur noir.txt
│ │ │ └── Les derniers Iroquois.txt
│ │ ├── de Maupassant
│ │ │ ├── Boule de Suif.txt
│ │ │ ├── Claire de Lune.txt
│ │ │ ├── Contes de la Becasse.txt
│ │ │ ├── L'inutile beautÇ.txt
│ │ │ ├── La Main Gauche.txt
│ │ │ ├── La Maison Tellier.txt
│ │ │ ├── La petite roque.txt
│ │ │ ├── Le Horla.txt
│ │ │ └── Œuvres complètes de Guy de Maupassant.txt
│ │ ├── diderot
│ │ │ ├── Ceci n'est pas un conte.txt
│ │ │ ├── Entretien d'un päre avec ses enfants.txt
│ │ │ ├── L'oiseau blanc.txt
│ │ │ ├── Les deux amis de Bourbonne.txt
│ │ │ └── Regrets sur ma vieille robe de chambre.txt
│ │ └── sand
│ │ │ ├── Jacques le fataliste et son maåtre.txt
│ │ │ ├── L' Orco.txt
│ │ │ ├── La Coupe; Lupo Liverani; Le Toast; Garnier; Le Contrebandier; La Ràverie Ö Paris.txt
│ │ │ ├── La Marquise.txt
│ │ │ ├── Le Piccinino.txt
│ │ │ ├── Le poâme de Myrza.txt
│ │ │ ├── Mattea.txt
│ │ │ ├── Metella.txt
│ │ │ ├── Oeuvres illustrÇes de George Sand.txt
│ │ │ ├── Pauline.txt
│ │ │ └── cora.txt
│ ├── German
│ │ ├── lessing
│ │ │ ├── der freigeist.txt
│ │ │ ├── der junge gelehrte.txt
│ │ │ ├── die juden.txt
│ │ │ ├── emilia galotti.txt
│ │ │ ├── hamburgische dramaturgie.txt
│ │ │ ├── minna von barnhelm.txt
│ │ │ ├── miss sara sampson.txt
│ │ │ └── philotas.txt
│ │ ├── raimund
│ │ │ ├── Das MÑdchen aus der Feenwelt.txt
│ │ │ ├── Der Alpenkînig und der Menschenfeind.txt
│ │ │ ├── Der Barometermacher auf der Zauberinsel.txt
│ │ │ ├── Der Diamant des Geisterkînigs.txt
│ │ │ ├── Der Verschwender.txt
│ │ │ ├── Die gefesselte Phantasie.txt
│ │ │ ├── Die unheilbringende Krone.txt
│ │ │ └── Moisasurs Zauberfluch.txt
│ │ ├── schiller
│ │ │ ├── Der Neffe als Onkel.txt
│ │ │ ├── Der Parasit, oder die Kunst, sein GlÅck zu machen.txt
│ │ │ ├── Die Huldigung der KÅnste.txt
│ │ │ ├── Die Jungfrau von Orleans.txt
│ │ │ ├── Die Piccolomini.txt
│ │ │ ├── Die Verschwîrung des Fiesco zu Genua.txt
│ │ │ ├── Kabale und Liebe.txt
│ │ │ ├── Turandot, Prinzessin von China.txt
│ │ │ ├── Wallensteins Lager.txt
│ │ │ ├── Wallensteins Tod.txt
│ │ │ └── die braut von messina.txt
│ │ └── shakespeare
│ │ │ ├── Der Kaufmann von Venedig.txt
│ │ │ ├── Ein Sommernachtstraum.txt
│ │ │ ├── Hamlet.txt
│ │ │ ├── Macbeth.txt
│ │ │ ├── Othello.txt
│ │ │ ├── Richard III.txt
│ │ │ └── Romeo und Julia.txt
│ └── Portuguese
│ │ ├── Queir¢s
│ │ ├── A Cidade e as Serras.txt
│ │ ├── A Illustre Casa de Ramires.txt
│ │ ├── A Rel°quia.txt
│ │ ├── A correspondància de Fradique Mendes.txt
│ │ ├── Cartas de Inglaterra.txt
│ │ ├── O Mandarim.txt
│ │ ├── O Primo Bazilio.txt
│ │ ├── O crime do padre Amaro.txt
│ │ └── Os Maias.txt
│ │ ├── branco
│ │ ├── A Filha do Arcediago.txt
│ │ ├── A Neta do Arcediago.txt
│ │ ├── A Queda d'um Anjo.txt
│ │ ├── Agulha em Palheiro.txt
│ │ ├── Amor de Perdição.txt
│ │ ├── Amor de Salvação.txt
│ │ ├── Annos de Prosa.txt
│ │ ├── Carlota Angela.txt
│ │ ├── Estrellas Funestas.txt
│ │ ├── Estrellas Prop°cias.txt
│ │ ├── Lagrimas Abenáoadas.txt
│ │ ├── Livro de Consolação.txt
│ │ ├── O Olho de Vidro.txt
│ │ ├── O Regicida.txt
│ │ ├── O que fazem mulheres.txt
│ │ └── Scenas Contemporaneas.txt
│ │ ├── dinis
│ │ ├── A Morgadinha dos Cannaviaes.txt
│ │ ├── Os fidalgos da Casa Mourisca.txt
│ │ └── Uma fam°lia ingleza.txt
│ │ └── shakespeare
│ │ └── Hamlet.txt
├── READ_ME.txt
├── code.jpegs_books_eng.fre.port.ru
│ ├── read_book.JPG
│ ├── read_list_all_books_&_plot.JPG
│ └── read_manipulate_strings.JPG
├── figures_books_eng.fre.port.ru
│ ├── figure_1_plot_+_loglog.png
│ └── figure_2_lang_comparison.png
├── read_book.py
├── read_list_all_books_&_plot.py
└── read_manipulate_strings.py
├── data-analysis project - 6 - wine_&_whiskies_bokeh
├── READ_ME.txt
├── clustering_whiskies_by_flavour_profile.py
├── code.jpegs_wine_&_whiskies_bokeh
│ ├── clustering_whiskies_by_flavour_profile.JPG
│ ├── whiskies_comparing_correlation_matrices.JPG
│ ├── whiskies_exploring_correlations.JPG
│ └── whiskies_loading_&_inspecting_data.JPG
├── figures_wine_&_whiskies_bokeh
│ ├── corlate-whisky.pdf
│ ├── corlate-whisky_2.pdf
│ ├── figure_1_clustering_whiskies_by_flavour_profile1.png
│ ├── figure_2_clustering_whiskies_by_flavour_profile2.png
│ ├── figure_3_whiskies_comparing_correlation_matrices1.png
│ └── figure_4_whiskies_comparing_correlation_matrices2.png
├── regions.txt
├── whiskies.txt
├── whiskies_comparing_correlation_matrices.py
├── whiskies_exploring_correlations.py
└── whiskies_loading_&_inspecting_data.py
├── data_analysis_bokeh_extra
├── bokeh_plot.png
├── bokeh_plot_2.png
├── bokeh_plot_2.py
└── bokeh_plot_extra.py
└── download.png
/Highress_VIEW.ME.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/Highress_VIEW.ME.jpg
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Data-analysis
2 |
3 | Analyzing real data sets using libraries - numpy, pandas, scikit-learn etc in Python 3. Part of the Mooc that I did with HarvardX
4 |
5 |
6 |
7 |
8 | I covered detailed articles in GeeksforGeeks for the same projects:
9 |
10 | [1. Tracking Bird Migration](https://www.geeksforgeeks.org/tracking-bird-migration-using-python-3/)
11 |
12 | [2. Tesxt Analysis/Books Frequency](https://www.geeksforgeeks.org/text-analysis-in-python-3/)
13 |
14 | [3. DNA Translation](https://www.geeksforgeeks.org/dna-protein-python-3/)
15 |
16 | [4. Whisky Clustering](https://www.geeksforgeeks.org/project-scikit-learn-whisky-clustering/)
17 |
--------------------------------------------------------------------------------
/REAM_ME.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 | **************************************************************************************************************
4 | Amartya Ranjan Saikia (ar5saikia@gmail.com /amartyasaikia@acm.org)
5 | **************************************************************************************************************
6 |
7 | Data Analysis projects as part of HarvardX course - PH526x Using Python for Research.
8 |
9 | **************************************************************************************************************
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-cayman
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/Dependencies.Cartopy/Cartopy-0.14.0-cp35-cp35m-win_amd64.whl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 1 - bird_migration_cartopy/Dependencies.Cartopy/Cartopy-0.14.0-cp35-cp35m-win_amd64.whl
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/Dependencies.Cartopy/Shapely-1.5.17-cp35-cp35m-win_amd64.whl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 1 - bird_migration_cartopy/Dependencies.Cartopy/Shapely-1.5.17-cp35-cp35m-win_amd64.whl
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/READ_ME.txt:
--------------------------------------------------------------------------------
1 | Track the movement of three gulls(birds) namely - Eric, Nico & Sanne : dataset : https://inbo.carto.com/u/lifewatch/datasets
2 |
3 | One fascinating area of research uses GPS to track movements of animals.
4 | It is now possible to manufacturer a small GPS device that is solar charged,
5 | so you don't need to change batteries, and use
6 | it to track flight patterns of birds.
7 | The data for this case study comes from the LifeWatch INBO project.
8 | Several data sets have been released as part of this project.
9 | We will use a small data set that consists of migration data for three
10 | gulls named Eric, Nico, and Sanne.
11 | The csv file contains eight columns, and includes variables
12 | like latitude, longitude, altitude, and time stamps.
13 | In this case study, we will first load the data,
14 | visualize some simple flight trajectories,
15 | track flight speed, learn about daytime and much, much more.
16 |
17 |
18 |
19 | Order of Project subparts :
20 | 1.bird_migration_trajectories_lat.long.py
21 | 2.bird_migration_speed.py
22 | 3.bird_migration_date.time.py
23 | 4.bird_migration_daily_mean_speed.py
24 | 5.bird_migration_cartographic.py
25 |
26 |
27 | I did this project to accompany my learnings from HarvardX course - PH526x Using Python for Research.
28 |
29 | - Amartya Ranjan Saikia (amartyasaikia@acm.org/ar5saikia@gmail.com)
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/bird_migration_cartographic.py:
--------------------------------------------------------------------------------
1 | import cartopy.crs as ccrs
2 | import cartopy.feature as cfeature
3 | import matplotlib.pyplot as plt
4 |
5 | proj = ccrs.Mercator() #To move forward, we need to specify a specific projection that we're interested in using.
6 |
7 | plt.figure(figsize=(10,10))
8 | ax = plt.axes(projections=proj)
9 | ax.set_extent((-25.0, 20.0, 52.0, 10.0))
10 | ax.add_feature(cfeature.LAND)
11 | ax.add_feature(cfeature.OCEAN)
12 | ax.add_feature(cfeature.COASTLINE)
13 | ax.add_feature(cfeature.BORDERS, linestyle=':')
14 | for name in bird_names:
15 | ix = birddata['bird_name'] == name
16 | x,y = birddata.longitude[ix], birddata.latitude[ix]
17 | ax.plot(x,y,'.', transform=ccrs.Geodetic(), label=name)
18 | plt.legend(loc="upper left")
19 | plt.show()
20 |
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/bird_migration_daily_mean_speed.py:
--------------------------------------------------------------------------------
1 | import pandas as pd
2 | import matplotlib.pyplot as plt
3 | import datetime
4 | import numpy as np
5 |
6 | #code from bird_migration_date.time *************************************
7 | timestamps = []
8 | for k in range(len(birddata)):
9 | timestamps.append(datetime.datetime.strptime(birddata.date_time.iloc[k][:-3], "%Y-%m-%d %H:%M:%S"))
10 | birddata["timestamp"] = pd.Series(timestamps, index = birddata.index)
11 |
12 | #code from bird_migration_date.time *************************************
13 | data = birddata[birddata.bird_name == "Eric"]
14 | times = data.timestamp
15 | elapsed_time = [time-times[0] for time in times]
16 | elapsed_days = np.array(elapsed_time)/datetime.timedelta(days=1)
17 |
18 | next_day = 1
19 | inds = []
20 | daily_mean_speed = []
21 | for (i,t) in enumerate(elapsed_days):
22 | if t < next_day:
23 | inds.append(i)
24 | else:
25 | daily_mean_speed.append(np.mean(data.speed_2d[inds]))
26 | next_day += 1
27 | inds = []
28 |
29 | plt.figure(figsize = (8,6))
30 | plt.plot(daily_mean_speed, "rs-")
31 | plt.xlabel(" Day ")
32 | plt.ylabel(" Mean Speed (m/s) ");
33 | plt.show()
34 |
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/bird_migration_date.time.py:
--------------------------------------------------------------------------------
1 | import pandas as pd
2 | import matplotlib.pyplot as plt
3 | import datetime
4 |
5 | # >>>birddata.column #check the columns of dataset
6 | # >>>birddata.date_time[0:3] #check first few entries of date_time
7 | # >>>datetime.datetime.today() #returns the current Date (yy-mm-dd) & time (h:m:s)
8 |
9 | # >>>time_1 = datetime.datetime.today()
10 | # >>>time_2 = datetime.datetime.today() #enter this code waiting few seconds
11 | # >>>time_2-time_1 #you will get the measure of elapsed seconds as output,the resulting object is called date time time delta object
12 |
13 | # >>>date_str = birddata.date_time[0]
14 | # >>>date_str
15 | # >>>date_str[:-3] # slices/removes the UTC +00 coordinated time stamps
16 | # >>>datetime.datetime.strptime(date_str[:-3], "%Y-%m-%d %H:%M:%S") #the time stamp strings from date_str are converted to datetime object to be worked upon.
17 |
18 | timestamps = []
19 | for k in range(len(birddata)):
20 | timestamps.append(datetime.datetime.strptime(birddata.date_time.iloc[k][:-3], "%Y-%m-%d %H:%M:%S"))
21 | '''
22 | The next step for me is to construct a panda series object
23 | and insert the timestamp from my Python list into that object.
24 | I can then append the panda series as a new column in my bird data data frame.
25 | '''
26 | birddata["timestamp"] = pd.Series(timestamps, index = birddata.index)
27 | # >>>birddata.timestamp[4] - birddata.timestamp[3] #measure time difference between row 4 & 3
28 |
29 | '''
30 | What I'd like to do next is to create a list that captures the amount of time
31 | that has elapsed since the beginning of data collection.
32 | '''
33 | times = birddata.timestamp[birddata.bird_name == "Eric"]
34 | elapsed_time = [time-times[0] for time in times]
35 |
36 | #But how can we measure time in certain units, like hours or days?
37 | # >>>elapsed_time[1000]/datetime.timedelta(days=1) #output is the no of days have passed between these two points
38 | # >>>len(elapsed_time) # check the length of entries
39 | # >>>elapsed_time[19000]/datetime.timedelta(hours=1) #output is the no of hours have passed between these two points
40 |
41 | plt.plot(np.array(elapsed_time)/datetime.timedelta(days=1))
42 | plt.xlabel(" Observation ")
43 | plt.ylabel(" Elapsed time (days) ")
44 | plt.show()
45 |
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/bird_migration_speed.py:
--------------------------------------------------------------------------------
1 | import pandas as pd
2 | import matplotlib.pyplot as plt
3 | import numpy as np
4 |
5 | ix = birddata.bird_name == "Eric" #storing the indices of the bird Eric
6 | speed = birddata.speed_2d[ix]
7 | # >>>plt.hist(speed) #[F.A.I.L.S] ,since we have non numeric numbers in the speed array
8 | # >>>plt.hist(speed[:10]) #plot a histogram using the first 10 observations of speed [works]
9 | # >>>np.isnan(speed) #>>>np.isnan(speed).any() #I am looking for any non number objects in the speed column using numpy's isnan function.
10 | # >>>np.sum(np.isnan(speed)) # I find out the count of non numeric entries, False=0 & True =1 from isnan()
11 |
12 | # >>>ind = np.isnan(speed)
13 | # >>>plt.hist(speed[~ind]) #we will include only those entries for which ind != True
14 |
15 | plt.figure(figsize = (8,4))
16 | # >>>speed = birddata.speed_2d[birddata.bird_name == "Eric"] #step 5 & 6 combined
17 | ind = np.isnan(speed)
18 | plt.hist(speed[~ind], bins=np.linspace(0,30,20), normed=True)
19 | plt.xlabel(" 2D speed (m/s) ")
20 | plt.ylabel(" Frequency ")
21 | plt.show()
22 |
23 |
24 | '''
25 | We can also plot a similar histogram using the pandas module instead of pyplot.
26 | The benefit of using pandas is that we do not have to deal with NaNs explicitly.
27 | Instead, all of that happens under the hood.
28 |
29 | NaNs - Not-a-Number
30 |
31 | >>>birddata.speed_2d.plot(kind='hist', range=[0,30])
32 | >>>plt.xlabel("2D speed")
33 | >>>plt.savefig("hist_birdmig_speed.pdf")
34 | '''
35 |
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/bird_migration_trajectories_lat.long.py:
--------------------------------------------------------------------------------
1 | import pandas as pd
2 | import matplotlib.pyplot as plt
3 | import numpy as np
4 |
5 | birddata = pd.read_csv("bird_tracking.csv") #make sure,you are in the right directory , check (>>>pwd)
6 |
7 | # >>>birddata.info() #look at basic info abot the data frame
8 | # >>>birddata.head() #look for first 5 rows in the data set
9 | # >>>birddata.tail() #look for last 5 rows in the data set
10 |
11 | bird_names = pd.unique(birddata.bird_name) #look at the unique names of the birds in the csv_file
12 | # >>>print(bird_name)
13 |
14 | ix = birddata.bird_name == "Eric" #storing the indices of the bird Eric
15 | x,y = birddata.longitude[ix], birddata.latitude[ix]
16 | plt.figure(figsize = (7,7))
17 | plt.plot(x,y,"b.")
18 | # >>>plt.show() #if you want to check trajectory of "Eric" only
19 |
20 | ''' To look at all the birds trajectories, we plot each bird in the same plot '''
21 | plt.figure(figsize = (7,7))
22 | for bird_name in bird_names:
23 | ix = birddata.bird_name == bird_name #storing the indices of the bird Eric
24 | x,y = birddata.longitude[ix], birddata.latitude[ix]
25 | plt.plot(x,y,".", label=bird_name)
26 | plt.xlabel("Longitude")
27 | plt.ylabel("Latitude")
28 | plt.legend(loc="lower right")
29 | plt.show()
30 |
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/code.jpegs_bird_migration/bird_migration_cartographic.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 1 - bird_migration_cartopy/code.jpegs_bird_migration/bird_migration_cartographic.JPG
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/code.jpegs_bird_migration/bird_migration_daily_mean_speed.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 1 - bird_migration_cartopy/code.jpegs_bird_migration/bird_migration_daily_mean_speed.JPG
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/code.jpegs_bird_migration/bird_migration_date.time.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 1 - bird_migration_cartopy/code.jpegs_bird_migration/bird_migration_date.time.JPG
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/code.jpegs_bird_migration/bird_migration_speed.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 1 - bird_migration_cartopy/code.jpegs_bird_migration/bird_migration_speed.JPG
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/code.jpegs_bird_migration/bird_migration_trajectories_lat.long.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 1 - bird_migration_cartopy/code.jpegs_bird_migration/bird_migration_trajectories_lat.long.JPG
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/figures_bird_migration/figure_1_Eric's_trajectory.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 1 - bird_migration_cartopy/figures_bird_migration/figure_1_Eric's_trajectory.png
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/figures_bird_migration/figure_2_bird_trajectories.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 1 - bird_migration_cartopy/figures_bird_migration/figure_2_bird_trajectories.png
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/figures_bird_migration/figure_3_speed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 1 - bird_migration_cartopy/figures_bird_migration/figure_3_speed.png
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/figures_bird_migration/figure_4_time_stamp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 1 - bird_migration_cartopy/figures_bird_migration/figure_4_time_stamp.png
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/figures_bird_migration/figure_5_mean.avg.speed_perday.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 1 - bird_migration_cartopy/figures_bird_migration/figure_5_mean.avg.speed_perday.png
--------------------------------------------------------------------------------
/data-analysis project - 1 - bird_migration_cartopy/figures_bird_migration/figure_6_bird_cartographic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 1 - bird_migration_cartopy/figures_bird_migration/figure_6_bird_cartographic.png
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/READ_ME.txt:
--------------------------------------------------------------------------------
1 | Social Network Analysis | Datasets - http://science.sciencemag.org/content/341/6144/1236498.full
2 |
3 | Many systems of scientific and societal interest
4 | consist of a large number of interacting components.
5 | The structure of these systems can be represented
6 | as networks where network nodes represent the components,
7 | and network edges, the interactions between the components.
8 | Network analysis can be used to study how pathogens, behaviors,
9 | and information spread in social networks,
10 | having important implications for our understanding of epidemics
11 | and the planning of effective interventions.
12 | In a biological context, at a molecular level,
13 | network analysis can be applied to gene regulation networks, signal
14 | transduction networks, protein interaction networks, and much,
15 | much more.
16 | This case study first introduces some basic concepts about networks,
17 | we'll then write a Python function to generate very simple random graphs,
18 | and finally, we'll analyze some basic properties of social networks collected in different rural villages in India.
19 |
20 |
21 |
22 | Order of Project subparts :
23 | 1.social_net_analysis_networkx_basic_manipulation.py
24 | 2.social_net_analysis_networkx_karate_kid_club.py
25 | 3.social_network_analysis_Erdos-Renyi_bernoulli.py
26 | 4.descriptive_statistics_of_empirical_social_networks.py
27 | 5.social_network_analysis_plot_degree_distribution.py
28 | 6.social_network_analysis_largest_connected_component.py
29 |
30 |
31 | I did this project to accompany my learnings from HarvardX course - PH526x Using Python for Research.
32 |
33 | - Amartya Ranjan Saikia (amartyasaikia@acm.org/ar5saikia@gmail.com)
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/code.jpegs_social_network_analysis/descriptive_statistics_of_empirical_social_networks.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/code.jpegs_social_network_analysis/descriptive_statistics_of_empirical_social_networks.JPG
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/code.jpegs_social_network_analysis/social_net_analysis_networkx_basic_manipulation.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/code.jpegs_social_network_analysis/social_net_analysis_networkx_basic_manipulation.JPG
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/code.jpegs_social_network_analysis/social_net_analysis_networkx_karate_kid_club.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/code.jpegs_social_network_analysis/social_net_analysis_networkx_karate_kid_club.JPG
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/code.jpegs_social_network_analysis/social_network_analysis_Erdos-Renyi_bernoulli.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/code.jpegs_social_network_analysis/social_network_analysis_Erdos-Renyi_bernoulli.JPG
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/code.jpegs_social_network_analysis/social_network_analysis_largest_connected_component.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/code.jpegs_social_network_analysis/social_network_analysis_largest_connected_component.JPG
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/code.jpegs_social_network_analysis/social_network_analysis_plot_degree_distribution.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/code.jpegs_social_network_analysis/social_network_analysis_plot_degree_distribution.JPG
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/descriptive_statistics_of_empirical_social_networks.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | import networkx as nx
3 | import matplotlib.pyplot as plt
4 |
5 | A1 = np.loadtxt("adj_allVillageRelationships_vilno_1.csv", delimiter=",") #np.loadtxt is used to read in the CSV files, the adjacency matrices.
6 | A2 = np.loadtxt("adj_allVillageRelationships_vilno_2.csv", delimiter=",")
7 | # now convert the adjacency matrices to graph objects.
8 | G1 = nx.to_networkx_graph(A1)
9 | G2 = nx.to_networkx_graph(A2)
10 |
11 | '''
12 | let's count the number of nodes and the number of edges in the networks.In addition, each node has a total number of edges,
13 | its degree.Let's also calculate the mean degree for all nodes in the network.
14 | '''
15 | def basic_net_stats(G):
16 | print("Number of nodes : %d" %G.number_of_nodes())
17 | print("Number of edges : %d" %G.number_of_edges())
18 | print("Average degree : %.2f" % np.mean(list(G.degree().values())))
19 |
20 | basic_net_stats(G1)
21 | basic_net_stats(G2)
22 |
23 | plot_degree_distribution(G1)
24 | plot_degree_distribution(G2)
25 | plt.show()
26 |
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_10_G1_LCC_village_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_10_G1_LCC_village_1.png
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_11_G2_LCC_village_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_11_G2_LCC_village_2.png
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_1_karate_club_graph_networkx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_1_karate_club_graph_networkx.png
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_2_bernoulli_error_ep2x_erdf_n_20_p_0.2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_2_bernoulli_error_ep2x_erdf_n_20_p_0.2.png
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_3_bernoulli_correct_!ep2x_erdf_n_20_p_0.2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_3_bernoulli_correct_!ep2x_erdf_n_20_p_0.2.png
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_4_bernoulli_erdf_n_50_p_0.08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_4_bernoulli_erdf_n_50_p_0.08.png
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_5_bernoulli_erdf_n_10_p_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_5_bernoulli_erdf_n_10_p_1.png
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_6_Degree Distribution_n_500_p_0.08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_6_Degree Distribution_n_500_p_0.08.png
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_7_Degree Distribution_n_500_p_0.08_G123.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_7_Degree Distribution_n_500_p_0.08_G123.png
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_8_1.2_extra graph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_8_1.2_extra graph.png
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_9_descriptive_statistics_of_empirical_social_networks.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 2 - social_network_analysis/figures_social_network_analysis/figure_9_descriptive_statistics_of_empirical_social_networks.png
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/social_net_analysis_networkx_basic_manipulation.py:
--------------------------------------------------------------------------------
1 | import networkx as nx
2 |
3 | G = nx.Graph() #we have an empty graph called G.
4 | G.add_node(1) # node no 1 has been added to our graph.
5 | G.add_nodes_from([2,3]) # add multiple nodes to graph,input is a list
6 | G.add_nodes_from(["u","v"]) #node labels can be strings as well
7 | # >>>G.nodes() # to check the nodes in graph
8 | G.add_edge(1,2)
9 | G.add_edge("u","v")
10 | G.add_edges_from([(1,3),(1,4),(1,5),(1,6)]) #python will add these non-existant nodes automatically
11 | G.add_edge("u","w")
12 | # >>>G.edges() # to check the edges in graph
13 | G.remove_node(2) #remove node no 2 from graph
14 | G.remove_nodes_from([4,5]) # removes multiple nodes from graph,input is a list
15 | G.remove_edge(1,3)
16 | G.remove_edges_from([(1,2),("u","v")])
17 |
18 | G.number_of_nodes() #total no of nodes in graph
19 | G.number_of_edges() #total no of edges in graph
20 |
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/social_net_analysis_networkx_karate_kid_club.py:
--------------------------------------------------------------------------------
1 | import matplotlib.pyplot as plt
2 | import networkx as nx
3 |
4 | G = nx.karate_club_graph()
5 | nx.draw(G, with_labels=True, node_color="lightblue", edge_color="gray")
6 | plt.show()
7 |
8 | # >>>G.degree() #get access to node degree's(no of links) stores as a dict in networkx
9 | # >>>G.degree()[33] #gives the value(degree) for id 33
10 | # >>>G.degree(33) #gives the value(degree) for id 33 #same
11 | # >>>G.degree(0) is G.degree()[0] #True
12 |
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/social_network_analysis_Erdos-Renyi_bernoulli.py:
--------------------------------------------------------------------------------
1 | '''
2 | Erdos-Renyi (E.R) random graph distribution model.It has 2(N,p) parameters.N is the number of nodes in
3 | the graph,and p is the probability for any pair of nodes to be connected by an edge.
4 | '''
5 | from scipy.stats import bernoulli
6 | import networkx as nx
7 | # >>>bernoulli.rvs(p=0.2) #the rvs method to generate one single realization of a Bernoulli random variable.
8 | N = 20 #sample case
9 | p = 0.2 #sample case
10 |
11 | def er_graph(N, p):
12 | G = nx.Graph()
13 | G.add_nodes_from(range(N))
14 | for node1 in G.nodes():
15 | for node2 in G.nodes():
16 | if node1 < node2 and bernoulli.rvs(p=p) == True: #>>>if bernoulli.rvs(p=p): is equally true since only if b.rvs==1 it will enter the loop
17 | G.add_edge(node1,node2)
18 | return G
19 |
20 | nx.draw(er_graph(50,0.08), node_size=40, node_color="gray")
21 | plt.show()
22 |
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/social_network_analysis_largest_connected_component.py:
--------------------------------------------------------------------------------
1 | import networkx as nx
2 | import numpy as np
3 | import matplotlib.pyplot as plt
4 |
5 | gen = nx.connected_component_subgraphs(G1)
6 | g = gen.__next__()
7 | # >>>type(g)
8 | # >>>g.number_of_nodes()
9 | # >>>len(gen.__next__()) #returns number of nodes in that subcomponent
10 | # >>>len(G1) #returns the total number of nodes in the graph
11 |
12 | G1_LCC = max(nx.connected_component_subgraphs(G1), key=len)
13 | G2_LCC = max(nx.connected_component_subgraphs(G2), key=len)
14 | # >>>len(G1_LCC)
15 | # >>>G1_LCC.number_of_nodes()
16 | ( G1_LCC.number_of_nodes() / G1.number_of_nodes() )*100
17 | # we see that 97.9% of all of the nodes of graph G1 are contained in the largest connected component.
18 | ( G2_LCC.number_of_nodes() / G2.number_of_nodes() )*100
19 | # we see that 92.4% of all of the nodes of graph G1 are contained in the largest connected component.
20 |
21 | plt.figure()
22 | nx.draw(G1_LCC, node_color = "red", edge_color = "gray", node_size = 20)
23 | # >>>plt.savefig("component.pdf")
24 | plt.figure()
25 | nx.draw(G2_LCC, node_color = "red", edge_color = "gray", node_size = 20)
26 | plt.show()
27 |
--------------------------------------------------------------------------------
/data-analysis project - 2 - social_network_analysis/social_network_analysis_plot_degree_distribution.py:
--------------------------------------------------------------------------------
1 | import matplotlib.pyplot as plt
2 |
3 | def plot_degree_distribution(G):
4 | plt.hist(list(G.degree().values()), histtype="step")
5 | plt.xlabel(" Degree $k$ ")
6 | plt.ylabel(" $P(k)$ ")
7 | plt.title(" Degree distribution ")
8 |
9 | G1 = er_graph(500,0.08)
10 | plot_degree_distribution(G1)
11 | G2 = er_graph(500,0.08)
12 | plot_degree_distribution(G2)
13 | G3 = er_graph(500,0.08)
14 | plot_degree_distribution(G3)
15 | plt.show()
16 |
17 | #1.2_extra graph
18 | #>>>G1 = er_graph(100, 0.03)
19 | #>>>plot_degree_distribution(G1)
20 | #>>>G2 = er_graph(100, 0.30)
21 | #>>>plot_degree_distribution(G2)
22 | #>>>plt.show()
23 |
--------------------------------------------------------------------------------
/data-analysis project - 3 - DNA_Translation/Capture.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 3 - DNA_Translation/Capture.PNG
--------------------------------------------------------------------------------
/data-analysis project - 3 - DNA_Translation/DNA_seq_altered.txt:
--------------------------------------------------------------------------------
1 | GGTCAGAAAAAGCCCTCTCCATGTCTACTCACGATACATCCCTGAAAACCACTGAGGAAGTGGCTTTTCA
2 | GATCATCTTGCTTTGCCAGTTTGGGGTTGGGACTTTTGCCAATGTATTTCTCTTTGTCTATAATTTCTCT
3 | CCAATCTCGACTGGTTCTAAACAGAGGCCCAGACAAGTGATTTTAAGACACATGGCTGTGGCCAATGCCT
4 | TAACTCTCTTCCTCACTATATTTCCAAACAACATGATGACTTTTGCTCCAATTATTCCTCAAACTGACCT
5 | CAAATGTAAATTAGAATTCTTCACTCGCCTCGTGGCAAGAAGCACAAACTTGTGTTCAACTTGTGTTCTG
6 | AGTATCCATCAGTTTGTCACACTTGTTCCTGTTAATTCAGGTAAAGGAATACTCAGAGCAAGTGTCACAA
7 | ACATGGCAAGTTATTCTTGTTACAGTTGTTGGTTCTTCAGTGTCTTAAATAACATCTACATTCCAATTAA
8 | GGTCACTGGTCCACAGTTAACAGACAATAACAATAACTCTAAAAGCAAGTTGTTCTGTTCCACTTCTGAT
9 | TTCAGTGTAGGCATTGTCTTCTTGAGGTTTGCCCATGATGCCACATTCATGAGCATCATGGTCTGGACCA
10 | GTGTCTCCATGGTACTTCTCCTCCATAGACATTGTCAGAGAATGCAGTACATATTCACTCTCAATCAGGA
11 | CCCCAGGGGCCAAGCAGAGACCACAGCAACCCATACTATCCTGATGCTGGTAGTCACATTTGTTGGCTTT
12 | TATCTTCTAAGTCTTATTTGTATCATCTTTTACACCTATTTTATATATTCTCATCATTCCCTGAGGCATT
13 | GCAATGACATTTTGGTTTCGGGTTTCCCTACAATTTCTCCTTTACTGTTGACCTTCAGAGACCCTAAGGG
14 | TCCTTGTTCTGTGTTCTTCAACTGTTGAAAGCCAGAGTCACTAAAAATGCCAAACACAGAAGACAGCTTT
15 | GCTAATACCATTAAATACTTTATTCCATAAATATGTTTTTAAAAGCTTGTATGAACAAGGTATGGTGCTC
16 | ACTGCTATACTTATAAAAGAGTAAGGTTATAATCACTTGTTGATATGAAAAGATTTCTGGTTGGAATCTG
17 | ATTGAAACAGTGAGTTATTCACCACCCTCCATTCTCT
18 |
19 |
--------------------------------------------------------------------------------
/data-analysis project - 3 - DNA_Translation/DNA_sequence_original.txt:
--------------------------------------------------------------------------------
1 | GGTCAGAAAAAGCCCTCTCCATGTCTACTCACGATACATCCCTGAAAACCACTGAGGAAGTGGCTTTTCA
2 | GATCATCTTGCTTTGCCAGTTTGGGGTTGGGACTTTTGCCAATGTATTTCTCTTTGTCTATAATTTCTCT
3 | CCAATCTCGACTGGTTCTAAACAGAGGCCCAGACAAGTGATTTTAAGACACATGGCTGTGGCCAATGCCT
4 | TAACTCTCTTCCTCACTATATTTCCAAACAACATGATGACTTTTGCTCCAATTATTCCTCAAACTGACCT
5 | CAAATGTAAATTAGAATTCTTCACTCGCCTCGTGGCAAGAAGCACAAACTTGTGTTCAACTTGTGTTCTG
6 | AGTATCCATCAGTTTGTCACACTTGTTCCTGTTAATTCAGGTAAAGGAATACTCAGAGCAAGTGTCACAA
7 | ACATGGCAAGTTATTCTTGTTACAGTTGTTGGTTCTTCAGTGTCTTAAATAACATCTACATTCCAATTAA
8 | GGTCACTGGTCCACAGTTAACAGACAATAACAATAACTCTAAAAGCAAGTTGTTCTGTTCCACTTCTGAT
9 | TTCAGTGTAGGCATTGTCTTCTTGAGGTTTGCCCATGATGCCACATTCATGAGCATCATGGTCTGGACCA
10 | GTGTCTCCATGGTACTTCTCCTCCATAGACATTGTCAGAGAATGCAGTACATATTCACTCTCAATCAGGA
11 | CCCCAGGGGCCAAGCAGAGACCACAGCAACCCATACTATCCTGATGCTGGTAGTCACATTTGTTGGCTTT
12 | TATCTTCTAAGTCTTATTTGTATCATCTTTTACACCTATTTTATATATTCTCATCATTCCCTGAGGCATT
13 | GCAATGACATTTTGGTTTCGGGTTTCCCTACAATTTCTCCTTTACTGTTGACCTTCAGAGACCCTAAGGG
14 | TCCTTGTTCTGTGTTCTTCAACTGTTGAAAGCCAGAGTCACTAAAAATGCCAAACACAGAAGACAGCTTT
15 | GCTAATACCATTAAATACTTTATTCCATAAATATGTTTTTAAAAGCTTGTATGAACAAGGTATGGTGCTC
16 | ACTGCTATACTTATAAAAGAGTAAGGTTATAATCACTTGTTGATATGAAAAGATTTCTGGTTGGAATCTG
17 | ATTGAAACAGTGAGTTATTCACCACCCTCCATTCTCT
--------------------------------------------------------------------------------
/data-analysis project - 3 - DNA_Translation/READ_ME.txt:
--------------------------------------------------------------------------------
1 | Translate the DNA->RNA->Protein : dataset : https://www.ncbi.nlm.nih.gov/ | Nucleotide sample : (NM_207618.2) link - https://www.ncbi.nlm.nih.gov/nuccore/NM_207618.2
2 |
3 | Life depends on the ability of cells to store, retrieve, and translate
4 | genetic instructions.
5 | These instructions are needed to make and maintain living organisms.
6 | For a long time, it was not clear what molecules
7 | were able to copy and transmit genetic information.
8 | We now know that this information is carried by the dioxyribonucleic acid
9 | or DNA in all living things.
10 | DNA is a discrete code physically present
11 | in almost every cell of an organism.
12 | We can think of DNA as a one dimensional string of characters
13 | with four characters to choose from.
14 | These characters are A, C, G, and T. They
15 | stand for the first letters with the four nucleotides used to construct DNA.
16 | The full names of these nucleotides are adenine, cytosine, guanine,
17 | and thymine.
18 | Each unique three character sequence of nucleotides,
19 | sometimes called a nucleotide triplet, corresponds to one amino acid.
20 | The sequence of amino acids is unique for each type of protein
21 | and all proteins are built from the same set of just 20 amino acids
22 | for all living things.
23 | Protein molecules dominate the behavior of the cell
24 | serving as structural supports, chemical catalysts, molecular motors, and so on.
25 | The so called central dogma of molecular biology
26 | describes the flow of genetic information in a biological system.
27 | Instructions in the DNA are first transcribed into RNA
28 | and the RNA is then translated into proteins.
29 | We can think of DNA, when read as sequences of three letters,
30 | as a dictionary of life.
31 | In this case study, we will first download a DNA strand as a text file
32 | from a public web-based repository of DNA sequences.
33 | We will then write code to translate the DNA sequence
34 | to a sequence of amino acids where each amino acid is
35 | represented by a unique letter.
36 | We will also download the amino acid sequence to check our solution.
37 |
38 |
39 | I did this project to accompany my learnings from HarvardX course - PH526x Using Python for Research.
40 |
41 | - Amartya Ranjan Saikia (amartyasaikia@acm.org/ar5saikia@gmail.com)
--------------------------------------------------------------------------------
/data-analysis project - 3 - DNA_Translation/amino_acid__seq_altered.txt:
--------------------------------------------------------------------------------
1 | MSTHDTSLKTTEEVAFQIILLCQFGVGTFANVFLFVYNFSPIST
2 | GSKQRPRQVILRHMAVANALTLFLTIFPNNMMTFAPIIPQTDLKCKLEFFTRLVARST
3 | NLCSTCVLSIHQFVTLVPVNSGKGILRASVTNMASYSCYSCWFFSVLNNIYIPIKVTG
4 | PQLTDNNNNSKSKLFCSTSDFSVGIVFLRFAHDATFMSIMVWTSVSMVLLLHRHCQRM
5 | QYIFTLNQDPRGQAETTATHTILMLVVTFVGFYLLSLICIIFYTYFIYSHHSLRHCND
6 | ILVSGFPTISPLLLTFRDPKGPCSVFFNC
--------------------------------------------------------------------------------
/data-analysis project - 3 - DNA_Translation/amino_acid_sequence_original.txt:
--------------------------------------------------------------------------------
1 | MSTHDTSLKTTEEVAFQIILLCQFGVGTFANVFLFVYNFSPIST
2 | GSKQRPRQVILRHMAVANALTLFLTIFPNNMMTFAPIIPQTDLKCKLEFFTRLVARST
3 | NLCSTCVLSIHQFVTLVPVNSGKGILRASVTNMASYSCYSCWFFSVLNNIYIPIKVTG
4 | PQLTDNNNNSKSKLFCSTSDFSVGIVFLRFAHDATFMSIMVWTSVSMVLLLHRHCQRM
5 | QYIFTLNQDPRGQAETTATHTILMLVVTFVGFYLLSLICIIFYTYFIYSHHSLRHCND
6 | ILVSGFPTISPLLLTFRDPKGPCSVFFNC
--------------------------------------------------------------------------------
/data-analysis project - 3 - DNA_Translation/code.jpegs_DNA_translation/code_dna_seq.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 3 - DNA_Translation/code.jpegs_DNA_translation/code_dna_seq.JPG
--------------------------------------------------------------------------------
/data-analysis project - 3 - DNA_Translation/dna_seq.py:
--------------------------------------------------------------------------------
1 | #open the original DNA sequence .txt file
2 | inputfile="DNA_sequence_original.txt" #make sure to put your file in the right directory
3 | f=open(inputfile,"r")
4 | seq=f.read()
5 | # >>>seq #check the DNA sequence
6 | seq=seq.replace("\n","") #you will see "\n" characters messing with our DNA sequence, so we are cleaning them off the sequence.
7 | seq=seq.replace("\r","")
8 | # >>>seq #check the DNA sequence
9 | def translate(seq):
10 | """
11 | Translate a string containing a nucleotide sequence into a string containing the corresponding sequence of amino acids .
12 | Nucleotides are translated in triplets using the table dictionary; each amino acid 4 is encoded with a string of length 1.
13 | """
14 | table = {
15 | 'ATA':'I', 'ATC':'I', 'ATT':'I', 'ATG':'M',
16 | 'ACA':'T', 'ACC':'T', 'ACG':'T', 'ACT':'T',
17 | 'AAC':'N', 'AAT':'N', 'AAA':'K', 'AAG':'K',
18 | 'AGC':'S', 'AGT':'S', 'AGA':'R', 'AGG':'R', #this table dictionary is pre-created
19 | 'CTA':'L', 'CTC':'L', 'CTG':'L', 'CTT':'L',
20 | 'CCA':'P', 'CCC':'P', 'CCG':'P', 'CCT':'P',
21 | 'CAC':'H', 'CAT':'H', 'CAA':'Q', 'CAG':'Q',
22 | 'CGA':'R', 'CGC':'R', 'CGG':'R', 'CGT':'R',
23 | 'GTA':'V', 'GTC':'V', 'GTG':'V', 'GTT':'V',
24 | 'GCA':'A', 'GCC':'A', 'GCG':'A', 'GCT':'A',
25 | 'GAC':'D', 'GAT':'D', 'GAA':'E', 'GAG':'E',
26 | 'GGA':'G', 'GGC':'G', 'GGG':'G', 'GGT':'G',
27 | 'TCA':'S', 'TCC':'S', 'TCG':'S', 'TCT':'S',
28 | 'TTC':'F', 'TTT':'F', 'TTA':'L', 'TTG':'L',
29 | 'TAC':'Y', 'TAT':'Y', 'TAA':'_', 'TAG':'_',
30 | 'TGC':'C', 'TGT':'C', 'TGA':'_', 'TGG':'W',
31 | }
32 | protein=""
33 | if len(seq)%3==0:
34 | for i in range(0,len(seq),3):
35 | codon=seq[i:i+3]
36 | protein+=table[codon]
37 | return protein
38 | def read_seq(inputfile):
39 | with open(inputfile,"r") as f:
40 | seq=f.read()
41 | seq=seq.replace("\n","")
42 | seq=seq.replace("\r","")
43 | return seq
44 |
45 | prt = read_seq("amino_acid_sequence_original.txt")
46 | dna = read_seq("DNA_sequence_original.txt")
47 | # >>>translate(dna)
48 | # >>>translate(dna[20:938]) #try translating the DNA sequence into a protein sequence
49 | # >>>len(translate(dna[20:938]))%3 #check, now than the translated sequence is divisible by 3 since we classified the terminal & starting codon as well
50 | # say p = translate(dna[20:938]) , try printing >>>p & >>>prt | p = amino acid sequence prepared by us & prt = amino acid sequence from the database of NCBI
51 | # >>>p==prt , # = False, since _ character is read by default as an end to the string in p
52 | p=translate(dna[20:935]) #dna[20:938] --> dna[20:935] (since, each character = tri base pair)
53 | p==prt # True , we got our analysis correct
54 |
55 | '''
56 | prt==p[:-1] #False
57 | p=translate(dna[20:938])
58 | prt==p[:-1] #True
59 | '''
60 |
--------------------------------------------------------------------------------
/data-analysis project - 3 - DNA_Translation/figures_DNA_translation/dna_seq_with_formatting.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 3 - DNA_Translation/figures_DNA_translation/dna_seq_with_formatting.JPG
--------------------------------------------------------------------------------
/data-analysis project - 3 - DNA_Translation/figures_DNA_translation/dna_seq_without_formatting.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 3 - DNA_Translation/figures_DNA_translation/dna_seq_without_formatting.JPG
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/READ_ME.txt:
--------------------------------------------------------------------------------
1 | Assigning observation(point) to a category & building Synthetic Data.We also build our very own kNN classifier.
2 |
3 | Statistical learning refers to a collection
4 | of mathematical and computation tools to understand data.
5 | In what is often called supervised learning,
6 | the goal is to estimate or predict an output based on one or more inputs.
7 | The inputs have many names, like predictors, independent variables,
8 | features, and variables being called common.
9 | The output or outputs are often called response variables,
10 | or dependent variables.
11 | If the response is quantitative - say, a number that measures weight or height,
12 | we call these problems regression problems.
13 | If the response is qualitative-- say, yes or no, or blue or green,
14 | we call these problems classification problems.
15 | This case study deals with one specific approach to classification.
16 | The goal is to set up a classifier such that when
17 | it's presented with a new observation whose category is not known,
18 | it will attempt to assign that observation to a category, or a class,
19 | based on the observations for which it does know the true category.
20 | This specific method is known as the k-Nearest Neighbors classifier,
21 | or kNN for short.
22 | Given a positive integer k, say 5, and a new data point,
23 | it first identifies those k points in the data that are nearest to the point
24 | and classifies the new data point as belonging to the most common class
25 | among those k neighbors.
26 |
27 |
28 |
29 | Order of Project subparts :
30 | 1.kNN_distance_algorithm
31 | 2.kNN_majority_vote+nearest_neighbour
32 | 3.kKK_predict+synthetic_points
33 | 4.kNN_prediction_grids
34 | 5.kNN_scikitlearn_vS_organic_on_IRIS
35 |
36 |
37 | I did this project to accompany my learnings from HarvardX course - PH526x Using Python for Research.
38 |
39 | - Amartya Ranjan Saikia (amartyasaikia@acm.org/ar5saikia@gmail.com)
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/code.jpegs_kNN_algorithm/kKK_predict+synthetic_points.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 4 - kNN_algorithm/code.jpegs_kNN_algorithm/kKK_predict+synthetic_points.JPG
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/code.jpegs_kNN_algorithm/kNN_distance_algorithm.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 4 - kNN_algorithm/code.jpegs_kNN_algorithm/kNN_distance_algorithm.JPG
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/code.jpegs_kNN_algorithm/kNN_majority_vote+nearest_neighbour.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 4 - kNN_algorithm/code.jpegs_kNN_algorithm/kNN_majority_vote+nearest_neighbour.JPG
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/code.jpegs_kNN_algorithm/kNN_prediction_grids.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 4 - kNN_algorithm/code.jpegs_kNN_algorithm/kNN_prediction_grids.JPG
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/code.jpegs_kNN_algorithm/kNN_scikitlearn_vS_organic_on_IRIS.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 4 - kNN_algorithm/code.jpegs_kNN_algorithm/kNN_scikitlearn_vS_organic_on_IRIS.JPG
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/figures_kNN_algorithm/figure_1_points_in_space.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 4 - kNN_algorithm/figures_kNN_algorithm/figure_1_points_in_space.png
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/figures_kNN_algorithm/figure_2_kNN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 4 - kNN_algorithm/figures_kNN_algorithm/figure_2_kNN.png
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/figures_kNN_algorithm/figure_3_prediction_grid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 4 - kNN_algorithm/figures_kNN_algorithm/figure_3_prediction_grid.png
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/figures_kNN_algorithm/figure_4_kNN_IRIS_dataset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 4 - kNN_algorithm/figures_kNN_algorithm/figure_4_kNN_IRIS_dataset.png
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/figures_kNN_algorithm/figure_5_Iris_type_comparison.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 4 - kNN_algorithm/figures_kNN_algorithm/figure_5_Iris_type_comparison.png
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/kKK_predict+synthetic_points.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | import random
3 | import scipy.stats as ss
4 | import matplotlib.pyplot as plt
5 |
6 | ''' add the functions and libraries from previous programmes '''
7 |
8 | def knn_predict(p,points,outcomes,k=5):
9 | ind=find_nearest_neighbours(p,points,k)
10 | return majority_vote(outcomes[ind])
11 |
12 | outcomes=np.array([0,0,0,0,1,1,1,1,1])
13 | knn_predict(np.array([2.5,2.7]),points,outcomes,k=2)
14 |
15 | def generate_synth_data(n=50):
16 | points = np.concatenate((ss.norm(0,1).rvs((n,2)),ss.norm(1,1).rvs((n,2))),axis=0)
17 | outcomes = np.concatenate((np.repeat(0,n),np.repeat(1,n)))
18 | return (points,outcomes)
19 |
20 | n=20
21 | plt.figure()
22 | plt.plot(points[:n,0], points[:n,1], "ro")
23 | plt.plot(points[n:,0], points[n:,1], "bo")
24 | plt.show()
25 |
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/kNN/Kernel_Machine.svg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 4 - kNN_algorithm/kNN/Kernel_Machine.svg.png
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/kNN/KnnClassification.svg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 4 - kNN_algorithm/kNN/KnnClassification.svg.png
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/kNN_distance_algorithm.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | def distance(p1,p2):
3 | return np.sqrt(np.sum(np.power(p2-p1,2))) #distance between two points
4 | p1 = np.array([1, 1]) #coordinate x=1,y=1
5 | p2 = np.array([4, 4]) #coordinate x=4,y=4
6 | distance(p1,p2)
7 |
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/kNN_majority_vote+nearest_neighbour.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | import random
3 | import scipy.stats as ss
4 | import matplotlib.pyplot as plt
5 |
6 | points=np.array([[1,1],[1,2],[1,3],[2,1],[2,2],[2,3],[3,1],[3,2],[3,3]])
7 | p=np.array([2.5,2])
8 |
9 | def majority_vote(votes):
10 | vote_counts = {}
11 | for vote in votes:
12 | if vote in vote_counts:
13 | vote_counts[vote]+=1
14 | else:
15 | vote_counts[vote]=1
16 | winners = []
17 | max_count = max(vote_counts.values())
18 | for vote, count in vote_counts.items():
19 | if count == max_count:
20 | winners.append(vote)
21 | return random.choice(winners) #returns winner randomly if there are more than 1 winner
22 |
23 | # >>>votes=[1,2,3,2,2,3,1,1,1,2,3,1,1,1,2,3,3,3,2,2,2,3,2,3,1,1,2] #sample vote counts
24 | # >>>vote_counts=majority_vote(votes)
25 | def majority_vote_short(votes):
26 | mode,count = ss.mstats.mode(votes)
27 | return mode
28 |
29 | def find_nearest_neighbours(p,points,k=5): #algorithm to find the nearest neighbours
30 | distances=np.zeros(points.shape[0])
31 | for i in range(len(distances)):
32 | distances[i]=distance(p,points[i])
33 | ind = np.argsort(distances) #returns index,according to sorted values in array
34 | return ind[:k]
35 |
36 | ind=find_nearest_neighbours(p,points,2);print(points[ind]) #gives the nearest neighbour's for this sample case
37 |
38 | plt.plot(points[:,0],points[:,1],"ro")
39 | plt.plot(p[0],p[1], "bo")
40 | plt.axis([0.5,3.5,0.5,3.5])
41 | plt.show()
42 |
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/kNN_prediction_grids.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | import random
3 | import scipy.stats as ss
4 | import matplotlib.pyplot as plt
5 |
6 | def make_prediction_grid(predictors,outcomes,limits,h,k):
7 | (x_min,x_max, y_min,y_max) = limits
8 | xs=np.arange(x_min,x_max,h)
9 | ys = np.arange(y_min,y_max, h)
10 | xx, yy = np.meshgrid(xs,ys)
11 |
12 | prediction_grid = np.zeros(xx.shape, dtype = int)
13 | for i,x in enumerate(xs):
14 | for j,y in enumerate(ys):
15 | p=np.array([x,y])
16 | prediction_grid[j,i] = knn_predict(p,predictors,outcomes,k)
17 | return (xx,yy,prediction_grid)
18 |
19 | def plot_prediction_grid (xx, yy, prediction_grid, filename):
20 | """ Plot KNN predictions for every point on the grid."""
21 | from matplotlib.colors import ListedColormap
22 | background_colormap = ListedColormap (["hotpink","lightskyblue", "yellowgreen"])
23 | observation_colormap = ListedColormap (["red","blue","green"])
24 | plt.figure(figsize =(10,10))
25 | plt.pcolormesh(xx, yy, prediction_grid, cmap = background_colormap, alpha = 0.5)
26 | plt.scatter(predictors[:,0], predictors [:,1], c = outcomes, cmap = observation_colormap, s = 50)
27 | plt.xlabel('Variable 1'); plt.ylabel('Variable 2')
28 | plt.xticks(()); plt.yticks(())
29 | plt.xlim (np.min(xx), np.max(xx))
30 | plt.ylim (np.min(yy), np.max(yy))
31 | plt.savefig(filename)
32 |
33 | (predictors, outcomes) = generate_synth_data()
34 | # >>>predictors.shape
35 | # >>>outcomes.shape
36 | k=5; filename="knn_synth_5.pdf"; limits=(-3,4,-3,4); h=0.1
37 | (xx,yy,prediction_grid) = make_prediction_grid(predictors,outcomes,limits,h,k)
38 | plot_prediction_grid(xx,yy,prediction_grid,filename)
39 | plt.show()
40 |
--------------------------------------------------------------------------------
/data-analysis project - 4 - kNN_algorithm/kNN_scikitlearn_vS_organic_on_IRIS.py:
--------------------------------------------------------------------------------
1 | from sklearn import datasets
2 | import numpy as np
3 | import random
4 | import matplotlib.pyplot as plt
5 | '''
6 | We'll be applying both the SciKitLearn and our homemade classifier to a classic data set created by Ron Fisher in 1933.
7 | It consists of 150 different iris flowers.50 from each of three different species.For each flower, we have the following
8 | covariates: sepal length, sepal width,petal length, and petal width.
9 | '''
10 | iris=datasets.load_iris()
11 | # >>>iris["data"]
12 | predictors = iris.data[:, 0:2]
13 | outcomes = iris.target
14 |
15 | plt.plot(predictors[outcomes==0][:,0], predictors[outcomes==0][:,1], "ro")
16 | plt.plot(predictors[outcomes==1][:,0], predictors[outcomes==1][:,1], "go")
17 | plt.plot(predictors[outcomes==2][:,0], predictors[outcomes==2][:,1], "bo")
18 |
19 | k=5; filename="iris_grid.pdf"; limits=(4,8,1.5,4.5); h=0.1
20 | (xx,yy,prediction_grid) = make_prediction_grid(predictors,outcomes,limits,h,k)
21 | plot_prediction_grid(xx,yy,prediction_grid,filename)
22 | plt.show()
23 |
24 | from sklearn.neighbors import KNeighborsClassifier #predictions from skikit
25 | knn = KNeighborsClassifier(n_neighbors=5)
26 | knn.fit(predictors,outcomes)
27 | sk_predictions = knn.predict(predictors)
28 |
29 | my_predictions = np.array([knn_predict(p,predictors,outcomes,5) for p in predictors])
30 |
31 | # >>>sk_predictions == my_predictions
32 | # >>>np.mean(sk_predictions == my_predictions)
33 | print(" prediction by scikit learn : ")
34 | print(100*np.mean(sk_predictions == outcomes))
35 | print(" prediction by own model : ")
36 | print(100*np.mean(my_predictions == outcomes))
37 |
38 | # our homemade predicter is actually somewhat better
39 |
--------------------------------------------------------------------------------
/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/Books/French/diderot/Les deux amis de Bourbonne.txt:
--------------------------------------------------------------------------------
1 | The Project Gutenberg EBook of Les deux amis de Bourbonne, by Denis Diderot
2 |
3 | This eBook is for the use of anyone anywhere at no cost and with
4 | almost no restrictions whatsoever. You may copy it, give it away or
5 | re-use it under the terms of the Project Gutenberg License included
6 | with this eBook or online at www.gutenberg.net
7 |
8 |
9 | Title: Les deux amis de Bourbonne
10 |
11 | Author: Denis Diderot
12 |
13 | Editor: Jules Assézat
14 |
15 | Release Date: April 25, 2009 [EBook #28603]
16 |
17 | Language: French
18 |
19 |
20 | *** START OF THIS PROJECT GUTENBERG EBOOK LES DEUX AMIS DE BOURBONNE ***
21 |
22 |
23 |
24 |
25 | Produced by Laurent Vogel and the Online Distributed
26 | Proofreading Team at http://www.pgdp.net (This file was
27 | produced from images generously made available by the
28 | Bibliothèque nationale de France (BnF/Gallica) at
29 | http://gallica.bnf.fr)
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | [Extrait des OEuvres complètes de Diderot, éditées par Jules Assézat,
38 | 5ème volume, Paris, Garnier Frères, 1875.]
39 |
40 |
41 |
42 |
43 | LES DEUX AMIS DE BOURBONNE
44 |
45 | (Écrit en 1770--Publié en 1773)
46 |
47 |
48 |
49 |
50 | NOTICE PRÉLIMINAIRE
51 |
52 |
53 | Voici la Notice qui précède ce conte dans l'édition Brière:
54 |
55 | «Au mois d'août 1770, Diderot[1] vint à Bourbonne-les-Bains, près de
56 | Langres, pour y voir une amie qui avait mené sa fille aux eaux dans
57 | l'espérance de lui rendre la santé altérée par les suites d'une première
58 | couche. Il trouva ces dames occupées, pour se désennuyer, à écrire des
59 | contes qu'elles adressaient à leurs correspondants de Paris. L'un d'eux
60 | venait à son tour de leur envoyer les _Deux Amis, conte iroquois_ que
61 | Saint-Lambert avait fait paraître peu de jours après sa réception à
62 | l'Académie française. Diderot eut l'idée de riposter par l'histoire des
63 | _Deux Amis de Bourbonne_, dont la simplicité contraste d'une manière si
64 | touchante avec la prétention du conte de Saint-Lambert. Cet écrit,
65 | échappé sans effort à la plume du philosophe, et dans lequel on retrouve
66 | des personnages contemporains, fut adressé par la jeune malade, ou la
67 | _petite soeur_, au _petit frère_, son correspondant, qui lui avait
68 | envoyé le conte iroquois.»
69 |
70 | Nous n'avons à ajouter à ce qui précède que deux mots. Les dames que
71 | retrouva Diderot à Bourbonne étaient Mme de Meaux et Mme de Prunevaux,
72 | sa fille. Le conte passa pour être de cette dernière, et comme son
73 | correspondant le croyait vrai, elle dut avoir de nouveau recours à
74 | Diderot pour le compléter. C'est à ce même moment que Diderot fit une
75 | courte excursion à Langres. Il revint de ce voyage ayant en
76 | portefeuille, outre les _Deux Amis de Bourbonne_, l'_Entretien d'un père
77 | avec ses enfants_, inspiré par la visite de la maison paternelle. Sur
78 | ces entrefaites, Gessner lui fit demander, comme une faveur, quelques
79 | pages pour accompagner la traduction de ses _Nouvelles Idylles_. Il lui
80 | donna les deux morceaux qui furent insérés en tête des _Contes moraux et
81 | Nouvelles Idylles de MM. D... et Gessner_ (Zuric, chez Orel, Gessner,
82 | Fuessli et Cie, 1773, petit in-8º), sous ce titre: _Contes moraux_ de M.
83 | D... Ils ont été souvent réimprimés.
84 |
85 | Voici ce que dit à ce sujet Gessner, dans la préface de l'édition in-4º
86 | ornée de frontispice, figures, en-têtes et culs-de-lampe gravés à
87 | l'eau-forte par lui-même (1773, IV, 184 pages. Zuric, chez l'auteur):
88 |
89 | «Les premiers ouvrages de M. Gessner ont été reçus si favorablement dans
90 | les païs étrangers et surtout en France, qu'il ne s'intéresse pas moins
91 | à la traduction[2] de celui-ci qu'à l'original même...
92 |
93 | «M. Gessner a communiqué son projet aux amis qu'il a à Paris, et
94 | particulièrement à M. D..., dont l'approbation lui a toujours été si
95 | précieuse. Cet homme célèbre a eu la bonté de lui envoyer en manuscript
96 | les deux contes moraux qui précèdent la traduction des _Nouvelles
97 | Idylles_. M. Gessner se trouve heureux de pouvoir offrir à la France un
98 | présent qu'elle recevra sans doute avec plaisir et qui sera le monument
99 | d'une amitié que la seule culture des lettres a fait naître entre deux
100 | hommes que des contrées éloignées ont toujours tenus séparés.»
101 |
102 | Dans la préface de l'édition des _Idylles_ de Gessner, illustrées par
103 | Moreau (1795), Renouard dit qu'il a pu corriger sur les manuscrits
104 | annotés par Diderot, _et qui étaient en sa possession_, le texte des
105 | _Deux Amis de Bourbonne_ et de l'_Entretien d'un père et de ses
106 | enfants_.
107 |
108 | C'est de ces deux contes que l'abbé de Vauxcelles, dont nous avons déjà
109 | parlé (_Notice_ du _Supplément au voyage de Bougainville_), disait
110 | qu'ils faisaient au milieu des _Idylles_ de Gessner l'effet «de satyres
111 | parmi des nymphes!»
112 |
113 | Disons, par contre, que Goethe, dans ses _Mémoires_, constate que les
114 | _Deux Amis_ firent une vive impression dans le petit cercle des
115 | étudiants allemands, à Strasbourg, où il était alors. «Nous fûmes ravis,
116 | dit-il, de ses braves braconniers, de ses vaillants contrebandiers,
117 | canaille poétique, qui ne tarda pas à venir faire des siennes sur le
118 | théâtre allemand:» dans _les Brigands_ de Schiller d'abord.
119 |
120 | * * * * *
121 |
122 | Nous recommanderons, comme complétant ce que nous avons pu dire à propos
123 | de l'annexe de la _Religieuse_, l'annexe des _Amis de Bourbonne_: «Et
124 | puis, il y a trois sortes de contes...»
125 |
126 |
127 |
128 |
129 | LES DEUX AMIS DE BOURBONNE
130 |
131 |
132 | Il y avait ici deux hommes, qu'on pourrait appeler les Oreste et Pylade
133 | de Bourbonne. L'un se nommait Olivier, et l'autre Félix; ils étaient nés
134 | le même jour, dans la même maison, et des deux soeurs. Ils avaient été
135 | nourris du même lait; car l'une des mères étant morte en couche, l'autre
136 | se chargea des deux enfants. Ils avaient été élevés ensemble; ils
137 | étaient toujours séparés des autres: ils s'aimaient comme on existe,
138 | comme on vit, sans s'en douter; ils le sentaient à tout moment, et ils
139 | ne se l'étaient peut-être jamais dit. Olivier avait une fois sauvé la
140 | vie à Félix, qui se piquait d'être grand nageur, et qui avait failli de
141 | se noyer: ils ne s'en souvenaient ni l'un ni l'autre. Cent fois Félix
142 | avait tiré Olivier des aventures fâcheuses où son caractère impétueux
143 | l'avait engagé; et jamais celui-ci n'avait songé à l'en remercier: ils
144 | s'en retournaient ensemble à la maison, sans se parler, ou en parlant
145 | d'autre chose.
146 |
147 | Lorsqu'on tira pour la milice, le premier billet fatal étant tombé sur
148 | Félix, Olivier dit: «L'autre est pour moi.» Ils firent leur temps de
149 | service; ils revinrent au pays: plus chers l'un à l'autre qu'ils ne
150 | l'étaient encore auparavant, c'est ce que je ne saurais vous assurer:
151 | car, petit frère, si les bienfaits réciproques cimentent les amitiés
152 | réfléchies, peut-être ne font-ils rien à celles que j'appellerais
153 | volontiers des amitiés animales et domestiques. À l'armée, dans une
154 | rencontre, Olivier étant menacé d'avoir la tête fendue d'un coup de
155 | sabre, Félix se mit machinalement au-devant du coup, et en resta
156 | balafré: on prétend qu'il était fier de cette blessure; pour moi, je
157 | n'en crois rien. À Hastembeck[3], Olivier avait retiré Félix d'entre la
158 | foule des morts, où il était demeuré. Quand on les interrogeait, ils
159 | parlaient quelquefois des secours qu'ils avaient reçus l'un de l'autre,
160 | jamais de ceux qu'ils avaient rendus l'un à l'autre. Olivier disait de
161 | Félix, Félix disait d'Olivier; mais ils ne se louaient pas. Au bout de
162 | quelque temps de séjour au pays, ils aimèrent; et le hasard voulut que
163 | ce fût la même fille. Il n'y eut entre eux aucune rivalité; le premier
164 | qui s'aperçut de la passion de son ami se retira: ce fut Félix. Olivier
165 | épousa; et Félix dégoûté de la vie sans savoir pourquoi, se précipita
166 | dans toutes sortes de métiers dangereux; le dernier fut de se faire
167 | contrebandier[4].
168 |
169 | Vous n'ignorez pas, petit frère, qu'il y a quatre tribunaux en France,
170 | Caen, Reims, Valence et Toulouse, où les contrebandiers sont jugés; et
171 | que le plus sévère des quatre, c'est celui de Reims, où préside un nommé
172 | Coleau, l'âme la plus féroce que la nature ait encore formée. Félix fut
173 | pris les armes à la main, conduit devant le terrible Coleau, et condamné
174 | à mort, comme cinq cents autres qui l'avaient précédé. Olivier apprit le
175 | sort de Félix. Une nuit, il se lève d'à côté de sa femme, et, sans lui
176 | rien dire, il s'en va à Reims. Il s'adresse au juge Coleau; il se jette
177 | à ses pieds, et lui demande la grâce de voir et d'embrasser Félix.
178 | Coleau le regarde, se tait un moment, et lui fait signe de s'asseoir.
179 | Olivier s'assied. Au bout d'une demi-heure, Coleau tire sa montre et dit
180 | à Olivier: «Si tu veux voir et embrasser ton ami vivant, dépêche-toi, il
181 | est en chemin; et si ma montre va bien, avant qu'il soit dix minutes il
182 | sera pendu.» Olivier, transporté de fureur, se lève, décharge sur la
183 | nuque du cou au juge Coleau un énorme coup de bâton, dont il l'étend
184 | presque mort; court vers la place, arrive, crie, frappe le bourreau,
185 | frappe les gens de la justice, soulève la populace indignée de ces
186 | exécutions. Les pierres volent; Félix délivré s'enfuit; Olivier songe à
187 | son salut: mais un soldat de maréchaussée lui avait percé les flancs
188 | d'un coup de baïonnette, sans qu'il s'en fût aperçu. Il gagna la porte
189 | de la ville, mais il ne put aller plus loin; des voituriers charitables
190 | le jetèrent sur leur charrette, et le déposèrent à la porte de sa maison
191 | un moment avant qu'il expirât; il n'eut que le temps de dire à sa femme:
192 | «Femme, approche, que je t'embrasse; je me meurs, mais le balafré est
193 | sauvé.»
194 |
195 | Un soir que nous allions à la promenade, selon notre usage, nous vîmes
196 | au-devant d'une chaumière une grande femme debout, avec quatre petits
197 | enfants à ses pieds; sa contenance triste et ferme attira notre
198 | attention, et notre attention fixa la sienne. Après un moment de
199 | silence, elle nous dit: «Voilà quatre petits enfants, je suis leur mère,
200 | et je n'ai plus de mari.» Cette manière haute de solliciter la
201 | commisération était bien faite pour nous toucher. Nous lui offrîmes nos
202 | secours, qu'elle accepta avec honnêteté: c'est à cette occasion que nous
203 | avons appris l'histoire de son mari Olivier et de Félix son ami. Nous
204 | avons parlé d'elle, et j'espère que notre recommandation ne lui aura pas
205 | été inutile. Vous voyez, petit frère, que la grandeur d'âme et les
206 | hautes qualités sont de toutes les conditions et de tous les pays; que
207 | tel meurt obscur, à qui il n'a manqué qu'un autre théâtre; et qu'il ne
208 | faut pas aller jusque chez les Iroquois pour trouver deux amis.
209 |
210 | Dans le temps que le brigand Testalunga infestait la Sicile avec sa
211 | troupe, Romano, son ami et son confident, fut pris. C'était le
212 | lieutenant de Testalunga, et son second. Le père de ce Romano fut arrêté
213 | et emprisonné pour crimes. On lui promit sa grâce et sa liberté, pourvu
214 | que Romano trahît et livrât son chef Testalunga. Le combat entre la
215 | tendresse filiale et l'amitié jurée fut violent. Mais Romano père
216 | persuada son fils de donner la préférence à l'amitié, honteux de devoir
217 | la vie à une trahison. Romano se rendit à l'avis de son père. Romano
218 | père fut mis à mort; et jamais les tortures les plus cruelles ne purent
219 | arracher de Romano fils la délation de ses complices.
220 |
221 | * * * * *
222 |
223 | Vous avez désiré, petit frère, de savoir ce qu'est devenu Félix; c'est
224 | une curiosité si simple, et le motif en est si louable, que nous nous
225 | sommes un peu reproché de ne l'avoir pas eue. Pour réparer cette faute,
226 | nous avons pensé d'abord à M. Papin, docteur en théologie, et curé de
227 | Sainte-Marie à Bourbonne: mais maman s'est ravisée; et nous avons donné
228 | la préférence au subdélégué Aubert, qui est un bon homme, bien rond, et
229 | qui nous a envoyé le récit suivant, sur la vérité duquel vous pouvez
230 | compter:
231 |
232 | «Le nommé Félix vit encore. Échappé des mains de la justice, il se jeta
233 | dans les forêts de la province, dont il avait appris à connaître les
234 | tours et les détours pendant qu'il faisait la contrebande, cherchant à
235 | s'approcher peu à peu de la demeure d'Olivier, dont il ignorait le sort.
236 |
237 | «Il y avait au fond d'un bois, où vous vous êtes promenée quelquefois,
238 | un charbonnier dont la cabane servait d'asile à ces sortes de gens;
239 | c'était aussi l'entrepôt de leurs marchandises et de leurs armes: ce fut
240 | là que Félix se rendit, non sans avoir couru le danger de tomber dans
241 | les embûches de la maréchaussée, qui le suivait à la piste. Quelques-uns
242 | de ses associés y avaient porté la nouvelle de son emprisonnement à
243 | Reims; et le charbonnier et la charbonnière le croyaient justicié,
244 | lorsqu'il leur apparut.
245 |
246 | «Je vais vous raconter la chose, comme je la tiens de la charbonnière,
247 | qui est décédée ici il n'y a pas longtemps.
248 |
249 | «Ce furent ses enfants, en rôdant autour de la cabane, qui le virent les
250 | premiers. Tandis qu'il s'arrêtait à caresser le plus jeune, dont il
251 | était le parrain, les autres entrèrent dans la cabane en criant: Félix!
252 | Félix! Le père et la mère sortirent en répétant le même cri de joie;
253 | mais ce misérable était si harassé de fatigue et de besoin, qu'il n'eut
254 | pas la force de répondre, et qu'il tomba presque défaillant entre leurs
255 | bras.
256 |
257 | «Ces bonnes gens le secoururent de ce qu'ils avaient, lui donnèrent du
258 | pain, du vin, quelques légumes: il mangea, et s'endormit.
259 |
260 | «À son réveil, son premier mot fut: «Olivier! Enfants, ne savez-vous
261 | rien d'Olivier?--Non,» lui répondirent-ils. Il leur raconta l'aventure
262 | de Reims; il passa la nuit et le jour suivant avec eux. Il soupirait, il
263 | prononçait le nom d'Olivier; il le croyait dans les prisons de Reims; il
264 | voulait y aller, il voulait aller mourir avec lui; et ce ne fut pas sans
265 | peine que le charbonnier et la charbonnière le détournèrent de ce
266 | dessein.
267 |
268 | «Sur le milieu de la seconde nuit, il prit un fusil, il mit un sabre
269 | sous son bras, et s'adressant à voix basse au charbonnier...
270 | «Charbonnier!
271 |
272 | «--Félix!
273 |
274 | «--Prends ta cognée, et marchons.
275 |
276 | «--Où!
277 |
278 | «--Belle demande! chez Olivier.»
279 |
280 | «Ils vont; mais tout en sortant de la forêt, les voilà enveloppés d'un
281 | détachement de maréchaussée.
282 |
283 | «Je m'en rapporte à ce que m'en a dit la charbonnière; mais il est inouï
284 | que deux hommes à pied aient pu tenir contre une vingtaine d'hommes à
285 | cheval: apparemment que ceux-ci étaient épars, et qu'ils voulaient se
286 | saisir de leur proie en vie. Quoi qu'il en soit, l'action fut
287 | très-chaude; il y eut cinq chevaux d'estropiés et sept cavaliers de
288 | hachés ou sabrés. Le pauvre charbonnier resta mort sur la place d'un
289 | coup de feu à la tempe; Félix regagna la forêt; et comme il est d'une
290 | agilité incroyable, il courait d'un endroit à l'autre; en courant, il
291 | chargeait son fusil, tirait, donnait un coup de sifflet. Ces coups de
292 | sifflet, ces coups de fusil donnés, tirés à différents intervalles et de
293 | différents côtés, firent craindre aux cavaliers de maréchaussée qu'il
294 | n'y eût là une horde de contrebandiers; et ils se retirèrent en
295 | diligence.
296 |
297 | «Lorsque Félix les vit éloignés, il revint sur le champ de bataille; il
298 | mit le cadavre du charbonnier sur ses épaules, et reprit le chemin de la
299 | cabane, où la charbonnière et ses enfants dormaient encore. Il s'arrête
300 | à la porte, il étend le cadavre à ses pieds, et s'assied le dos appuyé
301 | contre un arbre et le visage tourné vers l'entrée de la cabane. Voilà le
302 | spectacle qui attendait la charbonnière au sortir de sa baraque.
303 |
304 | «Elle s'éveille, elle ne trouve point son mari à côté d'elle; elle
305 | cherche des yeux Félix, point de Félix. Elle se lève, elle sort, elle
306 | voit, elle crie, elle tombe à la renverse. Ses enfants accourent, ils
307 | voient, ils crient; ils se roulent sur leur père, ils se roulent sur
308 | leur mère. La charbonnière, rappelée à elle-même par le tumulte et les
309 | cris de ses enfants, s'arrache les cheveux, se déchire les joues. Félix,
310 | immobile au pied de son arbre, les yeux fermés, la tête renversée en
311 | arrière, leur disait d'une voix éteinte: «Tuez-moi.» Il se faisait un
312 | moment de silence; ensuite la douleur et les cris reprenaient, et Félix
313 | leur redisait: «Tuez-moi; enfants, par pitié, tuez-moi.»
314 |
315 | «Ils passèrent ainsi trois jours et trois nuits à se désoler; le
316 | quatrième, Félix dit à la charbonnière: «Femme, prends ton bissac,
317 | mets-y du pain, et suis-moi.» Après un long circuit à travers nos
318 | montagnes et nos forêts, ils arrivèrent à la maison d'Olivier, qui est
319 | située, comme vous savez, à l'extrémité du bourg, à l'endroit où la voie
320 | se partage en deux routes, dont l'une conduit en Franche-Comté et
321 | l'autre en Lorraine[5].
322 |
323 | «C'est là que Félix va apprendre la mort d'Olivier et se trouver entre
324 | les veuves de deux hommes massacrés à son sujet. Il entre et dit
325 | brusquement à la femme Olivier: «Où est Olivier?» Au silence de cette
326 | femme, à son vêtement, à ses pleurs, il comprit qu'Olivier n'était plus.
327 | Il se trouva mal; il tomba et se fendit la tête contre la huche à pétrir
328 | le pain. Les deux veuves le relevèrent; son sang coulait sur elles; et
329 | tandis qu'elles s'occupaient à l'étancher avec leurs tabliers, il leur
330 | disait: «Et vous êtes leurs femmes, et vous me secourez!» Puis il
331 | défaillait, puis il revenait et disait en soupirant: «Que ne me
332 | laissait-il? Pourquoi s'en venir à Reims? Pourquoi l'y laisser
333 | venir?...» Puis sa tête se perdait, il entrait en fureur, il se roulait
334 | à terre et déchirait ses vêtements. Dans un de ces accès, il tira son
335 | sabre, et il allait s'en frapper; mais les deux femmes se jetèrent sur
336 | lui, crièrent au secours; les voisins accoururent: on le lia avec des
337 | cordes, et il fut saigné sept à huit fois. Sa fureur tomba avec
338 | l'épuisement de ses forces; et il resta comme mort pendant trois ou
339 | quatre jours, au bout desquels la raison lui revint. Dans le premier
340 | moment, il tourna ses yeux autour de lui, comme un homme qui sort d'un
341 | profond sommeil, et il dit: «Où suis-je? Femmes, qui êtes-vous?» La
342 | charbonnière lui répondit: «Je suis la charbonnière...» Il reprit: «Ah!
343 | oui, la charbonnière... Et vous?...» La femme Olivier se tut. Alors il
344 | se mit à pleurer, il se tourna du côté de la muraille, et dit en
345 | sanglotant: «Je suis chez Olivier... ce lit est celui d'Olivier... et
346 | cette femme qui est là, c'était la sienne! Ah!»
347 |
348 | «Ces deux femmes en eurent tant de soin, elles lui inspirèrent tant de
349 | pitié, elles le prièrent si instamment de vivre, elles lui remontrèrent
350 | d'une manière si touchante qu'il était leur unique ressource, qu'il se
351 | laissa persuader.
352 |
353 | «Pendant tout le temps qu'il resta dans cette maison, il ne se coucha
354 | plus. Il sortait la nuit, il errait dans les champs, il se roulait sur
355 | la terre, il appelait Olivier; une des femmes le suivait et le ramenait
356 | au point du jour.
357 |
358 | «Plusieurs personnes le savaient dans la maison d'Olivier; et parmi ces
359 | personnes il y en avait de malintentionnées. Les deux veuves
360 | l'avertirent du péril qu'il courait: c'était une après-midi, il était
361 | assis sur un banc, son sabre sur ses genoux, les coudes appuyés sur une
362 | table et ses deux poings sur ses deux yeux. D'abord il ne répondit rien.
363 | La femme Olivier avait un garçon de dix-sept à dix-huit ans, la
364 | charbonnière une fille de quinze. Tout à coup il dit à la charbonnière:
365 | «La charbonnière, va chercher ta fille et amène-la ici...» Il avait
366 | quelques fauchées de prés, il les vendit. La charbonnière revint avec sa
367 | fille, le fils d'Olivier l'épousa: Félix leur donna l'argent de ses
368 | prés, les embrassa, leur demanda pardon en pleurant; et ils allèrent
369 | s'établir dans la cabane où ils sont encore et où ils servent de père et
370 | de mère aux autres enfants. Les deux veuves demeurèrent ensemble; et les
371 | enfants d'Olivier eurent un père et deux mères.
372 |
373 | «Il y a à peu près un an et demi que la charbonnière est morte; la femme
374 | d'Olivier la pleure encore tous les jours.
375 |
376 | «Un soir qu'elles épiaient Félix (car il y en avait une des deux qui le
377 | gardait toujours à vue), elles le virent qui fondait en larmes; il
378 | tournait en silence ses bras vers la porte qui le séparait d'elles, et
379 | il se remettait ensuite à faire son sac. Elles ne lui dirent rien, car
380 | elles comprenaient de reste combien son départ était nécessaire. Ils
381 | soupèrent tous les trois sans parler. La nuit, il se leva; les femmes ne
382 | dormaient point: il s'avança vers la porte sur la pointe des pieds. Là,
383 | il s'arrêta, regarda vers le lit des deux femmes, essuya ses yeux de ses
384 | mains et sortit. Les deux femmes se serrèrent dans les bras l'une de
385 | l'autre et passèrent le reste de la nuit à pleurer. On ignore où il se
386 | réfugia; mais il n'y a guère eu de semaines qu'il ne leur ait envoyé
387 | quelques secours.
388 |
389 | «La forêt où la fille de la charbonnière vit avec le fils d'Olivier,
390 | appartient à un M. Leclerc de Rançonnières, homme fort riche et seigneur
391 | d'un autre village de ces cantons, appelé Courcelles[6]. Un jour que M.
392 | de Rançonnières ou de Courcelles, comme il vous plaira, faisait une
393 | chasse dans sa forêt, il arriva à la cabane du fils d'Olivier; il y
394 | entra, il se mit à jouer avec les enfants, qui sont jolis; il les
395 | questionna; la figure de la femme, qui n'est pas mal, lui revint; le ton
396 | ferme du mari, qui tient beaucoup de son père, l'intéressa; il apprit
397 | l'aventure de leurs parents, il promit de solliciter la grâce de Félix;
398 | il la sollicita et l'obtint.
399 |
400 | «Félix passa au service de M. de Rançonnières, qui lui donna une place
401 | de garde-chasse.
402 |
403 | «Il y avait environ deux ans qu'il vivait dans le château de
404 | Rançonnières, envoyant aux veuves une bonne partie de ses gages, lorsque
405 | l'attachement à son maître et la fierté de son caractère l'impliquèrent
406 | dans une affaire qui n'était rien dans son origine, mais qui eut les
407 | suites les plus fâcheuses.
408 |
409 | «M. de Rançonnières avait pour voisin à Courcelles, un M. Fourmont,
410 | conseiller au présidial de Ch...[7]. Les deux maisons n'étaient séparées
411 | que par une borne; cette borne gênait la porte de M. de Rançonnières et
412 | en rendait l'entrée difficile aux voitures. M. de Rançonnières la fit
413 | reculer de quelques pieds du côté de M. Fourmont; celui-ci renvoya la
414 | borne d'autant sur M. de Rançonnières; et puis voilà de la haine, des
415 | insultes, un procès entre les deux voisins. Le procès de la borne en
416 | suscita deux ou trois autres plus considérables. Les choses en étaient
417 | là, lorsqu'un soir M. de Rançonnières, revenant de la chasse, accompagné
418 | de son garde Félix, fit rencontre, sur le grand chemin, de M. Fourmont
419 | le magistrat et de son frère le militaire. Celui-ci dit à son frère:
420 | «Mon frère, si l'on coupait le visage à ce vieux bougre-là, qu'en
421 | pensez-vous?» Ce propos ne fut pas entendu de M. de Rançonnières, mais
422 | il le fut malheureusement de Félix, qui s'adressant fièrement au jeune
423 | homme, lui dit: «Mon officier, seriez-vous assez brave pour vous mettre
424 | seulement en devoir de faire ce que vous avez dit?» Au même instant, il
425 | pose son fusil à terre et met la main sur la garde de son sabre, car il
426 | n'allait jamais sans son sabre. Le jeune militaire tire son épée,
427 | s'avance sur Félix; M. de Rançonnières accourt, s'interpose, saisit son
428 | garde. Cependant le militaire s'empare du fusil qui était à terre, tire
429 | sur Félix, le manque; celui-ci riposte d'un coup de sabre, fait tomber
430 | l'épée de la main au jeune homme, et avec l'épée la moitié du bras: et
431 | voilà un procès criminel en sus de trois ou quatre procès civils; Félix
432 | confiné dans les prisons; une procédure effrayante; et à la suite de
433 | cette procédure, un magistrat dépouillé de son état et presque
434 | déshonoré, un militaire exclus de son corps, M. de Rançonnières mort de
435 | chagrin, et Félix, dont la détention durait toujours, exposé à tout le
436 | ressentiment des Fourmont. Sa fin eût été malheureuse, si l'amour ne
437 | l'eût secouru; la fille du geôlier prit de la passion pour lui et
438 | facilita son évasion: si cela n'est pas vrai, c'est du moins l'opinion
439 | publique. Il s'en est allé en Prusse, où il sert aujourd'hui dans le
440 | régiment des gardes. On dit qu'il y est aimé de ses camarades, et même
441 | connu du roi. Son nom de guerre est le Triste; la veuve Olivier m'a dit
442 | qu'il continuait à la soulager.
443 |
444 | «Voilà, madame, tout ce que j'ai pu recueillir de l'histoire de Félix.
445 | Je joins à mon récit une lettre de M. Papin, notre curé. Je ne sais ce
446 | qu'elle contient; mais je crains bien que le pauvre prêtre, qui a la
447 | tête un peu étroite et le coeur assez mal tourné, ne vous parle
448 | d'Olivier et de Félix d'après ses préventions. Je vous conjure, madame,
449 | de vous en tenir aux faits sur la vérité desquels vous pouvez compter,
450 | et à la bonté de votre coeur, qui vous conseillera mieux que le premier
451 | casuiste de Sorbonne, qui n'est pas M. Papin.»
452 |
453 |
454 | LETTRE
455 |
456 | DE M. PAPIN, DOCTEUR EN THÉOLOGIE, ET CURÉ DE SAINTE-MARIE À BOURBONNE.
457 |
458 | J'ignore, madame, ce que M. le subdélégué a pu vous conter d'Olivier et
459 | de Félix, ni quel intérêt vous pouvez prendre à deux brigands, dont tous
460 | les pas dans ce monde ont été trempés de sang. La Providence qui a
461 | châtié l'un, a laissé à l'autre quelques moments de répit, dont je
462 | crains bien qu'il ne profite pas; mais que la volonté de Dieu soit
463 | faite! Je sais qu'il y a des gens ici (et je ne serais point étonné que
464 | M. le subdélégué fût de ce nombre) qui parlent de ces deux hommes comme
465 | de modèles d'une d'amitié rare; mais qu'est-ce aux yeux de Dieu que la
466 | plus sublime vertu, dénuée des sentiments de la piété, du respect dû à
467 | l'Église et à ses ministres, et de la soumission à la loi du souverain?
468 | Olivier est mort à la porte de sa maison, sans sacrements; quand je fus
469 | appelé auprès de Félix, chez les deux veuves, je n'en pus jamais tirer
470 | autre chose que le nom d'Olivier; aucun signe de religion, aucune marque
471 | de repentir. Je n'ai pas mémoire que celui-ci se soit présenté une fois
472 | au tribunal de la pénitence. La femme Olivier est une arrogante qui m'a
473 | manqué en plus d'une occasion; sous prétexte qu'elle sait lire et
474 | écrire, elle se croit en état d'élever ses enfants; et on ne les voit ni
475 | aux écoles de la paroisse, ni à mes instructions. Que madame juge
476 | d'après cela, si des gens de cette espèce sont bien dignes de ses
477 | bontés! L'Évangile ne cesse de nous recommander la commisération pour
478 | les pauvres; mais on double le mérite de sa charité par un bon choix des
479 | misérables; et personne ne connaît mieux les vrais indigents que le
480 | pasteur commun des indigents et des riches. Si madame daignait m'honorer
481 | de sa confiance, je placerais peut-être les marques de sa bienfaisance
482 | d'une manière plus utile pour les malheureux, et plus méritoire pour
483 | elle.
484 |
485 | Je suis avec respect, etc.
486 |
487 |
488 | Madame de *** remercia M. le subdélégué Aubert de ses intentions, et
489 | envoya ses aumônes à M. Papin, avec le billet qui suit:
490 |
491 |
492 | «Je vous suis très-obligée, monsieur, de vos sages conseils. Je vous
493 | avoue que l'histoire de ces deux hommes m'avait touchée; et vous
494 | conviendrez que l'exemple d'une amitié aussi rare était bien faite pour
495 | séduire une âme honnête et sensible: mais vous m'avez éclairée, et j'ai
496 | conçu qu'il valait mieux porter ses secours à des vertus chrétiennes et
497 | malheureuses, qu'à des vertus naturelles et païennes. Je vous prie
498 | d'accepter la somme modique que je vous envoie, et de la distribuer
499 | d'après une charité mieux entendue que la mienne.
500 |
501 | «J'ai l'honneur d'être, etc.»
502 |
503 |
504 | On pense bien que la veuve Olivier et Félix n'eurent aucune part aux
505 | aumônes de madame de ***. Félix mourut; et la pauvre femme aurait péri
506 | de misère avec ses enfants, si elle ne s'était réfugiée dans la forêt,
507 | chez son fils aîné, où elle travaille, malgré son grand âge, et subsiste
508 | comme elle peut à côté de ses enfants et de ses petits-enfants[8].
509 |
510 |
511 |
512 |
513 | Et puis, il y a trois sortes de contes... Il y en a bien davantage, me
514 | direz-vous... À la bonne heure; mais je distingue le conte à la manière
515 | d'Homère, de Virgile, du Tasse, et je l'appelle le conte merveilleux. La
516 | nature y est exagérée; la vérité y est hypothétique: et si le conteur a
517 | bien gardé le module qu'il a choisi, si tout répond à ce module, et dans
518 | les actions, et dans les discours, il a obtenu le degré de perfection
519 | que le genre de son ouvrage comportait, et vous n'avez rien de plus à
520 | lui demander. En entrant dans son poëme, vous mettez le pied dans une
521 | terre inconnue, où rien ne se passe comme dans celle que vous habitez,
522 | mais où tout se fait en grand comme les choses se font autour de vous en
523 | petit. Il y a le conte plaisant à la façon de La Fontaine, de Vergier,
524 | de l'Arioste, d'Hamilton, où le conteur ne se propose ni l'imitation de
525 | la nature, ni la vérité, ni l'illusion; il s'élance dans les espaces
526 | imaginaires. Dites à celui-ci: Soyez gai, ingénieux, varié, original,
527 | même extravagant, j'y consens; mais séduisez-moi par les détails; que le
528 | charme de la forme me dérobe toujours l'invraisemblance du fond: et si
529 | ce conteur fait ce que vous exigez ici, il a tout fait. Il y a enfin le
530 | conte historique, tel qu'il est écrit dans les Nouvelles de Scarron, de
531 | Cervantes, de Marmontel...
532 |
533 | --Au diable le conte et le conteur historiques! c'est un menteur plat et
534 | froid...
535 |
536 | --Oui, s'il ne sait pas son métier. Celui-ci se propose de vous tromper;
537 | il est assis au coin de votre âtre; il a pour objet la vérité
538 | rigoureuse; il veut être cru; il veut intéresser, toucher, entraîner,
539 | émouvoir, faire frissonner la peau et couler les larmes; effet qu'on
540 | n'obtient point sans éloquence et sans poésie. Mais l'éloquence est une
541 | sorte de mensonge, et rien de plus contraire à l'illusion que la poésie;
542 | l'une et l'autre exagèrent, surfont, amplifient, inspirent la méfiance:
543 | comment s'y prendra donc ce conteur-ci pour vous tromper? Le voici. Il
544 | parsèmera son récit de petites circonstances si liées à la chose, de
545 | traits si simples, si naturels, et toutefois si difficiles à imaginer,
546 | que vous serez forcé de vous dire en vous-même: Ma foi, cela est vrai:
547 | on n'invente pas ces choses-là. C'est ainsi qu'il sauvera l'exagération
548 | de l'éloquence et de la poésie; que la vérité de la nature couvrira le
549 | prestige de l'art; et qu'il satisfera à deux conditions qui semblent
550 | contradictoires, d'être en même temps historien et poëte, véridique et
551 | menteur.
552 |
553 | Un exemple emprunté d'un autre art rendra peut-être plus sensible ce que
554 | je veux vous dire. Un peintre exécute sur la toile une tête. Toutes les
555 | formes en sont fortes, grandes et régulières; c'est l'ensemble le plus
556 | parfait et le plus rare. J'éprouve, en le considérant, du respect, de
557 | l'admiration, de l'effroi. J'en cherche le modèle dans la nature, et ne
558 | l'y trouve pas; en comparaison, tout y est faible, petit et mesquin;
559 | c'est une tête idéale; je le sens, je me le dis. Mais que l'artiste me
560 | fasse apercevoir au front de cette tête une cicatrice légère, une verrue
561 | à l'une de ses tempes, une coupure imperceptible à la lèvre inférieure;
562 | et, d'idéale qu'elle était, à l'instant la tête devient un portrait; une
563 | marque de petite vérole au coin de l'oeil ou à côté du nez, et ce visage
564 | de femme n'est plus celui de Vénus; c'est le portrait de quelqu'une de
565 | mes voisines. Je dirai donc à nos conteurs historiques: Vos figures sont
566 | belles, si vous voulez; mais il y manque la verrue à la tempe, la
567 | coupure à la lèvre, la marque de petite vérole à côté du nez, qui les
568 | rendraient vraies; et, comme disait mon ami Caillot[9]: «Un peu de
569 | poussière sur mes souliers, et je ne sors pas de ma loge, je reviens de
570 | la campagne.»
571 |
572 | Atque ita mentitur, sic veris falsa remiscet,
573 | Primo ne medium, medio ne discrepet imum.
574 |
575 | HORAT. _De Art. poet._, v. 151.
576 |
577 | Et puis un peu de morale après un peu de poétique, cela va si bien!
578 | Félix était un gueux qui n'avait rien; Olivier était un autre gueux qui
579 | n'avait rien: dites-en autant du charbonnier, de la charbonnière, et des
580 | autres personnages de ce conte; et concluez qu'en général il ne peut
581 | guère y avoir d'amitiés entières et solides qu'entre des hommes qui
582 | n'ont rien. Un homme alors est toute la fortune de son ami, et son ami
583 | est toute la sienne. De là la vérité de l'expérience, que le malheur
584 | resserre les liens; et la matière d'un petit paragraphe de plus pour la
585 | première édition du livre de _l'Esprit_[10].
586 |
587 |
588 |
589 |
590 | NOTES
591 |
592 |
593 | [1] Il n'y alla pas seul, il était avec Grimm, qui raconte les faits
594 | (_Correspondance littéraire_, 1er décembre 1770) et donne comme
595 | motifs ayant déterminé le titre et le sujet du conte, non-seulement
596 | les _Deux Amis_, de Saint-Lambert, mais encore les _Deux Amis_,
597 | drame de Beaumarchais, et les _Deux Amis_ ou _le Comte de Meralbi_
598 | (par Sellier de Moranville), roman en 4 volumes, tous ouvrages dont
599 | on s'occupait alors et qui n'avaient pas eu de succès.
600 |
601 | [2] C'était Meister le traducteur.
602 |
603 | [3] Cette bataille, livrée le 26 juillet 1757, fut gagnée par le
604 | maréchal d'Estrées contre le duc de Cumberland. (Note de l'édition
605 | BRIÈRE.)
606 |
607 | [4] Bourbonne, alors chef-lieu de subdélégation, était frontière de la
608 | Champagne, de la Lorraine et de la Franche-Comté, et il s'y faisait
609 | beaucoup de contrebande. (Note de l'édition BRIÈRE.)
610 |
611 | [5] La route de _Villars_ et celle d'_Iche_. (Note de l'édition
612 | BRIÈRE.)
613 |
614 | [6] Sur une copie qui est en notre possession, _Rançonnières_ est
615 | remplacé par _Romainville_, et _Courcelles_ par _Jolibois_.
616 |
617 | [7] Toutes les éditions portent _Lh..._ au lieu de _Ch..._ Diderot a
618 | voulu désigner Chaumont. (Note de l'édition BRIÈRE.)
619 |
620 | [8] Il est à supposer que nous n'avons pas ici la première version du
621 | conte. Nous trouvons dans une lettre à Grimm, du 21 octobre 1770, la
622 | preuve qu'il doit avoir subi divers remaniements. Voici, en effet,
623 | ce que nous y lisons:
624 |
625 | «J'avais pensé comme vous que l'atrocité du prêtre ôtait tout le
626 | pathétique de l'histoire de _Félix_. Envoyez-moi une copie de cette
627 | histoire et de celle d'_Olivier_, et ce que vous me demandez sera
628 | fait; mais dépêchez-vous.»
629 |
630 | Dans une autre lettre du 2 novembre au même, Diderot écrit:
631 |
632 | «On m'a envoyé le papier de _Félix_, mais on aurait bien fait d'y
633 | joindre celui d'_Olivier_ que j'avais demandé, afin de donner aux
634 | deux contes un peu d'unité. N'importe, je me passerai de celui qui
635 | me manque et je ferai de mon mieux.»
636 |
637 | Quelle fut la nature des corrections opérées? Nous ne savons; mais
638 | peut-être la lettre de M. Papin a-t-elle remplacé une intervention
639 | plus directe et plus _atroce_ du prêtre.
640 |
641 | [9] L'un des meilleurs acteurs de la comédie italienne, deviné par
642 | Garrick, et dont Grimm disait qu'il était sublime sans effort.
643 | «Personne, écrit-il, ne faisait avec une mesure plus juste tout ce
644 | qu'il voulait faire. Le Kain est un homme prodigieusement rare;
645 | peut-être Caillot est-il plus rare que lui. Caillot ne se doutait
646 | point de son talent; il se croyait fait pour chanter avec beaucoup
647 | d'agrément, jouer avec beaucoup de gaieté, avec une belle mine bien
648 | réjouie; mais il ne se croyait pas pathétique. Garrick, l'ayant vu
649 | jouer pendant son séjour en France, lui apprit qu'il serait acteur
650 | quand il lui plairait...» Caillot quitta le théâtre en 1772 et fut
651 | remplacé par un jeune abbé appelé Narbonne, échappé de la musique de
652 | Notre-Dame.
653 |
654 | [10] Cette édition ne se fit pas attendre. Condamné en 1759,
655 | l'_Esprit_ reparut en 1771 (Londres). Diderot était sans doute au
656 | courant de ce qui se préparait.
657 |
658 |
659 |
660 |
661 |
662 |
663 | End of Project Gutenberg's Les deux amis de Bourbonne, by Denis Diderot
664 |
665 | *** END OF THIS PROJECT GUTENBERG EBOOK LES DEUX AMIS DE BOURBONNE ***
666 |
667 | ***** This file should be named 28603-8.txt or 28603-8.zip *****
668 | This and all associated files of various formats will be found in:
669 | http://www.gutenberg.org/2/8/6/0/28603/
670 |
671 | Produced by Laurent Vogel and the Online Distributed
672 | Proofreading Team at http://www.pgdp.net (This file was
673 | produced from images generously made available by the
674 | Bibliothèque nationale de France (BnF/Gallica) at
675 | http://gallica.bnf.fr)
676 |
677 |
678 | Updated editions will replace the previous one--the old editions
679 | will be renamed.
680 |
681 | Creating the works from public domain print editions means that no
682 | one owns a United States copyright in these works, so the Foundation
683 | (and you!) can copy and distribute it in the United States without
684 | permission and without paying copyright royalties. Special rules,
685 | set forth in the General Terms of Use part of this license, apply to
686 | copying and distributing Project Gutenberg-tm electronic works to
687 | protect the PROJECT GUTENBERG-tm concept and trademark. Project
688 | Gutenberg is a registered trademark, and may not be used if you
689 | charge for the eBooks, unless you receive specific permission. If you
690 | do not charge anything for copies of this eBook, complying with the
691 | rules is very easy. You may use this eBook for nearly any purpose
692 | such as creation of derivative works, reports, performances and
693 | research. They may be modified and printed and given away--you may do
694 | practically ANYTHING with public domain eBooks. Redistribution is
695 | subject to the trademark license, especially commercial
696 | redistribution.
697 |
698 |
699 |
700 | *** START: FULL LICENSE ***
701 |
702 | THE FULL PROJECT GUTENBERG LICENSE
703 | PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK
704 |
705 | To protect the Project Gutenberg-tm mission of promoting the free
706 | distribution of electronic works, by using or distributing this work
707 | (or any other work associated in any way with the phrase "Project
708 | Gutenberg"), you agree to comply with all the terms of the Full Project
709 | Gutenberg-tm License (available with this file or online at
710 | http://gutenberg.net/license).
711 |
712 |
713 | Section 1. General Terms of Use and Redistributing Project Gutenberg-tm
714 | electronic works
715 |
716 | 1.A. By reading or using any part of this Project Gutenberg-tm
717 | electronic work, you indicate that you have read, understand, agree to
718 | and accept all the terms of this license and intellectual property
719 | (trademark/copyright) agreement. If you do not agree to abide by all
720 | the terms of this agreement, you must cease using and return or destroy
721 | all copies of Project Gutenberg-tm electronic works in your possession.
722 | If you paid a fee for obtaining a copy of or access to a Project
723 | Gutenberg-tm electronic work and you do not agree to be bound by the
724 | terms of this agreement, you may obtain a refund from the person or
725 | entity to whom you paid the fee as set forth in paragraph 1.E.8.
726 |
727 | 1.B. "Project Gutenberg" is a registered trademark. It may only be
728 | used on or associated in any way with an electronic work by people who
729 | agree to be bound by the terms of this agreement. There are a few
730 | things that you can do with most Project Gutenberg-tm electronic works
731 | even without complying with the full terms of this agreement. See
732 | paragraph 1.C below. There are a lot of things you can do with Project
733 | Gutenberg-tm electronic works if you follow the terms of this agreement
734 | and help preserve free future access to Project Gutenberg-tm electronic
735 | works. See paragraph 1.E below.
736 |
737 | 1.C. The Project Gutenberg Literary Archive Foundation ("the Foundation"
738 | or PGLAF), owns a compilation copyright in the collection of Project
739 | Gutenberg-tm electronic works. Nearly all the individual works in the
740 | collection are in the public domain in the United States. If an
741 | individual work is in the public domain in the United States and you are
742 | located in the United States, we do not claim a right to prevent you from
743 | copying, distributing, performing, displaying or creating derivative
744 | works based on the work as long as all references to Project Gutenberg
745 | are removed. Of course, we hope that you will support the Project
746 | Gutenberg-tm mission of promoting free access to electronic works by
747 | freely sharing Project Gutenberg-tm works in compliance with the terms of
748 | this agreement for keeping the Project Gutenberg-tm name associated with
749 | the work. You can easily comply with the terms of this agreement by
750 | keeping this work in the same format with its attached full Project
751 | Gutenberg-tm License when you share it without charge with others.
752 |
753 | 1.D. The copyright laws of the place where you are located also govern
754 | what you can do with this work. Copyright laws in most countries are in
755 | a constant state of change. If you are outside the United States, check
756 | the laws of your country in addition to the terms of this agreement
757 | before downloading, copying, displaying, performing, distributing or
758 | creating derivative works based on this work or any other Project
759 | Gutenberg-tm work. The Foundation makes no representations concerning
760 | the copyright status of any work in any country outside the United
761 | States.
762 |
763 | 1.E. Unless you have removed all references to Project Gutenberg:
764 |
765 | 1.E.1. The following sentence, with active links to, or other immediate
766 | access to, the full Project Gutenberg-tm License must appear prominently
767 | whenever any copy of a Project Gutenberg-tm work (any work on which the
768 | phrase "Project Gutenberg" appears, or with which the phrase "Project
769 | Gutenberg" is associated) is accessed, displayed, performed, viewed,
770 | copied or distributed:
771 |
772 | This eBook is for the use of anyone anywhere at no cost and with
773 | almost no restrictions whatsoever. You may copy it, give it away or
774 | re-use it under the terms of the Project Gutenberg License included
775 | with this eBook or online at www.gutenberg.net
776 |
777 | 1.E.2. If an individual Project Gutenberg-tm electronic work is derived
778 | from the public domain (does not contain a notice indicating that it is
779 | posted with permission of the copyright holder), the work can be copied
780 | and distributed to anyone in the United States without paying any fees
781 | or charges. If you are redistributing or providing access to a work
782 | with the phrase "Project Gutenberg" associated with or appearing on the
783 | work, you must comply either with the requirements of paragraphs 1.E.1
784 | through 1.E.7 or obtain permission for the use of the work and the
785 | Project Gutenberg-tm trademark as set forth in paragraphs 1.E.8 or
786 | 1.E.9.
787 |
788 | 1.E.3. If an individual Project Gutenberg-tm electronic work is posted
789 | with the permission of the copyright holder, your use and distribution
790 | must comply with both paragraphs 1.E.1 through 1.E.7 and any additional
791 | terms imposed by the copyright holder. Additional terms will be linked
792 | to the Project Gutenberg-tm License for all works posted with the
793 | permission of the copyright holder found at the beginning of this work.
794 |
795 | 1.E.4. Do not unlink or detach or remove the full Project Gutenberg-tm
796 | License terms from this work, or any files containing a part of this
797 | work or any other work associated with Project Gutenberg-tm.
798 |
799 | 1.E.5. Do not copy, display, perform, distribute or redistribute this
800 | electronic work, or any part of this electronic work, without
801 | prominently displaying the sentence set forth in paragraph 1.E.1 with
802 | active links or immediate access to the full terms of the Project
803 | Gutenberg-tm License.
804 |
805 | 1.E.6. You may convert to and distribute this work in any binary,
806 | compressed, marked up, nonproprietary or proprietary form, including any
807 | word processing or hypertext form. However, if you provide access to or
808 | distribute copies of a Project Gutenberg-tm work in a format other than
809 | "Plain Vanilla ASCII" or other format used in the official version
810 | posted on the official Project Gutenberg-tm web site (www.gutenberg.net),
811 | you must, at no additional cost, fee or expense to the user, provide a
812 | copy, a means of exporting a copy, or a means of obtaining a copy upon
813 | request, of the work in its original "Plain Vanilla ASCII" or other
814 | form. Any alternate format must include the full Project Gutenberg-tm
815 | License as specified in paragraph 1.E.1.
816 |
817 | 1.E.7. Do not charge a fee for access to, viewing, displaying,
818 | performing, copying or distributing any Project Gutenberg-tm works
819 | unless you comply with paragraph 1.E.8 or 1.E.9.
820 |
821 | 1.E.8. You may charge a reasonable fee for copies of or providing
822 | access to or distributing Project Gutenberg-tm electronic works provided
823 | that
824 |
825 | - You pay a royalty fee of 20% of the gross profits you derive from
826 | the use of Project Gutenberg-tm works calculated using the method
827 | you already use to calculate your applicable taxes. The fee is
828 | owed to the owner of the Project Gutenberg-tm trademark, but he
829 | has agreed to donate royalties under this paragraph to the
830 | Project Gutenberg Literary Archive Foundation. Royalty payments
831 | must be paid within 60 days following each date on which you
832 | prepare (or are legally required to prepare) your periodic tax
833 | returns. Royalty payments should be clearly marked as such and
834 | sent to the Project Gutenberg Literary Archive Foundation at the
835 | address specified in Section 4, "Information about donations to
836 | the Project Gutenberg Literary Archive Foundation."
837 |
838 | - You provide a full refund of any money paid by a user who notifies
839 | you in writing (or by e-mail) within 30 days of receipt that s/he
840 | does not agree to the terms of the full Project Gutenberg-tm
841 | License. You must require such a user to return or
842 | destroy all copies of the works possessed in a physical medium
843 | and discontinue all use of and all access to other copies of
844 | Project Gutenberg-tm works.
845 |
846 | - You provide, in accordance with paragraph 1.F.3, a full refund of any
847 | money paid for a work or a replacement copy, if a defect in the
848 | electronic work is discovered and reported to you within 90 days
849 | of receipt of the work.
850 |
851 | - You comply with all other terms of this agreement for free
852 | distribution of Project Gutenberg-tm works.
853 |
854 | 1.E.9. If you wish to charge a fee or distribute a Project Gutenberg-tm
855 | electronic work or group of works on different terms than are set
856 | forth in this agreement, you must obtain permission in writing from
857 | both the Project Gutenberg Literary Archive Foundation and Michael
858 | Hart, the owner of the Project Gutenberg-tm trademark. Contact the
859 | Foundation as set forth in Section 3 below.
860 |
861 | 1.F.
862 |
863 | 1.F.1. Project Gutenberg volunteers and employees expend considerable
864 | effort to identify, do copyright research on, transcribe and proofread
865 | public domain works in creating the Project Gutenberg-tm
866 | collection. Despite these efforts, Project Gutenberg-tm electronic
867 | works, and the medium on which they may be stored, may contain
868 | "Defects," such as, but not limited to, incomplete, inaccurate or
869 | corrupt data, transcription errors, a copyright or other intellectual
870 | property infringement, a defective or damaged disk or other medium, a
871 | computer virus, or computer codes that damage or cannot be read by
872 | your equipment.
873 |
874 | 1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for the "Right
875 | of Replacement or Refund" described in paragraph 1.F.3, the Project
876 | Gutenberg Literary Archive Foundation, the owner of the Project
877 | Gutenberg-tm trademark, and any other party distributing a Project
878 | Gutenberg-tm electronic work under this agreement, disclaim all
879 | liability to you for damages, costs and expenses, including legal
880 | fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
881 | LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE
882 | PROVIDED IN PARAGRAPH F3. YOU AGREE THAT THE FOUNDATION, THE
883 | TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE
884 | LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR
885 | INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH
886 | DAMAGE.
887 |
888 | 1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you discover a
889 | defect in this electronic work within 90 days of receiving it, you can
890 | receive a refund of the money (if any) you paid for it by sending a
891 | written explanation to the person you received the work from. If you
892 | received the work on a physical medium, you must return the medium with
893 | your written explanation. The person or entity that provided you with
894 | the defective work may elect to provide a replacement copy in lieu of a
895 | refund. If you received the work electronically, the person or entity
896 | providing it to you may choose to give you a second opportunity to
897 | receive the work electronically in lieu of a refund. If the second copy
898 | is also defective, you may demand a refund in writing without further
899 | opportunities to fix the problem.
900 |
901 | 1.F.4. Except for the limited right of replacement or refund set forth
902 | in paragraph 1.F.3, this work is provided to you 'AS-IS' WITH NO OTHER
903 | WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
904 | WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR ANY PURPOSE.
905 |
906 | 1.F.5. Some states do not allow disclaimers of certain implied
907 | warranties or the exclusion or limitation of certain types of damages.
908 | If any disclaimer or limitation set forth in this agreement violates the
909 | law of the state applicable to this agreement, the agreement shall be
910 | interpreted to make the maximum disclaimer or limitation permitted by
911 | the applicable state law. The invalidity or unenforceability of any
912 | provision of this agreement shall not void the remaining provisions.
913 |
914 | 1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation, the
915 | trademark owner, any agent or employee of the Foundation, anyone
916 | providing copies of Project Gutenberg-tm electronic works in accordance
917 | with this agreement, and any volunteers associated with the production,
918 | promotion and distribution of Project Gutenberg-tm electronic works,
919 | harmless from all liability, costs and expenses, including legal fees,
920 | that arise directly or indirectly from any of the following which you do
921 | or cause to occur: (a) distribution of this or any Project Gutenberg-tm
922 | work, (b) alteration, modification, or additions or deletions to any
923 | Project Gutenberg-tm work, and (c) any Defect you cause.
924 |
925 |
926 | Section 2. Information about the Mission of Project Gutenberg-tm
927 |
928 | Project Gutenberg-tm is synonymous with the free distribution of
929 | electronic works in formats readable by the widest variety of computers
930 | including obsolete, old, middle-aged and new computers. It exists
931 | because of the efforts of hundreds of volunteers and donations from
932 | people in all walks of life.
933 |
934 | Volunteers and financial support to provide volunteers with the
935 | assistance they need are critical to reaching Project Gutenberg-tm's
936 | goals and ensuring that the Project Gutenberg-tm collection will
937 | remain freely available for generations to come. In 2001, the Project
938 | Gutenberg Literary Archive Foundation was created to provide a secure
939 | and permanent future for Project Gutenberg-tm and future generations.
940 | To learn more about the Project Gutenberg Literary Archive Foundation
941 | and how your efforts and donations can help, see Sections 3 and 4
942 | and the Foundation web page at http://www.pglaf.org.
943 |
944 |
945 | Section 3. Information about the Project Gutenberg Literary Archive
946 | Foundation
947 |
948 | The Project Gutenberg Literary Archive Foundation is a non profit
949 | 501(c)(3) educational corporation organized under the laws of the
950 | state of Mississippi and granted tax exempt status by the Internal
951 | Revenue Service. The Foundation's EIN or federal tax identification
952 | number is 64-6221541. Its 501(c)(3) letter is posted at
953 | http://pglaf.org/fundraising. Contributions to the Project Gutenberg
954 | Literary Archive Foundation are tax deductible to the full extent
955 | permitted by U.S. federal laws and your state's laws.
956 |
957 | The Foundation's principal office is located at 4557 Melan Dr. S.
958 | Fairbanks, AK, 99712., but its volunteers and employees are scattered
959 | throughout numerous locations. Its business office is located at
960 | 809 North 1500 West, Salt Lake City, UT 84116, (801) 596-1887, email
961 | business@pglaf.org. Email contact links and up to date contact
962 | information can be found at the Foundation's web site and official
963 | page at http://pglaf.org
964 |
965 | For additional contact information:
966 | Dr. Gregory B. Newby
967 | Chief Executive and Director
968 | gbnewby@pglaf.org
969 |
970 |
971 | Section 4. Information about Donations to the Project Gutenberg
972 | Literary Archive Foundation
973 |
974 | Project Gutenberg-tm depends upon and cannot survive without wide
975 | spread public support and donations to carry out its mission of
976 | increasing the number of public domain and licensed works that can be
977 | freely distributed in machine readable form accessible by the widest
978 | array of equipment including outdated equipment. Many small donations
979 | ($1 to $5,000) are particularly important to maintaining tax exempt
980 | status with the IRS.
981 |
982 | The Foundation is committed to complying with the laws regulating
983 | charities and charitable donations in all 50 states of the United
984 | States. Compliance requirements are not uniform and it takes a
985 | considerable effort, much paperwork and many fees to meet and keep up
986 | with these requirements. We do not solicit donations in locations
987 | where we have not received written confirmation of compliance. To
988 | SEND DONATIONS or determine the status of compliance for any
989 | particular state visit http://pglaf.org
990 |
991 | While we cannot and do not solicit contributions from states where we
992 | have not met the solicitation requirements, we know of no prohibition
993 | against accepting unsolicited donations from donors in such states who
994 | approach us with offers to donate.
995 |
996 | International donations are gratefully accepted, but we cannot make
997 | any statements concerning tax treatment of donations received from
998 | outside the United States. U.S. laws alone swamp our small staff.
999 |
1000 | Please check the Project Gutenberg Web pages for current donation
1001 | methods and addresses. Donations are accepted in a number of other
1002 | ways including including checks, online payments and credit card
1003 | donations. To donate, please visit: http://pglaf.org/donate
1004 |
1005 |
1006 | Section 5. General Information About Project Gutenberg-tm electronic
1007 | works.
1008 |
1009 | Professor Michael S. Hart is the originator of the Project Gutenberg-tm
1010 | concept of a library of electronic works that could be freely shared
1011 | with anyone. For thirty years, he produced and distributed Project
1012 | Gutenberg-tm eBooks with only a loose network of volunteer support.
1013 |
1014 |
1015 | Project Gutenberg-tm eBooks are often created from several printed
1016 | editions, all of which are confirmed as Public Domain in the U.S.
1017 | unless a copyright notice is included. Thus, we do not necessarily
1018 | keep eBooks in compliance with any particular paper edition.
1019 |
1020 |
1021 | Most people start at our Web site which has the main PG search facility:
1022 |
1023 | http://www.gutenberg.net
1024 |
1025 | This Web site includes information about Project Gutenberg-tm,
1026 | including how to make donations to the Project Gutenberg Literary
1027 | Archive Foundation, how to help produce our new eBooks, and how to
1028 | subscribe to our email newsletter to hear about new eBooks.
1029 |
--------------------------------------------------------------------------------
/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/Books/French/diderot/Regrets sur ma vieille robe de chambre.txt:
--------------------------------------------------------------------------------
1 | Project Gutenberg's Regrets sur ma vieille robe de chambre, by Denis Diderot
2 |
3 | This eBook is for the use of anyone anywhere at no cost and with
4 | almost no restrictions whatsoever. You may copy it, give it away or
5 | re-use it under the terms of the Project Gutenberg License included
6 | with this eBook or online at www.gutenberg.net
7 |
8 |
9 | Title: Regrets sur ma vieille robe de chambre
10 |
11 | Author: Denis Diderot
12 |
13 | Release Date: October 25, 2004 [EBook #13863]
14 |
15 | Language: French
16 |
17 |
18 | *** START OF THIS PROJECT GUTENBERG EBOOK REGRETS SUR MA VIEILLE ROBE ***
19 |
20 |
21 |
22 |
23 | This Etext was prepared by Ebooks libres et gratuits and
24 | is available at http://www.ebooksgratuits.com in Word format,
25 | Mobipocket Reader format, eReader format and Acrobat Reader format.
26 |
27 |
28 |
29 |
30 | Denis Diderot
31 |
32 | REGRETS SUR MA VIEILLE ROBE DE CHAMBRE
33 |
34 | OU
35 |
36 | AVIS À CEUX QUI ONT PLUS DE GOÛT QUE DE FORTUNE
37 |
38 | (1772)
39 |
40 |
41 | Pourquoi ne l'avoir pas gardée? Elle était faite à moi; j'étais fait
42 | à elle. Elle moulait tous les plis de mon corps sans le gêner;
43 | j'étais pittoresque et beau. L'autre, raide, empesée, me mannequine.
44 | Il n'y avait aucun besoin auquel sa complaisance ne se prêtât; car
45 | l'indigence est presque toujours officieuse. Un livre était-il
46 | couvert de poussière, un de ses pans s'offrait à l'essuyer. L'encre
47 | épaissie refusait-elle de couler de ma plume, elle présentait le
48 | flanc. On y voyait tracés en longues raies noires les fréquents
49 | services qu'elle m'avait rendus. Ces longues raies annonçaient le
50 | littérateur, l'écrivain, l'homme qui travaille. A présent, j'ai
51 | l'air d'un riche fainéant; on ne sait qui je suis.
52 |
53 | Sous son abri, je ne redoutais ni la maladresse d'un valet, ni la
54 | mienne, ni les éclats du feu, ni la chute de l'eau. J'étais le
55 | maître absolu de ma vieille robe de chambre; je suis devenu
56 | l'esclave de la nouvelle.
57 |
58 | Le dragon qui surveillait la toison d'or ne fut pas plus inquiet que
59 | moi. Le souci m'enveloppe.
60 |
61 | Le vieillard passionné qui s'est livré, pieds et poings liés, aux
62 | caprices, à la merci d'une jeune folle, dit depuis le matin jusqu'au
63 | soir: Où est ma bonne, ma vieille gouvernante? Quel démon m'obsédait
64 | le jour que je la chassai pour celle-ci! Puis il pleure, il soupire.
65 |
66 | Je ne pleure pas, je ne soupire pas; mais à chaque instant je dis:
67 | Maudit soit celui qui inventa l'art de donner du prix à l'étoffe
68 | commune en la teignant en écarlate! Maudit soit le précieux vêtement
69 | que je révère! Où est mon ancien, mon humble, mon commode lambeau de
70 | calemande?
71 |
72 | Mes amis, gardez vos vieux amis. Mes amis, craignez l'atteinte de la
73 | richesse. Que mon exemple vous instruise. La pauvreté a ses
74 | franchises; l'opulence a sa gêne.
75 |
76 | O Diogène! si tu voyais ton disciple sous le fastueux manteau
77 | d'Aristippe, comme tu rirais! O Aristippe, ce manteau fastueux fut
78 | payé par bien des bassesses. Quelle comparaison de ta vie molle,
79 | rampante, efféminée, et de la vie libre et ferme du cynique
80 | déguenillé! J'ai quitté le tonneau où je régnais, pour servir sous
81 | un tyran.
82 |
83 | Ce n'est pas tout, mon ami. Écoutez les ravages du luxe, les suites
84 | d'un luxe conséquent.
85 |
86 | Ma vieille robe de chambre était une avec les autres guenilles qui
87 | m'environnaient. Une chaise de paille, une table de bois, une
88 | tapisserie de Bergame, une planche de sapin qui soutenait quelques
89 | livres, quelques estampes enfumées, sans bordure, clouées par les
90 | angles sur cette tapisserie; entre ces estampes trois ou quatre
91 | plâtres suspendus formaient avec ma vieille robe de chambre
92 | l'indigence la plus harmonieuse.
93 |
94 | Tout est désaccordé. Plus d'ensemble, plus d'unité, plus de beauté.
95 |
96 | Une nouvelle gouvernante stérile qui succède dans un presbytère, la
97 | femme qui entre dans la maison d'un veuf, le ministre qui remplace
98 | un ministre disgracié, le prélat moliniste qui s'empare du diocèse
99 | d'un prélat janséniste, ne causent pas plus de trouble que
100 | l'écarlate intruse en a causé chez moi.
101 |
102 | Je puis supporter sans dégoût la vue d'une paysanne. Ce morceau de
103 | toile grossière qui couvre sa tête; cette chevelure qui tombe éparse
104 | sur ses joues; ces haillons troués qui la vêtissent [sic] à demi; ce
105 | mauvais cotillon court qui ne va qu'à la moitié de ses jambes; ces
106 | pieds nus et couverts de fange ne peuvent me blesser: c'est l'image
107 | d'un état que je respecte; c'est l'ensemble des disgrâces d'une
108 | condition nécessaire et malheureuse que je plains. Mais mon coeur se
109 | soulève; et, malgré l'atmosphère parfumée qui la suit, j'éloigne mes
110 | pas, je détourne mes regards de cette courtisane dont la coiffure à
111 | points d'Angleterre, et les manchettes déchirées, les bas de soie
112 | sales et la chaussure usée, me montrent la misère du jour associée à
113 | l'opulence de la veille.
114 |
115 | Tel eût été mon domicile, si l'impérieuse écarlate n'eût tout mis à
116 | son unisson.
117 |
118 | J'ai vu la Bergame céder la muraille, à laquelle elle était depuis
119 | si longtemps attachée, à la tenture de damas.
120 |
121 | Deux estampes qui n'étaient pas sans mérite: _la Chute de la manne
122 | dans le désert_ du Poussin, et _l'Esther devant Assuérus_ du même;
123 | l'une honteusement chassée par un vieillard de Rubens, c'est la
124 | triste Esther; _la Chute de la manne_ dissipée par une _Tempête_ de
125 | Vernet.
126 |
127 | La chaise de paille reléguée dans l'antichambre par le fauteuil de
128 | maroquin.
129 |
130 | Homère, Virgile, Horace, Cicéron, soulager le faible sapin courbé
131 | sous leur masse, et se refermer dans une armoire marquetée, asile
132 | plus digne d'eux que de moi.
133 |
134 | Une grande glace s'emparer du manteau de ma cheminée.
135 |
136 | Ces deux jolis plâtres que je tenais de l'amitié de Falconet, et
137 | qu'il avait réparés lui-même, déménagés par une Vénus accroupie.
138 | L'argile moderne brisée par le bronze antique.
139 |
140 | La table de bois disputait encore le terrain, à l'abri d'une foule
141 | de brochures et de papiers entassés pêle-mêle, et qui semblaient
142 | devoir la dérober longtemps à l'injure qui la menaçait. Un jour elle
143 | subit son sort et, en dépit de ma paresse, les brochures et les
144 | papiers allèrent se ranger dans les serres d'un bureau précieux.
145 |
146 | Instinct funeste des convenances! Tact délicat et ruineux, goût
147 | sublime qui change, qui déplace, qui édifie, qui renverse; qui vide
148 | les coffres des pères; qui laisse les filles sans dot, les fils sans
149 | éducation; qui fait tant de belles choses et de si grand maux, toi
150 | qui substituas chez moi le fatal et précieux bureau à la table de
151 | bois; c'est toi qui perds les nations; c'est toi qui, peut-être, un
152 | jour, conduira mes effets sur le pont Saint-Michel, où l'on entendra
153 | la voix enrouée d'un juré crieur dire: A vingt louis une Vénus
154 | accroupie.
155 |
156 | L'intervalle qui restait entre la tablette de ce bureau et la
157 | _Tempête_ de Vernet, qui est au-dessus, faisait un vide désagréable
158 | à l'oeil. Ce vide fut rempli par une pendule; et quelle pendule
159 | encore! une pendule à la Geoffrin, une pendule où l'or contraste
160 | avec le bronze.
161 |
162 | Il y avait un angle vacant à côté de ma fenêtre. Cet angle demandait
163 | un secrétaire, qu'il obtint.
164 |
165 | Autre vide déplaisant entre la tablette du secrétaire et la belle
166 | tête de Rubens, il fut rempli par deux La Grenée.
167 |
168 | Ici c'est une _Magdeleine_ du même artiste; là, c'est une esquisse
169 | ou de Vien ou de Machy; car je donnai aussi dans les esquisses. Et
170 | ce fut ainsi que le réduit édifiant du philosophe se transforma dans
171 | le cabinet scandaleux du publicain. J'insulte aussi à la misère
172 | nationale.
173 |
174 | De ma médiocrité première, il n'est resté qu'un tapis de lisières.
175 | Ce tapis mesquin ne cadre guère avec mon luxe, je le sens. Mais j'ai
176 | juré et je jure, car les pieds de Denis le philosophe ne fouleront
177 | jamais un chef-d'oeuvre de la Savonnerie, que je réserverai ce
178 | tapis, comme le paysan transféré de sa chaumière dans le palais de
179 | son souverain réserva ses sabots.
180 |
181 | Lorsque le matin, couvert de la somptueuse écarlate, j'entre dans
182 | mon cabinet, si je baisse la vue, j'aperçois mon ancien tapis de
183 | lisières; il me rappelle mon premier état, et l'orgueil s'arrête à
184 | l'entrée de mon coeur.
185 |
186 | Non, mon ami, non: je ne suis point corrompu. Ma porte s'ouvre
187 | toujours au besoin qui s'adresse à moi; il me trouve la même
188 | affabilité. Je l'écoute, je le conseille, je le secours, je le
189 | plains. Mon âme ne s'est point endurcie; ma tête ne s'est point
190 | relevée. Mon dos est bon et rond, comme ci-devant. C'est le même ton
191 | de franchise; c'est la même sensibilité. Mon luxe est de fraîche
192 | date et le poison n'a point encore agi. Mais avec le temps, qui sait
193 | ce qui peut arriver? Qu'attendre de celui qui a oublié sa femme et
194 | sa fille, qui s'est endetté, qui a cessé d'être époux et père, et
195 | qui, au lieu de déposer au fond d'un coffre fidèle, une somme
196 | utile...
197 |
198 | Ah, saint prophète! levez vos mains au ciel, priez pour un ami en
199 | péril, dites à Dieu: si tu vois dans tes décrets éternels que la
200 | richesse corrompe le coeur de Denis, n'épargne pas les chefs-
201 | d'oeuvre qu'il idolâtre; détruis-les et ramène-le à sa première
202 | pauvreté; et moi, je dirai au ciel de mon côté: O Dieu! je me
203 | résigne à la prière du saint prophète et à ta volonté! Je
204 | t'abandonne tout; reprends tout; oui, tout, excepté le Vernet. Ah!
205 | laisse-moi le Vernet!
206 |
207 | Ce n'est pas l'artiste, c'est toi qui l'as fait. Respecte l'ouvrage
208 | de l'amitié et le tien. Vois ce phare, vois cette tour adjacente qui
209 | s'élève à droite; vois ce vieil arbre que les vents ont déchiré. Que
210 | cette masse est belle! Au-dessous de cette masse obscure, vois ces
211 | rochers couverts de verdure. C'est ainsi que ta main puissante les a
212 | formés; c'est ainsi que ta main bienfaisante les a tapissés. Vois
213 | cette terrasse inégale, qui descend du pied des rochers vers la mer.
214 | C'est l'image des dégradations que tu as permises au temps d'exercer
215 | sur les choses du monde les plus solides. Ton soleil l'aurait-il
216 | autrement éclairée? Dieu! si tu anéantis cet ouvrage de l'art, on
217 | dira que tu es un Dieu jaloux. Prends en pitié les malheureux épars
218 | sur cette rive. Ne te suffit-il pas de leur avoir montré le fond des
219 | abîmes? Ne les as-tu sauvés que pour les perdre? Écoute la prière de
220 | celui-ci qui te remercie. Aide les efforts de celui-là qui rassemble
221 | les tristes restes de sa fortune. Ferme l'oreille aux imprécations
222 | de ce furieux: hélas! il se promettait des retours si avantageux; il
223 | avait médité le repos et la retraite; il en était à son dernier
224 | voyage. Cent fois dans la route, il avait calculé par ses doigts le
225 | fond de sa fortune; il en avait arrangé l'emploi: et voilà toutes
226 | ses espérances trompées; peine lui reste-t-il de quoi couvrir ses
227 | membres nus. Sois touché de la tendresse de ces deux époux. Vois la
228 | terreur que tu as inspirée à cette femme. Elle te rend grâce du mal
229 | que tu ne lui as pas fait. Cependant, son enfant, trop jeune pour
230 | savoir à quel péril tu l'avais exposé, lui, son père et sa mère,
231 | s'occupe du fidèle compagnon de son voyage; il rattache le collier
232 | de son chien. Fais grâce à l'innocent. Vois cette mère fraîchement
233 | échappée des eaux avec son époux; ce n'est pas pour elle qu'elle a
234 | tremblé, c'est pour son enfant. Vois comme elle le serre contre son
235 | sein; vois comme elle le baise. O Dieu! reconnais les eaux que tu as
236 | créées. Reconnais-les, et lorsque ton souffle les agite, et lorsque
237 | ta main les apaise. Reconnais les sombres nuages que tu avais
238 | rassemblés, et qu'il t'a plu de dissiper. Déjà ils se séparent, ils
239 | s'éloignent, déjà la lueur de l'astre du jour renaît sur la face des
240 | eaux; je présage le calme à cet horizon rougeâtre. Qu'il est loin,
241 | cet horizon! il ne confine point avec la mer. Le ciel descend au-
242 | dessous et semble tourner autour du globe. Achève d'éclaircir ce
243 | ciel; achève de rendre à la mer sa tranquillité. Permets à ces
244 | matelots de remettre à flot leur navire échoué; seconde leur
245 | travail; donne-leur des forces, et laisse-moi mon tableau. Laisse-
246 | le-moi, comme la verge dont tu châtieras l'homme vain. Déjà ce n'est
247 | plus moi qu'on visite, qu'on vient entendre: c'est Vernet qu'on
248 | vient admirer chez moi. Le peintre a humilié le philosophe.
249 |
250 | O mon ami, le beau Vernet que je possède! Le sujet est la fin d'une
251 | tempête sans catastrophe fâcheuse. Les flots sont encore agités; le
252 | ciel couvert de nuages; les matelots s'occupent sur leur navire
253 | échoué; les habitants accourent des montagnes voisines.
254 |
255 | Que cet artiste a d'esprit! Il ne lui a fallu qu'un petit nombre de
256 | figures principales pour rendre toutes les circonstances de
257 | l'instant qu'il a choisi. Comme toute cette scène est vraie! Comme
258 | tout est peint avec légèreté, facilité et vigueur! Je veux garder ce
259 | témoignage de son amitié. Je veux que mon gendre le transmette ses
260 | enfants, ses enfants aux leurs, et ceux-ci aux enfants qui naîtront
261 | d'eux.
262 |
263 | Si vous voyiez le bel ensemble de ce morceau; comme tout y est
264 | harmonieux; comme les effets s'y enchaînent; comme tout se fait
265 | valoir sans effort et sans apprêt; comme ces montagnes de la droite
266 | sont vaporeuses; comme ces rochers et les édifices surimposés sont
267 | beaux; comme cet arbre est pittoresque; comme cette terrasse est
268 | éclairée; comme la lumière s'y dégrade; comme ces figures sont
269 | disposées, vraies, agissantes, naturelles, vivantes; comme elles
270 | intéressent; la force dont elles sont peintes; la pureté dont elles
271 | sont dessinées; comme elles se détachent du fond; l'énorme étendue
272 | de cet espace; la vérité de ces eaux; ces nuées, ce ciel, cet
273 | horizon! Ici le fond est privé de lumière et le devant clair, au
274 | contraire du technique commun. Venez voir mon Vernet; mais ne me
275 | l'ôtez pas.
276 |
277 | Avec le temps, les dettes s'acquitteront; le remords s'apaisera; et
278 | j'aurai une jouissance pure. Ne craignez pas que la fureur
279 | d'entasser des belles choses me prenne. Les amis que j'avais, je les
280 | ai; et le nombre n'en est pas augmenté. J'ai Laïs, mais Laïs ne m'a
281 | pas. Heureux entre ses bras, je suis prêt à la céder à celui que
282 | j'aimerai et qu'elle rendrait plus heureux que moi. Et pour vous
283 | dire mon secret à l'oreille, cette Laïs, qui se vend si cher aux
284 | autres, ne m'a rien coûté.
285 |
286 |
287 |
288 |
289 |
290 | End of the Project Gutenberg EBook of Regrets sur ma vieille robe de chambre
291 | by Denis Diderot
292 |
293 | *** END OF THIS PROJECT GUTENBERG EBOOK REGRETS SUR MA VIEILLE ROBE ***
294 |
295 | ***** This file should be named 13863-8.txt or 13863-8.zip *****
296 | This and all associated files of various formats will be found in:
297 | http://www.gutenberg.net/1/3/8/6/13863/
298 |
299 | This Etext was prepared by Ebooks libres et gratuits and
300 | is available at http://www.ebooksgratuits.com in Word format,
301 | Mobipocket Reader format, eReader format and Acrobat Reader format.
302 |
303 | Updated editions will replace the previous one--the old editions
304 | will be renamed.
305 |
306 | Creating the works from public domain print editions means that no
307 | one owns a United States copyright in these works, so the Foundation
308 | (and you!) can copy and distribute it in the United States without
309 | permission and without paying copyright royalties. Special rules,
310 | set forth in the General Terms of Use part of this license, apply to
311 | copying and distributing Project Gutenberg-tm electronic works to
312 | protect the PROJECT GUTENBERG-tm concept and trademark. Project
313 | Gutenberg is a registered trademark, and may not be used if you
314 | charge for the eBooks, unless you receive specific permission. If you
315 | do not charge anything for copies of this eBook, complying with the
316 | rules is very easy. You may use this eBook for nearly any purpose
317 | such as creation of derivative works, reports, performances and
318 | research. They may be modified and printed and given away--you may do
319 | practically ANYTHING with public domain eBooks. Redistribution is
320 | subject to the trademark license, especially commercial
321 | redistribution.
322 |
323 |
324 |
325 | *** START: FULL LICENSE ***
326 |
327 | THE FULL PROJECT GUTENBERG LICENSE
328 | PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK
329 |
330 | To protect the Project Gutenberg-tm mission of promoting the free
331 | distribution of electronic works, by using or distributing this work
332 | (or any other work associated in any way with the phrase "Project
333 | Gutenberg"), you agree to comply with all the terms of the Full Project
334 | Gutenberg-tm License (available with this file or online at
335 | http://gutenberg.net/license).
336 |
337 |
338 | Section 1. General Terms of Use and Redistributing Project Gutenberg-tm
339 | electronic works
340 |
341 | 1.A. By reading or using any part of this Project Gutenberg-tm
342 | electronic work, you indicate that you have read, understand, agree to
343 | and accept all the terms of this license and intellectual property
344 | (trademark/copyright) agreement. If you do not agree to abide by all
345 | the terms of this agreement, you must cease using and return or destroy
346 | all copies of Project Gutenberg-tm electronic works in your possession.
347 | If you paid a fee for obtaining a copy of or access to a Project
348 | Gutenberg-tm electronic work and you do not agree to be bound by the
349 | terms of this agreement, you may obtain a refund from the person or
350 | entity to whom you paid the fee as set forth in paragraph 1.E.8.
351 |
352 | 1.B. "Project Gutenberg" is a registered trademark. It may only be
353 | used on or associated in any way with an electronic work by people who
354 | agree to be bound by the terms of this agreement. There are a few
355 | things that you can do with most Project Gutenberg-tm electronic works
356 | even without complying with the full terms of this agreement. See
357 | paragraph 1.C below. There are a lot of things you can do with Project
358 | Gutenberg-tm electronic works if you follow the terms of this agreement
359 | and help preserve free future access to Project Gutenberg-tm electronic
360 | works. See paragraph 1.E below.
361 |
362 | 1.C. The Project Gutenberg Literary Archive Foundation ("the Foundation"
363 | or PGLAF), owns a compilation copyright in the collection of Project
364 | Gutenberg-tm electronic works. Nearly all the individual works in the
365 | collection are in the public domain in the United States. If an
366 | individual work is in the public domain in the United States and you are
367 | located in the United States, we do not claim a right to prevent you from
368 | copying, distributing, performing, displaying or creating derivative
369 | works based on the work as long as all references to Project Gutenberg
370 | are removed. Of course, we hope that you will support the Project
371 | Gutenberg-tm mission of promoting free access to electronic works by
372 | freely sharing Project Gutenberg-tm works in compliance with the terms of
373 | this agreement for keeping the Project Gutenberg-tm name associated with
374 | the work. You can easily comply with the terms of this agreement by
375 | keeping this work in the same format with its attached full Project
376 | Gutenberg-tm License when you share it without charge with others.
377 |
378 | 1.D. The copyright laws of the place where you are located also govern
379 | what you can do with this work. Copyright laws in most countries are in
380 | a constant state of change. If you are outside the United States, check
381 | the laws of your country in addition to the terms of this agreement
382 | before downloading, copying, displaying, performing, distributing or
383 | creating derivative works based on this work or any other Project
384 | Gutenberg-tm work. The Foundation makes no representations concerning
385 | the copyright status of any work in any country outside the United
386 | States.
387 |
388 | 1.E. Unless you have removed all references to Project Gutenberg:
389 |
390 | 1.E.1. The following sentence, with active links to, or other immediate
391 | access to, the full Project Gutenberg-tm License must appear prominently
392 | whenever any copy of a Project Gutenberg-tm work (any work on which the
393 | phrase "Project Gutenberg" appears, or with which the phrase "Project
394 | Gutenberg" is associated) is accessed, displayed, performed, viewed,
395 | copied or distributed:
396 |
397 | This eBook is for the use of anyone anywhere at no cost and with
398 | almost no restrictions whatsoever. You may copy it, give it away or
399 | re-use it under the terms of the Project Gutenberg License included
400 | with this eBook or online at www.gutenberg.net
401 |
402 | 1.E.2. If an individual Project Gutenberg-tm electronic work is derived
403 | from the public domain (does not contain a notice indicating that it is
404 | posted with permission of the copyright holder), the work can be copied
405 | and distributed to anyone in the United States without paying any fees
406 | or charges. If you are redistributing or providing access to a work
407 | with the phrase "Project Gutenberg" associated with or appearing on the
408 | work, you must comply either with the requirements of paragraphs 1.E.1
409 | through 1.E.7 or obtain permission for the use of the work and the
410 | Project Gutenberg-tm trademark as set forth in paragraphs 1.E.8 or
411 | 1.E.9.
412 |
413 | 1.E.3. If an individual Project Gutenberg-tm electronic work is posted
414 | with the permission of the copyright holder, your use and distribution
415 | must comply with both paragraphs 1.E.1 through 1.E.7 and any additional
416 | terms imposed by the copyright holder. Additional terms will be linked
417 | to the Project Gutenberg-tm License for all works posted with the
418 | permission of the copyright holder found at the beginning of this work.
419 |
420 | 1.E.4. Do not unlink or detach or remove the full Project Gutenberg-tm
421 | License terms from this work, or any files containing a part of this
422 | work or any other work associated with Project Gutenberg-tm.
423 |
424 | 1.E.5. Do not copy, display, perform, distribute or redistribute this
425 | electronic work, or any part of this electronic work, without
426 | prominently displaying the sentence set forth in paragraph 1.E.1 with
427 | active links or immediate access to the full terms of the Project
428 | Gutenberg-tm License.
429 |
430 | 1.E.6. You may convert to and distribute this work in any binary,
431 | compressed, marked up, nonproprietary or proprietary form, including any
432 | word processing or hypertext form. However, if you provide access to or
433 | distribute copies of a Project Gutenberg-tm work in a format other than
434 | "Plain Vanilla ASCII" or other format used in the official version
435 | posted on the official Project Gutenberg-tm web site (www.gutenberg.net),
436 | you must, at no additional cost, fee or expense to the user, provide a
437 | copy, a means of exporting a copy, or a means of obtaining a copy upon
438 | request, of the work in its original "Plain Vanilla ASCII" or other
439 | form. Any alternate format must include the full Project Gutenberg-tm
440 | License as specified in paragraph 1.E.1.
441 |
442 | 1.E.7. Do not charge a fee for access to, viewing, displaying,
443 | performing, copying or distributing any Project Gutenberg-tm works
444 | unless you comply with paragraph 1.E.8 or 1.E.9.
445 |
446 | 1.E.8. You may charge a reasonable fee for copies of or providing
447 | access to or distributing Project Gutenberg-tm electronic works provided
448 | that
449 |
450 | - You pay a royalty fee of 20% of the gross profits you derive from
451 | the use of Project Gutenberg-tm works calculated using the method
452 | you already use to calculate your applicable taxes. The fee is
453 | owed to the owner of the Project Gutenberg-tm trademark, but he
454 | has agreed to donate royalties under this paragraph to the
455 | Project Gutenberg Literary Archive Foundation. Royalty payments
456 | must be paid within 60 days following each date on which you
457 | prepare (or are legally required to prepare) your periodic tax
458 | returns. Royalty payments should be clearly marked as such and
459 | sent to the Project Gutenberg Literary Archive Foundation at the
460 | address specified in Section 4, "Information about donations to
461 | the Project Gutenberg Literary Archive Foundation."
462 |
463 | - You provide a full refund of any money paid by a user who notifies
464 | you in writing (or by e-mail) within 30 days of receipt that s/he
465 | does not agree to the terms of the full Project Gutenberg-tm
466 | License. You must require such a user to return or
467 | destroy all copies of the works possessed in a physical medium
468 | and discontinue all use of and all access to other copies of
469 | Project Gutenberg-tm works.
470 |
471 | - You provide, in accordance with paragraph 1.F.3, a full refund of any
472 | money paid for a work or a replacement copy, if a defect in the
473 | electronic work is discovered and reported to you within 90 days
474 | of receipt of the work.
475 |
476 | - You comply with all other terms of this agreement for free
477 | distribution of Project Gutenberg-tm works.
478 |
479 | 1.E.9. If you wish to charge a fee or distribute a Project Gutenberg-tm
480 | electronic work or group of works on different terms than are set
481 | forth in this agreement, you must obtain permission in writing from
482 | both the Project Gutenberg Literary Archive Foundation and Michael
483 | Hart, the owner of the Project Gutenberg-tm trademark. Contact the
484 | Foundation as set forth in Section 3 below.
485 |
486 | 1.F.
487 |
488 | 1.F.1. Project Gutenberg volunteers and employees expend considerable
489 | effort to identify, do copyright research on, transcribe and proofread
490 | public domain works in creating the Project Gutenberg-tm
491 | collection. Despite these efforts, Project Gutenberg-tm electronic
492 | works, and the medium on which they may be stored, may contain
493 | "Defects," such as, but not limited to, incomplete, inaccurate or
494 | corrupt data, transcription errors, a copyright or other intellectual
495 | property infringement, a defective or damaged disk or other medium, a
496 | computer virus, or computer codes that damage or cannot be read by
497 | your equipment.
498 |
499 | 1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for the "Right
500 | of Replacement or Refund" described in paragraph 1.F.3, the Project
501 | Gutenberg Literary Archive Foundation, the owner of the Project
502 | Gutenberg-tm trademark, and any other party distributing a Project
503 | Gutenberg-tm electronic work under this agreement, disclaim all
504 | liability to you for damages, costs and expenses, including legal
505 | fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
506 | LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE
507 | PROVIDED IN PARAGRAPH F3. YOU AGREE THAT THE FOUNDATION, THE
508 | TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE
509 | LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR
510 | INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH
511 | DAMAGE.
512 |
513 | 1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you discover a
514 | defect in this electronic work within 90 days of receiving it, you can
515 | receive a refund of the money (if any) you paid for it by sending a
516 | written explanation to the person you received the work from. If you
517 | received the work on a physical medium, you must return the medium with
518 | your written explanation. The person or entity that provided you with
519 | the defective work may elect to provide a replacement copy in lieu of a
520 | refund. If you received the work electronically, the person or entity
521 | providing it to you may choose to give you a second opportunity to
522 | receive the work electronically in lieu of a refund. If the second copy
523 | is also defective, you may demand a refund in writing without further
524 | opportunities to fix the problem.
525 |
526 | 1.F.4. Except for the limited right of replacement or refund set forth
527 | in paragraph 1.F.3, this work is provided to you 'AS-IS', WITH NO OTHER
528 | WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
529 | WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR ANY PURPOSE.
530 |
531 | 1.F.5. Some states do not allow disclaimers of certain implied
532 | warranties or the exclusion or limitation of certain types of damages.
533 | If any disclaimer or limitation set forth in this agreement violates the
534 | law of the state applicable to this agreement, the agreement shall be
535 | interpreted to make the maximum disclaimer or limitation permitted by
536 | the applicable state law. The invalidity or unenforceability of any
537 | provision of this agreement shall not void the remaining provisions.
538 |
539 | 1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation, the
540 | trademark owner, any agent or employee of the Foundation, anyone
541 | providing copies of Project Gutenberg-tm electronic works in accordance
542 | with this agreement, and any volunteers associated with the production,
543 | promotion and distribution of Project Gutenberg-tm electronic works,
544 | harmless from all liability, costs and expenses, including legal fees,
545 | that arise directly or indirectly from any of the following which you do
546 | or cause to occur: (a) distribution of this or any Project Gutenberg-tm
547 | work, (b) alteration, modification, or additions or deletions to any
548 | Project Gutenberg-tm work, and (c) any Defect you cause.
549 |
550 |
551 | Section 2. Information about the Mission of Project Gutenberg-tm
552 |
553 | Project Gutenberg-tm is synonymous with the free distribution of
554 | electronic works in formats readable by the widest variety of computers
555 | including obsolete, old, middle-aged and new computers. It exists
556 | because of the efforts of hundreds of volunteers and donations from
557 | people in all walks of life.
558 |
559 | Volunteers and financial support to provide volunteers with the
560 | assistance they need, is critical to reaching Project Gutenberg-tm's
561 | goals and ensuring that the Project Gutenberg-tm collection will
562 | remain freely available for generations to come. In 2001, the Project
563 | Gutenberg Literary Archive Foundation was created to provide a secure
564 | and permanent future for Project Gutenberg-tm and future generations.
565 | To learn more about the Project Gutenberg Literary Archive Foundation
566 | and how your efforts and donations can help, see Sections 3 and 4
567 | and the Foundation web page at http://www.pglaf.org.
568 |
569 |
570 | Section 3. Information about the Project Gutenberg Literary Archive
571 | Foundation
572 |
573 | The Project Gutenberg Literary Archive Foundation is a non profit
574 | 501(c)(3) educational corporation organized under the laws of the
575 | state of Mississippi and granted tax exempt status by the Internal
576 | Revenue Service. The Foundation's EIN or federal tax identification
577 | number is 64-6221541. Its 501(c)(3) letter is posted at
578 | http://pglaf.org/fundraising. Contributions to the Project Gutenberg
579 | Literary Archive Foundation are tax deductible to the full extent
580 | permitted by U.S. federal laws and your state's laws.
581 |
582 | The Foundation's principal office is located at 4557 Melan Dr. S.
583 | Fairbanks, AK, 99712., but its volunteers and employees are scattered
584 | throughout numerous locations. Its business office is located at
585 | 809 North 1500 West, Salt Lake City, UT 84116, (801) 596-1887, email
586 | business@pglaf.org. Email contact links and up to date contact
587 | information can be found at the Foundation's web site and official
588 | page at http://pglaf.org
589 |
590 | For additional contact information:
591 | Dr. Gregory B. Newby
592 | Chief Executive and Director
593 | gbnewby@pglaf.org
594 |
595 | Section 4. Information about Donations to the Project Gutenberg
596 | Literary Archive Foundation
597 |
598 | Project Gutenberg-tm depends upon and cannot survive without wide
599 | spread public support and donations to carry out its mission of
600 | increasing the number of public domain and licensed works that can be
601 | freely distributed in machine readable form accessible by the widest
602 | array of equipment including outdated equipment. Many small donations
603 | ($1 to $5,000) are particularly important to maintaining tax exempt
604 | status with the IRS.
605 |
606 | The Foundation is committed to complying with the laws regulating
607 | charities and charitable donations in all 50 states of the United
608 | States. Compliance requirements are not uniform and it takes a
609 | considerable effort, much paperwork and many fees to meet and keep up
610 | with these requirements. We do not solicit donations in locations
611 | where we have not received written confirmation of compliance. To
612 | SEND DONATIONS or determine the status of compliance for any
613 | particular state visit http://pglaf.org
614 |
615 | While we cannot and do not solicit contributions from states where we
616 | have not met the solicitation requirements, we know of no prohibition
617 | against accepting unsolicited donations from donors in such states who
618 | approach us with offers to donate.
619 |
620 | International donations are gratefully accepted, but we cannot make
621 | any statements concerning tax treatment of donations received from
622 | outside the United States. U.S. laws alone swamp our small staff.
623 |
624 | Please check the Project Gutenberg Web pages for current donation
625 | methods and addresses. Donations are accepted in a number of other
626 | ways including including checks, online payments and credit card
627 | donations. To donate, please visit: http://pglaf.org/donate
628 |
629 |
630 | Section 5. General Information About Project Gutenberg-tm electronic
631 | works.
632 |
633 | Professor Michael S. Hart is the originator of the Project Gutenberg-tm
634 | concept of a library of electronic works that could be freely shared
635 | with anyone. For thirty years, he produced and distributed Project
636 | Gutenberg-tm eBooks with only a loose network of volunteer support.
637 |
638 | Project Gutenberg-tm eBooks are often created from several printed
639 | editions, all of which are confirmed as Public Domain in the U.S.
640 | unless a copyright notice is included. Thus, we do not necessarily
641 | keep eBooks in compliance with any particular paper edition.
642 |
643 | Most people start at our Web site which has the main PG search facility:
644 |
645 | http://www.gutenberg.net
646 |
647 | This Web site includes information about Project Gutenberg-tm,
648 | including how to make donations to the Project Gutenberg Literary
649 | Archive Foundation, how to help produce our new eBooks, and how to
650 | subscribe to our email newsletter to hear about new eBooks.
651 |
652 | *** END: FULL LICENSE ***
653 |
654 |
--------------------------------------------------------------------------------
/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/Books/German/schiller/Die Huldigung der KÅnste.txt:
--------------------------------------------------------------------------------
1 | Project Gutenberg's Die Huldigung der Kuenste, by Friedrich Schiller
2 | #41 in our series by Friedrich Schiller
3 |
4 | Copyright laws are changing all over the world. Be sure to check the
5 | copyright laws for your country before downloading or redistributing
6 | this or any other Project Gutenberg eBook.
7 |
8 | This header should be the first thing seen when viewing this Project
9 | Gutenberg file. Please do not remove it. Do not change or edit the
10 | header without written permission.
11 |
12 | Please read the "legal small print," and other information about the
13 | eBook and Project Gutenberg at the bottom of this file. Included is
14 | important information about your specific rights and restrictions in
15 | how the file may be used. You can also find out about how to make a
16 | donation to Project Gutenberg, and how to get involved.
17 |
18 |
19 | **Welcome To The World of Free Plain Vanilla Electronic Texts**
20 |
21 | **eBooks Readable By Both Humans and By Computers, Since 1971**
22 |
23 | *****These eBooks Were Prepared By Thousands of Volunteers!*****
24 |
25 |
26 | Title: Die Huldigung der Kuenste
27 |
28 | Author: Friedrich Schiller
29 |
30 | Release Date: April, 2005 [EBook #7939]
31 | [Yes, we are more than one year ahead of schedule]
32 | [This file was first posted on June 3, 2003]
33 |
34 | Edition: 10
35 |
36 | Language: German
37 |
38 |
39 | *** START OF THE PROJECT GUTENBERG EBOOK DIE HULDIGUNG DER KUENSTE ***
40 |
41 |
42 |
43 |
44 | Produced by Delphine Lettau and Mike Pullen
45 |
46 |
47 |
48 |
49 | This Etext is in German.
50 |
51 | This book content was graciously contributed by the Gutenberg Projekt-DE.
52 | That project is reachable at the web site http://gutenberg.spiegel.de/.
53 |
54 | Dieses Buch wurde uns freundlicherweise vom "Gutenberg Projekt-DE"
55 | zur Verfügung gestellt. Das Projekt ist unter der Internet-Adresse
56 | http://gutenberg.spiegel.de/ erreichbar.
57 |
58 |
59 |
60 |
61 | Die Huldigung der Künste.
62 |
63 | Friedrich Schiller.
64 |
65 | Ein lyrisches Spiel.
66 |
67 | Ihrer Kaiserl. Hoheit der Frau Erbprinzessin von Weimar Maria
68 | Paulowna Großfürstin von Rußland in Ehrfurcht gewidmet
69 | und vorgestellt auf dem Hoftheater zu Weimar am 12. November 1804.
70 |
71 |
72 | Personen.
73 |
74 | Vater.
75 | Mutter.
76 | Jüngling.
77 | Mädchen.
78 | Chor von Landleuten.
79 | Genius.
80 |
81 | Die sieben Künste.
82 |
83 |
84 |
85 | Die Scene ist eine freie ländliche Gegend; in der Mitte ein
86 | Orangenbaum, mit Früchten beladen und mit Bändern geschmückt.
87 | Landleute sind eben beschäftigt, ihn in die Erde zu pflanzen,
88 | indem die Mädchen und Kinder ihn zu beiden Seiten an
89 | Blumenketten halten.
90 |
91 |
92 | Vater. Wachse, wachse, blühender Baum
93 | Mit der goldnen Früchtekrone,
94 | Den wir aus der fremden Zone,
95 | Pflanzen in dem heimischen Raum!
96 | Fülle süßer Früchte beuge
97 | Deine immer grünen Zweige!
98 |
99 | Alle Landleute. Wachse, wachse, blühender Baum
100 | Strebend in den Himmelraum!
101 |
102 | Jüngling. Mit der duft'gen Blüthe paare
103 | Prangend sich die goldne Frucht!
104 | Stehe in dem Sturm der Jahre,
105 | Daure in der Zeiten Flucht!
106 |
107 | Alle. Stehe in dem Sturm der Jahre,
108 | Daure in der Zeiten Flucht!
109 |
110 | Mutter. Nimm ihn auf, o heil'ge Erde,
111 | Nimm den zarten Fremdlich ein!
112 | Führer der gefleckten Heerde,
113 | Hoher Flurgott, pflege sein!
114 |
115 | Mädchen. Pflegt ihn, zärtliche Dryaden!
116 | Schütz' ihn, schütz' ihn, Vater Pan!
117 | Und ihr freien Oreaden,
118 | Daß ihm keine Wetter schaden,
119 | Fesselt alle Stürme an!
120 |
121 | Alle. Pflegt ihn, zärtliche Dryaden!
122 | Schütz' ihn, schütz' ihn, Vater Pan!
123 |
124 | Jüngling. Lächle dir der warme Aether
125 | Ewig klar und ewig blau!
126 | Sonne, gib ihm deine Strahlen,
127 | Erde, gib ihm deinen Thau!
128 |
129 | Alle. Sonne, gib ihm deine Strahlen,
130 | Erde, gib ihm deinen Thau!
131 |
132 | Vater. Freude, Freude, neues Leben
133 | Mögst du jedem Wandrer geben;
134 | Denn die Freude pflanzte dich.
135 | Mögen deine Nektargaben
136 | Noch den spätsten Enkel laben,
137 | Und erquicket segn' er dich!
138 |
139 | Alle. Freude, Freude, neues Leben
140 | Mögst du jedem Wandrer geben;
141 | Denn die Freude pflanzte dich.
142 |
143 | Sie tanzen in einem bunten Reihen um den Baum. Die Musik des
144 | Orchesters begleitet sie und geht allmählig in einen edlern Styl
145 | über, während daß man im Hintergrund den Genius mit den sieben
146 | Göttinnen herabsteigen sieht. Die Landleute ziehen sich nach beiden
147 | Seiten der Bühne, indem der Genius in die Mitte tritt und die drei
148 | bildenden Künste sich zu seiner Rechten, die vier redenden und
149 | musikalischen sich zu seiner Linken stellen.
150 |
151 | Chor der Künste. Wir kommen von fernher,
152 | Wir wandern und schreiten
153 | Von Völkern zu Völkern,
154 | Von Zeiten zu Zeiten;
155 | Wir suchen auf Erden ein bleibendes Haus.
156 | Um ewig zu wohnen
157 | Auf ruhigen Thronen,
158 | In schaffender Stille,
159 | In wirkender Fülle,
160 | Wir wandern und suchen und finden's nicht aus.
161 |
162 | Jüngling. Sieh, wer sind sie, die hier nahen,
163 | Eine göttergleiche Schaar!
164 | Bilder, wie wir nie sie sahen;
165 | Es ergreift mich wunderbar.
166 |
167 | Genius. Wo die Waffen erklirren
168 | Mit eisernem Klang,
169 | Wo der Haß und der Wahn die Herzen verwirren,
170 | Wo die Menschen wandeln im ewigen Irren
171 | Da wenden wir flüchtig den eilenden Gang.
172 |
173 | Chor der Künste. Wir hassen die Falschen,
174 | Die Götterverächter;
175 | Wir suchen der Menschen
176 | Aufricht'ge Geschlechter;
177 | Wo kindliche Sitten
178 | Uns freundlich empfahn,
179 | Da bauen wir Hütten
180 | Und siedeln uns an!
181 |
182 | Mädchen. Wie wird mir auf einmal!
183 | Wie ist mir geschehn!
184 | Es zieht mich zu ihnen mit dunkeln Gewalten;
185 | Es sind mir bekannte, geliebte Gestalten,
186 | Und weiß doch, ich habe sie niemals gesehn.
187 |
188 | Alle Landleute. Wie wird mir auf einmal!
189 | Wie ist mir geschehn!
190 |
191 | Genius. Aber, still! da seh' ich Menschen,
192 | Und sie scheinen hoch beglückt;
193 | Reich mit Bändern und mit Kränzen,
194 | Festlich ist der Baum geschmückt.
195 | --Sind dies nicht der Freude Spuren?
196 | Redet! Was begibt sich hier?
197 |
198 | Vater. Hirten sind wir dieser Fluren,
199 | Und ein Fest begehen wir.
200 |
201 | Genius. Welches Fest? O lasset hören!
202 |
203 | Mutter. Unsrer Königin zu Ehren,
204 | Der erhabnen, gütigen,
205 | Die in unser stilles Thal
206 | Niederstieg, uns zu beglücken,
207 | Aus dem hohen Kaisersaal.
208 |
209 | Jüngling. Sie, die alle Reize schmücken,
210 | Gütig, wie der Sonne Strahl.
211 |
212 | Genius. Warum pflanzt ihr diesen Baum?
213 |
214 | Jüngling. Ach, sie kommt aus fernem Land,
215 | Und ihr Herz blickt in die Ferne!
216 | Fesseln möchten wir sie gerne
217 | An das neue Vaterland.
218 |
219 | Genius. Darum grabt ihr diesen Baum
220 | Mit den Wurzeln in die Erde,
221 | Daß die Hohe heimisch werde
222 | In dem neuen Vaterland?
223 |
224 | Mädchen. Ach, so viele zarte Bande
225 | Ziehen sie zum Jugendlande!
226 | Alles, was sie dort verließ,
227 | Ihrer Kindheit Paradies
228 | Und den heil'gen Schooß der Mutter
229 | Und das große Herz der Brüder
230 | Und der Schwestern zarte Brust--
231 | Können wir es ihr ersetzen?
232 | Ist ein Preis in der Natur
233 | Solchen Freuden, solchen Schätzen?
234 |
235 | Genius. Liebe greift auch in die Ferne,
236 | Liebe fesselt ja kein Ort.
237 | Wie die Flamme nicht verarmet,
238 | Zündet sich an ihrem Feuer
239 | Eine andre wachsend fort--
240 | Was sie Theures dort besessen,
241 | Unverloren bleibt es ihr;
242 | Hat sie Liebe dort verlassen,
243 | Findet sie die Liebe hier.
244 |
245 | Mutter. Ach, sie tritt aus Marmorhallen,
246 | Aus dem goldnen Saal der Pracht.
247 | Wir die Hohe sich gefallen
248 | Hier, wo über freien Auen
249 | Nur die goldne Sonne lacht?
250 |
251 | Genius. Hirten, euch ist nicht gegeben,
252 | In ein schönes Herz zu schauen!
253 | Wissen ein erhabner Sinn
254 | Legt das Große in das Leben,
255 | Und er sucht es nicht darin.
256 |
257 | Jüngling. O schöne Fremdlinge! lehrt uns sie binden,
258 | O lehrt uns, ihr wohlgefällig sein!
259 | Gern wollten wir ihr duft'ge Kränze winden
260 | Und führten sie in unsre Hütten ein!
261 |
262 | Genius. Ein schönes Herz hat bald sich heim gefunden,
263 | Es schafft sich selbst, still wirkend, seine Welt.
264 | Und wie der Baum sich in die Erde schlingt
265 | Mit seiner Wurzeln Kraft und fest sich kettet,
266 | So rankt das Edle sich, das Treffliche,
267 | Mit seinen Thaten an das Leben an.
268 | Schnell knüpfen sich der Liebe zarte Bande,
269 | Wo man beglückt, ist man im Vaterlande.
270 |
271 | Alle Landleute. O schöner Fremdling! sag, wie wir sie binden,
272 | Die Herrliche, in unsern stillen Gründen?
273 |
274 | Genius. Es ist gefunden schon, das zarte Band,
275 | Nicht Alles ist ihr fremd in diesem Land;
276 | Mich wird sie wohl und mein Gefolge kennen,
277 | Wenn wir uns ihr verkündigen und nennen.
278 |
279 | (Hier tritt der Genius bis ans Proszenium, die sieben Göttinnen
280 | thun das Gleiche, so daß sie ganz vorn einen Halbkreis bilden. In
281 | dem Augenblick, wo sie vortreten, enthüllen sie ihre Attribute, die
282 | sie bis jetzt unter den Gewändern verborgen gehalten.)
283 |
284 | Genius (gegen die Fürstin).
285 | Ich bin der schaffende Genius des Schönen,
286 | Und die mir folget, ist der Künste Schaar.
287 | Wir sind's, die alle Menschenwerke krönen,
288 | Wir schmücken den Palast und den Altar.
289 | Längst wohnten wir bei deinem Kaiserstamme,
290 | Und sie, die Herrliche, die dich gebar,
291 | Sie nährt uns selbst die heil'ge Opferflamme
292 | Mit reiner Hand auf ihrem Hausaltar.
293 | Wir sind dir nachgefolgt, von ihr gesendet;
294 | Denn alles Glück wird nur durch uns vollendet.
295 |
296 | Architektur (mit einer Mauerkrone auf dem Haupt, ein goldnes Schiff
297 | in der Rechten).
298 | Mich sahst du thronen an der Newa Strom!
299 | Dein großer Ahnherr rief mich nach dem Norden,
300 | Und dort erbaut' ich ihm ein zweites Rom;
301 | Durch mich ist es ein Kaisersitz geworden.
302 | Ein Paradies der Herrlichkeit und Größe
303 | Stieg unter meiner Zauberruthe Schlag.
304 | Jetzt rauscht des Lebens lustiges Getöse,
305 | Wo vormals nur ein düstrer Nebel lag;
306 | Die stolze Flottenrüstung seiner Maste
307 | Erschreckt den alten Belt in seinem Meerpalaste.
308 |
309 | Sculptur (mit einer Victoria in der Hand).
310 | Auch mich hast du mit Staunen oft gesehen,
311 | Die ernste Bildnerin der alten Götterwelt.
312 | Auf einen Felsen--er wird ewig stehen--
313 | Hab' ich sein großes Heldenbild gestellt;
314 | Und dieses Siegesbild, das ich erschaffen, (die Victoria zeigend)
315 | Dein hoher Bruder schwingt's in mächt'ger Hand;
316 | Es fliegt einher vor Alexanders Waffen,
317 | Er hat's auf ewig an sein Heer gebannt.
318 | Ich kann aus Thon nur Lebenloses bilden,
319 | Er schafft sich ein gesittet Volk aus Wilden.
320 |
321 | Malerei. Auch mich, Erhabne! wirst du nicht verkennen,
322 | Die heitre Schöpferin der täuschenden Gestalt.
323 | Von Leben blitzt es, und die Farben brennen
324 | Auf meinem Tuch mit glühender Gewalt.
325 | Die Sinne weiß ich lieblich zu betrügen,
326 | Ja, durch die Augen täusch' ich selbst das Herz;
327 | Mit des Geliebten nachgeahmten Zügen
328 | Versüß' ich oft der Sehnsucht bittern Schmerz.
329 | Die sich getrennt nach Norden und nach Süden,
330 | Sie haben mich--und sind nicht ganz geschieden.
331 |
332 | Poesie. Mich hält kein Band, mich fesselt keine Schranke,
333 | Frei schwing' ich mich durch alle Räume fort.
334 | Mein unermeßlich Reich ist der Gedanke,
335 | Und mein geflügelt Werkzeug ist das Wort.
336 | Was sich bewegt im Himmel und auf Erden,
337 | Was die Natur tief im Verborgnen schafft,
338 | Muß mir entschleiert und entsiegelt werden,
339 | Denn nichts beschränkt die freie Dichterkraft;
340 | Doch Schönres find' ich nichts, wie lang ich wähle,
341 | Als in der schönen Form--die schöne Seele.
342 |
343 | Musik (mit der Leier).
344 | Der Töne Macht, die aus den Saiten quillet,
345 | Du kennst sie wohl, du übst sie mächtig aus.
346 | Was ahnungsvoll den tiefen Busen füllet,
347 | Es spricht sich nur in meinen Tönen aus;
348 | Ein holder Zauber spielt um deine Sinnen,
349 | Ergieß' ich meinen Strom von Harmonien,
350 | In süßer Wehmuth will das Herz zerrinnen,
351 | Und von den Lippen will die Seele fliehn,
352 | Und setz' ich meine Leiter an von Tönen,
353 | Ich trage dich hinauf zum höchsten Schönen.
354 |
355 | Tanz (mit der Cymbale).
356 | Das hohe Göttliche, es ruht in ernster Stille,
357 | Mit stillem Geist will es empfunden sein.
358 | Das Leben regt sich gern in üpp'ger Fülle;
359 | Die Jugend will sich äußern, will sich freun.
360 | Die Freude führ' ich an der Schönheit Zügel,
361 | Die gern die zarten Grenzen übertritt;
362 | Dem schweren Körper geb' ich Zephyrs Flügel,
363 | Das Gleichmaß leg' ich in des Tanzes Schritt.
364 | Was sich bewegt, lenk' ich mit meinem Stabe,
365 | Die Grazie ist meine schöne Gabe.
366 |
367 | Schauspielkunst (mit einer Doppelmaske).
368 | Ein Janusbild lass' ich vor dir erscheinen,
369 | Die Freude zeigt es hier und hier den Schmerz.
370 | Die Menschheit wechselt zwischen Lust und Weinen,
371 | Und mit dem Ernste gattet sich der Scherz.
372 | Mit allen seinen Tiefen, seinen Höhen
373 | Roll' ich das Leben ab vor deinem Blick.
374 | Wenn du das große Spiel der Welt gesehen,
375 | So kehrst du reicher in dich selbst zurück;
376 | Denn, wer den Sinn aufs Ganze hält gerichtet,
377 | Dem ist der Streit in seiner Brust geschlichtet.
378 |
379 | Genius. Und Alle, die wir hier vor dir erschienen,
380 | Der hohen Künste heil'ger Götterkreis,
381 | Sind wir bereit, o Fürstin, dir zu dienen.
382 | Gebiete du, und schnell, auf dein Geheiß,
383 | Wie Thebens Mauer beider Leier Tönen,
384 | Belebt sich der empfindungslose Stein,
385 | Entfaltet sich dir eine Welt des Schönen.
386 |
387 | Architektur. Die Säule soll sich an die Säule reihn.
388 |
389 | Sculptur. Der Marmor schmelzen unter Hammers Schlägen.
390 |
391 | Malerei. Das Leben frisch sich auf der Leinwand regen.
392 |
393 | Musik. Der Strom der Harmonieen dir erklingen.
394 |
395 | Tanz. Der leichte Tanz den muntern Reigen schlingen.
396 |
397 | Schauspielkunst. Die Welt sich dir auf dieser Bühne spiegeln.
398 |
399 | Poesie. Die Phantasie auf ihren mächt'gen Flügeln
400 | Dich zaubern in das himmlische Gefild!
401 |
402 | Malerei. Und wie der Iris schönes Farbenbild
403 | Sich glänzend aufbaut aus der Sonne Strahlen,
404 | So wollen wir mit schön vereintem Streben,
405 | Der hohen Schönheit sieben heil'ge Zahlen,
406 | Dir, Herrliche, den Lebensteppich weben!
407 |
408 | Alle Künste (sich umfassend).
409 | Denn aus der Kräfte schön vereintem Streben
410 | Erhebt sich, wirkend, erst das wahre Leben.
411 |
412 |
413 | Ende dieses Projekt Gutenberg Etextes Die Huldigung der Künste,
414 | von Friedrich Schiller.
415 |
416 |
417 |
418 |
419 |
420 | End of Project Gutenberg's Die Huldigung der Kuenste, by Friedrich Schiller
421 |
422 | *** END OF THE PROJECT GUTENBERG EBOOK DIE HULDIGUNG DER KUENSTE ***
423 |
424 | This file should be named 7939-8.txt or 7939-8.zip
425 |
426 | Produced by Delphine Lettau and Mike Pullen
427 |
428 | Project Gutenberg eBooks are often created from several printed
429 | editions, all of which are confirmed as Public Domain in the US
430 | unless a copyright notice is included. Thus, we usually do not
431 | keep eBooks in compliance with any particular paper edition.
432 |
433 | We are now trying to release all our eBooks one year in advance
434 | of the official release dates, leaving time for better editing.
435 | Please be encouraged to tell us about any error or corrections,
436 | even years after the official publication date.
437 |
438 | Please note neither this listing nor its contents are final til
439 | midnight of the last day of the month of any such announcement.
440 | The official release date of all Project Gutenberg eBooks is at
441 | Midnight, Central Time, of the last day of the stated month. A
442 | preliminary version may often be posted for suggestion, comment
443 | and editing by those who wish to do so.
444 |
445 | Most people start at our Web sites at:
446 | http://gutenberg.net or
447 | http://promo.net/pg
448 |
449 | These Web sites include award-winning information about Project
450 | Gutenberg, including how to donate, how to help produce our new
451 | eBooks, and how to subscribe to our email newsletter (free!).
452 |
453 |
454 | Those of you who want to download any eBook before announcement
455 | can get to them as follows, and just download by date. This is
456 | also a good way to get them instantly upon announcement, as the
457 | indexes our cataloguers produce obviously take a while after an
458 | announcement goes out in the Project Gutenberg Newsletter.
459 |
460 | http://www.ibiblio.org/gutenberg/etext03 or
461 | ftp://ftp.ibiblio.org/pub/docs/books/gutenberg/etext03
462 |
463 | Or /etext02, 01, 00, 99, 98, 97, 96, 95, 94, 93, 92, 92, 91 or 90
464 |
465 | Just search by the first five letters of the filename you want,
466 | as it appears in our Newsletters.
467 |
468 |
469 | Information about Project Gutenberg (one page)
470 |
471 | We produce about two million dollars for each hour we work. The
472 | time it takes us, a rather conservative estimate, is fifty hours
473 | to get any eBook selected, entered, proofread, edited, copyright
474 | searched and analyzed, the copyright letters written, etc. Our
475 | projected audience is one hundred million readers. If the value
476 | per text is nominally estimated at one dollar then we produce $2
477 | million dollars per hour in 2002 as we release over 100 new text
478 | files per month: 1240 more eBooks in 2001 for a total of 4000+
479 | We are already on our way to trying for 2000 more eBooks in 2002
480 | If they reach just 1-2% of the world's population then the total
481 | will reach over half a trillion eBooks given away by year's end.
482 |
483 | The Goal of Project Gutenberg is to Give Away 1 Trillion eBooks!
484 | This is ten thousand titles each to one hundred million readers,
485 | which is only about 4% of the present number of computer users.
486 |
487 | Here is the briefest record of our progress (* means estimated):
488 |
489 | eBooks Year Month
490 |
491 | 1 1971 July
492 | 10 1991 January
493 | 100 1994 January
494 | 1000 1997 August
495 | 1500 1998 October
496 | 2000 1999 December
497 | 2500 2000 December
498 | 3000 2001 November
499 | 4000 2001 October/November
500 | 6000 2002 December*
501 | 9000 2003 November*
502 | 10000 2004 January*
503 |
504 |
505 | The Project Gutenberg Literary Archive Foundation has been created
506 | to secure a future for Project Gutenberg into the next millennium.
507 |
508 | We need your donations more than ever!
509 |
510 | As of February, 2002, contributions are being solicited from people
511 | and organizations in: Alabama, Alaska, Arkansas, Connecticut,
512 | Delaware, District of Columbia, Florida, Georgia, Hawaii, Illinois,
513 | Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Massachusetts,
514 | Michigan, Mississippi, Missouri, Montana, Nebraska, Nevada, New
515 | Hampshire, New Jersey, New Mexico, New York, North Carolina, Ohio,
516 | Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina, South
517 | Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West
518 | Virginia, Wisconsin, and Wyoming.
519 |
520 | We have filed in all 50 states now, but these are the only ones
521 | that have responded.
522 |
523 | As the requirements for other states are met, additions to this list
524 | will be made and fund raising will begin in the additional states.
525 | Please feel free to ask to check the status of your state.
526 |
527 | In answer to various questions we have received on this:
528 |
529 | We are constantly working on finishing the paperwork to legally
530 | request donations in all 50 states. If your state is not listed and
531 | you would like to know if we have added it since the list you have,
532 | just ask.
533 |
534 | While we cannot solicit donations from people in states where we are
535 | not yet registered, we know of no prohibition against accepting
536 | donations from donors in these states who approach us with an offer to
537 | donate.
538 |
539 | International donations are accepted, but we don't know ANYTHING about
540 | how to make them tax-deductible, or even if they CAN be made
541 | deductible, and don't have the staff to handle it even if there are
542 | ways.
543 |
544 | Donations by check or money order may be sent to:
545 |
546 | Project Gutenberg Literary Archive Foundation
547 | PMB 113
548 | 1739 University Ave.
549 | Oxford, MS 38655-4109
550 |
551 | Contact us if you want to arrange for a wire transfer or payment
552 | method other than by check or money order.
553 |
554 | The Project Gutenberg Literary Archive Foundation has been approved by
555 | the US Internal Revenue Service as a 501(c)(3) organization with EIN
556 | [Employee Identification Number] 64-622154. Donations are
557 | tax-deductible to the maximum extent permitted by law. As fund-raising
558 | requirements for other states are met, additions to this list will be
559 | made and fund-raising will begin in the additional states.
560 |
561 | We need your donations more than ever!
562 |
563 | You can get up to date donation information online at:
564 |
565 | http://www.gutenberg.net/donation.html
566 |
567 |
568 | ***
569 |
570 | If you can't reach Project Gutenberg,
571 | you can always email directly to:
572 |
573 | Michael S. Hart
574 |
575 | Prof. Hart will answer or forward your message.
576 |
577 | We would prefer to send you information by email.
578 |
579 |
580 | **The Legal Small Print**
581 |
582 |
583 | (Three Pages)
584 |
585 | ***START**THE SMALL PRINT!**FOR PUBLIC DOMAIN EBOOKS**START***
586 | Why is this "Small Print!" statement here? You know: lawyers.
587 | They tell us you might sue us if there is something wrong with
588 | your copy of this eBook, even if you got it for free from
589 | someone other than us, and even if what's wrong is not our
590 | fault. So, among other things, this "Small Print!" statement
591 | disclaims most of our liability to you. It also tells you how
592 | you may distribute copies of this eBook if you want to.
593 |
594 | *BEFORE!* YOU USE OR READ THIS EBOOK
595 | By using or reading any part of this PROJECT GUTENBERG-tm
596 | eBook, you indicate that you understand, agree to and accept
597 | this "Small Print!" statement. If you do not, you can receive
598 | a refund of the money (if any) you paid for this eBook by
599 | sending a request within 30 days of receiving it to the person
600 | you got it from. If you received this eBook on a physical
601 | medium (such as a disk), you must return it with your request.
602 |
603 | ABOUT PROJECT GUTENBERG-TM EBOOKS
604 | This PROJECT GUTENBERG-tm eBook, like most PROJECT GUTENBERG-tm eBooks,
605 | is a "public domain" work distributed by Professor Michael S. Hart
606 | through the Project Gutenberg Association (the "Project").
607 | Among other things, this means that no one owns a United States copyright
608 | on or for this work, so the Project (and you!) can copy and
609 | distribute it in the United States without permission and
610 | without paying copyright royalties. Special rules, set forth
611 | below, apply if you wish to copy and distribute this eBook
612 | under the "PROJECT GUTENBERG" trademark.
613 |
614 | Please do not use the "PROJECT GUTENBERG" trademark to market
615 | any commercial products without permission.
616 |
617 | To create these eBooks, the Project expends considerable
618 | efforts to identify, transcribe and proofread public domain
619 | works. Despite these efforts, the Project's eBooks and any
620 | medium they may be on may contain "Defects". Among other
621 | things, Defects may take the form of incomplete, inaccurate or
622 | corrupt data, transcription errors, a copyright or other
623 | intellectual property infringement, a defective or damaged
624 | disk or other eBook medium, a computer virus, or computer
625 | codes that damage or cannot be read by your equipment.
626 |
627 | LIMITED WARRANTY; DISCLAIMER OF DAMAGES
628 | But for the "Right of Replacement or Refund" described below,
629 | [1] Michael Hart and the Foundation (and any other party you may
630 | receive this eBook from as a PROJECT GUTENBERG-tm eBook) disclaims
631 | all liability to you for damages, costs and expenses, including
632 | legal fees, and [2] YOU HAVE NO REMEDIES FOR NEGLIGENCE OR
633 | UNDER STRICT LIABILITY, OR FOR BREACH OF WARRANTY OR CONTRACT,
634 | INCLUDING BUT NOT LIMITED TO INDIRECT, CONSEQUENTIAL, PUNITIVE
635 | OR INCIDENTAL DAMAGES, EVEN IF YOU GIVE NOTICE OF THE
636 | POSSIBILITY OF SUCH DAMAGES.
637 |
638 | If you discover a Defect in this eBook within 90 days of
639 | receiving it, you can receive a refund of the money (if any)
640 | you paid for it by sending an explanatory note within that
641 | time to the person you received it from. If you received it
642 | on a physical medium, you must return it with your note, and
643 | such person may choose to alternatively give you a replacement
644 | copy. If you received it electronically, such person may
645 | choose to alternatively give you a second opportunity to
646 | receive it electronically.
647 |
648 | THIS EBOOK IS OTHERWISE PROVIDED TO YOU "AS-IS". NO OTHER
649 | WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, ARE MADE TO YOU AS
650 | TO THE EBOOK OR ANY MEDIUM IT MAY BE ON, INCLUDING BUT NOT
651 | LIMITED TO WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
652 | PARTICULAR PURPOSE.
653 |
654 | Some states do not allow disclaimers of implied warranties or
655 | the exclusion or limitation of consequential damages, so the
656 | above disclaimers and exclusions may not apply to you, and you
657 | may have other legal rights.
658 |
659 | INDEMNITY
660 | You will indemnify and hold Michael Hart, the Foundation,
661 | and its trustees and agents, and any volunteers associated
662 | with the production and distribution of Project Gutenberg-tm
663 | texts harmless, from all liability, cost and expense, including
664 | legal fees, that arise directly or indirectly from any of the
665 | following that you do or cause: [1] distribution of this eBook,
666 | [2] alteration, modification, or addition to the eBook,
667 | or [3] any Defect.
668 |
669 | DISTRIBUTION UNDER "PROJECT GUTENBERG-tm"
670 | You may distribute copies of this eBook electronically, or by
671 | disk, book or any other medium if you either delete this
672 | "Small Print!" and all other references to Project Gutenberg,
673 | or:
674 |
675 | [1] Only give exact copies of it. Among other things, this
676 | requires that you do not remove, alter or modify the
677 | eBook or this "small print!" statement. You may however,
678 | if you wish, distribute this eBook in machine readable
679 | binary, compressed, mark-up, or proprietary form,
680 | including any form resulting from conversion by word
681 | processing or hypertext software, but only so long as
682 | *EITHER*:
683 |
684 | [*] The eBook, when displayed, is clearly readable, and
685 | does *not* contain characters other than those
686 | intended by the author of the work, although tilde
687 | (~), asterisk (*) and underline (_) characters may
688 | be used to convey punctuation intended by the
689 | author, and additional characters may be used to
690 | indicate hypertext links; OR
691 |
692 | [*] The eBook may be readily converted by the reader at
693 | no expense into plain ASCII, EBCDIC or equivalent
694 | form by the program that displays the eBook (as is
695 | the case, for instance, with most word processors);
696 | OR
697 |
698 | [*] You provide, or agree to also provide on request at
699 | no additional cost, fee or expense, a copy of the
700 | eBook in its original plain ASCII form (or in EBCDIC
701 | or other equivalent proprietary form).
702 |
703 | [2] Honor the eBook refund and replacement provisions of this
704 | "Small Print!" statement.
705 |
706 | [3] Pay a trademark license fee to the Foundation of 20% of the
707 | gross profits you derive calculated using the method you
708 | already use to calculate your applicable taxes. If you
709 | don't derive profits, no royalty is due. Royalties are
710 | payable to "Project Gutenberg Literary Archive Foundation"
711 | the 60 days following each date you prepare (or were
712 | legally required to prepare) your annual (or equivalent
713 | periodic) tax return. Please contact us beforehand to
714 | let us know your plans and to work out the details.
715 |
716 | WHAT IF YOU *WANT* TO SEND MONEY EVEN IF YOU DON'T HAVE TO?
717 | Project Gutenberg is dedicated to increasing the number of
718 | public domain and licensed works that can be freely distributed
719 | in machine readable form.
720 |
721 | The Project gratefully accepts contributions of money, time,
722 | public domain materials, or royalty free copyright licenses.
723 | Money should be paid to the:
724 | "Project Gutenberg Literary Archive Foundation."
725 |
726 | If you are interested in contributing scanning equipment or
727 | software or other items, please contact Michael Hart at:
728 | hart@pobox.com
729 |
730 | [Portions of this eBook's header and trailer may be reprinted only
731 | when distributed free of all fees. Copyright (C) 2001, 2002 by
732 | Michael S. Hart. Project Gutenberg is a TradeMark and may not be
733 | used in any sales of Project Gutenberg eBooks or other materials be
734 | they hardware or software or any other related product without
735 | express permission.]
736 |
737 | *END THE SMALL PRINT! FOR PUBLIC DOMAIN EBOOKS*Ver.02/11/02*END*
738 |
--------------------------------------------------------------------------------
/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/READ_ME.txt:
--------------------------------------------------------------------------------
1 | Count frequency of words,letters,visualize etc | dataset - https://www.gutenberg.org/
2 |
3 | Patterns within written text are not the same across all authors or languages.
4 | This allows linguists to study the language of origin
5 | or potential authorship of texts where these characteristics are not
6 | directly known such as the Federalist Papers of the American Revolution.
7 | In this case study, we will examine the properties of individual books
8 | in a book collection from various authors and various languages.
9 | More specifically, we will look at book lengths, number of unique words,
10 | and how these attributes cluster by language of or authorship.
11 | Project Gutenberg is the oldest digital library of books.
12 | It aims to digitize and archive cultural works, and at present,
13 | contains over 50,000 books, all previously published
14 | and now available electronically.
15 |
16 |
17 | Order of Project subparts :
18 | 1.read_manipulate_strings
19 | 2.read_book
20 | 3.read_list_all_books_&_plot
21 |
22 | I did this project to accompany my learnings from HarvardX course - PH526x Using Python for Research.
23 |
24 | - Amartya Ranjan Saikia (amartyasaikia@acm.org/ar5saikia@gmail.com)
--------------------------------------------------------------------------------
/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/code.jpegs_books_eng.fre.port.ru/read_book.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/code.jpegs_books_eng.fre.port.ru/read_book.JPG
--------------------------------------------------------------------------------
/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/code.jpegs_books_eng.fre.port.ru/read_list_all_books_&_plot.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/code.jpegs_books_eng.fre.port.ru/read_list_all_books_&_plot.JPG
--------------------------------------------------------------------------------
/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/code.jpegs_books_eng.fre.port.ru/read_manipulate_strings.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/code.jpegs_books_eng.fre.port.ru/read_manipulate_strings.JPG
--------------------------------------------------------------------------------
/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/figures_books_eng.fre.port.ru/figure_1_plot_+_loglog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/figures_books_eng.fre.port.ru/figure_1_plot_+_loglog.png
--------------------------------------------------------------------------------
/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/figures_books_eng.fre.port.ru/figure_2_lang_comparison.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/figures_books_eng.fre.port.ru/figure_2_lang_comparison.png
--------------------------------------------------------------------------------
/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/read_book.py:
--------------------------------------------------------------------------------
1 | def read_book(title_path):
2 | #read a book and return it as a string
3 | with open(title_path,"r", encoding="utf8") as current_file:
4 | text=current_file.read()
5 | text=text.replace("\n", "").replace("\r","")
6 | return text
7 |
8 | text = read_book("./Books/English/shakespeare/Romeo and Juliet.txt")
9 |
10 | # >>>p=text.find("What's in a name?")
11 | # >>>sp=text[p:p+1000]
12 |
13 | def word_stats(word_counts):
14 | num_unique=len(word_counts)
15 | counts=word_counts.values()
16 | return (num_unique,counts)
17 |
18 | word_counts = count_words_fast(text) #algorithm from previous program
19 | (num_unique,counts) = word_stats(word_counts)
20 | print(num_unique,sum(counts)) #For English Version
21 |
22 | text=read_book("./German/shakespeare/Romeo und Julia.txt")
23 | word_counts=count_words_fast(text)
24 | (num_unique,counts)=word_stats(word_counts)
25 | print(num_unique,sum(counts)) #For German Version
26 |
--------------------------------------------------------------------------------
/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/read_list_all_books_&_plot.py:
--------------------------------------------------------------------------------
1 | import os
2 | import pandas as pd
3 |
4 | book_dir = "./Books"
5 | os.listdir(book_dir)
6 |
7 | stats=pd.DataFrame(columns=("language","author","title","length","unique"))
8 | title_num=1
9 | for language in os.listdir(book_dir):
10 | for author in os.listdir(book_dir+"/"+language):
11 | for title in os.listdir(book_dir+"/"+language+"/"+author):
12 | inputfile=book_dir+"/"+language+"/"+author+"/"+title
13 | print(inputfile)
14 | text=read_book(inputfile)
15 | (num_unique,counts) = word_stats(count_words_fast(text))
16 | stats.loc[title_num]=language,author.capitalize(),title.replace(".txt",""),sum(counts), num_unique
17 | title_num+=1
18 | stats
19 | # >>>stats.head() #top 5 rows
20 | # >>>stats.tail() #bottom 5 rows
21 | # >>>stats.columname ---> gives the column
22 | import matplotlib.pyplot as plt
23 | plt.plot(stats.length,stats.unique,"bo-")
24 |
25 | plt.loglog(stats.length,stats.unique,"ro")
26 |
27 | stats[stats.language=="English"]
28 |
29 | plt.figure(figsize=(10,10))
30 | subset=stats[stats.language=="English"]
31 | plt.loglog(subset.length,subset.unique,"o",label="English",color="crimson")
32 | subset=stats[stats.language=="French"]
33 | plt.loglog(subset.length,subset.unique,"o",label="French",color="forestgreen")
34 | subset=stats[stats.language=="German"]
35 | plt.loglog(subset.length,subset.unique,"o",label="German",color="orange")
36 | subset=stats[stats.language=="Portuguese"]
37 | plt.loglog(subset.length,subset.unique,"o",label="Portuguese", color="blueviolet")
38 | plt.legend()
39 | plt.xlabel("Book Length")
40 | plt.ylabel("NUmber of Unique words")
41 | plt.savefig("we.pdf")
42 | plt.show()
43 |
--------------------------------------------------------------------------------
/data-analysis project - 5 - Books_frequency_Eng,Fre,Port & Ru/read_manipulate_strings.py:
--------------------------------------------------------------------------------
1 | from collections import Counter
2 |
3 | text="This is my test text. We're keeping this text short to keep things manageable."
4 | text=text.lower()
5 |
6 | def count_words(text): #counts word frequency
7 | skips=[".",",",":",";","'",'"']
8 | for ch in skips:
9 | text=text.replace(ch,"")
10 | word_counts ={}
11 | for word in text.split(" "):
12 | if word in word_counts:
13 | word_counts[word]+=1
14 | else:
15 | word_counts[word]=1
16 | return word_counts
17 | # >>>count_words(text)
18 |
19 |
20 | def count_words_fast(text): #counts word frequency using Counter from collections
21 | text = text.lower()
22 | skips = [".", ",", ":", ";", "'", '"']
23 | for ch in skips:
24 | text = text.replace(ch,"")
25 | word_counts =Counter(text.split(" "))
26 | return word_counts
27 | # >>>count_words_fast(text)
28 |
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/READ_ME.txt:
--------------------------------------------------------------------------------
1 | Scotch Whisky |
2 |
3 | Scotch whisky is prized for its complexity and variety of flavors.
4 | And the regions of Scotland where it is produced
5 | are believed to have distinct flavor profiles.
6 | In this case study, we will classify scotch whiskies
7 | based on their flavor characteristics.
8 | The dataset we'll be using contains a selection of scotch whiskies
9 | from several distilleries, and we'll attempt to cluster whiskies
10 | into groups that are similar in flavor.
11 | This case study will deepen your understanding of Pandas, NumPy,
12 | and scikit-learn, and perhaps of scotch whisky.
13 |
14 |
15 | The dataset we'll be using consists of tasting ratings
16 | of one readily available single malt scotch whisky
17 | from almost every active whisky distillery in Scotland.
18 | The resulting dataset has 86 malt whiskies
19 | that are scored between 0 and 4 in 12 different taste categories.
20 | The scores have been aggregated from 10 different tasters.
21 | The taste categories describe whether the whiskies are sweet, smoky,
22 | medicinal, spicy, and so on.
23 |
24 |
25 | Order of Project subparts :
26 | 1.whiskies_loading_&_inspecting_data.py
27 | 2.whiskies_exploring_correlations.py
28 | 3.clustering_whiskies_by_flavour_profile.py
29 | 4.whiskies_comparing_correlation_matrices.py
30 |
31 |
32 | I did this project to accompany my learnings from HarvardX course - PH526x Using Python for Research.
33 |
34 | - Amartya Ranjan Saikia (amartyasaikia@acm.org/ar5saikia@gmail.com)
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/clustering_whiskies_by_flavour_profile.py:
--------------------------------------------------------------------------------
1 | from sklearn.cluster.bicluster import SpectralCoclustering
2 | import numpy as np
3 | import pandas as pd
4 | import matplotlib.pyplot as plt
5 |
6 | model = SpectralCoclustering(n_clusters=6, random_state=0)
7 | model.fit(corr_whisky)
8 | model.rows_
9 | # >>>np.sum(model.rows_, axis=1)
10 | # >>>np.sum(model.rows_, axis=0)
11 | model.row_labels_
12 |
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/code.jpegs_wine_&_whiskies_bokeh/clustering_whiskies_by_flavour_profile.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 6 - wine_&_whiskies_bokeh/code.jpegs_wine_&_whiskies_bokeh/clustering_whiskies_by_flavour_profile.JPG
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/code.jpegs_wine_&_whiskies_bokeh/whiskies_comparing_correlation_matrices.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 6 - wine_&_whiskies_bokeh/code.jpegs_wine_&_whiskies_bokeh/whiskies_comparing_correlation_matrices.JPG
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/code.jpegs_wine_&_whiskies_bokeh/whiskies_exploring_correlations.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 6 - wine_&_whiskies_bokeh/code.jpegs_wine_&_whiskies_bokeh/whiskies_exploring_correlations.JPG
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/code.jpegs_wine_&_whiskies_bokeh/whiskies_loading_&_inspecting_data.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 6 - wine_&_whiskies_bokeh/code.jpegs_wine_&_whiskies_bokeh/whiskies_loading_&_inspecting_data.JPG
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/figures_wine_&_whiskies_bokeh/corlate-whisky.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 6 - wine_&_whiskies_bokeh/figures_wine_&_whiskies_bokeh/corlate-whisky.pdf
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/figures_wine_&_whiskies_bokeh/corlate-whisky_2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 6 - wine_&_whiskies_bokeh/figures_wine_&_whiskies_bokeh/corlate-whisky_2.pdf
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/figures_wine_&_whiskies_bokeh/figure_1_clustering_whiskies_by_flavour_profile1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 6 - wine_&_whiskies_bokeh/figures_wine_&_whiskies_bokeh/figure_1_clustering_whiskies_by_flavour_profile1.png
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/figures_wine_&_whiskies_bokeh/figure_2_clustering_whiskies_by_flavour_profile2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 6 - wine_&_whiskies_bokeh/figures_wine_&_whiskies_bokeh/figure_2_clustering_whiskies_by_flavour_profile2.png
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/figures_wine_&_whiskies_bokeh/figure_3_whiskies_comparing_correlation_matrices1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 6 - wine_&_whiskies_bokeh/figures_wine_&_whiskies_bokeh/figure_3_whiskies_comparing_correlation_matrices1.png
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/figures_wine_&_whiskies_bokeh/figure_4_whiskies_comparing_correlation_matrices2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data-analysis project - 6 - wine_&_whiskies_bokeh/figures_wine_&_whiskies_bokeh/figure_4_whiskies_comparing_correlation_matrices2.png
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/regions.txt:
--------------------------------------------------------------------------------
1 | #####Regions#####
2 | Highlands
3 | Speyside
4 | Highlands
5 | Islay
6 | Highlands
7 | Islands
8 | Lowlands
9 | Speyside
10 | Speyside
11 | Highlands
12 | Speyside
13 | Speyside
14 | Highlands
15 | Speyside
16 | Speyside
17 | Speyside
18 | Lowlands
19 | Highlands
20 | Islay
21 | Islay
22 | Islay
23 | Islay
24 | Speyside
25 | Highlands
26 | Speyside
27 | Speyside
28 | Speyside
29 | Highlands
30 | Highlands
31 | Highlands
32 | Speyside
33 | Highlands
34 | Speyside
35 | Speyside
36 | Highlands
37 | Speyside
38 | Speyside
39 | Speyside
40 | Highlands
41 | Campbelltown
42 | Speyside
43 | Speyside
44 | Highlands
45 | Speyside
46 | Speyside
47 | Speyside
48 | Highlands
49 | Lowlands
50 | Speyside
51 | Speyside
52 | Highlands
53 | Speyside
54 | Highlands
55 | Islands
56 | Speyside
57 | Islands
58 | Speyside
59 | Islay
60 | Islay
61 | Speyside
62 | Highlands
63 | Speyside
64 | Speyside
65 | Speyside
66 | Speyside
67 | Speyside
68 | Highlands
69 | Highlands
70 | Highlands
71 | Speyside
72 | Highlands
73 | Islands
74 | Speyside
75 | Speyside
76 | Campbelltown
77 | Speyside
78 | Speyside
79 | Islands
80 | Speyside
81 | Speyside
82 | Highlands
83 | Islands
84 | Highlands
85 | Speyside
86 | Speyside
87 | Highlands
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/whiskies.txt:
--------------------------------------------------------------------------------
1 | RowID,Distillery,Body,Sweetness,Smoky,Medicinal,Tobacco,Honey,Spicy,Winey,Nutty,Malty,Fruity,Floral,Postcode, Latitude, Longitude
2 | 01,Aberfeldy,2,2,2,0,0,2,1,2,2,2,2,2, PH15 2EB, 286580,749680
3 | 02,Aberlour,3,3,1,0,0,4,3,2,2,3,3,2, AB38 9PJ, 326340,842570
4 | 03,AnCnoc,1,3,2,0,0,2,0,0,2,2,3,2, AB5 5LI, 352960,839320
5 | 04,Ardbeg,4,1,4,4,0,0,2,0,1,2,1,0, PA42 7EB, 141560,646220
6 | 05,Ardmore,2,2,2,0,0,1,1,1,2,3,1,1, AB54 4NH, 355350,829140
7 | 06,ArranIsleOf,2,3,1,1,0,1,1,1,0,1,1,2, KA27 8HJ, 194050,649950
8 | 07,Auchentoshan,0,2,0,0,0,1,1,0,2,2,3,3, G81 4SJ, 247670,672610
9 | 08,Auchroisk,2,3,1,0,0,2,1,2,2,2,2,1, AB55 3XS, 340754,848623
10 | 09,Aultmore,2,2,1,0,0,1,0,0,2,2,2,2, AB55 3QY, 340754,848623
11 | 10,Balblair,2,3,2,1,0,0,2,0,2,1,2,1, IV19 1LB, 270820,885770
12 | 11,Balmenach,4,3,2,0,0,2,1,3,3,0,1,2, PH26 3PF, 307750,827170
13 | 12,Belvenie,3,2,1,0,0,3,2,1,0,2,2,2, AB55 4DH, 332680,840840
14 | 13,BenNevis,4,2,2,0,0,2,2,0,2,2,2,2, PH33 6TJ, 212600,775710
15 | 14,Benriach,2,2,1,0,0,2,2,0,0,2,3,2, IV30 8SJ, 323450,858380
16 | 15,Benrinnes,3,2,2,0,0,3,1,1,2,3,2,2, AB38 9NN, 325800,839920
17 | 16,Benromach,2,2,2,0,0,2,2,1,2,2,2,2, IV36 3EB, 303330,859350
18 | 17,Bladnoch,1,2,1,0,0,0,1,1,0,2,2,3, DG8 9AB, 242260,554260
19 | 18,BlairAthol,2,2,2,0,0,1,2,2,2,2,2,2, PH16 5LY, 294860,757580
20 | 19,Bowmore,2,2,3,1,0,2,2,1,1,1,1,2, PA43 7GS, 131330,659720
21 | 20,Bruichladdich,1,1,2,2,0,2,2,1,2,2,2,2, PA49 7UN, 126680,661400
22 | 21,Bunnahabhain,1,2,1,1,0,1,1,1,1,2,2,3, PA46 7RR, 142210,673170
23 | 22,Caol Ila,3,1,4,2,1,0,2,0,2,1,1,1, PA46 7RL, 142920,670040
24 | 23,Cardhu,1,3,1,0,0,1,1,0,2,2,2,2, AB38 7RY, 318790,843090
25 | 24,Clynelish,3,2,3,3,1,0,2,0,1,1,2,0, KW9 6LB, 290250,904230
26 | 25,Craigallechie,2,2,2,0,1,2,2,1,2,2,1,4, AB38 9ST, 328920,844920
27 | 26,Craigganmore,2,3,2,1,0,0,1,0,2,2,2,2, AB37 9AB, 316600,836370
28 | 27,Dailuaine,4,2,2,0,0,1,2,2,2,2,2,1, AB38 7RE, 323520,841010
29 | 28,Dalmore,3,2,2,1,0,1,2,2,1,2,3,1, IV17 0UT, 266610,868730
30 | 29,Dalwhinnie,2,2,2,0,0,2,1,0,1,2,2,2, PH19 1AB, 263670,785270
31 | 30,Deanston,2,2,1,0,0,2,1,1,1,3,2,1, FK16 6AG, 271570,701570
32 | 31,Dufftown,2,3,1,1,0,0,0,0,1,2,2,2, AB55 4BR, 332360,839200
33 | 32,Edradour,2,3,1,0,0,2,1,1,4,2,2,2, PH16 5JP, 295960,757940
34 | 33,GlenDeveronMacduff,2,3,1,1,1,1,1,2,0,2,0,1, AB4 3JT, 372120,860400
35 | 34,GlenElgin,2,3,1,0,0,2,1,1,1,1,2,3, IV30 3SL, 322640,861040
36 | 35,GlenGarioch,2,1,3,0,0,0,3,1,0,2,2,2, AB51 0ES, 381020,827590
37 | 36,GlenGrant,1,2,0,0,0,1,0,1,2,1,2,1, AB38 7BS, 327610,849570
38 | 37,GlenKeith,2,3,1,0,0,1,2,1,2,1,2,1, AB55 3BU, 340754,848623
39 | 38,GlenMoray,1,2,1,0,0,1,2,1,2,2,2,4, IV30 1YE, 319820,862320
40 | 39,GlenOrd,3,2,1,0,0,1,2,1,1,2,2,2, IV6 7UJ, 251810,850860
41 | 40,GlenScotia,2,2,2,2,0,1,0,1,2,2,1,1, PA28 6DS, 172090,621010
42 | 41,GlenSpey,1,3,1,0,0,0,1,1,1,2,0,2, AB38 7AU, 327760,849140
43 | 42,Glenallachie,1,3,1,0,0,1,1,0,1,2,2,2, AB38 9LR, 326490,841240
44 | 43,Glendronach,4,2,2,0,0,2,1,4,2,2,2,0, AB54 6DA, 361200,844930
45 | 44,Glendullan,3,2,1,0,0,2,1,2,1,2,3,2, AB55 4DJ, 333000,840300
46 | 45,Glenfarclas,2,4,1,0,0,1,2,3,2,3,2,2, AB37 9BD, 320950,838160
47 | 46,Glenfiddich,1,3,1,0,0,0,0,0,0,2,2,2, AB55 4DH, 332680,840840
48 | 47,Glengoyne,1,2,0,0,0,1,1,1,2,2,3,2, G63 9LB, 252810,682750
49 | 48,Glenkinchie,1,2,1,0,0,1,2,0,0,2,2,2, EH34 5ET, 344380,666690
50 | 49,Glenlivet,2,3,1,0,0,2,2,2,1,2,2,3, AB37 9DB, 319560,828780
51 | 50,Glenlossie,1,2,1,0,0,1,2,0,1,2,2,2, IV30 3SS, 322640,861040
52 | 51,Glenmorangie,2,2,1,1,0,1,2,0,2,1,2,2, IV19 1PZ, 276750,883450
53 | 52,Glenrothes,2,3,1,0,0,1,1,2,1,2,2,0, AB38 7AA, 327650,849170
54 | 53,Glenturret,2,3,1,0,0,2,2,2,2,2,1,2, PH7 4HA, 285630,723580
55 | 54,Highland Park,2,2,3,1,0,2,1,1,1,2,1,1, KW15 1SU, 345340,1009260
56 | 55,Inchgower,1,3,1,1,0,2,2,0,1,2,1,2, AB56 5AB, 342610,863970
57 | 56,Isle of Jura,2,1,2,2,0,1,1,0,2,1,1,1, PA60 7XT, 152660,667040
58 | 57,Knochando,2,3,1,0,0,2,2,1,2,1,2,2, AB38 7RT, 319470,841570
59 | 58,Lagavulin,4,1,4,4,1,0,1,2,1,1,1,0, PA42 7DZ, 140430,645730
60 | 59,Laphroig,4,2,4,4,1,0,0,1,1,1,0,0, PA42 7DU, 138680,645160
61 | 60,Linkwood,2,3,1,0,0,1,1,2,0,1,3,2, IV30 3RD, 322640,861040
62 | 61,Loch Lomond,1,1,1,1,0,1,1,0,1,2,1,2, G83 0TL, 239370,680920
63 | 62,Longmorn,3,2,1,0,0,1,1,1,3,3,2,3, IV30 3SJ, 322640,861040
64 | 63,Macallan,4,3,1,0,0,2,1,4,2,2,3,1, AB38 9RX, 327710,844480
65 | 64,Mannochmore,2,1,1,0,0,1,1,1,2,1,2,2, IV30 3SS, 322640,861040
66 | 65,Miltonduff,2,4,1,0,0,1,0,0,2,1,1,2, IV30 3TQ, 322640,861040
67 | 66,Mortlach,3,2,2,0,0,2,3,3,2,1,2,2, AB55 4AQ, 332950,839850
68 | 67,Oban,2,2,2,2,0,0,2,0,2,2,2,0, PA34 5NH, 185940,730190
69 | 68,OldFettercairn,1,2,2,0,1,2,2,1,2,3,1,1, AB30 1YE, 370860,772900
70 | 69,OldPulteney,2,1,2,2,1,0,1,1,2,2,2,2, KW1 5BA, 336730,950130
71 | 70,RoyalBrackla,2,3,2,1,1,1,2,1,0,2,3,2, IV12 5QY, 286040,851320
72 | 71,RoyalLochnagar,3,2,2,0,0,2,2,2,2,2,3,1, AB35 5TB, 326140,794370
73 | 72,Scapa,2,2,1,1,0,2,1,1,2,2,2,2, KW15 1SE, 342850,1008930
74 | 73,Speyburn,2,4,1,0,0,2,1,0,0,2,1,2, AB38 7AG, 326930,851430
75 | 74,Speyside,2,2,1,0,0,1,0,1,2,2,2,2, PH21 1NS, 278740,800600
76 | 75,Springbank,2,2,2,2,0,2,2,1,2,1,0,1, PA28 6EJ, 172280,620910
77 | 76,Strathisla,2,2,1,0,0,2,2,2,3,3,3,2, AB55 3BS, 340754,848623
78 | 77,Strathmill,2,3,1,0,0,0,2,0,2,1,3,2, AB55 5DQ,342650,850500
79 | 78,Talisker,4,2,3,3,0,1,3,0,1,2,2,0, IV47 8SR, 137950,831770
80 | 79,Tamdhu,1,2,1,0,0,2,0,1,1,2,2,2, AB38 7RP, 319210,841760
81 | 80,Tamnavulin,1,3,2,0,0,0,2,0,2,1,2,3, AB37 9JA, 321180,826110
82 | 81,Teaninich,2,2,2,1,0,0,2,0,0,0,2,2, IV17 0XB, 265360,869120
83 | 82,Tobermory,1,1,1,0,0,1,0,0,1,2,2,2, PA75 6NR, 150450,755070
84 | 83,Tomatin,2,3,2,0,0,2,2,1,1,2,0,1, IV13 7YT, 279120,829630
85 | 84,Tomintoul,0,3,1,0,0,2,2,1,1,2,1,2, AB37 9AQ, 315100,825560
86 | 85,Tormore,2,2,1,0,0,1,0,1,2,1,0,0, PH26 3LR, 315180,834960
87 | 86,Tullibardine,2,3,0,0,1,0,2,1,1,2,2,1, PH4 1QG, 289690,708850
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/whiskies_comparing_correlation_matrices.py:
--------------------------------------------------------------------------------
1 | from sklearn.cluster.bicluster import SpectralCoclustering
2 | import numpy as np
3 | import pandas as pd
4 | import matplotlib.pyplot as plt
5 |
6 | whisky['Group'] = pd.Series(model.row_labels_, index = whisky.index)
7 | whisky = whisky.ix[np.argsort(model.row_labels_)]
8 | whisky = whisky.reset_index(drop=True)
9 |
10 | correlations = pd.DataFrame.corr(whisky.iloc[:,2:14].transpose())
11 | correlations = np.array(correlations)
12 |
13 | plt.figure(figsize = (14,7))
14 | plt.subplot(121)
15 | plt.pcolor(corr_whisky)
16 | plt.title("Original")
17 | plt.axis("tight")
18 | plt.subplot(122)
19 | plt.pcolor(correlations)
20 | plt.title("Rearranged")
21 | plt.axis("tight")
22 | plt.show()
23 | plt.savefig("correlations.pdf")
24 |
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/whiskies_exploring_correlations.py:
--------------------------------------------------------------------------------
1 | import matplotlib.pyplot as plt
2 | plt.figure(figsize=(10,10))
3 | plt.pcolor(corr_flavors)
4 | plt.colorbar()
5 | # >>>plt.savefig("corlate-whisky1.pdf")
6 |
7 | corr_whisky = pd.DataFrame.corr(flavors.transpose())
8 | plt.figure(figsize=(10,10))
9 | plt.pcolor(corr_whisky)
10 | plt.axis("tight")
11 | plt.colorbar()
12 | # >>>plt.savefig("corlate-whisky2.pdf")
13 |
14 | plt.show()
15 |
--------------------------------------------------------------------------------
/data-analysis project - 6 - wine_&_whiskies_bokeh/whiskies_loading_&_inspecting_data.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | import pandas as pd
3 |
4 | whisky = pd.read_csv("whiskies.txt")
5 | whisky["Region"] = pd.read_csv("regions.txt")
6 | # >>>whisky.head() #iloc method to index a data frame by location.
7 |
8 | # >>>whisky.iloc[0:10] #we specified the rows from 0 - 9
9 | # >>>whisky.iloc[0:10,0:5] #we specified the rows from 0 - 9 & columns from 0-5
10 |
11 | # >>>whisky.columns
12 | flavors=whisky.iloc[:,2:14]
13 |
14 | corr_flavors = pd.DataFrame.corr(flavors)
15 | print(corr_flavors)
16 |
--------------------------------------------------------------------------------
/data_analysis_bokeh_extra/bokeh_plot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data_analysis_bokeh_extra/bokeh_plot.png
--------------------------------------------------------------------------------
/data_analysis_bokeh_extra/bokeh_plot_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/data_analysis_bokeh_extra/bokeh_plot_2.png
--------------------------------------------------------------------------------
/data_analysis_bokeh_extra/bokeh_plot_2.py:
--------------------------------------------------------------------------------
1 | points = [(0,0), (1,2), (3,1)]
2 | xs, ys = zip(*points)
3 | colors = ["red", "blue", "green"]
4 |
5 | output_file("Spatial_Example.html", title="Regional Example")
6 | location_source = ColumnDataSource(
7 | data={
8 | "x": xs,
9 | "y": ys,
10 | "colors": colors,
11 | }
12 | )
13 |
14 | fig = figure(title = "Title",
15 | x_axis_location = "above", tools="resize, hover, save")
16 | fig.plot_width = 300
17 | fig.plot_height = 380
18 | fig.circle("x", "y", 10, 10, size=10, source=location_source,
19 | color='colors', line_color = None)
20 |
21 | hover = fig.select(dict(type = HoverTool))
22 | hover.tooltips = {
23 | "Location": "(@x, @y)"
24 | }
25 | show(fig)
26 |
--------------------------------------------------------------------------------
/data_analysis_bokeh_extra/bokeh_plot_extra.py:
--------------------------------------------------------------------------------
1 | # First, we import a tool to allow text to pop up on a plot when the cursor
2 | # hovers over it. Also, we import a data structure used to store arguments
3 | # of what to plot in Bokeh. Finally, we will use numpy for this section as well!
4 |
5 | from bokeh.models import HoverTool, ColumnDataSource
6 | import numpy as np
7 |
8 | # Let's plot a simple 5x5 grid of squares, alternating in color as red and blue.
9 |
10 | plot_values = [1,2,3,4,5]
11 | plot_colors = ["red", "blue"]
12 |
13 | # How do we tell Bokeh to plot each point in a grid? Let's use a function that
14 | # finds each combination of values from 1-5.
15 | from itertools import product
16 |
17 | grid = list(product(plot_values, plot_values))
18 | print(grid)
19 |
20 | # The first value is the x coordinate, and the second value is the y coordinate.
21 | # Let's store these in separate lists.
22 |
23 | xs, ys = zip(*grid)
24 | print(xs)
25 | print(ys)
26 |
27 | # Now we will make a list of colors, alternating between red and blue.
28 |
29 | colors = [plot_colors[i%2] for i in range(len(grid))]
30 | print(colors)
31 |
32 | # Finally, let's determine the strength of transparency (alpha) for each point,
33 | # where 0 is completely transparent.
34 |
35 | alphas = np.linspace(0, 1, len(grid))
36 |
37 | # Bokeh likes each of these to be stored in a special dataframe, called
38 | # ColumnDataSource. Let's store our coordinates, colors, and alpha values.
39 |
40 | source = ColumnDataSource(
41 | data={
42 | "x": xs,
43 | "y": ys,
44 | "colors": colors,
45 | "alphas": alphas,
46 | }
47 | )
48 | # We are ready to make our interactive Bokeh plot!
49 |
50 | output_file("Basic_Example.html", title="Basic Example")
51 | fig = figure(tools="resize, hover, save")
52 | fig.rect("x", "y", 0.9, 0.9, source=source, color="colors",alpha="alphas")
53 | hover = fig.select(dict(type=HoverTool))
54 | hover.tooltips = {
55 | "Value": "@x, @y",
56 | }
57 | show(fig)
58 |
--------------------------------------------------------------------------------
/download.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/florist-notes/Data-Analysis/908a9e79a766362f87fd23a74cfe318698df17bd/download.png
--------------------------------------------------------------------------------