[PDF Download] Extending power bi with python and r: perform advanced analysis using the power of an

Page 1


Extending Power BI with Python and R: Perform advanced analysis using the power of analytical languages, (2nd Edition) Luca Zavarella

Visit to download the full and correct content document: https://textbookfull.com/product/extending-power-bi-with-python-and-r-perform-advan ced-analysis-using-the-power-of-analytical-languages-2nd-edition-luca-zavarella/

More products digital (pdf, epub, mobi) instant download maybe you interests ...

Data Analysis with Microsoft Power Bi Brian Larson

https://textbookfull.com/product/data-analysis-with-microsoftpower-bi-brian-larson/

Power BI MVP Book: A book of tricks and techniques for working with Power BI Reza Rad

https://textbookfull.com/product/power-bi-mvp-book-a-book-oftricks-and-techniques-for-working-with-power-bi-reza-rad/ Power Pivot and Power BI The Excel User s Guide to DAX

https://textbookfull.com/product/power-pivot-and-power-bi-theexcel-user-s-guide-to-dax-power-query-power-bi-power-pivot-inexcel-2010-2016-rob-collie/

Analyzing Data with Microsoft Power BI and Power Pivot for Excel 1st Edition Alberto Ferrari & Marco Russo

https://textbookfull.com/product/analyzing-data-with-microsoftpower-bi-and-power-pivot-for-excel-1st-edition-alberto-ferrarimarco-russo/

Python Data Analysis: Perform data collection, data processing, wrangling, visualization, and model building using Python 3rd Edition Avinash Navlani

https://textbookfull.com/product/python-data-analysis-performdata-collection-data-processing-wrangling-visualization-andmodel-building-using-python-3rd-edition-avinash-navlani/

Programming Microcontrollers with Python: Experience the Power of Embedded Python 1st Edition Armstrong Subero

https://textbookfull.com/product/programming-microcontrollerswith-python-experience-the-power-of-embedded-python-1st-editionarmstrong-subero/

Programming Microcontrollers with Python: Experience the Power of Embedded Python 1st Edition Armstrong Subero

https://textbookfull.com/product/programming-microcontrollerswith-python-experience-the-power-of-embedded-python-1st-editionarmstrong-subero-2/

Pro DAX with Power BI Business Intelligence with PowerPivot and SQL Server Analysis Services Tabular 1st Edition Philip Seamark Thomas Martens

https://textbookfull.com/product/pro-dax-with-power-bi-businessintelligence-with-powerpivot-and-sql-server-analysis-servicestabular-1st-edition-philip-seamark-thomas-martens/

Pro Power BI Desktop: Self-service Analytics and Data Visualization for the Power User 3rd Edition Adam Aspin

https://textbookfull.com/product/pro-power-bi-desktop-selfservice-analytics-and-data-visualization-for-the-power-user-3rdedition-adam-aspin/

Extending Power BI with Python and R, 2E

Copyright © 2024 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Early Access Publication: Extending Power BI with Python and R, 2E

Early Access Production Reference: B19551

Published by Packt Publishing Ltd.

ISBN: 978-1-83763-953-3

www.packt.com

Table of Contents

1. Extending Power BI with Python and R, Second Edition: Perform advanced analysis using the power of analytical languages

2. 1 Where and How to Use R and Python Scripts in Power BI

I. Join our book community on Discord

II. Technical requirements

III. Injecting R or Python scripts into Power BI

i. Data loading

ii. Data transformation

iii. Data visualization

IV. Using R and Python to interact with your data

V. Python and R compatibility across Power BI products

VI. Summary

VII. Test your knowledge

i. Answers

3. 2 Configuring R with Power BI

I. Join our book community on Discord

II. Technical requirements

III. The available R engines

i. The CRAN R distribution

ii. The Microsoft R Open distribution and MRAN

iii. Multi-threading in MRO

IV. Choosing an R engine to install

i. The R engines used by Power BI

ii. Installing the suggested R engines

iii. The R engine for data transformation

iv. The R engine for R script visuals on the Power BI service

V. Installing an IDE for R development

i. Installing RStudio

ii. Installing RTools

