Altair Cheat Sheet Python: Data Visualization Reference

Altair Cheat Sheet Python

01 Build a chart


1. Import + general pattern

import altair as alt
chart = (
    alt.Chart(data).mark_…()
    .encode(x=…, y=…, color=…)
    .transform_…(…).properties(…)
    .interactive()
)

2. Choose a chart type

mark_bar   bars / aggregated comparison
mark_line   trends over an ordered axis
mark_circle   scatter plots
mark_area   filled trends / totals
mark_rect   heat maps
mark_arc   pie or donut charts
mark_boxplot   distribution summaries
mark_geoshape

Read More

Essential Computer Science & Information Technology Handbook

Computer Systems and Software Basics

1. A computer is an electronic machine that can store, process, and display data. It helps in performing different tasks like calculations, writing, and browsing.

2. System software is a type of software that helps the computer work properly. It controls and manages the hardware and basic functions, like the operating system.

3. Application software is a program designed to help users perform specific tasks, like writing documents, playing games, or editing photos.

Read More

International Labour Standards: The Foundation of Decent Work

The Role of International Labour Standards

In 1919, the nations that signed the Treaty of Versailles created the International Labour Organization (ILO) because poor working conditions, injustice, and hardship threatened peace and social stability. To address this, the ILO created international labour standards through Conventions and Recommendations developed by governments, employers, and workers.

The ILO’s founders understood that the global economy needed clear rules so that economic progress

Read More

Thermal Power Plant Draught and Coal Handling Systems

1. Explanation of Draught System

Draught System in Thermal Power Plant:

  • Draught is the pressure difference that causes the flow of air into the furnace and flue gases out of the boiler.
  • Its main purpose is to supply sufficient oxygen for proper combustion of fuel and remove the resulting flue gases.
  • Natural Draught: It is produced by a tall chimney due to the difference in density between hot flue gases and outside air.
  • Forced Draught: A forced-draught (FD) fan forces fresh air into the furnace under
Read More

Controlled Release Drug Delivery Systems and Design

Approaches to Design Controlled Release Formulations

These are the methods or processes by which we design Controlled Release Drug Delivery Systems (CRDDS):

  • 1. Diffusion-controlled release
  • 2. Dissolution-controlled release
  • 3. Ion-exchange controlled release

1) Diffusion-Controlled Release System

Diffusion is the process of movement of drug molecules from a higher concentration to a lower concentration during absorption. For CRDDS, we can control the diffusion process by using polymers. Before polymer

Read More

Hospital Pharmacy Management and Clinical Practice

Classification and Organization of Hospitals

Hospitals are classified based on clinical specialization, ownership, bed strength, and level of care.

Clinical Basis

  • Medicine: Internal medicine, pediatrics, dermatology, psychiatry, cardiology.
  • Surgery: General surgery, orthopedics, neurosurgery, ophthalmology, ENT.
  • Maternity & Gynecology: Specialized in obstetrics and women’s health.
  • Specialty/Disease-Specific: Tuberculosis, oncology, and psychiatric care.

Non-Clinical Basis (Ownership and Control)

  • Government/
Read More

Geography Study Notes: Water, Agriculture, and Resources

Water Pollution and Conservation in India

1. Causes of Water Pollution and Conservation Measures

Water pollution is the contamination of water by harmful substances, rendering it unfit for human use and aquatic life.

Reasons for Water Pollution

  • Domestic sewage: Untreated wastewater discharged into rivers and lakes.
  • Industrial waste: Chemicals and toxic substances from factories.
  • Agricultural runoff: Fertilisers and pesticides entering water bodies.
  • Religious and cultural activities: Waste deposited in
Read More

Comprehensive Machine Learning Algorithms Tutorial

Linear Regression and Working Principle

Linear Regression is a supervised learning algorithm used to predict a continuous dependent variable from one or more independent variables.

For Simple Linear Regression, the relationship between x and y is represented by:

where:

  • y = predicted value
  • x = input feature
  • b0 = intercept
  • b1 = slope

Calculation of Slope

Intercept

Therefore, the regression equation becomes:

Working

  1. Collect training data.
  2. Assume a linear relationship between input and output.
  3. Calculate the regression
Read More

Pros and Cons of Wildlife Tourism, Zoos, and Money

Traveling to Exotic Places: Pros and Cons

Nowadays, more and more people decide to travel to exotic countries to watch wild animals in their natural environment. This form of holiday is becoming very popular worldwide. It has many advantages, but it also has some disadvantages.

The Benefits of Wildlife Tourism

  • Educational Value: Seeing beautiful animals live, rather than on television or in a zoo, is an amazing adventure.
  • Economic Impact: Exotic tourism provides jobs for local people and brings money
Read More

Indian Constitutional Law and Legal System Fundamentals

Powers and Functions of the President of India

Weightage: 7.5 Marks

The President of India is the constitutional head of the Union Executive. The executive power of the Union is vested in the President, who exercises it according to the Constitution.

1. Executive Powers

  • The President appoints the Prime Minister.
  • Other ministers are appointed by the President on the advice of the Prime Minister.
  • The President appoints important constitutional authorities such as the Attorney General, Governors, and the
Read More