I will present work on a detailed, data-driven, spiking network model of a piece of the brain. The model covers a small region of the macaque's primary visual cortex (V1) and reproduces a number of its known properties simultaneously, including orientation selectivity and pinwheels, gamma rhythm, simple/complex cells, contrast response, and a high diversity of response statistics. Neurons in the network react to visual stimulation via feedforward inputs relaying information from the eyes, but interestingly the vast majority of input to V1 neurons comes from connections to other nearby neurons in the cortex. When the network is visually driven, the recurrent connectivity within the cortex, in particular between the excitatory and inhibitory subpopulations, produces a gamma rhythm, which consists of coordinated clusters of spikes with a high degree of variability in their sizes and interevent times. It is in this environment that the responses of neurons to visual input from the world are shaped. Experimental data from V1 in the literature has guided the construction of the model. This is joint work with Lai-Sang Young, Robert Shapley, and Michael Hawken.