iii. Linking Intel’s MKL to R

VI. Configuring Power BI Desktop to work with R

i. Debugging an R script visual

VII. Configuring the Power BI service to work with R

i. Installing the on-premises data gateway in personal mode

ii. Sharing reports that use R scripts in the Power BI service

VIII. R script visuals limitations

IX. Summary

X. Test your knowledge

i. Answers

4. 3 Configuring Python with Power BI

I. Join our book community on Discord

II. Technical requirements

III. The available Python engines

i. Choosing a Python engine to install

ii. The Python engines used by Power BI

iii. Installing the suggested Python engines

iv. The Python engine for data transformation

IV. Creating an environment for data transformations using pip

V. Creating an optimized environment for data transformations using conda

VI. Creating an environment for Python script visuals on the Power BI service

VII. What to do when the Power BI service upgrades the Python engine

VIII. Installing an IDE for Python development

i. Configuring Python with RStudio

ii. Configuring Python with Visual Studio Code

IX. Configuring Power BI Desktop to work with Python

i. Configuring the Power BI service to work with Python

X. Limitations of Python visuals

XI. Summary

XII. Test your knowledge

i. Answers

5. 4 Solving Common Issues When Using Python and R in Power BI

I. Join our book community on Discord

II. Technical Requirements

III. Avoiding the ADO.NET error when running a Python script in Power BI

i. The real cause of the problem

ii. A practical solution to the problem

IV. Avoiding the Formula.Firewall error

i. Incompatible privacy levels

ii. Indirect access to a data source

V. Using multiple datasets in Python and R script steps

i. Applying a full join with Merge

ii. Using arguments of the Python.Execute function

VI. Dealing with dates/times in Python and R script steps

VII. Summary

VIII. Test your knowledge

i. Answers

6. 5 Importing Unhandled Data Objects

I. Join our book community on Discord

II. Technical requirements

III. Importing RDS files in R

i. A brief introduction to Tidyverse

ii. Creating a serialized R object

iii. Using an RDS file in Power BI

IV. Importing PKL files in Python

i. A very short introduction to the PyData world

ii. Creating a serialized Python object

iii. Using a PKL file in Power BI

V. Summary

VI. References

VII. Test your knowledge

i. Answers

7. 6 Using Regular Expressions in Power BI

I. Join our book community on Discord

II. Technical requirements

III. A brief introduction to regexes

i. The basics of regexes

ii. Checking the validity of email addresses

iii. Checking the validity of dates

IV. Validating data using regex in Power BI

i. Using regex in Power BI to validate emails with Python

ii. Using regex in Power BI to validate emails with R

iii. Using regex in Power BI to validate dates with Python

iv. Using regex in Power BI to validate dates with R

V. Loading complex log files using regex in Power BI

i. Apache access logs

ii. Importing Apache access logs in Power BI with Python

iii. Importing Apache access logs in Power BI with R

VI. Extracting values from text using regex in Power BI

i. One regex to rule them all

ii. Using regex in Power BI to extract values with Python

iii. Using regex in Power BI to extract values with R

VII. Summary

VIII. References

IX. Test your knowledge

i. Answers

8. 7 Anonymizing and Pseudonymizing Your Data in Power BI

I. Join our book community on Discord

II. Technical requirements

III. De-identifying data

i. De-identification techniques

ii. Understanding pseudonymization

iii. What is anonymization?

IV. Anonymizing data in Power BI

i. Anonymizing data using Python

ii. Anonymizing data using R

V. Pseudonymizing data in Power BI

i. Pseudonymizing data using Python

ii. Pseudonymizing data using R

VI. Summary

VII. References

VIII. Test your knowledge

i. Answers

9. 8 Logging Data from Power BI to External Sources

I. Join our book community on Discord

II. Technical requirements

III. Logging to CSV files

i. Logging to CSV files with Python

ii. Logging to CSV files with R

IV. Logging to Excel files

i. Logging to Excel files with Python

ii. Logging to Excel files with R

V. Logging to (Azure) SQL Server

i. Installing SQL Server Express

ii. Creating an Azure SQL database

iii. Logging to an (Azure) SQL Server with Python

iv. Logging to an (Azure) SQL server with R

v. Managing credentials in the code

VI. Summary

VII. References

VIII. Test your knowledge

i. Answers

10. 9 Loading Large Datasets beyond the Available RAM in Power BI

I. Join our book community on Discord

II. Technical requirements

III. A typical analytic scenario using large datasets

IV. Importing large datasets with Python

i. Installing Dask on your laptop

ii. Creating a Dask DataFrame

iii. Extracting information from a Dask DataFrame

iv. Importing a large dataset in Power BI with Python

V. Importing large datasets with R

i. Introducing Apache Arrow

ii. Installing arrow on your laptop

iii. Creating and extracting information from an Arrow Dataset object

iv. Importing a large dataset in Power BI with R

VI. Summary

VII. References

11. 10 Boosting Data Loading Speed in Power BI with Parquet Format

I. Join our book community on Discord

II. Technical Requirements

III. From CSV to the Parquet file format

i. Limitations of using Parquet files natively in Power BI

ii. Using Parquet files with Python

iii. Using Parquet files with R

IV. Using the Parquet format to speed up a Power BI report

i. Transforming historical data in Parquet

ii. Appending new data to and analyze the Parquet dataset

iii. Analyzing Parquet data in Power BI with Python

iv. Analyzing Parquet data in Power BI with R

V. Summary

VI. References

VII. Test your knowledge

i. Answers

Extending Power BI with Python and R, Second Edition: Perform advanced analysis using the

power of analytical languages

Welcome to Packt Early Access. We’re giving you an exclusive preview of this book before it goes on sale. It can take many months to write a book, but our authors have cutting-edge information to share with you today. Early Access gives you an insight into the latest developments by making chapter drafts available. The chapters may be a little rough around the edges right now, but our authors will update them over time.You can dip in and out of this book or follow along from start to finish; Early Access is designed to be flexible. We hope you enjoy getting to know more about the process of writing a Packt book.

1. Chapter 1: Where and How to Use R and Python Scripts in Power BI

2. Chapter 2: Configuring R with Power BI

3. Chapter 3: Configuring Python with Power BI

4. Chapter 4: Solving Common Issues When Using Python and R in Power BI

5. Chapter 5: Importing Unhandled Data Objects

6. Chapter 6: Using Regular Expressions in Power BI

7. Chapter 7: Anonymizing and Pseudonymizing Your Data in Power BI

8. Chapter 8: Logging Data from Power BI to External Sources

9. Chapter 9: Loading Large Datasets beyond the Available RAM in Power BI

10. Chapter 10: Boosting Data Loading Speed in Power BI with Parquet Format

11. Chapter 11: Calling External APIs To Enrich Your Data

12. Chapter 12: Calculating Columns Using Complex Algorithms: Distances

13. Chapter 13: Calculating Columns Using Complex Algorithms: Fuzzy Matching

14. Chapter 14: Calculating Columns Using Complex Algorithms: Optimization Problems

15. Chapter 15: Adding Statistics Insights: Associations

16. Chapter 16: Adding Statistics Insights: Outliers and Missing Values

17. Chapter 17: Using Machine Learning Without Premium or Embedded Capacity

18. Chapter 18: Using the SQL Server Extensibility Framework’s R and Python engines with Power BI

19. Chapter19: Exploratory Data Analysis

20. Chapter20: Using the Grammar of Graphics in Python

21. Chapter 21: Advanced Visualizations

22. Chapter 22: Interactive Custom Visuals in R

23. Chapter 23: Infrastructural Review

1 Where and How to Use R and Python Scripts in Power BI

Join our book community on Discord

https://packt.link/EarlyAccessCommunity

Power BI is Microsoft's flagship self-service business intelligence product. It consists of a set of on-premises applications and cloudbased services that help organizations integrate, transform, and analyze data from a wide variety of source systems through a userfriendly interface.The platform is not limited to data visualization. Power BI is much more than this when you consider that its analytics engine (Vertipaq) is the same as SQL Server Analysis Services (SSAS) and Azure Analysis Services and Power Pivot in Excel and it is also the engine used for reports and datasets published to the Power BI Service. In addition, it uses Power Query as its data extraction and transformation engine, which we find in both Analysis Services and Excel. The engine comes with a very powerful and versatile formula language (M) and GUI, thanks to which you can "grind" and shape any type of data into any form.Moreover, Power BI supports DAX as a data analytic formula language, which can be used for advanced calculations and queries on data that has already been loaded into tabular data models.Such a versatile and powerful tool is a godsend for anyone who needs to do data ingestion and transformation in order to build dashboards and reports to summarize a company's business.Recently, the availability of huge

amounts of data, along with the ability to scale the computational power of machines, has made the area of advanced analytics more appealing. So, new mathematical and statistical tools have become necessary in order to provide rich insights. Hence the integration of analytical languages such as Python and R within Power BI.R or Python scripts can only be used within Power BI with specific features. Knowing which Power BI tools can be used to inject R or Python scripts into Power BI is key to understanding whether the problem you want to address is achievable with these analytical languages.This chapter will cover the following topics:

Injecting R or Python scripts into Power BI

Using R and Python to interact with your data R and Python limitations on Power BI products

Technical requirements

This chapter requires you to have Power BI Desktop already installed on your machine (you can download it here: https://aka.ms/pbiSingleInstaller). The version used in this chapter is 2.110.1161.0 64-bit (October 2022).

Injecting R or Python scripts into Power BI

In this first section, Power BI Desktop tools that allow you to use Python or R scripts will be presented and described in detail. Specifically, you will see how to add your own code during the data loading, data transforming, and data viewing phases.

Data loading

One of the first steps required to work with data in Power BI Desktop is to import it from external sources:

1. There are many connectors that allow you to do this, depending on the respective data sources, but you can also do it via scripts in Python and R. In fact, if you click on the Get data icon in the ribbon, not only the most commonly used connectors are shown but you can also select other ones from a more complete list by clicking on More...:

Figure1.1–Browsemoreconnectorstoloadyourdata

2. In the new Get Data window that pops up, simply start typing the string script into the search text box, and immediately the two options for importing data via Python or R appear:

Figure1.2–ShowingRscriptandPythonscriptintheGetData window

3. Reading the contents of the tooltip, obtained by hovering the mouse over the Python script option, two things should immediately jump out at you:

a) A local installation of Python is required.b) What can be imported through Python is a data frame.The same two observations also apply when selecting R script. The only difference is that it is possible to import a pandas DataFrame when using Python (a DataFrame is a data structure provided by the pandas package), whereas R employs the two-dimensional array-like data structure called an R data frame, which is provided by default by the language.

1. After clicking on the Python script option, a new window will be shown containing a text box for writing the Python code:

Figure1.3–WindowshowingthePythonscripteditor

As you can see, it's definitely a very skimpy editor, but in Chapter3, ConfiguringPythonwithPowerBI, you'll discover how you can utilize your preferred IDE to create your scripts within a more comprehensive and feature-rich editor.

1. Taking a look at the warning message, Power BI reminds you that no Python engine has been detected, so it must be installed. If you already have Python installed and configured, you will not see this message. Clicking on the How to install Python link will cause a Microsoft Docs web page to open, explaining the steps to install Python.

Microsoft suggests installing the base Python distribution, but in order to follow some best practices on environments (selfcontained spaces that allow developers to manage dependencies, libraries, and configurations specific to individual projects), we will

install the Miniconda distribution. The details of how to do this and why will be covered in Chapter3.

1. If you had clicked on R script instead, a window for entering code in R, similar to the one shown in Figure1.4, would have appeared:

Figure1.4–WindowshowingtheRscripteditor

As with Python, in order to run code in R, you need to install the R engine on your machine. Clicking on the How to install R link will open a Docs page where Microsoft suggests installing either Microsoft R Open or the classic CRAN R. Chapter2, ConfiguringR WithPowerBI, will show you which engine to choose and how to configure your favorite IDE to write code in R.In order to import data using Python or R, you need to write code in the editors shown in Figure1.3and Figure1.4, which assign a pandas DataFrame or an R data frame to a variable, respectively. You will see concrete examples throughout this book.Next, let's look at transforming data.

Data transformation

It is possible to apply a transformation to data already imported or being imported, using scripts in R or Python. Should you want to test this on the fly, you can import the following CSV file directly from the web: http://bit.ly/iriscsv. Follow these steps:

1. Simply click on Get data and then Web to import data directly from a web page:

Figure1.5–SelecttheWebconnectortoimportdatafroma webpage

2. You can now enter the previously mentioned URL in the window that pops up:

Figure1.6–ImporttheIrisdatafromtheweb

Right after clicking OK, a window will pop up with a preview of the data to be imported.

1. In this case, instead of importing the data as-is, click on Transform Data in order to access the Power Query data transformation window:

2. It is at this point that you can add a transformation step using a Python or R script by selecting the Transform tab in Power Query Editor:

3. By clicking on Run Python script, you'll cause a window, similar to the one you've already seen in the data import phase, to pop up:

Figure1.9–TheRunPythonscripteditor

If you carefully read the comment in the text box, you will see that the dataset variable is already initialized and contains the data present at that moment in Power Query Editor, including any transformations already applied. At this point, you can insert your Python code in the text box to transform the data into the desired form.

1. A similar window will open if you click on Run R script:

Figure1.10–TheRunRscripteditor

Also, in this case, the dataset variable is already initialized and contains the data present at that moment in Power Query Editor. You can then add your own R code and reference the dataset variable to transform your data in the most appropriate way.Next, let's look at visualizing data.

Data visualization

Finally, your own Python or R scripts can be added to Power BI to create new visualizations, in addition to those already present in the tool out of the box:

1. Assuming we resume the data import activity started in the previous section, once the Iris dataset is loaded, simply click Cancel in the Run R script window, and then click Close & Apply in the Home tab of Power Query Editor:

Figure1.11–ClickClose&ApplytoimporttheIrisdata

2. After the data import is complete, you can select either the R script visual or Python script visual option in the Visualizations pane of Power BI:

3. If you click on Python script visual, a window pops up asking for permission to enable script code execution, as there may be security or privacy risks:

Figure1.12–TheRandPythonscriptvisuals

4. After enabling code execution, in Power BI Desktop, you can see a placeholder for the Python visual image on the report canvas and a Python script editor at the bottom:

Figure1.13–Enablethescriptcodeexecution
Figure1.14–ThePythonvisuallayout

Once you drag the fields you want to use in your Python script into the Values area, you can write your own custom code into the Python script editor and run it to generate a Python visualization.A pretty much identical layout occurs when you select R script visual.

Using R and Python to interact with your data

In the previous section, you saw all the ways you can interact with your data in Power BI via R or Python scripts. Beyond knowing how and where to inject your code into Power BI, it is very important to know how your code will interact with that data. It's here that we see a big difference between the effect of scripts injected via Power Query Editor and scripts used in visuals:

Scripts via Power Query Editor: This type of script will transform the data and persist transformations in the model. This means that it will always be possible to retrieve the transformed data from any object within Power BI. Also, once the scripts have been executed and have taken effect, theywill notbere-executedunlessthedataisrefreshed. Therefore, it is recommended to inject code in R or Python via Power Query Editor when you intend to use the resulting insights in other visuals, or in the data model.

Scripts in visuals: The scripts used within the R and Python script visuals extract particular insights from the data and only make them evident to the user through visualization. Like all the other visuals on a report page, the R and Python script visuals are also interconnected with the other visuals. This means that the script visuals are subject to cross-filtering and therefore, theyarerefreshedeverytimeyouinteractwithother visualsinthereport. That said, it is not possible to persist the results obtained from the visuals scripts in the data model.

TIP

Thanks to the interactive nature of R and Python script visuals due to cross-filtering, it is possible to inject code useful for extracting real-time insights from data. The important thing to keep in mind is that, as previously stated, it is then only possible to visualize such information, or at the most, to write it to external repositories (as you will see in Chapter 8, Logging Data from Power BI to External Sources). Also, although it is possible to access resources on the internet from a visual script when developing in Power BI Desktop, it is no longer possible to do so when the report is published to the Power BI Service (you will see what this is about in the next section) due to security issues. This restriction doesn’t exist for scripts used in Power Query.

In the final section of this chapter, let's look at the limitations of using R and Python when it comes to various Power BI products.

Python and R compatibility across Power BI products

The first question once you are clear on where to inject R and Python scripts in Power BI could be: "IstheuseofRandPython codeallowedinallPowerBIproducts?" In order to cover that, let’s briefly recap the various Power BI products and their usage in general. Here is a concise list:

Power BI Service: This is sometimes called Power BI Online, and it's the Software as a Service (SaaS) version of Power BI. It was created to facilitate the sharing of visual analysis between users through Dashboards and Reports.

Power BI Report Server: This is the on-premises version of Power BI and it extends the capabilities of SQL Server Reporting Services, enabling the sharing of reports created in Power BI Desktop (for Report Server) and in Power BI Report Builder for Power BI Paginated reports.

Power BI Embedded: A Microsoft Azure service that allows dashboards and reports to be embedded in an application for users who do not have a Power BI account.

Power BI Desktop: A free desktop application for Windows that allows you to use almost all of the features that Power BI offers. It is not the right tool for sharing results between users, but it allows you to share them on Power BI Service and Power BI Report Server. The desktop versions that allow publishing on the two mentioned services are distinct and support slightly different sets of features. They are named Power BI Desktop and Power BI Desktop for Power BI Report Server, respectively.

Power BI Mobile: A mobile application, available on Windows, Android, and iOS, that allows secure access to Power BI Service and Power BI Report Server, and that allows you to browse and share dashboards and reports, but not edit them.

Power BI Report Builder: A free desktop application for Windows that allows you to create Paginated reports. These can then be published and shared in Power BI Service and in Power BI Report Server.

Apart from the licenses, which we will not go into here, a summary figure of the relationships between the previously mentioned products follows:

Another random document with no related content on Scribd:

PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free distribution of electronic works, by using or distributing this work (or any other work associated in any way with the phrase “Project Gutenberg”), you agree to comply with all the terms of the Full Project Gutenberg™ License available with this file or online at www.gutenberg.org/license.

Section 1. General Terms of Use and Redistributing Project Gutenberg™ electronic works

1.A. By reading or using any part of this Project Gutenberg™ electronic work, you indicate that you have read, understand, agree to and accept all the terms of this license and intellectual property (trademark/copyright) agreement. If you do not agree to abide by all the terms of this agreement, you must cease using and return or destroy all copies of Project Gutenberg™ electronic works in your possession. If you paid a fee for obtaining a copy of or access to a Project Gutenberg™ electronic work and you do not agree to be bound by the terms of this agreement, you may obtain a refund from the person or entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be used on or associated in any way with an electronic work by people who agree to be bound by the terms of this agreement. There are a few things that you can do with most Project Gutenberg™ electronic works even without complying with the full terms of this agreement. See paragraph 1.C below. There are a lot of things you can do with Project Gutenberg™ electronic works if you follow the terms of this agreement and help preserve free future access to Project Gutenberg™ electronic works. See paragraph 1.E below.

1.C. The Project Gutenberg Literary Archive Foundation (“the Foundation” or PGLAF), owns a compilation copyright in the collection of Project Gutenberg™ electronic works. Nearly all the individual works in the collection are in the public domain in the United States. If an individual work is unprotected by copyright law in the United States and you are located in the United States, we do not claim a right to prevent you from copying, distributing, performing, displaying or creating derivative works based on the work as long as all references to Project Gutenberg are removed. Of course, we hope that you will support the Project Gutenberg™ mission of promoting free access to electronic works by freely sharing Project Gutenberg™ works in compliance with the terms of this agreement for keeping the Project Gutenberg™ name associated with the work. You can easily comply with the terms of this agreement by keeping this work in the same format with its attached full Project Gutenberg™ License when you share it without charge with others.

1.D. The copyright laws of the place where you are located also govern what you can do with this work. Copyright laws in most countries are in a constant state of change. If you are outside the United States, check the laws of your country in addition to the terms of this agreement before downloading, copying, displaying, performing, distributing or creating derivative works based on this work or any other Project Gutenberg™ work. The Foundation makes no representations concerning the copyright status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other immediate access to, the full Project Gutenberg™ License must appear prominently whenever any copy of a Project Gutenberg™ work (any work on which the phrase “Project Gutenberg” appears, or with which the phrase “Project Gutenberg” is associated) is accessed, displayed, performed, viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United States and most other parts of the world at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this eBook or online at www.gutenberg.org. If you are not located in the United States, you will have to check the laws of the country where you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived from texts not protected by U.S. copyright law (does not contain a notice indicating that it is posted with permission of the copyright holder), the work can be copied and distributed to anyone in the United States without paying any fees or charges. If you are redistributing or providing access to a work with the phrase “Project Gutenberg” associated with or appearing on the work, you must comply either with the requirements of paragraphs 1.E.1 through 1.E.7 or obtain permission for the use of the work and the Project Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted with the permission of the copyright holder, your use and distribution must comply with both paragraphs 1.E.1 through 1.E.7 and any additional terms imposed by the copyright holder. Additional terms will be linked to the Project Gutenberg™ License for all works posted with the permission of the copyright holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project Gutenberg™ License terms from this work, or any files containing a part of this work or any other work associated with Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this electronic work, or any part of this electronic work, without prominently displaying the sentence set forth in paragraph 1.E.1 with active links or immediate access to the full terms of the Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary, compressed, marked up, nonproprietary or proprietary form, including any word processing or hypertext form. However, if you provide access to or distribute copies of a Project Gutenberg™ work in a format other than “Plain Vanilla ASCII” or other format used in the official version posted on the official Project Gutenberg™ website (www.gutenberg.org), you must, at no additional cost, fee or expense to the user, provide a copy, a means of exporting a copy, or a means of obtaining a copy upon request, of the work in its original “Plain Vanilla ASCII” or other form. Any alternate format must include the full Project Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying, performing, copying or distributing any Project Gutenberg™ works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing access to or distributing Project Gutenberg™ electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive from the use of Project Gutenberg™ works calculated using the method you already use to calculate your applicable taxes. The fee is owed to the owner of the Project Gutenberg™ trademark, but he has agreed to donate royalties under this paragraph to the Project Gutenberg Literary Archive Foundation. Royalty payments must be paid within 60 days following each date on which you prepare (or are legally required to prepare) your periodic tax returns. Royalty payments should be clearly marked as such and sent to the Project Gutenberg Literary Archive Foundation at the address specified in Section 4, “Information about donations to the Project Gutenberg Literary Archive Foundation.”

• You provide a full refund of any money paid by a user who notifies you in writing (or by e-mail) within 30 days of receipt that s/he does not agree to the terms of the full Project Gutenberg™ License. You must require such a user to return or destroy all

copies of the works possessed in a physical medium and discontinue all use of and all access to other copies of Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of any money paid for a work or a replacement copy, if a defect in the electronic work is discovered and reported to you within 90 days of receipt of the work.

• You comply with all other terms of this agreement for free distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™ electronic work or group of works on different terms than are set forth in this agreement, you must obtain permission in writing from the Project Gutenberg Literary Archive Foundation, the manager of the Project Gutenberg™ trademark. Contact the Foundation as set forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend considerable effort to identify, do copyright research on, transcribe and proofread works not protected by U.S. copyright law in creating the Project Gutenberg™ collection. Despite these efforts, Project Gutenberg™ electronic works, and the medium on which they may be stored, may contain “Defects,” such as, but not limited to, incomplete, inaccurate or corrupt data, transcription errors, a copyright or other intellectual property infringement, a defective or damaged disk or other medium, a computer virus, or computer codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for the “Right of Replacement or Refund” described in paragraph 1.F.3, the Project Gutenberg Literary Archive Foundation, the owner of the Project Gutenberg™ trademark, and any other party distributing a Project Gutenberg™ electronic work under this agreement, disclaim all liability to you for damages, costs and

expenses, including legal fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you discover a defect in this electronic work within 90 days of receiving it, you can receive a refund of the money (if any) you paid for it by sending a written explanation to the person you received the work from. If you received the work on a physical medium, you must return the medium with your written explanation. The person or entity that provided you with the defective work may elect to provide a replacement copy in lieu of a refund. If you received the work electronically, the person or entity providing it to you may choose to give you a second opportunity to receive the work electronically in lieu of a refund. If the second copy is also defective, you may demand a refund in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied warranties or the exclusion or limitation of certain types of damages. If any disclaimer or limitation set forth in this agreement violates the law of the state applicable to this agreement, the agreement shall be interpreted to make the maximum disclaimer or limitation permitted by the applicable state law. The invalidity or unenforceability of any provision of this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation, the trademark owner, any agent or employee of the Foundation, anyone providing copies of Project Gutenberg™ electronic works in accordance with this agreement, and any volunteers associated with the production, promotion and distribution of Project Gutenberg™ electronic works, harmless from all liability, costs and expenses, including legal fees, that arise directly or indirectly from any of the following which you do or cause to occur: (a) distribution of this or any Project Gutenberg™ work, (b) alteration, modification, or additions or deletions to any Project Gutenberg™ work, and (c) any Defect you cause.

Section 2. Information about the Mission of Project Gutenberg™

Project Gutenberg™ is synonymous with the free distribution of electronic works in formats readable by the widest variety of computers including obsolete, old, middle-aged and new computers. It exists because of the efforts of hundreds of volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the assistance they need are critical to reaching Project Gutenberg™’s goals and ensuring that the Project Gutenberg™ collection will remain freely available for generations to come. In 2001, the Project Gutenberg Literary Archive Foundation was created to provide a secure and permanent future for Project Gutenberg™ and future generations. To learn more about the Project Gutenberg Literary Archive Foundation and how your efforts and donations can help, see Sections 3 and 4 and the Foundation information page at www.gutenberg.org.

Section 3. Information about the Project Gutenberg Literary Archive Foundation

The Project Gutenberg Literary Archive Foundation is a non-profit 501(c)(3) educational corporation organized under the laws of the state of Mississippi and granted tax exempt status by the Internal Revenue Service. The Foundation’s EIN or federal tax identification number is 64-6221541. Contributions to the Project Gutenberg Literary Archive Foundation are tax deductible to the full extent permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West, Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up to date contact information can be found at the Foundation’s website and official page at www.gutenberg.org/contact

Section 4. Information about Donations to the Project Gutenberg Literary Archive Foundation

Project Gutenberg™ depends upon and cannot survive without widespread public support and donations to carry out its mission of increasing the number of public domain and licensed works that can be freely distributed in machine-readable form accessible by the widest array of equipment including outdated equipment. Many small donations ($1 to $5,000) are particularly important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws regulating charities and charitable donations in all 50 states of the United States. Compliance requirements are not uniform and it takes a considerable effort, much paperwork and many fees to meet and keep up with these requirements. We do not solicit donations in locations where we have not received written confirmation of compliance. To SEND DONATIONS or determine the status of compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where we have not met the solicitation requirements, we know of no

prohibition against accepting unsolicited donations from donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make any statements concerning tax treatment of donations received from outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation methods and addresses. Donations are accepted in a number of other ways including checks, online payments and credit card donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About Project Gutenberg™ electronic works

Professor Michael S. Hart was the originator of the Project Gutenberg™ concept of a library of electronic works that could be freely shared with anyone. For forty years, he produced and distributed Project Gutenberg™ eBooks with only a loose network of volunteer support.

Project Gutenberg™ eBooks are often created from several printed editions, all of which are confirmed as not protected by copyright in the U.S. unless a copyright notice is included. Thus, we do not necessarily keep eBooks in compliance with any particular paper edition.

Most people start at our website which has the main PG search facility: www.gutenberg.org.

This website includes information about Project Gutenberg™, including how to make donations to the Project Gutenberg Literary Archive Foundation, how to help produce our new eBooks, and how to subscribe to our email newsletter to hear about new eBooks.

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.